Browse Source

修改整改数据

ychk 3 months ago
parent
commit
b533df8df9

+ 424 - 84
app/src/main/java/com/tofly/yxpc/entity/DataCorrectionBean.java

@@ -4,8 +4,8 @@ import java.io.Serializable;
 
 public class DataCorrectionBean implements Serializable {
 
-    private int idCus;
-    private Long id;
+    private long id;
+    private String batch;
     /**
      * 用户编号
      */
@@ -16,29 +16,28 @@ public class DataCorrectionBean implements Serializable {
      */
     private String waterMeterNum;
     private String waterMeterCaliber;
+    private String waterMeterCaliberText;
     private String useWaterProperties;
+    private String useWaterPropertiesText;
     /**
      * 表册号
      */
     private String qbNum;
     private String userAddr;
     private String createTime;
+    private String createUser;
     private String longitude;
     private String latitude;
     private String internetIdCard;
+    private String installPosition;
+    private Long taskId;
     private String brand;
+    private String brandText;
     private String installTime;
     private String type;
-
+    private String typeText;
+    private String isDeleted;
     private String recentMark;
-    /**
-     * 抄表月份
-     */
-    private String checkUser;
-    private String bpFilePath;
-    private String expFilePath;
-    private String exceptionTypeText;
-    private String exceptionDescribe;
     /**
      * 备注
      */
@@ -55,26 +54,33 @@ public class DataCorrectionBean implements Serializable {
      * 水表量程
      */
     private String waterMeterRange;
+    private String waterMeterRangeText;
+    private String userState;
     /**
      * 行政区
      */
     private String regionName;
+    private String regionCode;
     /**
      * 门牌号
      */
     private String houseNumber;
-    /**
-     * 地图地址信息
-     */
-    private String mapLocation;
-    /**
-     * 上次最近止码
-     */
-    private String recentMarkOld;
+    private String inspectUser;
+    private String inspectUserText;
+    private String inspectTime;
+    private String inspectResult;
+    private String inspectResultText;
+    private String exceptionType;
+    private String exceptionTypeText;
+    private String exceptionDescribe;
+    private String bpFilePath;
     /**
      * 表盘周边
      */
     private String bpaFilePath;
+    private String expFilePath;
+    private String qtResult;
+    private String qtUser;
     /**
      * 复核人员
      */
@@ -83,33 +89,63 @@ public class DataCorrectionBean implements Serializable {
      * 复核时间
      */
     private String qtTime;
+    private String qtRemark;
+    private Integer dataSort;
+    private String bpFileName;
+    private String expFileName;
+    /**
+     * 地图地址信息
+     */
+    private String mapLocation;
+    private String cbMonth;
+    private String currentPeriodMark;
     /**
      * 复核结果
      */
     private String reviewResult;
+    private String correctionStatus;
+    private String correctionDescribe;
+    private String correctionUser;
+    private String correctionTime;
     /**
      * 复核说明
      */
     private String reviewRemark;
+    private int idCus;
+    private String qbhs;
+    private Integer current;
+    private Integer size;
+    private String keyword;
+    private String keyword2;
+    private String rules;
+    private String startTime;
+    private String endTime;
+    private String field;
+    private String order;
+    /**
+     * 抄表月份
+     */
+    private String checkUser;
+    /**
+     * 上次最近止码
+     */
+    private String recentMarkOld;
     private String qtType;
-    private String inspectUser;
-    private String inspectUserText;
-    private String inspectTime;
 
-    public Long getId() {
+    public long getId() {
         return id;
     }
 
-    public void setId(Long id) {
+    public void setId(long id) {
         this.id = id;
     }
 
-    public int getIdCus() {
-        return idCus;
+    public String getBatch() {
+        return batch;
     }
 
-    public void setIdCus(int idCus) {
-        this.idCus = idCus;
+    public void setBatch(String batch) {
+        this.batch = batch;
     }
 
     public String getUserNum() {
@@ -144,6 +180,14 @@ public class DataCorrectionBean implements Serializable {
         this.waterMeterCaliber = waterMeterCaliber;
     }
 
+    public String getWaterMeterCaliberText() {
+        return waterMeterCaliberText;
+    }
+
+    public void setWaterMeterCaliberText(String waterMeterCaliberText) {
+        this.waterMeterCaliberText = waterMeterCaliberText;
+    }
+
     public String getUseWaterProperties() {
         return useWaterProperties;
     }
@@ -152,6 +196,14 @@ public class DataCorrectionBean implements Serializable {
         this.useWaterProperties = useWaterProperties;
     }
 
+    public String getUseWaterPropertiesText() {
+        return useWaterPropertiesText;
+    }
+
+    public void setUseWaterPropertiesText(String useWaterPropertiesText) {
+        this.useWaterPropertiesText = useWaterPropertiesText;
+    }
+
     public String getQbNum() {
         return qbNum;
     }
@@ -176,6 +228,14 @@ public class DataCorrectionBean implements Serializable {
         this.createTime = createTime;
     }
 
+    public String getCreateUser() {
+        return createUser;
+    }
+
+    public void setCreateUser(String createUser) {
+        this.createUser = createUser;
+    }
+
     public String getLongitude() {
         return longitude;
     }
@@ -200,76 +260,76 @@ public class DataCorrectionBean implements Serializable {
         this.internetIdCard = internetIdCard;
     }
 
-    public String getBrand() {
-        return brand;
+    public String getInstallPosition() {
+        return installPosition;
     }
 
-    public void setBrand(String brand) {
-        this.brand = brand;
+    public void setInstallPosition(String installPosition) {
+        this.installPosition = installPosition;
     }
 
-    public String getInstallTime() {
-        return installTime;
+    public Long getTaskId() {
+        return taskId;
     }
 
-    public void setInstallTime(String installTime) {
-        this.installTime = installTime;
+    public void setTaskId(Long taskId) {
+        this.taskId = taskId;
     }
 
-    public String getType() {
-        return type;
+    public String getBrand() {
+        return brand;
     }
 
-    public void setType(String type) {
-        this.type = type;
+    public void setBrand(String brand) {
+        this.brand = brand;
     }
 
-    public String getRecentMark() {
-        return recentMark;
+    public String getBrandText() {
+        return brandText;
     }
 
-    public void setRecentMark(String recentMark) {
-        this.recentMark = recentMark;
+    public void setBrandText(String brandText) {
+        this.brandText = brandText;
     }
 
-    public String getCheckUser() {
-        return checkUser;
+    public String getInstallTime() {
+        return installTime;
     }
 
-    public void setCheckUser(String checkUser) {
-        this.checkUser = checkUser;
+    public void setInstallTime(String installTime) {
+        this.installTime = installTime;
     }
 
-    public String getBpFilePath() {
-        return bpFilePath;
+    public String getType() {
+        return type;
     }
 
-    public void setBpFilePath(String bpFilePath) {
-        this.bpFilePath = bpFilePath;
+    public void setType(String type) {
+        this.type = type;
     }
 
-    public String getExpFilePath() {
-        return expFilePath;
+    public String getTypeText() {
+        return typeText;
     }
 
-    public void setExpFilePath(String expFilePath) {
-        this.expFilePath = expFilePath;
+    public void setTypeText(String typeText) {
+        this.typeText = typeText;
     }
 
-    public String getExceptionTypeText() {
-        return exceptionTypeText;
+    public String getIsDeleted() {
+        return isDeleted;
     }
 
-    public void setExceptionTypeText(String exceptionTypeText) {
-        this.exceptionTypeText = exceptionTypeText;
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
     }
 
-    public String getExceptionDescribe() {
-        return exceptionDescribe;
+    public String getRecentMark() {
+        return recentMark;
     }
 
-    public void setExceptionDescribe(String exceptionDescribe) {
-        this.exceptionDescribe = exceptionDescribe;
+    public void setRecentMark(String recentMark) {
+        this.recentMark = recentMark;
     }
 
     public String getAddressDetails() {
@@ -304,6 +364,22 @@ public class DataCorrectionBean implements Serializable {
         this.waterMeterRange = waterMeterRange;
     }
 
+    public String getWaterMeterRangeText() {
+        return waterMeterRangeText;
+    }
+
+    public void setWaterMeterRangeText(String waterMeterRangeText) {
+        this.waterMeterRangeText = waterMeterRangeText;
+    }
+
+    public String getUserState() {
+        return userState;
+    }
+
+    public void setUserState(String userState) {
+        this.userState = userState;
+    }
+
     public String getRegionName() {
         return regionName;
     }
@@ -312,6 +388,14 @@ public class DataCorrectionBean implements Serializable {
         this.regionName = regionName;
     }
 
+    public String getRegionCode() {
+        return regionCode;
+    }
+
+    public void setRegionCode(String regionCode) {
+        this.regionCode = regionCode;
+    }
+
     public String getHouseNumber() {
         return houseNumber;
     }
@@ -320,12 +404,76 @@ public class DataCorrectionBean implements Serializable {
         this.houseNumber = houseNumber;
     }
 
-    public String getRecentMarkOld() {
-        return recentMarkOld;
+    public String getInspectUser() {
+        return inspectUser;
     }
 
-    public void setRecentMarkOld(String recentMarkOld) {
-        this.recentMarkOld = recentMarkOld;
+    public void setInspectUser(String inspectUser) {
+        this.inspectUser = inspectUser;
+    }
+
+    public String getInspectUserText() {
+        return inspectUserText;
+    }
+
+    public void setInspectUserText(String inspectUserText) {
+        this.inspectUserText = inspectUserText;
+    }
+
+    public String getInspectTime() {
+        return inspectTime;
+    }
+
+    public void setInspectTime(String inspectTime) {
+        this.inspectTime = inspectTime;
+    }
+
+    public String getInspectResult() {
+        return inspectResult;
+    }
+
+    public void setInspectResult(String inspectResult) {
+        this.inspectResult = inspectResult;
+    }
+
+    public String getInspectResultText() {
+        return inspectResultText;
+    }
+
+    public void setInspectResultText(String inspectResultText) {
+        this.inspectResultText = inspectResultText;
+    }
+
+    public String getExceptionType() {
+        return exceptionType;
+    }
+
+    public void setExceptionType(String exceptionType) {
+        this.exceptionType = exceptionType;
+    }
+
+    public String getExceptionTypeText() {
+        return exceptionTypeText;
+    }
+
+    public void setExceptionTypeText(String exceptionTypeText) {
+        this.exceptionTypeText = exceptionTypeText;
+    }
+
+    public String getExceptionDescribe() {
+        return exceptionDescribe;
+    }
+
+    public void setExceptionDescribe(String exceptionDescribe) {
+        this.exceptionDescribe = exceptionDescribe;
+    }
+
+    public String getBpFilePath() {
+        return bpFilePath;
+    }
+
+    public void setBpFilePath(String bpFilePath) {
+        this.bpFilePath = bpFilePath;
     }
 
     public String getBpaFilePath() {
@@ -336,6 +484,30 @@ public class DataCorrectionBean implements Serializable {
         this.bpaFilePath = bpaFilePath;
     }
 
+    public String getExpFilePath() {
+        return expFilePath;
+    }
+
+    public void setExpFilePath(String expFilePath) {
+        this.expFilePath = expFilePath;
+    }
+
+    public String getQtResult() {
+        return qtResult;
+    }
+
+    public void setQtResult(String qtResult) {
+        this.qtResult = qtResult;
+    }
+
+    public String getQtUser() {
+        return qtUser;
+    }
+
+    public void setQtUser(String qtUser) {
+        this.qtUser = qtUser;
+    }
+
     public String getQtUserText() {
         return qtUserText;
     }
@@ -352,6 +524,62 @@ public class DataCorrectionBean implements Serializable {
         this.qtTime = qtTime;
     }
 
+    public String getQtRemark() {
+        return qtRemark;
+    }
+
+    public void setQtRemark(String qtRemark) {
+        this.qtRemark = qtRemark;
+    }
+
+    public Integer getDataSort() {
+        return dataSort;
+    }
+
+    public void setDataSort(Integer dataSort) {
+        this.dataSort = dataSort;
+    }
+
+    public String getBpFileName() {
+        return bpFileName;
+    }
+
+    public void setBpFileName(String bpFileName) {
+        this.bpFileName = bpFileName;
+    }
+
+    public String getExpFileName() {
+        return expFileName;
+    }
+
+    public void setExpFileName(String expFileName) {
+        this.expFileName = expFileName;
+    }
+
+    public String getMapLocation() {
+        return mapLocation;
+    }
+
+    public void setMapLocation(String mapLocation) {
+        this.mapLocation = mapLocation;
+    }
+
+    public String getCbMonth() {
+        return cbMonth;
+    }
+
+    public void setCbMonth(String cbMonth) {
+        this.cbMonth = cbMonth;
+    }
+
+    public String getCurrentPeriodMark() {
+        return currentPeriodMark;
+    }
+
+    public void setCurrentPeriodMark(String currentPeriodMark) {
+        this.currentPeriodMark = currentPeriodMark;
+    }
+
     public String getReviewResult() {
         return reviewResult;
     }
@@ -360,6 +588,38 @@ public class DataCorrectionBean implements Serializable {
         this.reviewResult = reviewResult;
     }
 
+    public String getCorrectionStatus() {
+        return correctionStatus;
+    }
+
+    public void setCorrectionStatus(String correctionStatus) {
+        this.correctionStatus = correctionStatus;
+    }
+
+    public String getCorrectionDescribe() {
+        return correctionDescribe;
+    }
+
+    public void setCorrectionDescribe(String correctionDescribe) {
+        this.correctionDescribe = correctionDescribe;
+    }
+
+    public String getCorrectionUser() {
+        return correctionUser;
+    }
+
+    public void setCorrectionUser(String correctionUser) {
+        this.correctionUser = correctionUser;
+    }
+
+    public String getCorrectionTime() {
+        return correctionTime;
+    }
+
+    public void setCorrectionTime(String correctionTime) {
+        this.correctionTime = correctionTime;
+    }
+
     public String getReviewRemark() {
         return reviewRemark;
     }
@@ -368,35 +628,115 @@ public class DataCorrectionBean implements Serializable {
         this.reviewRemark = reviewRemark;
     }
 
-    public String getQtType() {
-        return qtType;
+    public int getIdCus() {
+        return idCus;
     }
 
-    public void setQtType(String qtType) {
-        this.qtType = qtType;
+    public void setIdCus(int idCus) {
+        this.idCus = idCus;
     }
 
-    public String getInspectUser() {
-        return inspectUser;
+    public String getQbhs() {
+        return qbhs;
     }
 
-    public void setInspectUser(String inspectUser) {
-        this.inspectUser = inspectUser;
+    public void setQbhs(String qbhs) {
+        this.qbhs = qbhs;
     }
 
-    public String getInspectUserText() {
-        return inspectUserText;
+    public Integer getCurrent() {
+        return current;
     }
 
-    public void setInspectUserText(String inspectUserText) {
-        this.inspectUserText = inspectUserText;
+    public void setCurrent(Integer current) {
+        this.current = current;
     }
 
-    public String getInspectTime() {
-        return inspectTime;
+    public Integer getSize() {
+        return size;
     }
 
-    public void setInspectTime(String inspectTime) {
-        this.inspectTime = inspectTime;
+    public void setSize(Integer size) {
+        this.size = size;
+    }
+
+    public String getKeyword() {
+        return keyword;
+    }
+
+    public void setKeyword(String keyword) {
+        this.keyword = keyword;
+    }
+
+    public String getKeyword2() {
+        return keyword2;
+    }
+
+    public void setKeyword2(String keyword2) {
+        this.keyword2 = keyword2;
+    }
+
+    public String getRules() {
+        return rules;
+    }
+
+    public void setRules(String rules) {
+        this.rules = rules;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getField() {
+        return field;
+    }
+
+    public void setField(String field) {
+        this.field = field;
+    }
+
+    public String getOrder() {
+        return order;
+    }
+
+    public void setOrder(String order) {
+        this.order = order;
+    }
+
+    public String getCheckUser() {
+        return checkUser;
+    }
+
+    public void setCheckUser(String checkUser) {
+        this.checkUser = checkUser;
+    }
+
+    public String getRecentMarkOld() {
+        return recentMarkOld;
+    }
+
+    public void setRecentMarkOld(String recentMarkOld) {
+        this.recentMarkOld = recentMarkOld;
+    }
+
+    public String getQtType() {
+        return qtType;
+    }
+
+    public void setQtType(String qtType) {
+        this.qtType = qtType;
     }
 }

+ 26 - 2
app/src/main/java/com/tofly/yxpc/ui/activity/DataCorrectionDetailActivity.java

@@ -1,11 +1,15 @@
 package com.tofly.yxpc.ui.activity;
 
+import android.content.Intent;
 import android.os.Bundle;
 import android.text.TextUtils;
 
+import androidx.annotation.Nullable;
 import androidx.fragment.app.Fragment;
 
 import com.alibaba.fastjson.JSON;
+import com.google.zxing.integration.android.IntentIntegrator;
+import com.google.zxing.integration.android.IntentResult;
 import com.tofly.latte_core.base.LatteActivity;
 import com.tofly.latte_core.base.LatteContract;
 import com.tofly.yxpc.databinding.ActivityDataCorrectionDetailBinding;
@@ -26,6 +30,8 @@ public class DataCorrectionDetailActivity extends LatteActivity {
 
     private ActivityDataCorrectionDetailBinding binding;
     private DataCorrectionBean waterMeterEntity = null;
+    private WaterCheckCorrectionFragment waterCheckFragment = null;
+    private UnCalibrateCorrectionFragment unCalibrateFragment = null;
 
     @Override
     public Object setLayout() {
@@ -57,12 +63,12 @@ public class DataCorrectionDetailActivity extends LatteActivity {
         bundle.putString("data", JSON.toJSONString(waterMeterEntity));
         if ("无法标定水表".equals(waterMeterEntity.getQtType())) {
             strings = Collections.singletonList("无法标定");
-            UnCalibrateCorrectionFragment unCalibrateFragment = new UnCalibrateCorrectionFragment();
+            unCalibrateFragment = new UnCalibrateCorrectionFragment();
             unCalibrateFragment.setArguments(bundle);
             fragmentList.add(unCalibrateFragment);
         } else {
             strings = Collections.singletonList("稽查");
-            WaterCheckCorrectionFragment waterCheckFragment = new WaterCheckCorrectionFragment();
+            waterCheckFragment = new WaterCheckCorrectionFragment();
             waterCheckFragment.setArguments(bundle);
             fragmentList.add(waterCheckFragment);
         }
@@ -75,4 +81,22 @@ public class DataCorrectionDetailActivity extends LatteActivity {
         }
     }
 
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (requestCode == 49374 && resultCode == RESULT_OK) {
+            IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);
+            if (result != null && !TextUtils.isEmpty(result.getContents())) {
+                if (waterCheckFragment != null) {
+                    waterCheckFragment.setQc(result.getContents());
+                }
+                if (unCalibrateFragment != null) {
+                    unCalibrateFragment.setQc(result.getContents());
+                }
+            } else {
+                onMessage("扫码失败");
+            }
+        }
+    }
+
 }

+ 4 - 2
app/src/main/java/com/tofly/yxpc/ui/activity/TaskDetailActivity.java

@@ -30,8 +30,8 @@ import java.util.List;
 public class TaskDetailActivity extends LatteActivity {
 
     private ActivityTaskDetailBinding binding;
-    private WaterCheckFragment waterCheckFragment;
-    private UnCalibrateFragment unCalibrateFragment;
+    private WaterCheckFragment waterCheckFragment = null;
+    private UnCalibrateFragment unCalibrateFragment = null;
     private WaterMeterEntity sbdjEntity = null;
     private int type;
 
@@ -100,6 +100,8 @@ public class TaskDetailActivity extends LatteActivity {
             if (result != null && !TextUtils.isEmpty(result.getContents())) {
                 if (waterCheckFragment != null) {
                     waterCheckFragment.setQc(result.getContents());
+                }
+                if (unCalibrateFragment != null) {
                     unCalibrateFragment.setQc(result.getContents());
                 }
             } else {

+ 290 - 46
app/src/main/java/com/tofly/yxpc/ui/fragment/UnCalibrateCorrectionFragment.java

@@ -1,24 +1,40 @@
 package com.tofly.yxpc.ui.fragment;
 
+import android.content.Intent;
+import android.os.Build;
 import android.os.Bundle;
 import android.text.TextUtils;
 import android.view.MotionEvent;
 import android.view.View;
+import android.widget.AdapterView;
+import android.widget.CheckBox;
+import android.widget.LinearLayout;
 
+import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 
 import com.alibaba.fastjson.JSON;
+import com.google.zxing.integration.android.IntentIntegrator;
 import com.tofly.latte_core.base.LatteContract;
+import com.tofly.yxpc.R;
+import com.tofly.yxpc.base.MyApp;
 import com.tofly.yxpc.databinding.FragmentUncailbrateCorrectionBinding;
 import com.tofly.yxpc.entity.DataCorrectionBean;
+import com.tofly.yxpc.entity.DictEntity;
 import com.tofly.yxpc.entity.FileBean;
+import com.tofly.yxpc.greenDao.DictEntityDao;
 import com.tofly.yxpc.map.LocationUtil_xu;
+import com.tofly.yxpc.ui.activity.CaptureActivity;
+import com.tofly.yxpc.ui.activity.LocationActivity;
 import com.tofly.yxpc.ui.adapter.BigPictureAdapter;
 import com.tofly.yxpc.ui.impl.DataCorrectionImpl;
 import com.tofly.yxpc.utils.DialogUtils;
 import com.tofly.yxpc.utils.RecyclerViewUtils;
+import com.tofly.yxpc.utils.SpinnerUtils;
+import com.tofly.yxpc.utils.db.DaoUtilsStore;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -29,12 +45,17 @@ public class UnCalibrateCorrectionFragment extends PhotoFragment {
     private BigPictureAdapter pictureAdapter;
     private final List<FileBean> photoList = new ArrayList<>();
     private DataCorrectionBean waterMeterEntity;
-    private boolean isFirst = true;
+    private final List<DictEntity> dictEntities = new ArrayList<>();
+    private String headName;
+    private String shortName;
+    private String areaCode;
+    private final List<String> bwbhList = Arrays.asList("-", "-附", "空");
+    private String bwbh;
     private LocationUtil_xu.CoordinateClass locationUtilXuNew = null;
+    public int qcType = 0;
 
     @Override
     public void onTakePhotoSuccess(String pathFile) {
-
     }
 
     @Override
@@ -72,6 +93,19 @@ public class UnCalibrateCorrectionFragment extends PhotoFragment {
     }
 
     private void initRecyclerView() {
+        SpinnerUtils.initSpinner1(requireContext(), binding.spinnerBwbh, bwbhList);
+        binding.spinnerBwbh.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                bwbh = bwbhList.get(position);
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+
+            }
+        });
+
         photoList.clear();
         pictureAdapter = new BigPictureAdapter(photoList, false, true, size -> {
 
@@ -84,73 +118,262 @@ public class UnCalibrateCorrectionFragment extends PhotoFragment {
         binding.cbAbnormal.setOnClickListener(v -> binding.llAbnormal.setVisibility(binding.cbAbnormal.isChecked() ? View.VISIBLE : View.GONE));
 
         binding.tvSubmit.setOnClickListener(v -> {
-            if (check() && waterMeterEntity != null) {
-                DialogUtils.showDialog(requireContext(), "提示", "是否确定提交数据", false, (dialog, which) -> {
-                    Map<String, Object> map = new HashMap<>();
-                    if (!TextUtils.isEmpty(binding.etZgsm.getText())) {
-                        map.put("correctionDescribe", binding.etZgsm.getText().toString());
-                    }
-                    map.put("correctionStatus", "已整改");
-                    map.put("idCus", waterMeterEntity.getIdCus());
-                    mPresenter.getResultThree(requireContext(), map);
+            if (check()) {
+                DialogUtils.showDialog(requireContext(), "提示", "是否确定上传数据", false, (dialog, which) -> updateWaterMeter());
+            }
+        });
+
+        binding.tvSaoSbxh.setOnClickListener(v -> {
+            qcType = 1;
+            IntentIntegrator integrator = new IntentIntegrator(requireActivity());
+            integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE);
+            integrator.setPrompt("请扫码");
+            integrator.setCameraId(0);
+            integrator.setBeepEnabled(true);
+            integrator.setOrientationLocked(false);
+            integrator.setCaptureActivity(CaptureActivity.class);
+            integrator.initiateScan();
+        });
+
+        binding.imgAchieve.setOnClickListener(v -> {
+            if (!TextUtils.isEmpty(headName)) {
+                binding.tvXzq.setText(headName);
+            } else {
+                binding.tvXzq.setText("");
+                onMessage("请选择位置");
+            }
+        });
+        binding.imgAchieveAddress.setOnClickListener(v -> {
+            if (!TextUtils.isEmpty(shortName)) {
+                binding.etUserAddr.setText(shortName);
+            } else {
+                onMessage("请选择位置");
+            }
+        });
+        binding.imgCopy.setOnClickListener(v -> {
+            if (waterMeterEntity != null) {
+                binding.edMph.setText(waterMeterEntity.getUserAddr() == null ? "" : waterMeterEntity.getUserAddr());
+            }
+        });
+        binding.tvXzq.setOnClickListener(v -> {
+            if (MyApp.getInstance().isOverTime()) {
+                DialogUtils.xzqDialog(requireContext(), areaCode, (name, areaCode1) -> {
+                    binding.tvXzq.setText(name);
+                    this.areaCode = areaCode1;
                 });
             }
         });
     }
 
     private void loadData() {
-        if (waterMeterEntity != null) {
-            binding.tvState.setText(waterMeterEntity.getReviewResult() == null ? "" : ("【" + waterMeterEntity.getReviewResult() + "】"));
-            binding.tvContent.setText(waterMeterEntity.getReviewRemark() == null ? "" : waterMeterEntity.getReviewRemark());
-            binding.tvFhry.setText(waterMeterEntity.getQtUserText() == null ? "" : waterMeterEntity.getQtUserText());
-            binding.tvFhsj.setText(waterMeterEntity.getQtTime() == null ? "" : waterMeterEntity.getQtTime());
-
-            if (!TextUtils.isEmpty(waterMeterEntity.getLatitude()) && !TextUtils.isEmpty(waterMeterEntity.getLongitude())) {
-                binding.tvLat.setText("经度:" + waterMeterEntity.getLongitude() + " 纬度:" + waterMeterEntity.getLatitude());
+        binding.tvState.setText(waterMeterEntity.getReviewResult() == null ? "" : ("【" + waterMeterEntity.getReviewResult() + "】"));
+        binding.tvContent.setText(waterMeterEntity.getReviewRemark() == null ? "" : waterMeterEntity.getReviewRemark());
+        binding.tvFhry.setText(waterMeterEntity.getQtUserText() == null ? "" : waterMeterEntity.getQtUserText());
+        binding.tvFhsj.setText(waterMeterEntity.getQtTime() == null ? "" : waterMeterEntity.getQtTime());
+
+        if (!TextUtils.isEmpty(waterMeterEntity.getLatitude()) && !TextUtils.isEmpty(waterMeterEntity.getLongitude())) {
+            binding.tvLat.setText("经度:" + waterMeterEntity.getLongitude() + " 纬度:" + waterMeterEntity.getLatitude());
+        } else {
+            binding.tvLat.setText("");
+        }
+        binding.tvXzq.setText(waterMeterEntity.getRegionName() == null ? "" : waterMeterEntity.getRegionName());
+        areaCode = waterMeterEntity.getRegionCode();
+        binding.etUserAddr.setText(waterMeterEntity.getUserAddr() == null ? "" : waterMeterEntity.getUserAddr());
+        binding.edMph.setText(waterMeterEntity.getHouseNumber() == null ? "" : waterMeterEntity.getHouseNumber());
+        binding.edSbxh.setText(waterMeterEntity.getWaterMeterXh() == null ? "" : waterMeterEntity.getWaterMeterXh());
+        if (!TextUtils.isEmpty(waterMeterEntity.getMeterNum())) {
+            String[] arr = waterMeterEntity.getMeterNum().split("-");
+            if (arr.length == 0) {
+                binding.edBwbh1.setText("");
+                binding.spinnerBwbh.setSelection(0);
+                binding.edBwbh2.setText("");
+            } else if (arr.length == 1) {
+                binding.spinnerBwbh.setSelection(2);
+                binding.edBwbh1.setText(arr[0]);
+                binding.edBwbh2.setText("");
+            } else if (arr.length == 2) {
+                binding.edBwbh1.setText(arr[0]);
+                if (arr[1].contains("附")) {
+                    binding.spinnerBwbh.setSelection(1);
+                    binding.edBwbh2.setText(arr[1].replace("附", ""));
+                } else {
+                    binding.spinnerBwbh.setSelection(0);
+                    binding.edBwbh2.setText(arr[1]);
+                }
             } else {
-                binding.tvLat.setText("");
-            }
-            binding.tvXzq.setText(waterMeterEntity.getRegionName() == null ? "" : waterMeterEntity.getRegionName());
-            binding.etUserAddr.setText(waterMeterEntity.getUserAddr() == null ? "" : waterMeterEntity.getUserAddr());
-            binding.edMph.setText(waterMeterEntity.getHouseNumber() == null ? "" : waterMeterEntity.getHouseNumber());
-            binding.edSbxh.setText(waterMeterEntity.getWaterMeterXh() == null ? "" : waterMeterEntity.getWaterMeterXh());
-            binding.tvBwbh.setText(waterMeterEntity.getMeterNum() == null ? "" : waterMeterEntity.getMeterNum());
-
-            binding.tvQklx.setText(waterMeterEntity.getExceptionTypeText() == null ? "" : waterMeterEntity.getExceptionTypeText());
-            binding.tvDescribe.setText(waterMeterEntity.getExceptionDescribe() == null ? "" : waterMeterEntity.getExceptionDescribe());
-            if (!TextUtils.isEmpty(waterMeterEntity.getExpFilePath())) {
-                for (String s : waterMeterEntity.getExpFilePath().split(",")) {
-                    FileBean fileBean = new FileBean();
-                    fileBean.setFilePath(s);
-                    photoList.add(fileBean);
+                StringBuilder bwbh1 = new StringBuilder();
+                for (int i = 0; i < arr.length - 1; i++) {
+                    if (i == 0) {
+                        bwbh1.append(arr[i]);
+                    } else {
+                        bwbh1.append("-").append(arr[i]);
+                    }
+                }
+                binding.edBwbh1.setText(bwbh1.toString());
+                if (arr[arr.length - 1].contains("附")) {
+                    binding.spinnerBwbh.setSelection(1);
+                    binding.edBwbh2.setText(arr[arr.length - 1].replace("附", ""));
+                } else {
+                    binding.spinnerBwbh.setSelection(0);
+                    binding.edBwbh2.setText(arr[arr.length - 1]);
                 }
-                pictureAdapter.setNewData(photoList);
-                if (photoList.isEmpty()) {
-                    binding.rvListPhoto.setVisibility(View.GONE);
+            }
+        } else {
+            binding.edBwbh1.setText("");
+            binding.spinnerBwbh.setSelection(0);
+            binding.edBwbh2.setText("");
+        }
+
+        List<DictEntity> dictEntityList = DaoUtilsStore.getInstance().getDictEntityDbUtils().queryByQueryBuilder(DictEntityDao.Properties.DictCode.eq("enroll_info"));
+        List<String> ides = null;
+        if (!TextUtils.isEmpty(waterMeterEntity.getExceptionType())) {
+            ides = Arrays.asList(waterMeterEntity.getExceptionType().split(","));
+        }
+        binding.llAbnormalView.removeAllViews();
+        for (DictEntity dictEntity : dictEntityList) {
+            CheckBox checkBox = new CheckBox(requireContext());
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+                checkBox.setTextColor(requireContext().getColor(R.color.color_333));
+                LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+                //设置边距
+                layoutParams.setMargins(20, 12, 0, 0);
+                //将以上的属性赋给LinearLayout
+                checkBox.setLayoutParams(layoutParams);
+                checkBox.setTextSize(16);
+            }
+            checkBox.setText(dictEntity.getItemText());
+            checkBox.setOnCheckedChangeListener((buttonView, isChecked) -> {
+                if (isChecked) {
+                    dictEntities.add(dictEntity);
+                } else {
+                    dictEntities.remove(dictEntity);
+                }
+            });
+            if (ides != null && ides.contains(dictEntity.getId())) {
+                checkBox.setChecked(true);
+            }
+            binding.llAbnormalView.addView(checkBox, dictEntityList.indexOf(dictEntity));
+        }
+
+        if (!TextUtils.isEmpty(waterMeterEntity.getExpFilePath())) {
+            for (String s : waterMeterEntity.getExpFilePath().split(",")) {
+                FileBean fileBean = new FileBean();
+                fileBean.setFilePath(s);
+                photoList.add(fileBean);
+            }
+            pictureAdapter.setNewData(photoList);
+        }
+        if (photoList.isEmpty()) {
+            binding.rvListPhoto.setVisibility(View.GONE);
+        } else {
+            binding.rvListPhoto.setVisibility(View.VISIBLE);
+        }
+        if (!TextUtils.isEmpty(waterMeterEntity.getExceptionDescribe())) {
+            binding.edDescribe.setText(waterMeterEntity.getExceptionDescribe());
+        }
+    }
+
+    private void updateWaterMeter() {
+        Map<String, Object> map = new HashMap<>();
+        map.put("idCus", waterMeterEntity.getIdCus());
+        map.put("correctionStatus", "已整改");
+        if (!TextUtils.isEmpty(binding.etZgsm.getText())) {
+            map.put("correctionDescribe", binding.etZgsm.getText().toString());
+        }
+
+        if (locationUtilXuNew != null) {
+            map.put("longitude", String.valueOf(locationUtilXuNew.Longtitude));
+            map.put("latitude", String.valueOf(locationUtilXuNew.Latitude));
+        }
+        if (!TextUtils.isEmpty(binding.tvAddr.getText())) {
+            map.put("mapLocation", binding.tvAddr.getText().toString());
+        }
+        if (!TextUtils.isEmpty(binding.tvXzq.getText())) {
+            map.put("regionName", binding.tvXzq.getText().toString());
+            map.put("installPosition", binding.tvXzq.getText().toString());
+        }
+        if (!TextUtils.isEmpty(areaCode)) {
+            map.put("regionCode", areaCode);
+        }
+        if (!TextUtils.isEmpty(binding.etUserAddr.getText())) {
+            map.put("userAddr", binding.etUserAddr.getText().toString());
+        }
+        if (!TextUtils.isEmpty(binding.edMph.getText())) {
+            map.put("houseNumber", binding.edMph.getText().toString());
+        }
+        if (!TextUtils.isEmpty(binding.edSbxh.getText())) {
+            map.put("waterMeterXh", binding.edSbxh.getText().toString());
+        }
+        if (!TextUtils.isEmpty(binding.edBwbh1.getText()) || !TextUtils.isEmpty(binding.edBwbh2.getText())) {
+            map.put("meterNum", binding.edBwbh1.getText().toString() + bwbh.replace("空", "") + binding.edBwbh2.getText().toString());
+        }
+        if (!dictEntities.isEmpty()) {
+            StringBuilder stringBuilder = new StringBuilder();
+            for (DictEntity entity : dictEntities) {
+                if (dictEntities.indexOf(entity) == 0) {
+                    stringBuilder.append(entity.getId());
                 } else {
-                    binding.rvListPhoto.setVisibility(View.VISIBLE);
+                    stringBuilder.append(",").append(entity.getId());
                 }
             }
+            map.put("exceptionType", stringBuilder.toString());
         }
+        if (!TextUtils.isEmpty(binding.edDescribe.getText())) {
+            map.put("exceptionDescribe", binding.edDescribe.getText().toString());
+        }
+        mPresenter.getResultThree(requireContext(), map);
     }
 
     private boolean check() {
+        if (dictEntities.isEmpty()) {
+            onMessage("请选择情况类型");
+            return false;
+        }
         return true;
     }
 
+    public void setQc(@NonNull String qc) {
+        if (qcType == 1) {
+            String[] arr1 = qc.split("node_id");
+            if (arr1.length > 1 && !TextUtils.isEmpty(arr1[1])) {
+                String sbxh = arr1[1].replace(":", "")
+                        .replace("’", "")
+                        .replace("’", "")
+                        .replace("}", "");
+                binding.edSbxh.setText(sbxh);
+            } else {
+                onMessage("无效二维码");
+            }
+        }
+    }
+
     @Override
     public void initMapView() {
         super.initMapView();
         aMap.setOnMapTouchListener(motionEvent -> {
             binding.llMap.mapView.requestDisallowInterceptTouchEvent(motionEvent.getAction() != MotionEvent.ACTION_UP);
-            isFirst = false;
         });
+        aMap.setOnCameraChangeListener(mapCameraChangeListener);
         binding.llMap.imDrag.setVisibility(View.VISIBLE);
         binding.llMap.imgNavit.setVisibility(View.GONE);
         binding.llMap.imgFw.setVisibility(View.GONE);
-        binding.llMap.imgAllScreen.setVisibility(View.GONE);
-        binding.llMap.imgLocation.setVisibility(View.GONE);
-        binding.llMap.imgMap.setVisibility(View.GONE);
+        binding.llMap.imgAllScreen.setOnClickListener(v -> {
+            if (MyApp.getInstance().isOverTime()) {
+                Intent intent = new Intent(requireContext(), LocationActivity.class);
+                intent.putExtra("locationUtilXuNew", locationUtilXuNew);
+                intent.putExtra("isRed", "1");
+                intent.putExtra("isDrag", true);
+                startActivityForResult(intent, 1105);
+            }
+        });
+        binding.llMap.imgLocation.setOnClickListener(v -> {
+            if (MyApp.getInstance().isOverTime() && lo != null) {
+                moveOrigin(lo.Longtitude, lo.Latitude, aMap.getCameraPosition().zoom);
+                if (!TextUtils.isEmpty(lo.addr)) {
+                    binding.tvAddr.setText(lo.addr);
+                }
+            }
+        });
         binding.llMap.imgMap.setOnClickListener(v -> {
             checkMap();
         });
@@ -173,10 +396,31 @@ public class UnCalibrateCorrectionFragment extends PhotoFragment {
     @Override
     public void initMapListener(LocationUtil_xu.CoordinateClass info, String headName, String shortName, String areaCode) {
         super.initMapListener(info, headName, shortName, areaCode);
-        if (!isFirst) {
-            locationUtilXuNew = info;
-            binding.tvLat.setText("经度:" + locationUtilXuNew.Longtitude + " 纬度:" + locationUtilXuNew.Latitude);
-            binding.tvAddr.setText(locationUtilXuNew.addr == null ? "" : locationUtilXuNew.addr);
+        locationUtilXuNew = info;
+        binding.tvLat.setText("经度:" + locationUtilXuNew.Longtitude + " 纬度:" + locationUtilXuNew.Latitude);
+        binding.tvAddr.setText(locationUtilXuNew.addr == null ? "" : locationUtilXuNew.addr);
+        this.headName = headName;
+        this.shortName = shortName;
+        this.areaCode = areaCode;
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (requestCode == 1105 && resultCode == 1106) {
+            if (data != null) {
+                locationUtilXuNew = (LocationUtil_xu.CoordinateClass) data.getSerializableExtra("locationUtilXuNew");
+                headName = data.getStringExtra("headName");
+                shortName = data.getStringExtra("shortName");
+                areaCode = data.getStringExtra("areaCode");
+                if (locationUtilXuNew != null) {
+                    moveOrigin(locationUtilXuNew.Longtitude, locationUtilXuNew.Latitude, aMap.getCameraPosition().zoom);
+                    binding.tvLat.setText("经度:" + locationUtilXuNew.Longtitude + " 纬度:" + locationUtilXuNew.Latitude);
+                    if (!TextUtils.isEmpty(locationUtilXuNew.addr)) {
+                        binding.tvAddr.setText(locationUtilXuNew.addr);
+                    }
+                }
+            }
         }
     }
 

+ 439 - 33
app/src/main/java/com/tofly/yxpc/ui/fragment/WaterCheckCorrectionFragment.java

@@ -1,21 +1,31 @@
 package com.tofly.yxpc.ui.fragment;
 
+import android.content.Intent;
+import android.os.Build;
 import android.os.Bundle;
 import android.text.TextUtils;
 import android.view.MotionEvent;
 import android.view.View;
 import android.widget.AdapterView;
+import android.widget.CheckBox;
+import android.widget.LinearLayout;
 
+import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 
 import com.alibaba.fastjson.JSON;
+import com.google.zxing.integration.android.IntentIntegrator;
 import com.tofly.latte_core.base.LatteContract;
+import com.tofly.yxpc.R;
+import com.tofly.yxpc.base.MyApp;
 import com.tofly.yxpc.databinding.FragmentWaterCheckCorrectionBinding;
 import com.tofly.yxpc.entity.DataCorrectionBean;
 import com.tofly.yxpc.entity.DictEntity;
 import com.tofly.yxpc.entity.FileBean;
 import com.tofly.yxpc.greenDao.DictEntityDao;
 import com.tofly.yxpc.map.LocationUtil_xu;
+import com.tofly.yxpc.ui.activity.CaptureActivity;
+import com.tofly.yxpc.ui.activity.LocationActivity;
 import com.tofly.yxpc.ui.adapter.BigPictureAdapter;
 import com.tofly.yxpc.ui.impl.DataCorrectionImpl;
 import com.tofly.yxpc.utils.DialogUtils;
@@ -24,6 +34,7 @@ import com.tofly.yxpc.utils.SpinnerUtils;
 import com.tofly.yxpc.utils.db.DaoUtilsStore;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -37,16 +48,24 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
     private final List<FileBean> bpzbPhotoList = new ArrayList<>();
     private LocationUtil_xu.CoordinateClass locationUtilXuNew = null;
     private DataCorrectionBean waterMeterEntity;
-    private boolean isFirst = true;
+    private final List<DictEntity> dictEntities = new ArrayList<>();
+    private String idCard = null;
+    private String headName;
+    private String shortName;
+    private String areaCode;
+    public int qcType = 0;
     private final List<String> brandIdList = new ArrayList<>();
     private final List<String> calibarIdList = new ArrayList<>();
     private final List<String> typeIdList = new ArrayList<>();
     private final List<String> sblcIdList = new ArrayList<>();
     private final List<String> natureIdList = new ArrayList<>();
+    private final List<String> bwbhList = Arrays.asList("-", "-附", "空");
+    private String bwbh;
+    private DictEntity nullDictEntity = null;
+    private List<DictEntity> dictEntityList;
 
     @Override
     public void onTakePhotoSuccess(String pathFile) {
-
     }
 
     @Override
@@ -71,6 +90,7 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
         super.onCreate(savedInstanceState);
         Bundle bundle = this.getArguments();
         if (bundle != null) {
+            idCard = bundle.getString("idCard");
             waterMeterEntity = JSON.parseObject(bundle.getString("data"), DataCorrectionBean.class);
         }
     }
@@ -78,7 +98,18 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
     @Override
     public void initView() {
         super.initView();
-        initRecyclerView();
+        dictEntityList = DaoUtilsStore.getInstance().getDictEntityDbUtils().queryByQueryBuilder(DictEntityDao.Properties.DictCode.eq("abnormal_info"));
+        for (DictEntity dictEntity : dictEntityList) {
+            if ("9dc19b47-1a29-4558-8512-fdfec5d06dcc".equals(dictEntity.getId())) {
+                nullDictEntity = dictEntity;
+            }
+        }
+        if (nullDictEntity != null) {
+            dictEntityList.remove(nullDictEntity);
+            binding.switchException.setVisibility(View.VISIBLE);
+        } else {
+            binding.switchException.setVisibility(View.GONE);
+        }
         initListener();
         loadData();
     }
@@ -105,7 +136,6 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
 
             }
         });
-        binding.spinnerBrand.setEnabled(false);
 
         List<String> calibarList = new ArrayList<>();
         calibarIdList.clear();
@@ -128,7 +158,6 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
 
             }
         });
-        binding.spinnerWaterCaliber.setEnabled(false);
 
         List<String> typeList = new ArrayList<>();
         typeIdList.clear();
@@ -151,7 +180,6 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
 
             }
         });
-        binding.spinnerWaterType.setEnabled(false);
 
         List<String> sblcList = new ArrayList<>();
         sblcIdList.clear();
@@ -174,7 +202,6 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
 
             }
         });
-        binding.spinnerSblc.setEnabled(false);
 
         List<String> natureList = new ArrayList<>();
         natureIdList.clear();
@@ -197,7 +224,6 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
 
             }
         });
-        binding.spinnerUseWaterProperties.setEnabled(false);
 
         bpPhotoList.clear();
         bpPictureAdapter = new BigPictureAdapter(bpPhotoList, false, true, size -> {
@@ -215,6 +241,19 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
 
         });
         RecyclerViewUtils.initGrid(requireContext(), binding.rvListBpzb, 3, bpzbPictureAdapter);
+
+        SpinnerUtils.initSpinner1(requireContext(), binding.spinnerBwbh, bwbhList);
+        binding.spinnerBwbh.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                bwbh = bwbhList.get(position);
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+
+            }
+        });
     }
 
     private void initListener() {
@@ -224,18 +263,134 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
         binding.cbAbnormal.setOnClickListener(v -> binding.llAbnormal.setVisibility(binding.cbAbnormal.isChecked() ? View.VISIBLE : View.GONE));
 
         binding.tvSubmit.setOnClickListener(v -> {
-            if (check() && waterMeterEntity != null) {
-                DialogUtils.showDialog(requireContext(), "提示", "是否确定上传数据", false, (dialog, which) -> {
-                    Map<String, Object> map = new HashMap<>();
-                    if (!TextUtils.isEmpty(binding.etZgsm.getText())) {
-                        map.put("correctionDescribe", binding.etZgsm.getText().toString());
-                    }
-                    map.put("correctionStatus", "已整改");
-                    map.put("idCus", waterMeterEntity.getIdCus());
-                    mPresenter.getResultThree(requireContext(), map);
+            if (check()) {
+                DialogUtils.showDialog(requireContext(), "提示", "是否确定上传数据", false, (dialog, which) -> updateWaterMeter());
+            }
+        });
+
+        binding.tvSao.setOnClickListener(v -> {
+            qcType = 0;
+            IntentIntegrator integrator = new IntentIntegrator(requireActivity());
+            integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE);
+            integrator.setPrompt("请扫码");
+            integrator.setCameraId(0);
+            integrator.setBeepEnabled(true);
+            integrator.setOrientationLocked(false);
+            integrator.setCaptureActivity(CaptureActivity.class);
+            integrator.initiateScan();
+        });
+        binding.tvSaoSbxh.setOnClickListener(v -> {
+            qcType = 1;
+            IntentIntegrator integrator = new IntentIntegrator(requireActivity());
+            integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE);
+            integrator.setPrompt("请扫码");
+            integrator.setCameraId(0);
+            integrator.setBeepEnabled(true);
+            integrator.setOrientationLocked(false);
+            integrator.setCaptureActivity(CaptureActivity.class);
+            integrator.initiateScan();
+        });
+
+        binding.imgAchieve.setOnClickListener(v -> {
+            if (!TextUtils.isEmpty(headName)) {
+                binding.tvXzq.setText(headName);
+            } else {
+                binding.tvXzq.setText("");
+                onMessage("请选择位置");
+            }
+        });
+        binding.imgAchieveAddress.setOnClickListener(v -> {
+            if (!TextUtils.isEmpty(shortName)) {
+                binding.etUserAddr.setText(shortName);
+            } else {
+                onMessage("请选择位置");
+            }
+        });
+        binding.imgCopy.setOnClickListener(v -> {
+            if (waterMeterEntity != null) {
+                binding.edMph.setText(waterMeterEntity.getUserAddr() == null ? "" : waterMeterEntity.getUserAddr());
+            }
+        });
+        binding.tvXzq.setOnClickListener(v -> {
+            if (MyApp.getInstance().isOverTime()) {
+                DialogUtils.xzqDialog(requireContext(), areaCode, (name, areaCode1) -> {
+                    binding.tvXzq.setText(name);
+                    this.areaCode = areaCode1;
                 });
             }
         });
+
+        binding.switchException.setOnCheckedChangeListener((buttonView, isChecked) -> setNullTable(isChecked));
+    }
+
+    private void setNullTable(boolean isChecked) {
+        initRecyclerView();
+        binding.cbDetail.setVisibility(isChecked ? View.GONE : View.VISIBLE);
+        binding.cbDetail.setChecked(!isChecked);
+        binding.llDetail.setVisibility(isChecked ? View.GONE : View.VISIBLE);
+        binding.vDetail.setVisibility(isChecked ? View.GONE : View.VISIBLE);
+        binding.cbSbwz.setVisibility(isChecked ? View.GONE : View.VISIBLE);
+        binding.cbSbwz.setChecked(!isChecked);
+        binding.llSbwz.setVisibility(View.VISIBLE);
+        binding.cbAbnormal.setVisibility(isChecked ? View.GONE : View.VISIBLE);
+        binding.cbAbnormal.setChecked(true);
+        binding.llAbnormal.setVisibility(View.VISIBLE);
+        binding.llErrorPhoto.setVisibility(isChecked ? View.VISIBLE : View.GONE);
+        binding.rvListPhoto.setVisibility(isChecked ? View.VISIBLE : View.GONE);
+        binding.llAbnormalView.setVisibility(isChecked ? View.GONE : View.VISIBLE);
+        binding.tvLatTitle.setText(isChecked ? "位置" : "水表位置");
+        dictEntities.clear();
+        if (isChecked) {
+            dictEntities.add(nullDictEntity);
+        } else {
+            binding.edDescribe.setText("");
+            binding.llAbnormalView.removeAllViews();
+            List<String> ides = null;
+            if (!TextUtils.isEmpty(waterMeterEntity.getExceptionType())) {
+                ides = Arrays.asList(waterMeterEntity.getExceptionType().split(","));
+            }
+            for (DictEntity dictEntity : dictEntityList) {
+                CheckBox checkBox = new CheckBox(requireContext());
+                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+                    checkBox.setTextColor(requireContext().getColor(R.color.color_333));
+                    LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+                    //设置边距
+                    layoutParams.setMargins(20, 12, 0, 0);
+                    //将以上的属性赋给LinearLayout
+                    checkBox.setLayoutParams(layoutParams);
+                    checkBox.setTextSize(16);
+                }
+                checkBox.setText(dictEntity.getItemText());
+                if (ides != null && ides.contains(dictEntity.getId())) {
+                    dictEntities.add(dictEntity);
+                    checkBox.setChecked(true);
+                }
+                checkBox.setOnCheckedChangeListener((buttonView, isChecked1) -> {
+                    if (isChecked1) {
+                        dictEntities.add(dictEntity);
+                    } else {
+                        dictEntities.remove(dictEntity);
+                    }
+                    if (dictEntities.isEmpty()) {
+                        binding.llErrorPhoto.setVisibility(View.GONE);
+                        binding.rvListPhoto.setVisibility(View.GONE);
+                        photoList.clear();
+                    } else {
+                        binding.llErrorPhoto.setVisibility(View.VISIBLE);
+                        binding.rvListPhoto.setVisibility(View.VISIBLE);
+                    }
+                });
+                binding.llAbnormalView.addView(checkBox, dictEntityList.indexOf(dictEntity));
+            }
+            if (dictEntities.isEmpty()) {
+                binding.llErrorPhoto.setVisibility(View.GONE);
+                binding.rvListPhoto.setVisibility(View.GONE);
+                photoList.clear();
+            } else {
+                binding.llErrorPhoto.setVisibility(View.VISIBLE);
+                binding.rvListPhoto.setVisibility(View.VISIBLE);
+            }
+        }
     }
 
     private void loadData() {
@@ -245,7 +400,20 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
             binding.tvFhry.setText(waterMeterEntity.getQtUserText() == null ? "" : waterMeterEntity.getQtUserText());
             binding.tvFhsj.setText(waterMeterEntity.getQtTime() == null ? "" : waterMeterEntity.getQtTime());
 
-            binding.edInternetIdCard.setText(waterMeterEntity.getInternetIdCard() == null ? "" : waterMeterEntity.getInternetIdCard());
+            if (!TextUtils.isEmpty(waterMeterEntity.getExceptionType())) {
+                boolean isChecked = waterMeterEntity.getExceptionType().contains("9dc19b47-1a29-4558-8512-fdfec5d06dcc");
+                binding.switchException.setChecked(isChecked);
+                setNullTable(isChecked);
+            } else {
+                binding.switchException.setChecked(false);
+                setNullTable(false);
+            }
+
+            if (!TextUtils.isEmpty(idCard)) {
+                binding.edInternetIdCard.setText(idCard);
+            } else {
+                binding.edInternetIdCard.setText(waterMeterEntity.getInternetIdCard() == null ? "" : waterMeterEntity.getInternetIdCard());
+            }
 
             binding.tvUserNum.setText(waterMeterEntity.getUserNum() == null ? "" : waterMeterEntity.getUserNum());
             binding.tvUserName.setText(waterMeterEntity.getUserName() == null ? "" : waterMeterEntity.getUserName());
@@ -275,6 +443,7 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
             }
             binding.tvOldRecentMark.setText(waterMeterEntity.getRecentMarkOld() == null ? "" : waterMeterEntity.getRecentMarkOld());
             binding.edRecentMark.setText(waterMeterEntity.getRecentMark() == null ? "" : waterMeterEntity.getRecentMark());
+            binding.tvLastRecentRemark.setText(waterMeterEntity.getCurrentPeriodMark() == null ? "" : waterMeterEntity.getCurrentPeriodMark() + "(" + (waterMeterEntity.getCbMonth() == null ? "" : waterMeterEntity.getCbMonth()) + ")");
             binding.edRemark.setText(waterMeterEntity.getAddressDetails() == null ? "" : waterMeterEntity.getAddressDetails());
             if (!TextUtils.isEmpty(waterMeterEntity.getBpFilePath())) {
                 for (String s : waterMeterEntity.getBpFilePath().split(",")) {
@@ -299,13 +468,58 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
                 binding.tvLat.setText("");
             }
             binding.tvXzq.setText(waterMeterEntity.getRegionName() == null ? "" : waterMeterEntity.getRegionName());
+            areaCode = waterMeterEntity.getRegionCode();
             binding.etUserAddr.setText(waterMeterEntity.getUserAddr() == null ? "" : waterMeterEntity.getUserAddr());
             binding.edMph.setText(waterMeterEntity.getHouseNumber() == null ? "" : waterMeterEntity.getHouseNumber());
             binding.edSbxh.setText(waterMeterEntity.getWaterMeterXh() == null ? "" : waterMeterEntity.getWaterMeterXh());
-            binding.tvBwbh.setText(waterMeterEntity.getMeterNum() == null ? "" : waterMeterEntity.getMeterNum());
+            if (!TextUtils.isEmpty(waterMeterEntity.getMeterNum())) {
+                String[] arr = waterMeterEntity.getMeterNum().split("-");
+                if (arr.length == 0) {
+                    binding.edBwbh1.setText("");
+                    binding.spinnerBwbh.setSelection(0);
+                    binding.edBwbh2.setText("");
+                } else if (arr.length == 1) {
+                    binding.spinnerBwbh.setSelection(2);
+                    binding.edBwbh1.setText(arr[0]);
+                    binding.edBwbh2.setText("");
+                } else if (arr.length == 2) {
+                    binding.edBwbh1.setText(arr[0]);
+                    if (arr[1].contains("附")) {
+                        binding.spinnerBwbh.setSelection(1);
+                        binding.edBwbh2.setText(arr[1].replace("附", ""));
+                    } else {
+                        binding.spinnerBwbh.setSelection(0);
+                        binding.edBwbh2.setText(arr[1]);
+                    }
+                } else {
+                    StringBuilder bwbh1 = new StringBuilder();
+                    for (int i = 0; i < arr.length - 1; i++) {
+                        if (i == 0) {
+                            bwbh1.append(arr[i]);
+                        } else {
+                            bwbh1.append("-").append(arr[i]);
+                        }
+                    }
+                    binding.edBwbh1.setText(bwbh1.toString());
+                    if (arr[arr.length - 1].contains("附")) {
+                        binding.spinnerBwbh.setSelection(1);
+                        binding.edBwbh2.setText(arr[arr.length - 1].replace("附", ""));
+                    } else {
+                        binding.spinnerBwbh.setSelection(0);
+                        binding.edBwbh2.setText(arr[arr.length - 1]);
+                    }
+                }
+            } else {
+                binding.edBwbh1.setText("");
+                binding.spinnerBwbh.setSelection(0);
+                binding.edBwbh2.setText("");
+            }
 
-            binding.tvQklx.setText(waterMeterEntity.getExceptionTypeText() == null ? "" : waterMeterEntity.getExceptionTypeText());
-            binding.tvDescribe.setText(waterMeterEntity.getExceptionDescribe() == null ? "" : waterMeterEntity.getExceptionDescribe());
+            if (!TextUtils.isEmpty(waterMeterEntity.getExceptionDescribe())) {
+                binding.edDescribe.setText(waterMeterEntity.getExceptionDescribe());
+            } else {
+                binding.edDescribe.setText("");
+            }
             if (!TextUtils.isEmpty(waterMeterEntity.getExpFilePath())) {
                 for (String s : waterMeterEntity.getExpFilePath().split(",")) {
                     FileBean fileBean = new FileBean();
@@ -313,32 +527,203 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
                     photoList.add(fileBean);
                 }
                 pictureAdapter.setNewData(photoList);
-                if (photoList.isEmpty()) {
-                    binding.rvListPhoto.setVisibility(View.GONE);
-                } else {
-                    binding.rvListPhoto.setVisibility(View.VISIBLE);
+            }
+        }
+    }
+
+    private void updateWaterMeter() {
+        Map<String, Object> map = new HashMap<>();
+        map.put("idCus", waterMeterEntity.getIdCus());
+        map.put("correctionStatus", "已整改");
+        if (!TextUtils.isEmpty(binding.etZgsm.getText())) {
+            map.put("correctionDescribe", binding.etZgsm.getText().toString());
+        }
+
+        if (!TextUtils.isEmpty(binding.edInternetIdCard.getText())) {
+            map.put("internetIdCard", binding.edInternetIdCard.getText().toString());
+        }
+        if (!TextUtils.isEmpty(binding.edQbNum.getText())) {
+            map.put("qbNum", binding.edQbNum.getText().toString());
+        }
+        if (!binding.switchException.isChecked()) {
+            if (!TextUtils.isEmpty(binding.edWaterMeterNum.getText())) {
+                map.put("waterMeterNum", binding.edWaterMeterNum.getText().toString());
+            }
+            if (!TextUtils.isEmpty(binding.edRecentMark.getText())) {
+                map.put("recentMark", binding.edRecentMark.getText().toString());
+            }
+            if (!TextUtils.isEmpty(binding.edRemark.getText())) {
+                map.put("addressDetails", binding.edRemark.getText().toString());
+            }
+            if (locationUtilXuNew != null) {
+                map.put("longitude", String.valueOf(locationUtilXuNew.Longtitude));
+                map.put("latitude", String.valueOf(locationUtilXuNew.Latitude));
+            }
+            if (!TextUtils.isEmpty(binding.tvAddr.getText())) {
+                map.put("mapLocation", binding.tvAddr.getText().toString());
+            }
+            if (!TextUtils.isEmpty(binding.tvXzq.getText())) {
+                map.put("regionName", binding.tvXzq.getText().toString());
+                map.put("installPosition", binding.tvXzq.getText().toString());
+            }
+            if (!TextUtils.isEmpty(areaCode)) {
+                map.put("regionCode", areaCode);
+            }
+            if (!TextUtils.isEmpty(binding.etUserAddr.getText())) {
+                map.put("userAddr", binding.etUserAddr.getText().toString());
+            }
+            if (!TextUtils.isEmpty(binding.edMph.getText())) {
+                map.put("houseNumber", binding.edMph.getText().toString());
+            }
+            if (!TextUtils.isEmpty(binding.edSbxh.getText())) {
+                map.put("waterMeterXh", binding.edSbxh.getText().toString());
+            }
+            if (!TextUtils.isEmpty(binding.edBwbh1.getText()) || !TextUtils.isEmpty(binding.edBwbh2.getText())) {
+                map.put("meterNum", binding.edBwbh1.getText().toString() + bwbh.replace("空", "") + binding.edBwbh2.getText().toString());
+            }
+            if (!dictEntities.isEmpty()) {
+                StringBuilder stringBuilder = new StringBuilder();
+                for (DictEntity entity : dictEntities) {
+                    if (dictEntities.indexOf(entity) == 0) {
+                        stringBuilder.append(entity.getId());
+                    } else {
+                        stringBuilder.append(",").append(entity.getId());
+                    }
                 }
+                map.put("exceptionType", stringBuilder.toString());
+            }
+            if (!TextUtils.isEmpty(binding.edDescribe.getText())) {
+                map.put("exceptionDescribe", binding.edDescribe.getText().toString());
+            }
+        } else {
+            if (locationUtilXuNew != null) {
+                map.put("longitude", String.valueOf(locationUtilXuNew.Longtitude));
+                map.put("latitude", String.valueOf(locationUtilXuNew.Latitude));
+            }
+            if (!TextUtils.isEmpty(binding.tvAddr.getText())) {
+                map.put("mapLocation", binding.tvAddr.getText().toString());
+            }
+            if (!TextUtils.isEmpty(binding.tvXzq.getText())) {
+                map.put("regionName", binding.tvXzq.getText().toString());
+                map.put("installPosition", binding.tvXzq.getText().toString());
+            }
+            if (!TextUtils.isEmpty(areaCode)) {
+                map.put("regionCode", areaCode);
+            }
+            if (!TextUtils.isEmpty(binding.etUserAddr.getText())) {
+                map.put("userAddr", binding.etUserAddr.getText().toString());
+            }
+            if (!TextUtils.isEmpty(binding.edMph.getText())) {
+                map.put("houseNumber", binding.edMph.getText().toString());
+            }
+            if (!TextUtils.isEmpty(binding.edSbxh.getText())) {
+                map.put("waterMeterXh", binding.edSbxh.getText().toString());
+            }
+            if (!TextUtils.isEmpty(binding.edBwbh1.getText()) || !TextUtils.isEmpty(binding.edBwbh2.getText())) {
+                map.put("meterNum", binding.edBwbh1.getText().toString() + bwbh.replace("空", "") + binding.edBwbh2.getText().toString());
+            }
+            if (!dictEntities.isEmpty()) {
+                StringBuilder stringBuilder = new StringBuilder();
+                for (DictEntity entity : dictEntities) {
+                    if (dictEntities.indexOf(entity) == 0) {
+                        stringBuilder.append(entity.getId());
+                    } else {
+                        stringBuilder.append(",").append(entity.getId());
+                    }
+                }
+                map.put("exceptionType", stringBuilder.toString());
+            }
+            if (!TextUtils.isEmpty(binding.edDescribe.getText())) {
+                map.put("exceptionDescribe", binding.edDescribe.getText().toString());
             }
         }
+        mPresenter.getResultThree(requireContext(), map);
     }
 
     private boolean check() {
+        if (TextUtils.isEmpty(binding.tvLat.getText())) {
+            onMessage("请选择位置");
+            return false;
+        }
+        if (TextUtils.isEmpty(binding.tvXzq.getText())) {
+            onMessage("请选择行政区");
+            return false;
+        }
+        if (TextUtils.isEmpty(binding.etUserAddr.getText())) {
+            binding.etUserAddr.requestFocus();
+            onMessage("用户地址不能为空");
+            return false;
+        }
+        if (!dictEntities.isEmpty()) {
+            for (DictEntity dictEntity : dictEntities) {
+                if ("其他".equals(dictEntity.getItemText()) && TextUtils.isEmpty(binding.edDescribe.getText())) {
+                    onMessage("描述内容不能为空");
+                    binding.edDescribe.requestFocus();
+                    return false;
+                }
+            }
+        }
         return true;
     }
 
+    public void setQc(@NonNull String qc) {
+        switch (qcType) {
+            case 0:
+                String[] arr = qc.split("client_id");
+                if (arr.length > 1 && !TextUtils.isEmpty(arr[1])) {
+                    String sbbh = arr[1].replace(":", "")
+                            .replace("’", "")
+                            .replace("’", "")
+                            .replace("}", "");
+                    binding.edInternetIdCard.setText(sbbh);
+                } else {
+                    onMessage("无效二维码");
+                }
+                break;
+            case 1:
+                String[] arr1 = qc.split("node_id");
+                if (arr1.length > 1 && !TextUtils.isEmpty(arr1[1])) {
+                    String sbxh = arr1[1].replace(":", "")
+                            .replace("’", "")
+                            .replace("’", "")
+                            .replace("}", "");
+                    binding.edSbxh.setText(sbxh);
+                } else {
+                    onMessage("无效二维码");
+                }
+                break;
+            default:
+                break;
+        }
+    }
+
     @Override
     public void initMapView() {
         super.initMapView();
         aMap.setOnMapTouchListener(motionEvent -> {
             binding.llMap.mapView.requestDisallowInterceptTouchEvent(motionEvent.getAction() != MotionEvent.ACTION_UP);
-            isFirst = false;
         });
+        aMap.setOnCameraChangeListener(mapCameraChangeListener);
         binding.llMap.imDrag.setVisibility(View.VISIBLE);
         binding.llMap.imgNavit.setVisibility(View.GONE);
         binding.llMap.imgFw.setVisibility(View.GONE);
-        binding.llMap.imgAllScreen.setVisibility(View.GONE);
-        binding.llMap.imgLocation.setVisibility(View.GONE);
-        binding.llMap.imgMap.setVisibility(View.GONE);
+        binding.llMap.imgAllScreen.setOnClickListener(v -> {
+            if (MyApp.getInstance().isOverTime()) {
+                Intent intent = new Intent(requireContext(), LocationActivity.class);
+                intent.putExtra("locationUtilXuNew", locationUtilXuNew);
+                intent.putExtra("isRed", "1");
+                intent.putExtra("isDrag", true);
+                startActivityForResult(intent, 1105);
+            }
+        });
+        binding.llMap.imgLocation.setOnClickListener(v -> {
+            if (MyApp.getInstance().isOverTime() && lo != null) {
+                moveOrigin(lo.Longtitude, lo.Latitude, aMap.getCameraPosition().zoom);
+                if (!TextUtils.isEmpty(lo.addr)) {
+                    binding.tvAddr.setText(lo.addr);
+                }
+            }
+        });
         binding.llMap.imgMap.setOnClickListener(v -> checkMap());
         if (waterMeterEntity != null && waterMeterEntity.getLatitude() != null && waterMeterEntity.getLongitude() != null) {
             locationUtilXuNew = new LocationUtil_xu.CoordinateClass(Double.parseDouble(waterMeterEntity.getLongitude())
@@ -359,10 +744,31 @@ public class WaterCheckCorrectionFragment extends PhotoFragment {
     @Override
     public void initMapListener(LocationUtil_xu.CoordinateClass info, String headName, String shortName, String areaCode) {
         super.initMapListener(info, headName, shortName, areaCode);
-        if (!isFirst) {
-            locationUtilXuNew = info;
-            binding.tvLat.setText("经度:" + locationUtilXuNew.Longtitude + " 纬度:" + locationUtilXuNew.Latitude);
-            binding.tvAddr.setText(locationUtilXuNew.addr == null ? "" : locationUtilXuNew.addr);
+        locationUtilXuNew = info;
+        binding.tvLat.setText("经度:" + locationUtilXuNew.Longtitude + " 纬度:" + locationUtilXuNew.Latitude);
+        binding.tvAddr.setText(locationUtilXuNew.addr == null ? "" : locationUtilXuNew.addr);
+        this.headName = headName;
+        this.shortName = shortName;
+        this.areaCode = areaCode;
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (requestCode == 1105 && resultCode == 1106) {
+            if (data != null) {
+                locationUtilXuNew = (LocationUtil_xu.CoordinateClass) data.getSerializableExtra("locationUtilXuNew");
+                headName = data.getStringExtra("headName");
+                shortName = data.getStringExtra("shortName");
+                areaCode = data.getStringExtra("areaCode");
+                if (locationUtilXuNew != null) {
+                    moveOrigin(locationUtilXuNew.Longtitude, locationUtilXuNew.Latitude, aMap.getCameraPosition().zoom);
+                    binding.tvLat.setText("经度:" + locationUtilXuNew.Longtitude + " 纬度:" + locationUtilXuNew.Latitude);
+                    if (!TextUtils.isEmpty(locationUtilXuNew.addr)) {
+                        binding.tvAddr.setText(locationUtilXuNew.addr);
+                    }
+                }
+            }
         }
     }
 

+ 140 - 70
app/src/main/res/layout/fragment_uncailbrate_correction.xml

@@ -98,18 +98,18 @@
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginStart="@dimen/dp_10"
-                        android:text="费凯雷"
                         android:textColor="@color/color_555"
-                        android:textSize="@dimen/sp_16" />
+                        android:textSize="@dimen/sp_16"
+                        tools:text="费凯雷" />
 
                     <TextView
                         android:id="@+id/tv_fhsj"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginStart="@dimen/dp_10"
-                        android:text="2024-11-12 12:12:00"
                         android:textColor="@color/color_555"
-                        android:textSize="@dimen/sp_16" />
+                        android:textSize="@dimen/sp_16"
+                        tools:text="2024-11-12 12:12:00" />
                 </LinearLayout>
             </LinearLayout>
 
@@ -118,6 +118,28 @@
                 android:layout_height="@dimen/dp_5"
                 android:background="@color/line_gray" />
 
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/dp_15"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <View
+                    android:layout_width="@dimen/dp_4"
+                    android:layout_height="@dimen/dp_20"
+                    android:layout_marginStart="@dimen/dp_10"
+                    android:layout_marginEnd="@dimen/dp_6"
+                    android:background="@color/blue" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="情况登记"
+                    android:textColor="@color/color_333"
+                    android:textSize="@dimen/sp_20" />
+            </LinearLayout>
+
             <CheckBox
                 android:id="@+id/cb_sbwz"
                 android:layout_width="match_parent"
@@ -173,6 +195,13 @@
                     android:gravity="center_vertical"
                     android:orientation="horizontal">
 
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="*"
+                        android:textColor="@color/red"
+                        android:textSize="@dimen/sp_16" />
+
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -186,6 +215,7 @@
                         android:layout_height="wrap_content"
                         android:layout_marginStart="@dimen/dp_10"
                         android:gravity="end"
+                        android:hint="请选择位置"
                         android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
                 </LinearLayout>
@@ -207,6 +237,13 @@
                     android:gravity="center_vertical"
                     android:orientation="horizontal">
 
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="*"
+                        android:textColor="@color/red"
+                        android:textSize="@dimen/sp_16" />
+
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -216,14 +253,23 @@
 
                     <TextView
                         android:id="@+id/tv_xzq"
-                        android:layout_width="match_parent"
+                        android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginStart="@dimen/dp_10"
+                        android:layout_weight="1"
+                        android:drawableEnd="@mipmap/icon_arrow_up_gray"
+                        android:drawablePadding="@dimen/dp_8"
                         android:gravity="end"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_333"
                         android:textSize="@dimen/sp_16" />
 
+                    <ImageView
+                        android:id="@+id/img_achieve"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:paddingStart="@dimen/dp_10"
+                        android:src="@mipmap/icon_achieve" />
                 </LinearLayout>
 
                 <View
@@ -252,16 +298,22 @@
 
                     <EditText
                         android:id="@+id/et_user_addr"
-                        android:layout_width="match_parent"
+                        android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_marginStart="@dimen/dp_10"
+                        android:layout_weight="1"
                         android:background="@null"
-                        android:enabled="false"
                         android:gravity="end"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_333"
                         android:textSize="@dimen/sp_16" />
 
+                    <ImageView
+                        android:id="@+id/img_achieve_address"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:paddingStart="@dimen/dp_10"
+                        android:src="@mipmap/icon_achieve" />
                 </LinearLayout>
 
                 <View
@@ -295,11 +347,17 @@
                         android:layout_marginStart="@dimen/dp_10"
                         android:layout_weight="1"
                         android:background="@null"
-                        android:enabled="false"
                         android:gravity="end"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_333"
                         android:textSize="@dimen/sp_16" />
+
+                    <ImageView
+                        android:id="@+id/img_copy"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:paddingStart="@dimen/dp_10"
+                        android:src="@mipmap/icon_copy" />
                 </LinearLayout>
 
                 <View
@@ -333,13 +391,19 @@
                         android:layout_marginStart="@dimen/dp_10"
                         android:layout_weight="1"
                         android:background="@null"
-                        android:enabled="false"
                         android:gravity="end"
                         android:inputType="numberDecimal"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_333"
                         android:textSize="@dimen/sp_16" />
 
+                    <ImageView
+                        android:id="@+id/tv_sao_sbxh"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:paddingStart="@dimen/dp_10"
+                        android:src="@mipmap/icon_scan" />
+
                 </LinearLayout>
 
                 <View
@@ -364,18 +428,51 @@
                         android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
 
-                    <TextView
-                        android:id="@+id/tv_bwbh"
+                    <EditText
+                        android:id="@+id/ed_bwbh1"
                         android:layout_width="0dp"
                         android:layout_height="@dimen/dp_38"
                         android:layout_marginStart="@dimen/dp_40"
                         android:layout_weight="1"
-                        android:gravity="end|center_vertical"
+                        android:background="@drawable/frame_gray_4"
+                        android:gravity="center"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_333"
                         android:textSize="@dimen/sp_16"
                         tools:text="8" />
 
+                    <androidx.appcompat.widget.AppCompatSpinner
+                        android:id="@+id/spinner_bwbh"
+                        android:layout_width="@dimen/dp_56"
+                        android:layout_height="@dimen/dp_38"
+                        android:layout_marginStart="@dimen/dp_5"
+                        android:layout_marginTop="@dimen/dp_6"
+                        android:layout_marginBottom="@dimen/dp_6"
+                        android:background="@drawable/frame_gray_4"
+                        android:paddingEnd="@dimen/dp_5"
+                        android:textColor="@color/color_333"
+                        android:textSize="@dimen/sp_16" />
+
+                    <EditText
+                        android:id="@+id/ed_bwbh2"
+                        android:layout_width="0dp"
+                        android:layout_height="38dp"
+                        android:layout_marginStart="@dimen/dp_5"
+                        android:layout_weight="1"
+                        android:background="@drawable/frame_gray_4"
+                        android:gravity="center"
+                        android:inputType="number"
+                        android:textColor="@color/color_333"
+                        android:textColorHint="@color/color_333"
+                        android:textSize="@dimen/sp_16"
+                        tools:text="5" />
+
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/dp_7"
+                        android:src="@mipmap/icon_edit" />
+
                 </LinearLayout>
 
                 <View
@@ -413,40 +510,36 @@
                 android:orientation="vertical">
 
                 <LinearLayout
+                    android:id="@+id/ll_abnormal_view"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="@dimen/dp_10"
-                    android:layout_marginTop="@dimen/dp_14"
-                    android:layout_marginEnd="@dimen/dp_10"
-                    android:layout_marginBottom="@dimen/dp_13"
-                    android:gravity="center_vertical"
-                    android:orientation="horizontal">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="类型"
-                        android:textColor="@color/color_333"
-                        android:textSize="@dimen/sp_16" />
-
-                    <TextView
-                        android:id="@+id/tv_qklx"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_marginStart="@dimen/dp_10"
-                        android:gravity="end"
-                        android:textColor="@color/color_333"
-                        android:textColorHint="@color/color_333"
-                        android:textSize="@dimen/sp_16" />
+                    android:orientation="vertical" />
 
-                </LinearLayout>
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/dp_10"
+                    android:layout_marginTop="@dimen/dp_20"
+                    android:text="描述"
+                    android:textColor="@color/color_333"
+                    android:textSize="@dimen/sp_16" />
 
-                <View
+                <EditText
+                    android:id="@+id/ed_describe"
                     android:layout_width="match_parent"
-                    android:layout_height="@dimen/dp_1"
+                    android:layout_height="wrap_content"
                     android:layout_marginStart="@dimen/dp_10"
+                    android:layout_marginTop="@dimen/dp_8"
                     android:layout_marginEnd="@dimen/dp_10"
-                    android:background="@color/line_gray" />
+                    android:layout_marginBottom="@dimen/dp_10"
+                    android:background="@drawable/frame_gray"
+                    android:gravity="start"
+                    android:hint="请输入描述"
+                    android:minHeight="@dimen/dp_78"
+                    android:padding="@dimen/dp_8"
+                    android:textColor="@color/color_888"
+                    android:textColorHint="@color/color_888"
+                    android:textSize="@dimen/sp_16" />
 
                 <LinearLayout
                     android:layout_width="match_parent"
@@ -454,45 +547,16 @@
                     android:layout_marginStart="@dimen/dp_10"
                     android:layout_marginTop="@dimen/dp_14"
                     android:layout_marginEnd="@dimen/dp_10"
-                    android:layout_marginBottom="@dimen/dp_13"
                     android:gravity="center_vertical"
                     android:orientation="horizontal">
 
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:text="异常描述"
-                        android:textColor="@color/color_333"
-                        android:textSize="@dimen/sp_16" />
-
-                    <TextView
-                        android:id="@+id/tv_describe"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_marginStart="@dimen/dp_10"
-                        android:gravity="end"
-                        android:textColor="@color/color_333"
-                        android:textColorHint="@color/color_333"
+                        android:text="*"
+                        android:textColor="@color/red"
                         android:textSize="@dimen/sp_16" />
 
-                </LinearLayout>
-
-                <View
-                    android:layout_width="match_parent"
-                    android:layout_height="@dimen/dp_1"
-                    android:layout_marginStart="@dimen/dp_10"
-                    android:layout_marginEnd="@dimen/dp_10"
-                    android:background="@color/line_gray" />
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="@dimen/dp_10"
-                    android:layout_marginTop="@dimen/dp_14"
-                    android:layout_marginEnd="@dimen/dp_10"
-                    android:gravity="center_vertical"
-                    android:orientation="horizontal">
-
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -507,6 +571,11 @@
                         android:textColor="@color/color_999"
                         android:textSize="@dimen/sp_16" />
 
+                    <View
+                        android:layout_width="0dp"
+                        android:layout_height="@dimen/dp_1"
+                        android:layout_weight="1" />
+
                 </LinearLayout>
 
                 <androidx.recyclerview.widget.RecyclerView
@@ -515,6 +584,7 @@
                     android:layout_height="wrap_content"
                     android:nestedScrollingEnabled="false" />
             </LinearLayout>
+
         </LinearLayout>
 
     </androidx.core.widget.NestedScrollView>

+ 239 - 86
app/src/main/res/layout/fragment_water_check_correction.xml

@@ -99,18 +99,18 @@
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginStart="@dimen/dp_10"
-                        android:text="费凯雷"
                         android:textColor="@color/color_555"
-                        android:textSize="@dimen/sp_16" />
+                        android:textSize="@dimen/sp_16"
+                        tools:text="费凯雷" />
 
                     <TextView
                         android:id="@+id/tv_fhsj"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginStart="@dimen/dp_10"
-                        android:text="2024-11-12 12:12:00"
                         android:textColor="@color/color_555"
-                        android:textSize="@dimen/sp_16" />
+                        android:textSize="@dimen/sp_16"
+                        tools:text="2024-11-12 12:12:00" />
                 </LinearLayout>
             </LinearLayout>
 
@@ -159,16 +159,25 @@
 
                 <EditText
                     android:id="@+id/ed_internet_id_card"
-                    android:layout_width="match_parent"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="@dimen/dp_10"
                     android:layout_marginEnd="@dimen/dp_20"
+                    android:layout_weight="1"
                     android:background="@null"
-                    android:enabled="false"
                     android:gravity="end"
+                    android:hint="请输入"
                     android:textColor="@color/color_333"
                     android:textColorHint="@color/color_999"
                     android:textSize="@dimen/sp_16" />
+
+                <ImageView
+                    android:id="@+id/tv_sao"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/dp_10"
+                    android:src="@mipmap/icon_scan"
+                    android:visibility="gone" />
             </LinearLayout>
 
             <View
@@ -295,9 +304,9 @@
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_marginStart="@dimen/dp_10"
-                        android:layout_marginEnd="@dimen/dp_20"
                         android:background="@null"
-                        android:enabled="false"
+                        android:drawableEnd="@mipmap/icon_edit"
+                        android:drawablePadding="@dimen/dp_10"
                         android:gravity="end"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_333"
@@ -351,6 +360,44 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_14"
+                android:layout_marginEnd="@dimen/dp_10"
+                android:layout_marginBottom="@dimen/dp_13"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="有户无表"
+                    android:textColor="@color/color_333"
+                    android:textSize="@dimen/sp_16" />
+
+                <View
+                    android:layout_width="0dp"
+                    android:layout_height="@dimen/dp_1"
+                    android:layout_weight="1" />
+
+                <com.kyleduo.switchbutton.SwitchButton
+                    android:id="@+id/switch_exception"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="@dimen/dp_10"
+                    android:paddingVertical="@dimen/dp_1"
+                    app:kswBackColor="@drawable/check_red_gray"
+                    app:kswThumbColor="@color/white" />
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_1"
+                android:layout_marginStart="@dimen/dp_10"
+                android:layout_marginEnd="@dimen/dp_10"
+                android:background="@color/line_gray" />
+
             <CheckBox
                 android:id="@+id/cb_sbwz"
                 android:layout_width="match_parent"
@@ -406,6 +453,13 @@
                     android:gravity="center_vertical"
                     android:orientation="horizontal">
 
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="*"
+                        android:textColor="@color/red"
+                        android:textSize="@dimen/sp_16" />
+
                     <TextView
                         android:id="@+id/tv_lat_title"
                         android:layout_width="wrap_content"
@@ -442,6 +496,13 @@
                     android:gravity="center_vertical"
                     android:orientation="horizontal">
 
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="*"
+                        android:textColor="@color/red"
+                        android:textSize="@dimen/sp_16" />
+
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -455,11 +516,19 @@
                         android:layout_height="wrap_content"
                         android:layout_marginStart="@dimen/dp_10"
                         android:layout_weight="1"
+                        android:drawableEnd="@mipmap/icon_arrow_up_gray"
+                        android:drawablePadding="@dimen/dp_8"
                         android:gravity="end"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_333"
                         android:textSize="@dimen/sp_16" />
 
+                    <ImageView
+                        android:id="@+id/img_achieve"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:paddingStart="@dimen/dp_10"
+                        android:src="@mipmap/icon_achieve" />
                 </LinearLayout>
 
                 <View
@@ -479,6 +548,13 @@
                     android:gravity="center_vertical"
                     android:orientation="horizontal">
 
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="*"
+                        android:textColor="@color/red"
+                        android:textSize="@dimen/sp_16" />
+
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -493,12 +569,17 @@
                         android:layout_marginStart="@dimen/dp_10"
                         android:layout_weight="1"
                         android:background="@null"
-                        android:enabled="false"
                         android:gravity="end"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_333"
                         android:textSize="@dimen/sp_16" />
 
+                    <ImageView
+                        android:id="@+id/img_achieve_address"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:paddingStart="@dimen/dp_10"
+                        android:src="@mipmap/icon_achieve" />
                 </LinearLayout>
 
                 <View
@@ -532,12 +613,17 @@
                         android:layout_marginStart="@dimen/dp_10"
                         android:layout_weight="1"
                         android:background="@null"
-                        android:enabled="false"
                         android:gravity="end"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_333"
                         android:textSize="@dimen/sp_16" />
 
+                    <ImageView
+                        android:id="@+id/img_copy"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:paddingStart="@dimen/dp_10"
+                        android:src="@mipmap/icon_copy" />
                 </LinearLayout>
 
                 <View
@@ -571,13 +657,19 @@
                         android:layout_marginStart="@dimen/dp_10"
                         android:layout_weight="1"
                         android:background="@null"
-                        android:enabled="false"
                         android:gravity="end"
                         android:inputType="numberDecimal"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_333"
                         android:textSize="@dimen/sp_16" />
 
+                    <ImageView
+                        android:id="@+id/tv_sao_sbxh"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:paddingStart="@dimen/dp_10"
+                        android:src="@mipmap/icon_scan" />
+
                 </LinearLayout>
 
                 <View
@@ -602,15 +694,51 @@
                         android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
 
-                    <TextView
-                        android:id="@+id/tv_bwbh"
-                        android:layout_width="match_parent"
+                    <EditText
+                        android:id="@+id/ed_bwbh1"
+                        android:layout_width="0dp"
                         android:layout_height="@dimen/dp_38"
-                        android:gravity="end|center_vertical"
+                        android:layout_marginStart="@dimen/dp_40"
+                        android:layout_weight="1"
+                        android:background="@drawable/frame_gray_4"
+                        android:gravity="center"
                         android:textColor="@color/color_333"
+                        android:textColorHint="@color/color_333"
                         android:textSize="@dimen/sp_16"
                         tools:text="8" />
 
+                    <androidx.appcompat.widget.AppCompatSpinner
+                        android:id="@+id/spinner_bwbh"
+                        android:layout_width="@dimen/dp_56"
+                        android:layout_height="@dimen/dp_38"
+                        android:layout_marginStart="@dimen/dp_5"
+                        android:layout_marginTop="@dimen/dp_6"
+                        android:layout_marginBottom="@dimen/dp_6"
+                        android:background="@drawable/frame_gray_4"
+                        android:paddingEnd="@dimen/dp_5"
+                        android:textColor="@color/color_333"
+                        android:textSize="@dimen/sp_16" />
+
+                    <EditText
+                        android:id="@+id/ed_bwbh2"
+                        android:layout_width="0dp"
+                        android:layout_height="38dp"
+                        android:layout_marginStart="@dimen/dp_5"
+                        android:layout_weight="1"
+                        android:background="@drawable/frame_gray_4"
+                        android:gravity="center"
+                        android:inputType="number"
+                        android:textColor="@color/color_333"
+                        android:textColorHint="@color/color_333"
+                        android:textSize="@dimen/sp_16"
+                        tools:text="5" />
+
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/dp_7"
+                        android:src="@mipmap/icon_edit" />
+
                 </LinearLayout>
             </LinearLayout>
 
@@ -668,9 +796,9 @@
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_marginStart="@dimen/dp_10"
-                        android:layout_marginEnd="@dimen/dp_20"
                         android:background="@null"
-                        android:enabled="false"
+                        android:drawableEnd="@mipmap/icon_edit"
+                        android:drawablePadding="@dimen/dp_10"
                         android:gravity="end"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_333"
@@ -706,8 +834,9 @@
                         android:id="@+id/spinner_brand"
                         android:layout_width="wrap_content"
                         android:layout_height="@dimen/dp_20"
-                        android:layout_alignParentEnd="true"
+                        android:layout_alignParentRight="true"
                         android:background="@null"
+                        android:gravity="right"
                         android:minWidth="@dimen/dp_150"
                         android:paddingHorizontal="@dimen/dp_20"
                         android:spinnerMode="dropdown" />
@@ -741,8 +870,9 @@
                         android:id="@+id/spinner_water_caliber"
                         android:layout_width="wrap_content"
                         android:layout_height="@dimen/dp_20"
-                        android:layout_alignParentEnd="true"
+                        android:layout_alignParentRight="true"
                         android:background="@null"
+                        android:gravity="right"
                         android:minWidth="@dimen/dp_150"
                         android:paddingHorizontal="@dimen/dp_20"
                         android:spinnerMode="dropdown" />
@@ -812,8 +942,9 @@
                         android:id="@+id/spinner_sblc"
                         android:layout_width="wrap_content"
                         android:layout_height="@dimen/dp_20"
-                        android:layout_alignParentEnd="true"
+                        android:layout_alignParentRight="true"
                         android:background="@null"
+                        android:gravity="right"
                         android:minWidth="@dimen/dp_150"
                         android:paddingHorizontal="@dimen/dp_20"
                         android:spinnerMode="dropdown" />
@@ -898,18 +1029,58 @@
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginStart="@dimen/dp_10"
-                        android:layout_marginEnd="@dimen/dp_20"
                         android:background="@null"
-                        android:enabled="false"
+                        android:drawableEnd="@mipmap/icon_edit"
+                        android:drawablePadding="@dimen/dp_10"
                         android:gravity="end"
+                        android:hint="请输入"
                         android:inputType="number"
                         android:minWidth="@dimen/dp_100"
+                        android:text="0"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_999"
                         android:textSize="@dimen/sp_16" />
 
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:layout_marginStart="@dimen/dp_10"
+                    android:layout_marginEnd="@dimen/dp_10"
+                    android:background="@color/line_gray" />
+
+                <RelativeLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/dp_10"
+                    android:layout_marginTop="@dimen/dp_14"
+                    android:layout_marginEnd="@dimen/dp_10"
+                    android:layout_marginBottom="@dimen/dp_13"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_centerVertical="true"
+                        android:text="最近抄表"
+                        android:textColor="@color/color_333"
+                        android:textSize="@dimen/sp_16" />
+
+                    <TextView
+                        android:id="@+id/tv_last_recent_remark"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/dp_10"
+                        android:layout_marginEnd="@dimen/dp_20"
+                        android:enabled="false"
+                        android:gravity="end"
+                        android:textColor="@color/color_333"
+                        android:textColorHint="@color/color_333"
+                        android:textSize="@dimen/sp_16"
+                        tools:text="1" />
+                </RelativeLayout>
+
                 <View
                     android:layout_width="match_parent"
                     android:layout_height="@dimen/dp_1"
@@ -940,7 +1111,8 @@
                         android:layout_height="wrap_content"
                         android:layout_marginStart="@dimen/dp_10"
                         android:background="@null"
-                        android:enabled="false"
+                        android:drawableEnd="@mipmap/icon_edit"
+                        android:drawablePadding="@dimen/dp_10"
                         android:gravity="end"
                         android:textColor="@color/color_333"
                         android:textColorHint="@color/color_333"
@@ -959,11 +1131,17 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="@dimen/dp_10"
-                    android:layout_marginTop="@dimen/dp_10"
                     android:layout_marginEnd="@dimen/dp_10"
                     android:gravity="center_vertical"
                     android:orientation="horizontal">
 
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="*"
+                        android:textColor="@color/red"
+                        android:textSize="@dimen/sp_16" />
+
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -971,6 +1149,11 @@
                         android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
 
+                    <View
+                        android:layout_width="0dp"
+                        android:layout_height="@dimen/dp_1"
+                        android:layout_weight="1" />
+
                 </LinearLayout>
 
                 <androidx.recyclerview.widget.RecyclerView
@@ -991,7 +1174,6 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="@dimen/dp_10"
-                    android:layout_marginTop="@dimen/dp_10"
                     android:layout_marginEnd="@dimen/dp_10"
                     android:gravity="center_vertical"
                     android:orientation="horizontal">
@@ -1003,6 +1185,11 @@
                         android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
 
+                    <View
+                        android:layout_width="0dp"
+                        android:layout_height="@dimen/dp_1"
+                        android:layout_weight="1" />
+
                 </LinearLayout>
 
                 <androidx.recyclerview.widget.RecyclerView
@@ -1015,6 +1202,7 @@
             </LinearLayout>
 
             <View
+                android:id="@+id/v_detail"
                 android:layout_width="match_parent"
                 android:layout_height="@dimen/dp_1"
                 android:layout_marginStart="@dimen/dp_10"
@@ -1047,76 +1235,36 @@
                 android:orientation="vertical">
 
                 <LinearLayout
+                    android:id="@+id/ll_abnormal_view"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginStart="@dimen/dp_10"
-                    android:layout_marginTop="@dimen/dp_14"
-                    android:layout_marginEnd="@dimen/dp_10"
-                    android:layout_marginBottom="@dimen/dp_13"
-                    android:gravity="center_vertical"
-                    android:orientation="horizontal">
+                    android:orientation="vertical" />
 
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="类型"
-                        android:textColor="@color/color_333"
-                        android:textSize="@dimen/sp_16" />
-
-                    <TextView
-                        android:id="@+id/tv_qklx"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_marginStart="@dimen/dp_10"
-                        android:gravity="end"
-                        android:textColor="@color/color_333"
-                        android:textColorHint="@color/color_333"
-                        android:textSize="@dimen/sp_16" />
-
-                </LinearLayout>
-
-                <View
-                    android:layout_width="match_parent"
-                    android:layout_height="@dimen/dp_1"
-                    android:layout_marginStart="@dimen/dp_10"
-                    android:layout_marginEnd="@dimen/dp_10"
-                    android:background="@color/line_gray" />
-
-                <LinearLayout
-                    android:layout_width="match_parent"
+                <TextView
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="@dimen/dp_10"
-                    android:layout_marginTop="@dimen/dp_14"
-                    android:layout_marginEnd="@dimen/dp_10"
-                    android:layout_marginBottom="@dimen/dp_13"
-                    android:gravity="center_vertical"
-                    android:orientation="horizontal">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="异常描述"
-                        android:textColor="@color/color_333"
-                        android:textSize="@dimen/sp_16" />
-
-                    <TextView
-                        android:id="@+id/tv_describe"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_marginStart="@dimen/dp_10"
-                        android:gravity="end"
-                        android:textColor="@color/color_333"
-                        android:textColorHint="@color/color_333"
-                        android:textSize="@dimen/sp_16" />
-
-                </LinearLayout>
+                    android:layout_marginTop="@dimen/dp_20"
+                    android:text="异常描述"
+                    android:textColor="@color/color_333"
+                    android:textSize="@dimen/sp_16" />
 
-                <View
+                <EditText
+                    android:id="@+id/ed_describe"
                     android:layout_width="match_parent"
-                    android:layout_height="@dimen/dp_1"
+                    android:layout_height="wrap_content"
                     android:layout_marginStart="@dimen/dp_10"
+                    android:layout_marginTop="@dimen/dp_8"
                     android:layout_marginEnd="@dimen/dp_10"
-                    android:background="@color/line_gray" />
+                    android:layout_marginBottom="@dimen/dp_10"
+                    android:background="@drawable/frame_gray"
+                    android:gravity="start"
+                    android:hint="描述内容"
+                    android:minHeight="@dimen/dp_78"
+                    android:padding="@dimen/dp_8"
+                    android:textColor="@color/color_888"
+                    android:textColorHint="@color/color_888"
+                    android:textSize="@dimen/sp_16" />
 
                 <LinearLayout
                     android:id="@+id/ll_error_photo"
@@ -1143,6 +1291,11 @@
                         android:textColor="@color/color_999"
                         android:textSize="@dimen/sp_16" />
 
+                    <View
+                        android:layout_width="0dp"
+                        android:layout_height="@dimen/dp_1"
+                        android:layout_weight="1" />
+
                 </LinearLayout>
 
                 <androidx.recyclerview.widget.RecyclerView