Browse Source

外业抽查

ychk 5 months ago
parent
commit
bb242ebfec

+ 8 - 2
app/src/main/java/com/tofly/yxpc/base/Api.java

@@ -154,6 +154,12 @@ public interface Api {
     /**
      * 获取抽检历史记录
      */
-    @GET("dsfsss")
-    Observable<BaseResponse<PageInfo<WorkCheckBean>>> getCheckHistory(@Body RequestBody body);
+    @POST("yt/yxswWaterMeterCheck/page")
+    Observable<PageInfo<WorkCheckBean>> getCheckHistory(@Body RequestBody body);
+
+    /**
+     * 抽检上传
+     */
+    @POST("yt/yxswWaterMeterCheck/check")
+    Observable<BaseResponse> submitWorkCheck(@Body RequestBody body);
 }

+ 138 - 0
app/src/main/java/com/tofly/yxpc/entity/WorkCheckBean.java

@@ -1,4 +1,142 @@
 package com.tofly.yxpc.entity;
 
 public class WorkCheckBean {
+
+    private Long id;
+    private String checkUser;
+    private String checkUserName;
+    private String checkTime;
+    private String checkRemark;
+    private Long inspectId;
+    private Long detailsId;
+    private String userNum;
+    private String waterMeterNum;
+    private String userAddr;
+    private String inspectUser;
+    private String inspectUserName;
+    private String inspectResult;
+    private String inspectResultText;
+    private String inspectTime;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCheckUser() {
+        return checkUser;
+    }
+
+    public void setCheckUser(String checkUser) {
+        this.checkUser = checkUser;
+    }
+
+    public String getCheckUserName() {
+        return checkUserName;
+    }
+
+    public void setCheckUserName(String checkUserName) {
+        this.checkUserName = checkUserName;
+    }
+
+    public String getCheckTime() {
+        return checkTime;
+    }
+
+    public void setCheckTime(String checkTime) {
+        this.checkTime = checkTime;
+    }
+
+    public String getCheckRemark() {
+        return checkRemark;
+    }
+
+    public void setCheckRemark(String checkRemark) {
+        this.checkRemark = checkRemark;
+    }
+
+    public Long getInspectId() {
+        return inspectId;
+    }
+
+    public void setInspectId(Long inspectId) {
+        this.inspectId = inspectId;
+    }
+
+    public Long getDetailsId() {
+        return detailsId;
+    }
+
+    public void setDetailsId(Long detailsId) {
+        this.detailsId = detailsId;
+    }
+
+    public String getUserNum() {
+        return userNum;
+    }
+
+    public void setUserNum(String userNum) {
+        this.userNum = userNum;
+    }
+
+    public String getWaterMeterNum() {
+        return waterMeterNum;
+    }
+
+    public void setWaterMeterNum(String waterMeterNum) {
+        this.waterMeterNum = waterMeterNum;
+    }
+
+    public String getUserAddr() {
+        return userAddr;
+    }
+
+    public void setUserAddr(String userAddr) {
+        this.userAddr = userAddr;
+    }
+
+    public String getInspectUser() {
+        return inspectUser;
+    }
+
+    public void setInspectUser(String inspectUser) {
+        this.inspectUser = inspectUser;
+    }
+
+    public String getInspectUserName() {
+        return inspectUserName;
+    }
+
+    public void setInspectUserName(String inspectUserName) {
+        this.inspectUserName = inspectUserName;
+    }
+
+    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 getInspectTime() {
+        return inspectTime;
+    }
+
+    public void setInspectTime(String inspectTime) {
+        this.inspectTime = inspectTime;
+    }
+
 }

+ 19 - 4
app/src/main/java/com/tofly/yxpc/ui/activity/WorkCheckHistoryActivity.java

@@ -12,6 +12,7 @@ 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.latte_core.utils.AccountManager;
 import com.tofly.yxpc.base.MyApp;
 import com.tofly.yxpc.databinding.ActivityWorkCheckHistoryBinding;
 import com.tofly.yxpc.entity.PageInfo;
@@ -40,6 +41,10 @@ public class WorkCheckHistoryActivity extends LatteActivity {
      * 0,用户编号,1、水表表身号
      */
     private int type = 0;
+    /**
+     * 0,用户编号,1、水表表身号
+     */
+    private int checkType = 0;
 
     @Override
     public Object setLayout() {
@@ -109,8 +114,9 @@ public class WorkCheckHistoryActivity extends LatteActivity {
         });
         binding.tvSearch.setOnClickListener(v -> {
             if (MyApp.getInstance().isOverTime()) {
-                DialogUtils.YhbhDialog(this, false, yhbh -> {
+                DialogUtils.YhbhDialog(this, false, (yhbh, checkType) -> {
                     this.yhbh = yhbh;
+                    this.checkType = checkType;
                     page = 1;
                     getData();
                 });
@@ -127,9 +133,10 @@ public class WorkCheckHistoryActivity extends LatteActivity {
     }
 
     private void getWater() {
+        showLoading("正在查询");
         Map<String, Object> map = new HashMap<>();
         if (type == 0) {
-            map.put("yhbh", binding.etSearch.getText().toString());
+            map.put("userNum", binding.etSearch.getText().toString());
         } else {
             map.put("waterMeterNum", binding.etSearch.getText().toString());
         }
@@ -144,7 +151,14 @@ public class WorkCheckHistoryActivity extends LatteActivity {
                 binding.swipeRefreshLayout.setRefreshing(true);
             }
             Map<String, Object> map = new HashMap<>();
-            map.put("id", yhbh);
+            if (checkType == 0) {
+                map.put("userNum", yhbh);
+            } else {
+                map.put("waterMeterNum", yhbh);
+            }
+            map.put("page", page);
+            map.put("pageSize", 10);
+            map.put("checkUser", AccountManager.getUserId());
             mPresenter.getResultOne(this, map);
         } else {
             onMessage("请输入用户编号");
@@ -237,9 +251,10 @@ public class WorkCheckHistoryActivity extends LatteActivity {
                     waterMeter.setTaskState(0);
                 }
             }
-            Intent intent = new Intent(this, WorkCheckHistoryActivity.class);
+            Intent intent = new Intent(this, WorkCheckActivity.class);
             intent.putExtra("data", JSON.toJSONString(waterMeter));
             startActivity(intent);
         }
+        hideLoading();
     }
 }

+ 23 - 1
app/src/main/java/com/tofly/yxpc/ui/adapter/WorkCheckAdapter.java

@@ -1,5 +1,7 @@
 package com.tofly.yxpc.ui.adapter;
 
+import android.text.TextUtils;
+
 import androidx.annotation.Nullable;
 
 import com.chad.library.adapter.base.BaseQuickAdapter;
@@ -17,6 +19,26 @@ public class WorkCheckAdapter extends BaseQuickAdapter<WorkCheckBean, BaseViewHo
 
     @Override
     protected void convert(BaseViewHolder helper, WorkCheckBean item) {
-        // helper.setText(R.id.tv_yhxm,item.get==null?"":item.get);
+        if (!TextUtils.isEmpty(item.getInspectResult())) {
+            switch (item.getInspectResult()) {
+                case "a3f42e78-f4d6-495b-8fb4-e4824d499094":
+                    helper.setBackgroundRes(R.id.img_type, R.mipmap.icon_data_normal);
+                    break;
+                case "2e256fe7-69be-4674-86ea-29890ab6eeb9":
+                    helper.setBackgroundRes(R.id.img_type, R.mipmap.icon_data_error);
+                    break;
+                default:
+                    helper.setBackgroundRes(R.id.img_type, R.mipmap.icon_data_unable);
+                    break;
+            }
+        }
+        helper.setText(R.id.tv_yhxm, item.getInspectUserName() == null ? "" : item.getInspectUserName())
+                .setText(R.id.tv_time, item.getInspectTime() == null ? "" : item.getInspectTime().substring(5, item.getInspectTime().length() - 3))
+                .setText(R.id.tv_yhbh, item.getUserNum() == null ? "" : item.getUserNum())
+                .setText(R.id.tv_sbbsh, item.getWaterMeterNum() == null ? "" : item.getWaterMeterNum())
+                .setText(R.id.tv_yhdz, item.getUserAddr() == null ? "" : item.getUserAddr())
+                .setText(R.id.tv_check_time, item.getCheckTime() == null ? "" : item.getCheckTime().substring(5, item.getCheckTime().length() - 3))
+                .setText(R.id.tv_check_people, item.getCheckUserName() == null ? "" : item.getCheckUserName())
+                .setText(R.id.tv_check_content, item.getCheckRemark() == null ? "" : item.getCheckRemark());
     }
 }

+ 33 - 2
app/src/main/java/com/tofly/yxpc/ui/fragment/UnCalibrateWorkFragment.java

@@ -2,6 +2,7 @@ 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;
@@ -11,6 +12,7 @@ import android.widget.LinearLayout;
 
 import androidx.annotation.Nullable;
 
+import com.alibaba.fastjson.JSON;
 import com.tofly.latte_core.base.LatteContract;
 import com.tofly.latte_core.utils.AccountManager;
 import com.tofly.yxpc.R;
@@ -25,6 +27,7 @@ import com.tofly.yxpc.map.LocationUtil_xu;
 import com.tofly.yxpc.ui.activity.ImageTextNavitActivity;
 import com.tofly.yxpc.ui.activity.LocationActivity;
 import com.tofly.yxpc.ui.adapter.BigPictureAdapter;
+import com.tofly.yxpc.ui.impl.WorkCheckImpl;
 import com.tofly.yxpc.utils.DateUtils;
 import com.tofly.yxpc.utils.DialogUtils;
 import com.tofly.yxpc.utils.RecyclerViewUtils;
@@ -33,7 +36,9 @@ 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;
 
 public class UnCalibrateWorkFragment extends PhotoFragment {
 
@@ -64,7 +69,17 @@ public class UnCalibrateWorkFragment extends PhotoFragment {
 
     @Override
     protected LatteContract.LattePresenter createPresenter() {
-        return null;
+        return new WorkCheckImpl();
+    }
+
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        setIsLocation(false);
+        super.onCreate(savedInstanceState);
+        Bundle bundle = this.getArguments();
+        if (bundle != null) {
+            waterMeterEntity = JSON.parseObject(bundle.getString("data"), WaterMeterEntity.class);
+        }
     }
 
     @Override
@@ -91,8 +106,13 @@ public class UnCalibrateWorkFragment extends PhotoFragment {
         binding.cbNavit.setOnClickListener(v -> binding.llNavit.setVisibility(binding.cbNavit.isChecked() ? View.VISIBLE : View.GONE));
 
         binding.tvSubmit.setOnClickListener(v -> {
-            if (check()) {
+            if (check() && waterMeterEntity != null) {
                 DialogUtils.showDialog(requireContext(), "提示", "是否确定上传数据", false, (dialog, which) -> {
+                    Map<String, Object> map = new HashMap<>();
+                    map.put("checkRemark", binding.etInspectResult.getText().toString());
+                    map.put("userNum", waterMeterEntity.getUserNum());
+                    map.put("waterMeterNum", waterMeterEntity.getWaterMeterNum());
+                    mPresenter.getResultThree(requireContext(), map);
                 });
             }
         });
@@ -250,6 +270,7 @@ public class UnCalibrateWorkFragment extends PhotoFragment {
                 startActivityForResult(intent, 1105);
             }
         });
+        binding.llMap.imgLocation.setVisibility(View.GONE);
         binding.llMap.imgLocation.setOnClickListener(v -> {
             if (MyApp.getInstance().isOverTime() && lo != null) {
                 moveOrigin(lo.Longtitude, lo.Latitude, aMap.getCameraPosition().zoom);
@@ -258,6 +279,7 @@ public class UnCalibrateWorkFragment extends PhotoFragment {
                 }
             }
         });
+        binding.llMap.imgMap.setVisibility(View.GONE);
         binding.llMap.imgMap.setOnClickListener(v -> {
             checkMap();
         });
@@ -310,4 +332,13 @@ public class UnCalibrateWorkFragment extends PhotoFragment {
     public <T> void getResultOne(T response) {
 
     }
+
+    @Override
+    public <T> void getResultThree(T response) {
+        super.getResultThree(response);
+        if (response != null) {
+            onMessage("提交成功");
+            requireActivity().finish();
+        }
+    }
 }

+ 38 - 3
app/src/main/java/com/tofly/yxpc/ui/fragment/WaterCheckWorkFragment.java

@@ -2,6 +2,7 @@ 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;
@@ -11,6 +12,7 @@ import android.widget.LinearLayout;
 
 import androidx.annotation.Nullable;
 
+import com.alibaba.fastjson.JSON;
 import com.tofly.latte_core.base.LatteContract;
 import com.tofly.latte_core.utils.AccountManager;
 import com.tofly.yxpc.R;
@@ -25,6 +27,7 @@ import com.tofly.yxpc.map.LocationUtil_xu;
 import com.tofly.yxpc.ui.activity.ImageTextNavitActivity;
 import com.tofly.yxpc.ui.activity.LocationActivity;
 import com.tofly.yxpc.ui.adapter.BigPictureAdapter;
+import com.tofly.yxpc.ui.impl.WorkCheckImpl;
 import com.tofly.yxpc.utils.DateUtils;
 import com.tofly.yxpc.utils.DialogUtils;
 import com.tofly.yxpc.utils.RecyclerViewUtils;
@@ -33,7 +36,9 @@ 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;
 
 public class WaterCheckWorkFragment extends PhotoFragment {
 
@@ -72,7 +77,17 @@ public class WaterCheckWorkFragment extends PhotoFragment {
 
     @Override
     protected LatteContract.LattePresenter createPresenter() {
-        return null;
+        return new WorkCheckImpl();
+    }
+
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        setIsLocation(false);
+        super.onCreate(savedInstanceState);
+        Bundle bundle = this.getArguments();
+        if (bundle != null) {
+            waterMeterEntity = JSON.parseObject(bundle.getString("data"), WaterMeterEntity.class);
+        }
     }
 
     @Override
@@ -116,6 +131,7 @@ public class WaterCheckWorkFragment extends PhotoFragment {
 
             }
         });
+        binding.spinnerBrand.setEnabled(false);
 
         List<String> calibarList = new ArrayList<>();
         calibarIdList.clear();
@@ -138,6 +154,7 @@ public class WaterCheckWorkFragment extends PhotoFragment {
 
             }
         });
+        binding.spinnerWaterCaliber.setEnabled(false);
 
         List<String> typeList = new ArrayList<>();
         typeIdList.clear();
@@ -160,6 +177,7 @@ public class WaterCheckWorkFragment extends PhotoFragment {
 
             }
         });
+        binding.spinnerWaterType.setEnabled(false);
 
         List<String> sblcList = new ArrayList<>();
         sblcIdList.clear();
@@ -182,6 +200,7 @@ public class WaterCheckWorkFragment extends PhotoFragment {
 
             }
         });
+        binding.spinnerSblc.setEnabled(false);
 
         List<String> natureList = new ArrayList<>();
         natureIdList.clear();
@@ -204,6 +223,7 @@ public class WaterCheckWorkFragment extends PhotoFragment {
 
             }
         });
+        binding.spinnerUseWaterProperties.setEnabled(false);
 
         bpPhotoList.clear();
         bpPictureAdapter = new BigPictureAdapter(bpPhotoList, true, waterMeterEntity.getIsOnline(), size -> {
@@ -225,9 +245,13 @@ public class WaterCheckWorkFragment extends PhotoFragment {
         binding.cbNavit.setOnClickListener(v -> binding.llNavit.setVisibility(binding.cbNavit.isChecked() ? View.VISIBLE : View.GONE));
 
         binding.tvSubmit.setOnClickListener(v -> {
-            if (check()) {
+            if (check() && waterMeterEntity != null) {
                 DialogUtils.showDialog(requireContext(), "提示", "是否确定上传数据", false, (dialog, which) -> {
-
+                    Map<String, Object> map = new HashMap<>();
+                    map.put("checkRemark", binding.etInspectResult.getText().toString());
+                    map.put("userNum", waterMeterEntity.getUserNum());
+                    map.put("waterMeterNum", waterMeterEntity.getWaterMeterNum());
+                    mPresenter.getResultThree(requireContext(), map);
                 });
             }
         });
@@ -469,6 +493,7 @@ public class WaterCheckWorkFragment extends PhotoFragment {
                 startActivityForResult(intent, 1105);
             }
         });
+        binding.llMap.imgLocation.setVisibility(View.GONE);
         binding.llMap.imgLocation.setOnClickListener(v -> {
             if (MyApp.getInstance().isOverTime() && lo != null) {
                 moveOrigin(lo.Longtitude, lo.Latitude, aMap.getCameraPosition().zoom);
@@ -477,6 +502,7 @@ public class WaterCheckWorkFragment extends PhotoFragment {
                 }
             }
         });
+        binding.llMap.imgMap.setVisibility(View.GONE);
         binding.llMap.imgMap.setOnClickListener(v -> checkMap());
         if (waterMeterEntity != null && waterMeterEntity.getLatitude() != null && waterMeterEntity.getLongitude() != null) {
             locationUtilXuNew = new LocationUtil_xu.CoordinateClass(Double.parseDouble(waterMeterEntity.getLongitude())
@@ -527,4 +553,13 @@ public class WaterCheckWorkFragment extends PhotoFragment {
     public <T> void getResultOne(T response) {
 
     }
+
+    @Override
+    public <T> void getResultThree(T response) {
+        super.getResultThree(response);
+        if (response != null) {
+            onMessage("提交成功");
+            requireActivity().finish();
+        }
+    }
 }

+ 31 - 5
app/src/main/java/com/tofly/yxpc/ui/impl/WorkCheckImpl.java

@@ -25,15 +25,14 @@ public class WorkCheckImpl extends LattePresenterImpl {
         LatteNetWorkApi.getApiService(Api.class)
                 .getCheckHistory(RequestBodyUtils.toRequestBodyJson(JSON.toJSONString(map)))
                 .compose(RxHelper.observableIO2Main(context))
-                .subscribe(new BaseObserver<BaseResponse<PageInfo<WorkCheckBean>>>() {
+                .subscribe(new BaseObserver<PageInfo<WorkCheckBean>>() {
                     @Override
-                    public void onSuccess(BaseResponse<PageInfo<WorkCheckBean>> demo) {
+                    public void onSuccess(PageInfo<WorkCheckBean> demo) {
                         if (isViewAttached()) {
-                            if (Constants.SUCCESS.equals(demo.getCode())) {
-                                getView().getResultOne(demo.getData());
+                            if (demo.getRecords() != null && !demo.getRecords().isEmpty()) {
+                                getView().getResultOne(demo);
                             } else {
                                 getView().getResultOne(null);
-                                getView().onMessage(demo.getMessage());
                             }
                         }
                     }
@@ -76,4 +75,31 @@ public class WorkCheckImpl extends LattePresenterImpl {
                     }
                 });
     }
+
+    @Override
+    public void getResultThree(Context context, Map<String, Object> map) {
+        super.getResultThree(context, map);
+        LatteNetWorkApi.getApiService(Api.class)
+                .submitWorkCheck(RequestBodyUtils.toRequestBodyJson(JSON.toJSONString(map)))
+                .compose(RxHelper.observableIO2Main(context))
+                .subscribe(new BaseObserver<BaseResponse>() {
+                    @Override
+                    public void onSuccess(BaseResponse demo) {
+                        if (isViewAttached()) {
+                            if (Constants.SUCCESS.equals(demo.getCode())) {
+                                getView().getResultThree(demo.getCode());
+                            } else {
+                                getView().onMessage(demo.getMessage());
+                            }
+                        }
+                    }
+
+                    @Override
+                    public void onFailure(Throwable e, String errorMsg) {
+                        if (isViewAttached()) {
+                            getView().onMessage(errorMsg);
+                        }
+                    }
+                });
+    }
 }

+ 32 - 4
app/src/main/java/com/tofly/yxpc/utils/DialogUtils.java

@@ -8,10 +8,12 @@ import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.WindowManager;
+import android.widget.AdapterView;
 import android.widget.EditText;
 import android.widget.TextView;
 
 import androidx.appcompat.app.AlertDialog;
+import androidx.appcompat.widget.AppCompatSpinner;
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 
@@ -23,6 +25,7 @@ import com.tofly.yxpc.greenDao.XzqEntityDao;
 import com.tofly.yxpc.ui.adapter.XzqAdapter;
 import com.tofly.yxpc.utils.db.DaoUtilsStore;
 
+import java.util.Arrays;
 import java.util.List;
 import java.util.Objects;
 
@@ -97,6 +100,7 @@ public class DialogUtils {
     }
 
     public static void YhbhDialog(Context context, boolean cancelable, final OnYhbhListener listener) {
+        int[] ints = new int[]{0};
         AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.dialog);
         View view = LayoutInflater.from(context).inflate(R.layout.dialog_yhbh, null);
         builder.setView(view).setCancelable(cancelable);
@@ -110,13 +114,32 @@ public class DialogUtils {
         EditText etContent = view.findViewById(R.id.et_content);
         TextView tvCancel = view.findViewById(R.id.btn_cancel);
         TextView tvOk = view.findViewById(R.id.btn_ok);
+        AppCompatSpinner spinner = view.findViewById(R.id.spinner_type);
+        List<String> typeList = Arrays.asList("用户编号", "表身号");
+        SpinnerUtils.initSpinner(context, spinner, typeList);
+        spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                ints[0] = position;
+                if (position == 0) {
+                    etContent.setHint("请输入用户编号");
+                } else {
+                    etContent.setHint("请输入表身号");
+                }
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+
+            }
+        });
         tvCancel.setOnClickListener(v -> dialog.dismiss());
         tvOk.setOnClickListener(v -> {
             if (TextUtils.isEmpty(etContent.getText())) {
                 etContent.requestFocus();
-                ToastUtils.showToast("水表编号不能为空");
+                ToastUtils.showToast(ints[0] == 0 ? "水表编号不能为空" : "请输入表身号");
             } else {
-                listener.yhbh(etContent.getText().toString());
+                listener.yhbh(etContent.getText().toString(), ints[0]);
                 dialog.dismiss();
             }
         });
@@ -124,10 +147,10 @@ public class DialogUtils {
 
     public interface OnYhbhListener {
 
-        void yhbh(String yhbh);
+        void yhbh(String yhbh, int type);
     }
 
-    public static void YhInfoDialog(Context context, boolean cancelable, WaterMeterEntity waterMeter, String operationType, final OnYhbhListener listener) {
+    public static void YhInfoDialog(Context context, boolean cancelable, WaterMeterEntity waterMeter, String operationType, final OnYhbhInfoListener listener) {
         AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.dialog);
         View view = LayoutInflater.from(context).inflate(R.layout.dialog_yh_info, null);
         builder.setView(view).setCancelable(cancelable);
@@ -162,4 +185,9 @@ public class DialogUtils {
             dialog.dismiss();
         });
     }
+
+    public interface OnYhbhInfoListener {
+
+        void yhbh(String yhbh);
+    }
 }

+ 11 - 3
app/src/main/res/layout/dialog_yhbh.xml

@@ -24,13 +24,21 @@
             android:textColor="@color/color_333"
             android:textSize="@dimen/sp_18" />
 
+        <androidx.appcompat.widget.AppCompatSpinner
+            android:id="@+id/spinner_type"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginHorizontal="@dimen/dp_20"
+            android:layout_marginTop="@dimen/dp_20"
+            android:background="@color/white"
+            android:spinnerMode="dropdown" />
+
         <EditText
             android:id="@+id/et_content"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/dp_20"
-            android:layout_marginTop="@dimen/dp_30"
-            android:layout_marginEnd="@dimen/dp_20"
+            android:layout_marginHorizontal="@dimen/dp_20"
+            android:layout_marginTop="@dimen/dp_10"
             android:hint="请输入用户编号"
             android:inputType="number"
             android:singleLine="true"

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

@@ -100,8 +100,7 @@
                 android:layout_height="wrap_content"
                 android:layout_weight="1"
                 android:gravity="center_horizontal"
-                android:orientation="vertical"
-                android:visibility="gone">
+                android:orientation="vertical">
 
                 <ImageView
                     android:layout_width="wrap_content"

+ 68 - 69
app/src/main/res/layout/fragment_uncalibrate_work.xml

@@ -63,6 +63,74 @@
                     android:textSize="@dimen/sp_20" />
             </LinearLayout>
 
+            <LinearLayout
+                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/color_333"
+                    android:textSize="@dimen/sp_16" />
+
+                <TextView
+                    android:id="@+id/tv_inspect_people"
+                    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:gravity="end"
+                    android:textColor="@color/color_333"
+                    android:textSize="@dimen/sp_16" />
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_1"
+                android:layout_margin="@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_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/color_333"
+                    android:textSize="@dimen/sp_16" />
+
+                <TextView
+                    android:id="@+id/tv_inspect_time"
+                    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:gravity="end"
+                    android:textColor="@color/color_333"
+                    android:textSize="@dimen/sp_16" />
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_1"
+                android:layout_margin="@dimen/dp_10"
+                android:background="@color/line_gray" />
+
             <CheckBox
                 android:id="@+id/cb_sbwz"
                 android:layout_width="match_parent"
@@ -88,74 +156,6 @@
                 android:layout_height="wrap_content"
                 android:orientation="vertical">
 
-                <LinearLayout
-                    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/color_333"
-                        android:textSize="@dimen/sp_16" />
-
-                    <TextView
-                        android:id="@+id/tv_inspect_people"
-                        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:gravity="end"
-                        android:textColor="@color/color_333"
-                        android:textSize="@dimen/sp_16" />
-                </LinearLayout>
-
-                <View
-                    android:layout_width="match_parent"
-                    android:layout_height="@dimen/dp_1"
-                    android:layout_margin="@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_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/color_333"
-                        android:textSize="@dimen/sp_16" />
-
-                    <TextView
-                        android:id="@+id/tv_inspect_time"
-                        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:gravity="end"
-                        android:textColor="@color/color_333"
-                        android:textSize="@dimen/sp_16" />
-                </LinearLayout>
-
-                <View
-                    android:layout_width="match_parent"
-                    android:layout_height="@dimen/dp_1"
-                    android:layout_margin="@dimen/dp_10"
-                    android:background="@color/line_gray" />
-
                 <include
                     android:id="@+id/ll_map"
                     layout="@layout/view_map"
@@ -576,7 +576,6 @@
                 android:layout_marginEnd="@dimen/dp_10"
                 android:layout_marginBottom="@dimen/dp_10"
                 android:background="@drawable/frame_gray"
-                android:enabled="false"
                 android:gravity="start"
                 android:hint="请输入检查结果"
                 android:minHeight="@dimen/dp_78"

+ 3 - 6
app/src/main/res/layout/fragment_water_check_work.xml

@@ -284,6 +284,7 @@
                         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:gravity="end"
@@ -424,6 +425,7 @@
                         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:gravity="end"
@@ -463,7 +465,6 @@
                         android:layout_height="@dimen/dp_20"
                         android:layout_alignParentEnd="true"
                         android:background="@null"
-                        android:enabled="false"
                         android:minWidth="@dimen/dp_150"
                         android:paddingHorizontal="@dimen/dp_20"
                         android:spinnerMode="dropdown" />
@@ -499,7 +500,6 @@
                         android:layout_height="@dimen/dp_20"
                         android:layout_alignParentEnd="true"
                         android:background="@null"
-                        android:enabled="false"
                         android:minWidth="@dimen/dp_150"
                         android:paddingHorizontal="@dimen/dp_20"
                         android:spinnerMode="dropdown" />
@@ -536,7 +536,6 @@
                         android:layout_alignParentEnd="true"
                         android:layout_centerVertical="true"
                         android:background="@null"
-                        android:enabled="false"
                         android:minWidth="@dimen/dp_150"
                         android:paddingHorizontal="@dimen/dp_20"
                         android:spinnerMode="dropdown" />
@@ -572,7 +571,6 @@
                         android:layout_height="@dimen/dp_20"
                         android:layout_alignParentEnd="true"
                         android:background="@null"
-                        android:enabled="false"
                         android:minWidth="@dimen/dp_150"
                         android:paddingHorizontal="@dimen/dp_20"
                         android:spinnerMode="dropdown" />
@@ -609,7 +607,6 @@
                         android:layout_height="@dimen/dp_20"
                         android:layout_alignParentEnd="true"
                         android:background="@null"
-                        android:enabled="false"
                         android:minWidth="@dimen/dp_150"
                         android:paddingHorizontal="@dimen/dp_20"
                         android:spinnerMode="dropdown" />
@@ -718,6 +715,7 @@
                     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:layout_marginBottom="@dimen/dp_13"
                     android:gravity="center_vertical"
@@ -1208,7 +1206,6 @@
                 android:layout_marginEnd="@dimen/dp_10"
                 android:layout_marginBottom="@dimen/dp_10"
                 android:background="@drawable/frame_gray"
-                android:enabled="false"
                 android:gravity="start"
                 android:hint="请输入检查结果"
                 android:minHeight="@dimen/dp_78"