|
@@ -16,6 +16,7 @@ import com.tofly.latte_core.net.observer.BaseObserver;
|
|
|
import com.tofly.latte_core.net.observer.MyObserver;
|
|
|
import com.tofly.route.base.api.MapServerApi;
|
|
|
import com.tofly.route.bean.builds.BuildGlPlanBean;
|
|
|
+import com.tofly.route.bean.repair.LayerBean;
|
|
|
import com.tofly.route.bean.repair.MaterialBean;
|
|
|
import com.tofly.route.bean.repair.RepairTypeBean;
|
|
|
import com.tofly.route.bean.repair.RepairVo;
|
|
@@ -265,8 +266,11 @@ public class RepairProcessImpl extends LattePresenterImpl {
|
|
|
public void getResultSeven(Context context, Map<String, Object> map) {
|
|
|
super.getResultSeven(context, map);
|
|
|
if (isViewAttached()) {
|
|
|
+ map=new HashMap<>();
|
|
|
+ map.put("current", 1);
|
|
|
+ map.put("size", 1000);
|
|
|
LatteNetWorkApi.getApiService(Api.class)
|
|
|
- .getRepairType()
|
|
|
+ .getRepairType(map)
|
|
|
.compose(RxHelper.observableIO2Main(Latte.getApplicationContext()))
|
|
|
.subscribe(new BaseObserver<BaseResponse<PageInfo<RepairTypeBean, OrdersEntity>>>() {
|
|
|
@Override
|
|
@@ -323,11 +327,52 @@ public class RepairProcessImpl extends LattePresenterImpl {
|
|
|
MapServerApi.getApiService(Api.class)
|
|
|
.queryDeviceList(map)
|
|
|
.compose(RxHelper.observableIO2Main(context))
|
|
|
- .subscribe(new BaseObserver<BaseHXJResponse>() {
|
|
|
+ .subscribe(new BaseObserver<BaseHXJResponse<List<LayerBean>>>() {
|
|
|
@Override
|
|
|
- public void onSuccess(BaseHXJResponse demo) {
|
|
|
+ public void onSuccess(BaseHXJResponse<List<LayerBean>> demo) {
|
|
|
if (isViewAttached())
|
|
|
- getView().getResultNine(demo);
|
|
|
+ if (demo.getResults() != null && demo.getResults().size() > 0) {
|
|
|
+ Integer layerId = demo.getResults().get(0).getLayerId();
|
|
|
+ String objectIds = demo.getResults().get(0).getAttributes().getOBJECTID();
|
|
|
+ Map<String, Object> map1 = new HashMap<>();
|
|
|
+ map1.put("objectIds", objectIds);
|
|
|
+ map1.put("geometryType", "esriGeometryEnvelope");
|
|
|
+ map1.put("returnGeometry", false);
|
|
|
+ map1.put("returnTrueCurves", false);
|
|
|
+ map1.put("returnIdsOnly", false);
|
|
|
+ map1.put("returnCountOnly", false);
|
|
|
+ map1.put("returnZ", false);
|
|
|
+ map1.put("returnM", false);
|
|
|
+ map1.put("returnDistinctValues", false);
|
|
|
+ map1.put("f", "pjson");
|
|
|
+ if (layerId != null) {
|
|
|
+ MapServerApi.getApiService(Api.class)
|
|
|
+ .queryDeviceLists(layerId, map1)
|
|
|
+ .compose(RxHelper.observableIO2Main(context))
|
|
|
+ .subscribe(new BaseObserver<LayerBean>() {
|
|
|
+ @Override
|
|
|
+ public void onSuccess(LayerBean demo) {
|
|
|
+ if (isViewAttached()) {
|
|
|
+ if (demo != null) {
|
|
|
+ demo.setLayerId(layerId);
|
|
|
+ getView().getResultNine(demo);
|
|
|
+ } else {
|
|
|
+ ToastUtil.showToast("未查询到设备");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onFailure(Throwable e, String errorMsg) {
|
|
|
+ ToastUtil.showToast(errorMsg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ ToastUtil.showToast("未查询到设备");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ ToastUtil.showToast("未查询到设备");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|