Browse Source

抢维修修改

yuanck 3 years ago
parent
commit
13d9a31b77

+ 5 - 5
app/build.gradle

@@ -15,8 +15,8 @@ android {
         applicationId "com.tofly.tyuan"
         minSdkVersion MIN_SDK_VERSION
         targetSdkVersion TARGET_SDK_VERSION as int
-        versionCode 5
-        versionName "1.0.16"
+        versionCode 20
+        versionName "2.0"
         flavorDimensions "versionCode"
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         dataBinding.enabled = true
@@ -57,12 +57,12 @@ android {
             def outputFile = output.outputFile
             if (outputFile != null && outputFile.name.endsWith('.apk')) {
                 if (variant.buildType.name.equals('release')) {
-                    outputFileName = "tyuan_route_${variant.productFlavors[0].name}-${defaultConfig.versionCode}-${defaultConfig.versionName}.apk"
+                    outputFileName = "tyuan_route-${defaultConfig.versionName}.apk"
                 } else if (variant.buildType.name.equals('debug')) {
-                    outputFileName = "tyuan_route_${variant.productFlavors[0].name}-${defaultConfig.versionCode}-${defaultConfig.versionName}.apk"
+                    outputFileName = "tyuan_route-${defaultConfig.versionName}.apk"
                 }
             }
-            def fileName = "tyuan_route_${variant.buildType.name}-${variant.versionCode}-${variant.versionName}.apk"
+            def fileName = "tyuan_route-${variant.versionName}.apk"
             outputFileName = fileName
         }
     }

+ 41 - 0
app/src/main/java/com/tofly/route/bean/repair/GegeryBean.java

@@ -0,0 +1,41 @@
+package com.tofly.route.bean.repair;
+
+import java.util.List;
+
+/**
+ * @author ychk
+ * 几何点实体
+ */
+public class GegeryBean {
+    private Wkid spatialReference;
+    private List<List<List<Double>>> rings;
+
+    public Wkid getSpatialReference() {
+        return spatialReference;
+    }
+
+    public void setSpatialReference(Wkid spatialReference) {
+        this.spatialReference = spatialReference;
+    }
+
+    public List<List<List<Double>>> getRings() {
+        return rings;
+    }
+
+    public void setRings(List<List<List<Double>>> rings) {
+        this.rings = rings;
+    }
+
+    public static class Wkid {
+        private int wkid = 4490;
+
+        public int getWkid() {
+            return wkid;
+        }
+
+        public void setWkid(int wkid) {
+            this.wkid = wkid;
+        }
+    }
+
+}

+ 41 - 0
app/src/main/java/com/tofly/route/bean/repair/LayerBean.java

@@ -1,10 +1,51 @@
 package com.tofly.route.bean.repair;
 
+import java.util.List;
+
 /**
  * @author ychk
  * arcgis地图图片要素
  */
 public class LayerBean {
+    private Integer layerId;
+    private Attributs attributes;
+    private List<Featurs> features;
+
+    public void setLayerId(Integer layerId) {
+        this.layerId = layerId;
+    }
+
+    public Integer getLayerId() {
+        return layerId;
+    }
+
+    public Attributs getAttributes() {
+        return attributes;
+    }
+
+    public List<Featurs> getFeatures() {
+        return features;
+    }
+
+    public static class Attributs {
+
+        private String OBJECTID;
+        private String SID;
+
+        public String getOBJECTID() {
+            return OBJECTID;
+        }
+
+        public String getSID() {
+            return SID;
+        }
+    }
 
+    public static class Featurs {
+        private Attributs attributes;
 
+        public Attributs getAttributes() {
+            return attributes;
+        }
+    }
 }

File diff suppressed because it is too large
+ 55 - 15
app/src/main/java/com/tofly/route/ui/activity/UiRepairJobProcess.java


+ 5 - 1
app/src/main/java/com/tofly/route/ui/imp/RepairDispatchImpl.java

@@ -22,6 +22,7 @@ import com.tofly.tyuan.entity.messageEntity.DepartmentBean;
 import com.tofly.tyuan.ui.net.Api;
 import com.tofly.tyuan.utils.ToastUtil;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -33,8 +34,11 @@ public class RepairDispatchImpl extends LattePresenterImpl {
     @Override
     public void getResultOne(Context context, Map<String, Object> 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

+ 5 - 1
app/src/main/java/com/tofly/route/ui/imp/RepairFoundImpl.java

@@ -20,6 +20,7 @@ import com.tofly.tyuan.entity.messageEntity.DepartmentBean;
 import com.tofly.tyuan.ui.net.Api;
 import com.tofly.tyuan.utils.ToastUtil;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -30,8 +31,11 @@ public class RepairFoundImpl extends LattePresenterImpl {
     @Override
     public void getResultOne(Context context, Map<String, Object> 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

+ 49 - 4
app/src/main/java/com/tofly/route/ui/imp/RepairProcessImpl.java

@@ -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

+ 3 - 3
app/src/main/java/com/tofly/tyuan/entity/BaseHXJResponse.java

@@ -1,19 +1,19 @@
 package com.tofly.tyuan.entity;
 
 /**
+ * @param <T>
  * @author ychk
  * 省心局基础数据
- * @param <T>
  */
 public class BaseHXJResponse<T> {
     private String code;
     private String count;
     private T data;
     private String message;
-    private T Results;
+    private T results;
 
     public T getResults() {
-        return Results;
+        return results;
     }
 
     public String getCode() {

+ 5 - 1
app/src/main/java/com/tofly/tyuan/ui/activity/AbnormalActivity.java

@@ -657,6 +657,7 @@ public class AbnormalActivity extends TakePhotoActivity {
             if (!TextUtils.isEmpty(allLcjd) && bmId != null) {
                 Map<String, Object> map = new ArrayMap<>();
                 map.put("departmentId", bmId);
+                boolean isSeven = true;
                 if (allLcjd.contains("2")) {
                     map.put("ids", "2002");
                 } else if (allLcjd.contains("3")) {
@@ -667,8 +668,11 @@ public class AbnormalActivity extends TakePhotoActivity {
                     map.put("ids", "2005");
                 } else if (allLcjd.contains("6")) {
                     map.put("ids", "4097");
+                } else {
+                    isSeven = false;
                 }
-                mPresenter.getResultSeven(this, map);
+                if (isSeven)
+                    mPresenter.getResultSeven(this, map);
             }
             mPresenter.getResultFive(this, null);
         }

+ 6 - 2
app/src/main/java/com/tofly/tyuan/ui/activity/RepairInputActivity.java

@@ -576,8 +576,9 @@ public class RepairInputActivity extends TakePhotoActivity {
             spinnerDepartment.setEnabled(false);
             bmId = gdlcBean.getSsbm();
             if (!TextUtils.isEmpty(allLcjd) && bmId != null) {
-                Map<String, Object> map = new ArrayMap<>();
+                Map<String, Object> map = new HashMap<>();
                 map.put("departmentId", bmId);
+                boolean isSeven = true;
                 if (allLcjd.contains("2")) {
                     map.put("ids", "2002");
                 } else if (allLcjd.contains("3")) {
@@ -588,8 +589,11 @@ public class RepairInputActivity extends TakePhotoActivity {
                     map.put("ids", "2005");
                 } else if (allLcjd.contains("6")) {
                     map.put("ids", "4097");
+                } else {
+                    isSeven = false;
                 }
-                mPresenter.getResultSeven(RepairInputActivity.this, map);
+                if (isSeven)
+                    mPresenter.getResultSeven(RepairInputActivity.this, map);
             }
             mPresenter.getResultFive(this, null);
         }

+ 4 - 1
app/src/main/java/com/tofly/tyuan/ui/imp/AbnormalImpl.java

@@ -239,8 +239,11 @@ public class AbnormalImpl extends LattePresenterImpl {
     public void getResultEight(Context context, Map<String, Object> map) {
         super.getResultEight(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

+ 4 - 1
app/src/main/java/com/tofly/tyuan/ui/imp/RepairInputImpl.java

@@ -238,8 +238,11 @@ public class RepairInputImpl extends LattePresenterImpl {
     public void getResultEight(Context context, Map<String, Object> map) {
         super.getResultEight(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

+ 4 - 1
app/src/main/java/com/tofly/tyuan/ui/imp/RepairLcrzImpl.java

@@ -154,8 +154,11 @@ public class RepairLcrzImpl extends LattePresenterImpl {
     public void getResultFive(Context context, Map<String, Object> map) {
         super.getResultFive(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

+ 4 - 1
app/src/main/java/com/tofly/tyuan/ui/imp/RepairgdshImpl.java

@@ -210,8 +210,11 @@ public class RepairgdshImpl extends LattePresenterImpl {
     public void getResultEight(Context context, Map<String, Object> map) {
         super.getResultEight(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

+ 4 - 1
app/src/main/java/com/tofly/tyuan/ui/imp/RepairgdzjImpl.java

@@ -242,8 +242,11 @@ public class RepairgdzjImpl extends LattePresenterImpl {
     public void getResultNine(Context context, Map<String, Object> map) {
         super.getResultNine(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

+ 4 - 1
app/src/main/java/com/tofly/tyuan/ui/imp/RepairjgczImap.java

@@ -242,8 +242,11 @@ public class RepairjgczImap extends LattePresenterImpl {
     public void getResultEight(Context context, Map<String, Object> map) {
         super.getResultEight(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

+ 4 - 1
app/src/main/java/com/tofly/tyuan/ui/imp/YwgdJgshImpl.java

@@ -300,8 +300,11 @@ public class YwgdJgshImpl extends LattePresenterImpl {
     public void getResultEleven(Context context, Map<String, Object> map) {
         super.getResultEleven(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

+ 10 - 5
app/src/main/java/com/tofly/tyuan/ui/net/Api.java

@@ -8,6 +8,7 @@ import com.tofly.route.bean.builds.PeriodBean;
 import com.tofly.route.bean.builds.BuildEntity;
 import com.tofly.route.bean.builds.BuildInfo;
 import com.tofly.route.bean.builds.BuildTypeBean;
+import com.tofly.route.bean.repair.LayerBean;
 import com.tofly.route.bean.repair.MaterialTypeBean;
 import com.tofly.route.bean.repair.RepairBean;
 import com.tofly.route.bean.repair.RepairTypeBean;
@@ -212,7 +213,7 @@ public interface Api {
 
     //抢维修类型
     @GET("/gps/repairtype/page")
-    Observable<BaseResponse<PageInfo<RepairTypeBean, OrdersEntity>>> getRepairType();
+    Observable<BaseResponse<PageInfo<RepairTypeBean, OrdersEntity>>> getRepairType(@QueryMap Map<String, Object> map);
 
     //抢维修工单上报
     @Multipart
@@ -265,7 +266,7 @@ public interface Api {
 
     //待办事项分类统计
     @GET("/gis/homeInformation/getTypeDistributionInfo")
-    Observable<BaseResponse<List<TaskBean>>> getTaskTypeList(@QueryMap Map<String,Object> map);
+    Observable<BaseResponse<List<TaskBean>>> getTaskTypeList(@QueryMap Map<String, Object> map);
 
     //获取当前用户下,部门和巡检组信息
     @GET("/gps/groupuser/getGroupUserMap")
@@ -562,15 +563,19 @@ public interface Api {
     //转入抢维修
     @FormUrlEncoded
     @POST("/mis/gdglinfo/qwxPlaceOrder")
-    Observable<BaseResponse> subYwgdRepair(@FieldMap Map<String,Object> map);
+    Observable<BaseResponse> subYwgdRepair(@FieldMap Map<String, Object> map);
 
     //业务工单抢维修驳回记录
     @GET("/mis/gdglinfo/gdGdQWXInfo")
-    Observable<BaseResponse<List<RepairVo>>> getYwgdRepair(@QueryMap Map<String,Object> map);
+    Observable<BaseResponse<List<RepairVo>>> getYwgdRepair(@QueryMap Map<String, Object> map);
 
     //查询要素
     @FormUrlEncoded
     @POST("identify")
-    Observable<BaseHXJResponse> queryDeviceList(@FieldMap Map<String,Object> map);
+    Observable<BaseHXJResponse<List<LayerBean>>> queryDeviceList(@FieldMap Map<String, Object> map);
+
+    //查询要素英文
+    @GET("{identify}/query")
+    Observable<LayerBean> queryDeviceLists(@Path("identify") Integer id, @QueryMap Map<String, Object> map);
 
 }

+ 1 - 2
app/src/main/res/layout/layout_repair_process_report_module.xml

@@ -190,7 +190,6 @@
                             android:id="@+id/tv_query"
                             style="@style/PointRepair.Content.EditText1"
                             android:text="自动获取"
-                            android:visibility="invisible"
                             android:textColor="@color/blue" />
 
                     </LinearLayout>
@@ -235,7 +234,7 @@
                         <TextView
                             android:id="@+id/et_device_number"
                             style="@style/PointRepair.Content.EditText1"
-                            android:hint="请选择维修设备" />
+                            android:hint="请选择设备" />
                     </LinearLayout>
                 </LinearLayout>