|
@@ -56,9 +56,13 @@ public class GraphyVM extends BaseViewModel {
|
|
|
public static final String GET_QECODE = "GET_QECODE";
|
|
|
//设置空间的任务状态(新建和修改)
|
|
|
public static final String SET_JOB = "SET_JOB";
|
|
|
+ private String buildingId;
|
|
|
+ private String floorId;
|
|
|
|
|
|
- public GraphyVM(BaseViewModelInterface object, BaseActivity activity) {
|
|
|
+ public GraphyVM(BaseViewModelInterface object, BaseActivity activity, String buildingId, String floorId) {
|
|
|
super(object, activity);
|
|
|
+ this.buildingId = buildingId;
|
|
|
+ this.floorId = floorId;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -66,8 +70,8 @@ public class GraphyVM extends BaseViewModel {
|
|
|
*/
|
|
|
public void getSpaceJob() {
|
|
|
ReqSpaceJob bean = new ReqSpaceJob();
|
|
|
- bean.buildingId = "Bd00022200113a69205aebc34aba87b31a2a03a572ab";
|
|
|
- bean.floorId = "Fl00022200115d43d88abaab46cda43f1596b5e3930b";
|
|
|
+ bean.buildingId = buildingId;
|
|
|
+ bean.floorId = floorId;
|
|
|
bean.jobStatus.add("01");
|
|
|
bean.jobStatus.add("02");
|
|
|
Observable<BaseModel<List<SpaceJobModel>>> observable = RetrofitFactory.getInstance().getSpaceJob(getRequestBody(bean));
|
|
@@ -89,7 +93,7 @@ public class GraphyVM extends BaseViewModel {
|
|
|
public void addProblem(TunableSpaceItem choseSpace, float x, float y) {
|
|
|
ReqAddProblem bean = new ReqAddProblem();
|
|
|
bean.spaceId = choseSpace.getData().getId();
|
|
|
- bean.floorId = "Fl00022200115d43d88abaab46cda43f1596b5e3930b";
|
|
|
+ bean.floorId = floorId;
|
|
|
Position position = new Position();
|
|
|
position.x = x + "";
|
|
|
position.y = y + "";
|
|
@@ -110,7 +114,7 @@ public class GraphyVM extends BaseViewModel {
|
|
|
*/
|
|
|
public void getProblem(@Nullable TunableSpaceItem choseSpace) {
|
|
|
ReqProblems bean = new ReqProblems();
|
|
|
- bean.floorId = "Fl00022200115d43d88abaab46cda43f1596b5e3930b";
|
|
|
+ bean.floorId = floorId;
|
|
|
bean.spaceId = choseSpace.getData().getId();
|
|
|
Observable<BaseModel<List<ProblemsModel>>> observable = RetrofitFactory.getInstance().problems(getRequestBody(bean));
|
|
|
sendRequest(observable, new BaseObserver<List<ProblemsModel>>(mActivity, this) {
|
|
@@ -189,13 +193,14 @@ public class GraphyVM extends BaseViewModel {
|
|
|
|
|
|
/**
|
|
|
* 设置空间的任务状态(新建和修改)
|
|
|
+ *
|
|
|
* @param choseSpace 选中的空间
|
|
|
- * @param toString 数字化交付编码
|
|
|
+ * @param toString 数字化交付编码
|
|
|
*/
|
|
|
public void setJob(@Nullable TunableSpaceItem choseSpace, @NotNull String toString) {
|
|
|
ReqSetJob bean = new ReqSetJob();
|
|
|
- bean.buildingId = "Bd00022200113a69205aebc34aba87b31a2a03a572ab";
|
|
|
- bean.floorId = "Fl00022200115d43d88abaab46cda43f1596b5e3930b";
|
|
|
+ bean.buildingId = buildingId;
|
|
|
+ bean.floorId = floorId;
|
|
|
bean.spaceId.add(choseSpace.getData().getId());
|
|
|
bean.jobStatus = "03";
|
|
|
bean.spaceCode = toString;
|