Browse Source

修改截图疑问标识闪退,增加抄表时间间隔字段和计算赋值

YEJAVON\Tfly 3 years ago
parent
commit
b7ccd0f10f
25 changed files with 954 additions and 109 deletions
  1. 2 1
      app/src/main/java/com/tofly/route/base/BaseFileActivity.java
  2. 1 1
      app/src/main/java/com/tofly/route/base/BaseMapController.java
  3. 1 0
      app/src/main/java/com/tofly/route/base/C.java
  4. 0 5
      app/src/main/java/com/tofly/route/module/sign/ui/UiSign.java
  5. 1 1
      app/src/main/java/com/tofly/route/module/sketch/ui/UiSketchUpload.java
  6. 1 1
      app/src/main/java/com/tofly/route/module/trouble/view/TroubleDispatchReportModuleLayout.java
  7. 63 0
      app/src/main/java/com/tofly/route/ui/activity/HdysActivity.java
  8. 9 3
      app/src/main/java/com/tofly/route/util/Location/LocationUtil.java
  9. 9 5
      app/src/main/java/com/tofly/route/util/image/PhotoHelper.java
  10. 27 11
      app/src/main/java/com/tofly/route/util/sharedPreference/SharePreUtil.java
  11. 15 4
      app/src/main/java/com/tofly/tyuan/entity/cb/CbyhEntity.java
  12. 203 0
      app/src/main/java/com/tofly/tyuan/entity/ywgd/YwgdBean.java
  13. 68 54
      app/src/main/java/com/tofly/tyuan/greenDao/db/CbyhEntityDao.java
  14. 21 1
      app/src/main/java/com/tofly/tyuan/ui/activity/MeterInputActivity.java
  15. 65 8
      app/src/main/java/com/tofly/tyuan/ui/activity/RepairjgczActivity.java
  16. 1 1
      app/src/main/java/com/tofly/tyuan/ui/activity/ZjupdataActivity.java
  17. 1 1
      app/src/main/java/com/tofly/tyuan/ui/imp/MeterListImpl.java
  18. 0 1
      app/src/main/java/com/tofly/tyuan/ui/imp/ZjRzImpl.java
  19. 3 0
      app/src/main/java/com/tofly/tyuan/ui/net/Api.java
  20. 7 0
      app/src/main/java/com/tofly/tyuan/utils/DateUtils.java
  21. 422 0
      app/src/main/res/layout/item_user_info_multiple2.xml
  22. 8 2
      app/src/main/res/layout/layout_ywgd_base.xml
  23. 8 3
      app/src/main/res/layout/layout_ywgd_rz.xml
  24. 8 2
      app/src/main/res/layout/layout_ywgd_sh.xml
  25. 10 4
      app/src/main/res/layout/layout_ywgd_zj.xml

+ 2 - 1
app/src/main/java/com/tofly/route/base/BaseFileActivity.java

@@ -7,6 +7,7 @@ import android.widget.LinearLayout;
 import androidx.annotation.CallSuper;
 import androidx.appcompat.app.AlertDialog;
 
+import com.tofly.latte_core.base.BaseActivity;
 import com.tofly.latte_core.base.IPresenter;
 import com.tofly.route.module.trouble.data.TroublePictureBean;
 import com.tofly.route.ui.model.user.UserBean;
@@ -36,7 +37,7 @@ public abstract class BaseFileActivity<P extends IPresenter> extends BaseLocalAc
     @CallSuper
     public void initView() {
         permissionHelper = new PermissionHelper(this);
-        photoHelper = new PhotoHelper(this, permissionHelper);
+        photoHelper = new PhotoHelper(BaseFileActivity.this, permissionHelper);
     }
 
     @Override

+ 1 - 1
app/src/main/java/com/tofly/route/base/BaseMapController.java

@@ -223,7 +223,7 @@ public class BaseMapController {
         //EventBusUtil.register(this);
 
         permissionHelper = new PermissionHelper(mContext);
-        photoHelper = new PhotoHelper(mContext.getApplicationContext(), permissionHelper);
+        photoHelper = new PhotoHelper(mContext, permissionHelper);
         arcgisUtils = new ArcgisUtils(mContext.getApplicationContext());
 
         amapLocationHelper = new AmapLocationHelper(mContext.getApplicationContext(), mapView);

+ 1 - 0
app/src/main/java/com/tofly/route/base/C.java

@@ -86,4 +86,5 @@ public class C {
 
     public static final boolean is_passed_notify = true;
     public static final String upload_success = "提交成功";
+    public static final String map_search_key = "965e2ce6001f7b2016a0a3583c482e2b";
 }

+ 0 - 5
app/src/main/java/com/tofly/route/module/sign/ui/UiSign.java

@@ -116,14 +116,9 @@ public class UiSign extends BaseActivity<SignContract.Presenter> implements MapL
     public void initView() {
         textView.setText(R.string.sign_title);
         textViewAddr.setText(R.string.locating);
-
-
-        Log.e("TAG", "initView: --sHA1--- 签名值: ---" + sHA1(this));
-
         recycleView.setLayoutManager(new LinearLayoutManager(this));
         recycleView.setItemAnimator(new DefaultItemAnimator());
         recycleView.addItemDecoration(new DividerItemDecoration(this, LinearLayoutManager.VERTICAL));
-
         initArcgisLocationService();
     }
 

+ 1 - 1
app/src/main/java/com/tofly/route/module/sketch/ui/UiSketchUpload.java

@@ -182,7 +182,7 @@ public class UiSketchUpload extends BaseActivity<SketchContract.Presenter> imple
     }
 
     private void initData() {
-        photoHelper = new PhotoHelper(this, new PermissionHelper(this));
+        photoHelper = new PhotoHelper(UiSketchUpload.this, new PermissionHelper(this));
 
         Intent intent = getIntent();
         Bundle extras = intent.getExtras();

+ 1 - 1
app/src/main/java/com/tofly/route/module/trouble/view/TroubleDispatchReportModuleLayout.java

@@ -607,7 +607,7 @@ public class TroubleDispatchReportModuleLayout extends LinearLayout implements D
             List<PlanBean.PlanTypeOverList> overLists = new ArrayList<>();
             overListItem.setTypeId(14);
             overListItem.setCompletionRate(BigDecimal.valueOf(Double.valueOf(editPlanPercentageComplete.getText().toString())));
-
+            overLists.add(overListItem);
             planBean.setPlanTypeOverList(overLists);
 
 

+ 63 - 0
app/src/main/java/com/tofly/route/ui/activity/HdysActivity.java

@@ -4,7 +4,10 @@ import android.annotation.SuppressLint;
 import android.content.Intent;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
+import android.os.Handler;
+import android.os.Message;
 import android.text.TextUtils;
+import android.util.Log;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.MotionEvent;
@@ -21,6 +24,7 @@ import androidx.appcompat.widget.AppCompatSpinner;
 import androidx.appcompat.widget.Toolbar;
 
 import com.alibaba.fastjson.JSON;
+import com.esri.arcgisruntime.geometry.CoordinateFormatter;
 import com.esri.arcgisruntime.geometry.Point;
 import com.esri.arcgisruntime.layers.ArcGISTiledLayer;
 import com.esri.arcgisruntime.layers.FeatureLayer;
@@ -36,6 +40,7 @@ import com.tofly.route.bean.XjzBean;
 import com.tofly.route.bean.builds.GroupDeptBean;
 import com.tofly.route.bean.repair.RepairUserVo;
 import com.tofly.route.module.map.MapLoadHelper;
+import com.tofly.route.module.sign.ui.UiSign;
 import com.tofly.route.ui.imp.HdysImpl;
 import com.tofly.route.ui.view.XjUserListView;
 import com.tofly.route.util.AmapUtils.AmapLocationHelper;
@@ -47,7 +52,9 @@ import com.tofly.tyuan.utils.SpinnerUtils;
 import com.tofly.tyuan.utils.ToastUtil;
 
 import org.greenrobot.eventbus.Subscribe;
+import org.json.JSONException;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
@@ -55,6 +62,8 @@ import java.util.Set;
 
 import butterknife.BindView;
 
+import static com.tofly.route.util.Location.LocationUtil.getCoordinate;
+
 /**
  * @author ychk
  * 核定用时
@@ -138,6 +147,23 @@ public class HdysActivity extends LatteActivity implements MapLoadHelper {
                 if (!TextUtils.isEmpty(etNum.getText()) && points.size() < Integer.parseInt(etNum.getText().toString())) {
                     android.graphics.Point point = new android.graphics.Point(Math.round(e.getX()), Math.round(e.getY()));
                     Point location = mapView.screenToLocation(point);
+                    //将坐标转换为 地图坐标
+                    String latitudeLongitude = CoordinateFormatter.toLatitudeLongitude(location,
+                            CoordinateFormatter.LatitudeLongitudeFormat.DECIMAL_DEGREES, 4);
+
+                    String[] s = latitudeLongitude.split(" ");
+
+                    String[] latAndLon = new String[2];
+                    for (int i = 0; i < s.length; i++) {
+                        String s1 = s[i];
+                        String substring = s1.substring(0, s1.length() - 1);
+                        latAndLon[i] = substring;
+                    }
+
+
+                  double  lat = Double.valueOf(latAndLon[0]);
+                   double lng = Double.valueOf(latAndLon[1]);
+                    startSeartchLocation(lng,lat);  // 无法解析当前位置的地址信息
                     initRenderSymbol(location);
                 } else {
                     ToastUtil.showToast("不可超过数量的个数");
@@ -201,6 +227,43 @@ public class HdysActivity extends LatteActivity implements MapLoadHelper {
         return super.onOptionsItemSelected(item);
     }
 
+    private static final int SUCCESS = 1;
+    private static final int FALSE = 0;
+    Handler handler = new Handler() {
+        @Override
+        public void handleMessage(@NonNull Message msg) {
+            super.handleMessage(msg);
+            if (msg.what == SUCCESS) {
+                //根据坐标解析地址成功
+                com.tofly.route.util.toast.ToastUtil.showToast(HdysActivity.this, "定位解析结果...."+mAddress);
+            } else if (msg.what == FALSE) {
+                //根据坐标解析地址失败
+                com.tofly.route.util.toast.ToastUtil.showToast(HdysActivity.this, "定位走丢了....");
+            }
+        }
+    };
+    private Point longPoint = null;
+
+    private String mAddress = null;
+    private void startSeartchLocation(double lon, double lat) {
+
+        double finalLon = lon;
+        double finalLat = lat;
+        new Thread() {
+            @Override
+            public void run() {
+                super.run();
+                try {
+                    mAddress = getCoordinate(finalLon + "", finalLat + "");
+                    handler.sendEmptyMessage(SUCCESS);
+                } catch (IOException | JSONException e) {
+                    handler.sendEmptyMessage(FALSE);
+                }
+
+            }
+        }.start();
+    }
+
     private boolean checkData() {
         boolean isSuccess = false;
         if (TextUtils.isEmpty(etNum.getText())) {

+ 9 - 3
app/src/main/java/com/tofly/route/util/Location/LocationUtil.java

@@ -1,6 +1,9 @@
 package com.tofly.route.util.Location;
 
+import android.util.Log;
+
 import com.esri.arcgisruntime.geometry.Point;
+import com.tofly.route.base.C;
 
 import org.json.JSONException;
 import org.json.JSONObject;
@@ -13,6 +16,7 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
 
+import static com.tofly.route.base.C.map_search_key;
 import static java.lang.Math.PI;
 import static java.lang.Math.abs;
 import static java.lang.Math.cos;
@@ -160,8 +164,8 @@ public class LocationUtil {
         return out;
     }
 
-//    private static final String key = "db36da402f5d5b0813f33604abd247fb";
-    private static final String key = "965e2ce6001f7b2016a0a3583c482e2b";
+        private static final String key = "1b30814745c00a3545c8c7557fcb09cf";
+//    private static final String key = map_search_key;db36da402f5d5b0813f33604abd247fb
 
     public static String getCoordinate(String lng, String lat) throws IOException, JSONException {
 
@@ -172,7 +176,8 @@ public class LocationUtil {
         StringBuilder httpsTail = new StringBuilder("&poitype=&radius=&extensions=base&batch=true");
         String url = https.append(key).append(localhost).append(httpsTail).toString();
         //拼接出来的地址
-        //System.out.println(https1.append(key).append(localhost1).append(httpsTail).toString());
+
+        Log.e("TAG", "getCoordinate: ---------:拼接出来的地址"+url );
         // String url ="http://restapi.amap.com/v3/geocode/regeo?key=自己申请的key&location=116.310003,39.991957&poitype=&radius=&extensions=base&batch=true&roadlevel=";
         URL myURL = null;
         URLConnection httpsConn = null;
@@ -208,6 +213,7 @@ public class LocationUtil {
         }
 
 
+        Log.e("TAG", "getCoordinate: -------------"+resultData.toString() );
         org.json.JSONObject jsonObject = new org.json.JSONObject(resultData.toString());
 
         String regeocodes = jsonObject.getString("regeocodes");

+ 9 - 5
app/src/main/java/com/tofly/route/util/image/PhotoHelper.java

@@ -422,11 +422,15 @@ public class PhotoHelper {
         // 设置放大镜的倍数,当小于等于0时表示不使用放大器功能.放大器只有在设置面板被隐藏的时候才会出现
         params.mAmplifierScale = 2.5f;
         */
-        Activity activity = (Activity) mContext;
-        if (mbIsAddWatermark) {
-            GraffitiActivity.startActivityForResult(activity, params, mWaterMarkParams, REQ_CODE_GRAFFITI_SKETCH);
-        } else {
-            GraffitiActivity.startActivityForResult(activity, params, null, REQ_CODE_GRAFFITI_SKETCH);
+        try {
+            Activity activity = (Activity) mContext;
+            if (mbIsAddWatermark) {
+                GraffitiActivity.startActivityForResult(activity, params, mWaterMarkParams, REQ_CODE_GRAFFITI_SKETCH);
+            } else {
+                GraffitiActivity.startActivityForResult(activity, params, null, REQ_CODE_GRAFFITI_SKETCH);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
         }
     }
 

+ 27 - 11
app/src/main/java/com/tofly/route/util/sharedPreference/SharePreUtil.java

@@ -1,20 +1,18 @@
 package com.tofly.route.util.sharedPreference;
 
 import android.content.Context;
-import android.content.SharedPreferences;
 
-import com.tofly.latte_core.config.Latte;
-import com.tofly.latte_core.utils.AccountManager;
 import com.tofly.latte_core.utils.LattePreference;
-import com.tofly.route.ui.model.user.UserBean;
 import com.tofly.route.util.date.DateUtils;
-import com.tofly.tyuan.base.MyApp;
 
 /**
  * SharePreference的工具类
  * Created by li on 2016/8/5.
  */
 public class SharePreUtil {
+    public static final String AGO_TIME = "ago_time";//上次抄表时间
+    public static final String AGO_TIME_KEY = "ago_time_key";//上次抄表时间
+
     private enum Config {
         IS_LOGINED,
         IS_NEED_LOGIN,
@@ -39,7 +37,7 @@ public class SharePreUtil {
         PLAN_POINT_PLAN_DOWN_TIMES,
         CUSTOM_THEME_TAG,
         BACUP_SEVER_OPENED,
-        IMEI,P_LINE_COLOR,
+        IMEI, P_LINE_COLOR,
         DEVICE_BIND
     }
 
@@ -95,10 +93,10 @@ public class SharePreUtil {
 
     // 当前 section
     public static long getSignSection(String date) {
-       return LattePreference.getLong(Tag.SIGN_SECTION.name(), date, 1);
+        return LattePreference.getLong(Tag.SIGN_SECTION.name(), date, 1);
     }
 
-    public static void setSignSectionToday(long section){
+    public static void setSignSectionToday(long section) {
         String today = DateUtils.getYMD();
         setSignSection(today, section);
     }
@@ -109,7 +107,7 @@ public class SharePreUtil {
         return getSignSection(today);
     }
 
-    public static void setPlanExecuteToday(int plan_id){
+    public static void setPlanExecuteToday(int plan_id) {
         String today = DateUtils.getYMD();
         LattePreference.setInt(Tag.PLAN_EXECUTE.name(), today, plan_id);
     }
@@ -139,6 +137,7 @@ public class SharePreUtil {
 
     /**
      * 查询是否使用在线地图
+     *
      * @return
      */
     public static boolean getIsOnlineMap() {
@@ -147,6 +146,7 @@ public class SharePreUtil {
 
     /**
      * 设置是否显示了某图层
+     *
      * @param which      图层名
      * @param isLayoutOn
      */
@@ -156,6 +156,7 @@ public class SharePreUtil {
 
     /**
      * 查询某图层是否显示
+     *
      * @param which
      * @return
      */
@@ -290,7 +291,7 @@ public class SharePreUtil {
      */
     public static void setKeepScreenWakeupMode(boolean isOn, int time) {
         LattePreference.setBoolean(Tag.QUERY_NAME.name(), Config.SCREEN_WAKEUP_MODE.name(), isOn);
-        if (isOn){
+        if (isOn) {
             LattePreference.setInt(Tag.QUERY_NAME.name(), Config.SCREEN_WAKEUP_TIME.name(), time);
         }
     }
@@ -378,7 +379,8 @@ public class SharePreUtil {
     public static String getIMEI() {
         return LattePreference.getString(Config.IMEI.name());
     }
-  /**
+
+    /**
      * 用户轨迹颜色
      */
     public static void setPLineColor(String pLineColor) {
@@ -407,5 +409,19 @@ public class SharePreUtil {
     }
 
 
+    /**
+     * 本地记录上次抄表时间
+     * @param agoTime
+     */
+    public static void setCbTimeAgo( String agoTime) {
+        LattePreference.setString(SharePreUtil.AGO_TIME, AGO_TIME_KEY, agoTime);
+    }
 
+    /**
+     * 获取本地缓存的上次抄表时间
+     * @return
+     */
+    public static String getCbTimeAgo() {
+        return LattePreference.getString(SharePreUtil.AGO_TIME, AGO_TIME_KEY, null);
+    }
 }

+ 15 - 4
app/src/main/java/com/tofly/tyuan/entity/cb/CbyhEntity.java

@@ -59,6 +59,8 @@ public class CbyhEntity implements Serializable {
     private Integer bcds;//本次度数
     private String sl;//用水量
     private String cbrq;//抄表日期
+    private Integer diffTime = 0;//抄表时间间隔   时间为分
+
     private int isupload;//0未上传,1已上传
     private int isSave;//0未保存,1已保存
     private String imgUrl;//图片
@@ -75,6 +77,14 @@ public class CbyhEntity implements Serializable {
 
     private  boolean isSelect;
 
+    public Integer getDiffTime() {
+        return diffTime;
+    }
+
+    public void setDiffTime(Integer diffTime) {
+        this.diffTime = diffTime;
+    }
+
     public boolean isSelect() {
         return isSelect;
     }
@@ -185,7 +195,7 @@ public class CbyhEntity implements Serializable {
     public CbyhEntity() {
     }
 
-    @Generated(hash = 1121570407)
+    @Generated(hash = 657261775)
     public CbyhEntity(Long id, String yhbh, Integer scds, String yhxm, String yhdz,
             String lxdh, String sbcj, String sblx, String sbkj, String isqf, String ysxz,
             String cbfsCode, String cbfsName, String sbbh, Integer cbxh, Integer beforeOne,
@@ -193,9 +203,9 @@ public class CbyhEntity implements Serializable {
             String month2, String cbrq2, String month3, String cbrq3, String rfid,
             String qydbmName, String qybmName, String qybm, String qydbm, String xzxf,
             String ysxzName, String bz, String cbbz, int cbry, double x, double y,
-            String addressState, Integer bcds, String sl, String cbrq, int isupload,
-            int isSave, String imgUrl, String isGeneral, Integer xbqd, Integer jbzd,
-            Integer hblx, String hbrq, boolean isSelect) {
+            String addressState, Integer bcds, String sl, String cbrq, Integer diffTime,
+            int isupload, int isSave, String imgUrl, String isGeneral, Integer xbqd,
+            Integer jbzd, Integer hblx, String hbrq, boolean isSelect) {
         this.id = id;
         this.yhbh = yhbh;
         this.scds = scds;
@@ -236,6 +246,7 @@ public class CbyhEntity implements Serializable {
         this.bcds = bcds;
         this.sl = sl;
         this.cbrq = cbrq;
+        this.diffTime = diffTime;
         this.isupload = isupload;
         this.isSave = isSave;
         this.imgUrl = imgUrl;

+ 203 - 0
app/src/main/java/com/tofly/tyuan/entity/ywgd/YwgdBean.java

@@ -121,10 +121,41 @@ public class YwgdBean {
     private Integer typeId;//维修类型
     private Integer respUser;//主要负责人
 
+
+    public List<ResultList> resultList;
+
+    public List<ResultList> getResultList() {
+        return resultList;
+    }
+
+    public void setResultList(List<ResultList> resultList) {
+        this.resultList = resultList;
+    }
+
     public String getZjczryName() {
         return zjczryName;
     }
 
+    public void setShslryName(String shslryName) {
+        this.shslryName = shslryName;
+    }
+
+    public void setZjczryName(String zjczryName) {
+        this.zjczryName = zjczryName;
+    }
+
+    public void setJgczryName(String jgczryName) {
+        this.jgczryName = jgczryName;
+    }
+
+    public void setGddjFiles(List<GdFiles> gddjFiles) {
+        this.gddjFiles = gddjFiles;
+    }
+
+    public void setGddjFileid(String gddjFileid) {
+        this.gddjFileid = gddjFileid;
+    }
+
     public String getStartTime() {
         return startTime;
     }
@@ -1105,4 +1136,176 @@ public class YwgdBean {
         }
     }
 
+    public class ResultList {
+
+
+        /**
+         * czsj
+         */
+        private String czsj;
+        /**
+         * jgczFileid
+         */
+        private Integer jgczFileid;
+        /**
+         * czyj
+         */
+        private String czyj;
+        /**
+         * isCollect
+         */
+        private String isCollect;
+        /**
+         * isFinish
+         */
+        private String isFinish;
+        /**
+         * personName
+         */
+        private String personName;
+        /**
+         * gdbh
+         */
+        private String gdbh;
+        /**
+         * lcjdName
+         */
+        private String lcjdName;
+        /**
+         * importDate
+         */
+        private String importDate;
+        /**
+         * departId
+         */
+        private Integer departId;
+        /**
+         * personId
+         */
+        private Integer personId;
+        /**
+         * id
+         */
+        private Integer id;
+        /**
+         * importLcjd
+         */
+        private Integer importLcjd;
+        /**
+         * departName
+         */
+        private String departName;
+
+        public String getCzsj() {
+            return czsj;
+        }
+
+        public void setCzsj(String czsj) {
+            this.czsj = czsj;
+        }
+
+        public Integer getJgczFileid() {
+            return jgczFileid;
+        }
+
+        public void setJgczFileid(Integer jgczFileid) {
+            this.jgczFileid = jgczFileid;
+        }
+
+        public String getCzyj() {
+            return czyj;
+        }
+
+        public void setCzyj(String czyj) {
+            this.czyj = czyj;
+        }
+
+        public String getIsCollect() {
+            return isCollect;
+        }
+
+        public void setIsCollect(String isCollect) {
+            this.isCollect = isCollect;
+        }
+
+        public String getIsFinish() {
+            return isFinish;
+        }
+
+        public void setIsFinish(String isFinish) {
+            this.isFinish = isFinish;
+        }
+
+        public String getPersonName() {
+            return personName;
+        }
+
+        public void setPersonName(String personName) {
+            this.personName = personName;
+        }
+
+        public String getGdbh() {
+            return gdbh;
+        }
+
+        public void setGdbh(String gdbh) {
+            this.gdbh = gdbh;
+        }
+
+        public String getLcjdName() {
+            return lcjdName;
+        }
+
+        public void setLcjdName(String lcjdName) {
+            this.lcjdName = lcjdName;
+        }
+
+        public String getImportDate() {
+            return importDate;
+        }
+
+        public void setImportDate(String importDate) {
+            this.importDate = importDate;
+        }
+
+        public Integer getDepartId() {
+            return departId;
+        }
+
+        public void setDepartId(Integer departId) {
+            this.departId = departId;
+        }
+
+        public Integer getPersonId() {
+            return personId;
+        }
+
+        public void setPersonId(Integer personId) {
+            this.personId = personId;
+        }
+
+        public Integer getId() {
+            return id;
+        }
+
+        public void setId(Integer id) {
+            this.id = id;
+        }
+
+        public Integer getImportLcjd() {
+            return importLcjd;
+        }
+
+        public void setImportLcjd(Integer importLcjd) {
+            this.importLcjd = importLcjd;
+        }
+
+        public String getDepartName() {
+            return departName;
+        }
+
+        public void setDepartName(String departName) {
+            this.departName = departName;
+        }
+    }
 }

+ 68 - 54
app/src/main/java/com/tofly/tyuan/greenDao/db/CbyhEntityDao.java

@@ -64,15 +64,16 @@ public class CbyhEntityDao extends AbstractDao<CbyhEntity, Long> {
         public final static Property Bcds = new Property(37, Integer.class, "bcds", false, "BCDS");
         public final static Property Sl = new Property(38, String.class, "sl", false, "SL");
         public final static Property Cbrq = new Property(39, String.class, "cbrq", false, "CBRQ");
-        public final static Property Isupload = new Property(40, int.class, "isupload", false, "ISUPLOAD");
-        public final static Property IsSave = new Property(41, int.class, "isSave", false, "IS_SAVE");
-        public final static Property ImgUrl = new Property(42, String.class, "imgUrl", false, "IMG_URL");
-        public final static Property IsGeneral = new Property(43, String.class, "isGeneral", false, "IS_GENERAL");
-        public final static Property Xbqd = new Property(44, Integer.class, "xbqd", false, "XBQD");
-        public final static Property Jbzd = new Property(45, Integer.class, "jbzd", false, "JBZD");
-        public final static Property Hblx = new Property(46, Integer.class, "hblx", false, "HBLX");
-        public final static Property Hbrq = new Property(47, String.class, "hbrq", false, "HBRQ");
-        public final static Property IsSelect = new Property(48, boolean.class, "isSelect", false, "IS_SELECT");
+        public final static Property DiffTime = new Property(40, Integer.class, "diffTime", false, "DIFF_TIME");
+        public final static Property Isupload = new Property(41, int.class, "isupload", false, "ISUPLOAD");
+        public final static Property IsSave = new Property(42, int.class, "isSave", false, "IS_SAVE");
+        public final static Property ImgUrl = new Property(43, String.class, "imgUrl", false, "IMG_URL");
+        public final static Property IsGeneral = new Property(44, String.class, "isGeneral", false, "IS_GENERAL");
+        public final static Property Xbqd = new Property(45, Integer.class, "xbqd", false, "XBQD");
+        public final static Property Jbzd = new Property(46, Integer.class, "jbzd", false, "JBZD");
+        public final static Property Hblx = new Property(47, Integer.class, "hblx", false, "HBLX");
+        public final static Property Hbrq = new Property(48, String.class, "hbrq", false, "HBRQ");
+        public final static Property IsSelect = new Property(49, boolean.class, "isSelect", false, "IS_SELECT");
     }
 
 
@@ -128,15 +129,16 @@ public class CbyhEntityDao extends AbstractDao<CbyhEntity, Long> {
                 "\"BCDS\" INTEGER," + // 37: bcds
                 "\"SL\" TEXT," + // 38: sl
                 "\"CBRQ\" TEXT," + // 39: cbrq
-                "\"ISUPLOAD\" INTEGER NOT NULL ," + // 40: isupload
-                "\"IS_SAVE\" INTEGER NOT NULL ," + // 41: isSave
-                "\"IMG_URL\" TEXT," + // 42: imgUrl
-                "\"IS_GENERAL\" TEXT," + // 43: isGeneral
-                "\"XBQD\" INTEGER," + // 44: xbqd
-                "\"JBZD\" INTEGER," + // 45: jbzd
-                "\"HBLX\" INTEGER," + // 46: hblx
-                "\"HBRQ\" TEXT," + // 47: hbrq
-                "\"IS_SELECT\" INTEGER NOT NULL );"); // 48: isSelect
+                "\"DIFF_TIME\" INTEGER," + // 40: diffTime
+                "\"ISUPLOAD\" INTEGER NOT NULL ," + // 41: isupload
+                "\"IS_SAVE\" INTEGER NOT NULL ," + // 42: isSave
+                "\"IMG_URL\" TEXT," + // 43: imgUrl
+                "\"IS_GENERAL\" TEXT," + // 44: isGeneral
+                "\"XBQD\" INTEGER," + // 45: xbqd
+                "\"JBZD\" INTEGER," + // 46: jbzd
+                "\"HBLX\" INTEGER," + // 47: hblx
+                "\"HBRQ\" TEXT," + // 48: hbrq
+                "\"IS_SELECT\" INTEGER NOT NULL );"); // 49: isSelect
     }
 
     /** Drops the underlying database table. */
@@ -336,39 +338,44 @@ public class CbyhEntityDao extends AbstractDao<CbyhEntity, Long> {
         if (cbrq != null) {
             stmt.bindString(40, cbrq);
         }
-        stmt.bindLong(41, entity.getIsupload());
-        stmt.bindLong(42, entity.getIsSave());
+ 
+        Integer diffTime = entity.getDiffTime();
+        if (diffTime != null) {
+            stmt.bindLong(41, diffTime);
+        }
+        stmt.bindLong(42, entity.getIsupload());
+        stmt.bindLong(43, entity.getIsSave());
  
         String imgUrl = entity.getImgUrl();
         if (imgUrl != null) {
-            stmt.bindString(43, imgUrl);
+            stmt.bindString(44, imgUrl);
         }
  
         String isGeneral = entity.getIsGeneral();
         if (isGeneral != null) {
-            stmt.bindString(44, isGeneral);
+            stmt.bindString(45, isGeneral);
         }
  
         Integer xbqd = entity.getXbqd();
         if (xbqd != null) {
-            stmt.bindLong(45, xbqd);
+            stmt.bindLong(46, xbqd);
         }
  
         Integer jbzd = entity.getJbzd();
         if (jbzd != null) {
-            stmt.bindLong(46, jbzd);
+            stmt.bindLong(47, jbzd);
         }
  
         Integer hblx = entity.getHblx();
         if (hblx != null) {
-            stmt.bindLong(47, hblx);
+            stmt.bindLong(48, hblx);
         }
  
         String hbrq = entity.getHbrq();
         if (hbrq != null) {
-            stmt.bindString(48, hbrq);
+            stmt.bindString(49, hbrq);
         }
-        stmt.bindLong(49, entity.getIsSelect() ? 1L: 0L);
+        stmt.bindLong(50, entity.getIsSelect() ? 1L: 0L);
     }
 
     @Override
@@ -562,39 +569,44 @@ public class CbyhEntityDao extends AbstractDao<CbyhEntity, Long> {
         if (cbrq != null) {
             stmt.bindString(40, cbrq);
         }
-        stmt.bindLong(41, entity.getIsupload());
-        stmt.bindLong(42, entity.getIsSave());
+ 
+        Integer diffTime = entity.getDiffTime();
+        if (diffTime != null) {
+            stmt.bindLong(41, diffTime);
+        }
+        stmt.bindLong(42, entity.getIsupload());
+        stmt.bindLong(43, entity.getIsSave());
  
         String imgUrl = entity.getImgUrl();
         if (imgUrl != null) {
-            stmt.bindString(43, imgUrl);
+            stmt.bindString(44, imgUrl);
         }
  
         String isGeneral = entity.getIsGeneral();
         if (isGeneral != null) {
-            stmt.bindString(44, isGeneral);
+            stmt.bindString(45, isGeneral);
         }
  
         Integer xbqd = entity.getXbqd();
         if (xbqd != null) {
-            stmt.bindLong(45, xbqd);
+            stmt.bindLong(46, xbqd);
         }
  
         Integer jbzd = entity.getJbzd();
         if (jbzd != null) {
-            stmt.bindLong(46, jbzd);
+            stmt.bindLong(47, jbzd);
         }
  
         Integer hblx = entity.getHblx();
         if (hblx != null) {
-            stmt.bindLong(47, hblx);
+            stmt.bindLong(48, hblx);
         }
  
         String hbrq = entity.getHbrq();
         if (hbrq != null) {
-            stmt.bindString(48, hbrq);
+            stmt.bindString(49, hbrq);
         }
-        stmt.bindLong(49, entity.getIsSelect() ? 1L: 0L);
+        stmt.bindLong(50, entity.getIsSelect() ? 1L: 0L);
     }
 
     @Override
@@ -645,15 +657,16 @@ public class CbyhEntityDao extends AbstractDao<CbyhEntity, Long> {
             cursor.isNull(offset + 37) ? null : cursor.getInt(offset + 37), // bcds
             cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38), // sl
             cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39), // cbrq
-            cursor.getInt(offset + 40), // isupload
-            cursor.getInt(offset + 41), // isSave
-            cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42), // imgUrl
-            cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // isGeneral
-            cursor.isNull(offset + 44) ? null : cursor.getInt(offset + 44), // xbqd
-            cursor.isNull(offset + 45) ? null : cursor.getInt(offset + 45), // jbzd
-            cursor.isNull(offset + 46) ? null : cursor.getInt(offset + 46), // hblx
-            cursor.isNull(offset + 47) ? null : cursor.getString(offset + 47), // hbrq
-            cursor.getShort(offset + 48) != 0 // isSelect
+            cursor.isNull(offset + 40) ? null : cursor.getInt(offset + 40), // diffTime
+            cursor.getInt(offset + 41), // isupload
+            cursor.getInt(offset + 42), // isSave
+            cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43), // imgUrl
+            cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44), // isGeneral
+            cursor.isNull(offset + 45) ? null : cursor.getInt(offset + 45), // xbqd
+            cursor.isNull(offset + 46) ? null : cursor.getInt(offset + 46), // jbzd
+            cursor.isNull(offset + 47) ? null : cursor.getInt(offset + 47), // hblx
+            cursor.isNull(offset + 48) ? null : cursor.getString(offset + 48), // hbrq
+            cursor.getShort(offset + 49) != 0 // isSelect
         );
         return entity;
     }
@@ -700,15 +713,16 @@ public class CbyhEntityDao extends AbstractDao<CbyhEntity, Long> {
         entity.setBcds(cursor.isNull(offset + 37) ? null : cursor.getInt(offset + 37));
         entity.setSl(cursor.isNull(offset + 38) ? null : cursor.getString(offset + 38));
         entity.setCbrq(cursor.isNull(offset + 39) ? null : cursor.getString(offset + 39));
-        entity.setIsupload(cursor.getInt(offset + 40));
-        entity.setIsSave(cursor.getInt(offset + 41));
-        entity.setImgUrl(cursor.isNull(offset + 42) ? null : cursor.getString(offset + 42));
-        entity.setIsGeneral(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
-        entity.setXbqd(cursor.isNull(offset + 44) ? null : cursor.getInt(offset + 44));
-        entity.setJbzd(cursor.isNull(offset + 45) ? null : cursor.getInt(offset + 45));
-        entity.setHblx(cursor.isNull(offset + 46) ? null : cursor.getInt(offset + 46));
-        entity.setHbrq(cursor.isNull(offset + 47) ? null : cursor.getString(offset + 47));
-        entity.setIsSelect(cursor.getShort(offset + 48) != 0);
+        entity.setDiffTime(cursor.isNull(offset + 40) ? null : cursor.getInt(offset + 40));
+        entity.setIsupload(cursor.getInt(offset + 41));
+        entity.setIsSave(cursor.getInt(offset + 42));
+        entity.setImgUrl(cursor.isNull(offset + 43) ? null : cursor.getString(offset + 43));
+        entity.setIsGeneral(cursor.isNull(offset + 44) ? null : cursor.getString(offset + 44));
+        entity.setXbqd(cursor.isNull(offset + 45) ? null : cursor.getInt(offset + 45));
+        entity.setJbzd(cursor.isNull(offset + 46) ? null : cursor.getInt(offset + 46));
+        entity.setHblx(cursor.isNull(offset + 47) ? null : cursor.getInt(offset + 47));
+        entity.setHbrq(cursor.isNull(offset + 48) ? null : cursor.getString(offset + 48));
+        entity.setIsSelect(cursor.getShort(offset + 49) != 0);
      }
     
     @Override

+ 21 - 1
app/src/main/java/com/tofly/tyuan/ui/activity/MeterInputActivity.java

@@ -40,6 +40,7 @@ import com.tofly.latte_core.utils.AccountManager;
 import com.tofly.latte_core.utils.LogUtils;
 import com.tofly.route.ui.view.manger.LineChartManager;
 import com.tofly.route.util.AmapUtils.AmapLocationHelper;
+import com.tofly.route.util.sharedPreference.SharePreUtil;
 import com.tofly.tyuan.R;
 import com.tofly.tyuan.entity.FilePathBean;
 import com.tofly.tyuan.entity.PageInfo;
@@ -986,8 +987,27 @@ public class MeterInputActivity extends TakePhotoActivity implements TextWatcher
             if (cbfsCode != -1) {
                 cbyhEntity.setCbfsCode(String.valueOf(cbfsCode));
             }
-            cbyhEntity.setCbrq(DateUtils.getDate());
+            String date = DateUtils.getDate();
+            cbyhEntity.setCbrq(date);
 
+            //抄表时间间隔
+            String cbTimeAgo1 = SharePreUtil.getCbTimeAgo();//上次抄表时间
+            if (cbTimeAgo1 != null) {
+
+                long timeOffset = DateUtils.getTimeOffset(cbTimeAgo1, date);
+
+                long timeMin = timeOffset / 1000 / 60;
+
+                //默认超过一天充值上次抄表时间
+                if (timeMin <= 720) {
+                    cbyhEntity.setDiffTime((int) timeMin);
+                }
+
+            }
+
+
+            //更改本次时间为抄表时间记录
+            SharePreUtil.setCbTimeAgo(date);
             cbyhEntity.setCbry(AccountManager.getUserId());
             StringBuilder stringBuilder = new StringBuilder();
             boolean isFirst = false;

+ 65 - 8
app/src/main/java/com/tofly/tyuan/ui/activity/RepairjgczActivity.java

@@ -26,7 +26,6 @@ import androidx.recyclerview.widget.RecyclerView;
 import com.google.android.material.appbar.AppBarLayout;
 import com.google.android.material.appbar.CollapsingToolbarLayout;
 import com.jph.takephoto.model.TResult;
-import com.tofly.latte_core.base.LatteActivity;
 import com.tofly.latte_core.base.LatteContract;
 import com.tofly.latte_core.utils.AccountManager;
 import com.tofly.route.bean.XjzBean;
@@ -60,6 +59,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -775,9 +775,11 @@ public class RepairjgczActivity extends TakePhotoActivity {
                 stateList.add(s.getId());
             }
             SpinnerUtils.setAdapter(this, spinnerLcztCz, strings.toArray(new String[0]));
+            //获取传值ID
             Integer id = getIntent().getIntExtra("id", -1);
             Map<String, Object> map = new ArrayMap<>();
             map.put("id", id);
+            //根据id 获取任务详情
             mPresenter.getResultOne(this, map);
         }
     }
@@ -922,6 +924,9 @@ public class RepairjgczActivity extends TakePhotoActivity {
         }
     }
 
+
+    boolean isMultiplePerson = false;//记录是否已经读取了多选部门多选人
+
     private void loadData() {
         if (ywgdBean != null) {
             //工单登记
@@ -931,10 +936,11 @@ public class RepairjgczActivity extends TakePhotoActivity {
                 maps.put("gdbh", ywgdBean.getGdbh());
                 mPresenter.getResultFive(this, maps);
             }
-            if (ywgdBean.getGdflowconfig() != null && !TextUtils.isEmpty(ywgdBean.getGdflowconfig().getAllLcjd())) {
+            String allLcjd = ywgdBean.getGdflowconfig().getAllLcjd();
+            if (ywgdBean.getGdflowconfig() != null && !TextUtils.isEmpty(allLcjd)) {
                 repairIs = false;
                 isEnd = false;
-                if (!ywgdBean.getGdflowconfig().getAllLcjd().contains("6"))
+                if (!allLcjd.contains("6"))
                     if (ywgdBean.getGdflowconfig().getTransferOutType() != null && ywgdBean.getGdflowconfig().getTransferOutType() == 840) {
                         mPresenter.getResultEight(this, null);
                         text_date_start.setText(com.tofly.route.util.date.DateUtils.getYMD());
@@ -964,6 +970,56 @@ public class RepairjgczActivity extends TakePhotoActivity {
                         SpinnerUtils.setAdapter(this, spinnerLcztCz, strings.toArray(new String[0]));
                     }
             }
+
+
+            List<YwgdBean.ResultList> resultList = ywgdBean.getResultList();
+
+            LinkedHashSet<String> deptNames = new LinkedHashSet<>();
+            LinkedHashSet<String> personNames = new LinkedHashSet<>();
+            if (resultList != null) {
+                for (YwgdBean.ResultList re : resultList) {
+
+                    deptNames.add(re.getDepartName() + " ");
+                    personNames.add(re.getPersonName());
+                }
+            }
+
+            if (allLcjd != null) {
+                String[] split = allLcjd.split(",");
+                for (int i = 0; i < split.length; i++) {
+                    if (split[i].equals("5")) {
+                        //获取前一个状态----- 回显上一个状态 部门和人员的多选
+                        //在本地修改回显时候的数据取值即可
+                        //1.工单登记,2.认证处置3.认证审核4.认证质检5.结果处置6.结果审核7.工单归档)
+                        switch (split[i - 1]) {
+                            case "1":
+                                // 受理部门 受理人员
+                                ywgdBean.setSlbmName(deptNames.toString());
+                                ywgdBean.setSlryName(personNames.toString());
+                                break;
+                            case "2":
+                                //处置部门 处置人员
+                                ywgdBean.setCzbmName(deptNames.toString());
+                                ywgdBean.setCzryName(personNames.toString());
+                                break;
+                            case "3":
+                                //认证部门/人员
+                                ywgdBean.setShbmName(deptNames.toString());
+                                ywgdBean.setShryName(personNames.toString());
+                                break;
+                            case "4":
+                                //质检部门/人员
+                                ywgdBean.setZjbmName(deptNames.toString().substring(1, deptNames.toString().length() - 1));
+                                ywgdBean.setZjczryName(personNames.toString().substring(1, personNames.toString().length() - 1));
+                                break;
+                        }
+
+                        break;
+                    }
+                }
+            }
+
+
             if (!TextUtils.isEmpty(ywgdBean.getLdhm()))
                 tvLdhm.setText(ywgdBean.getLdhm());
             if (!TextUtils.isEmpty(ywgdBean.getDjryName()))
@@ -994,17 +1050,18 @@ public class RepairjgczActivity extends TakePhotoActivity {
                 tvLcztDj.setText(ywgdBean.getGddjZtName());
             if (!TextUtils.isEmpty(ywgdBean.getJdsx()))
                 tvJdsx.setText(ywgdBean.getJdsx());
-            if (!TextUtils.isEmpty(ywgdBean.getGdflowconfig().getAllLcjd())) {
-                if (ywgdBean.getGdflowconfig().getAllLcjd().contains("2")) {
+            //1.工单登记,2.认证处置3.认证审核4.认证质检5.结果处置6.结果审核7.工单归档)
+            if (!TextUtils.isEmpty(allLcjd)) {
+                if (allLcjd.contains("2")) {
                     if (!TextUtils.isEmpty(ywgdBean.getRzsx()))
                         tvRzsx.setText(ywgdBean.getRzsx());
-                } else if (ywgdBean.getGdflowconfig().getAllLcjd().contains("3")) {
+                } else if (allLcjd.contains("3")) {
                     if (!TextUtils.isEmpty(ywgdBean.getShsx()))
                         tvRzsx.setText(ywgdBean.getShsx());
-                } else if (ywgdBean.getGdflowconfig().getAllLcjd().contains("4")) {
+                } else if (allLcjd.contains("4")) {
                     if (!TextUtils.isEmpty(ywgdBean.getZjsx()))
                         tvRzsx.setText(ywgdBean.getZjsx());
-                } else if (ywgdBean.getGdflowconfig().getAllLcjd().contains("5")) {
+                } else if (allLcjd.contains("5")) {
                     if (!TextUtils.isEmpty(ywgdBean.getCzsx()))
                         tvRzsx.setText(ywgdBean.getCzsx());
                 }

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

@@ -317,7 +317,7 @@ public class ZjupdataActivity extends LatteActivity {
         LinearLayoutManager layout = new LinearLayoutManager(this);
         layout.setOrientation(RecyclerView.HORIZONTAL);
         rvUserInfo.setLayoutManager(layout);
-        userAdapter = new ZjUserAdapter(R.layout.item_user_info_multiple, userList);
+        userAdapter = new ZjUserAdapter(R.layout.item_user_info_multiple2, userList);
 
         rvUserInfo.setAdapter(userAdapter);
     }

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

@@ -115,7 +115,7 @@ public class MeterListImpl extends LattePresenterImpl {
                                         Integer size = result.getSize();
                                         Integer pages = result.getPages();
                                         int i = current * size;
-                                        if (current < pages) {
+                                        if (current <= pages) {
                                             getView().showLoading("正在下载,抄表客户...\n      " + i + "/" + total + "户");
                                             map.put("current", ++current);
                                             getResultThree(context, map);

+ 0 - 1
app/src/main/java/com/tofly/tyuan/ui/imp/ZjRzImpl.java

@@ -140,7 +140,6 @@ public class ZjRzImpl extends LattePresenterImpl {
     public void getResultFour(Context context, Map<String, Object> map) {
         super.getResultFour(context, map);
         if (isViewAttached()) {
-
             getView().showLoading("加载中...");
             LatteNetWorkApi.getApiService(Api.class)
                     .getMbAllList()

+ 3 - 0
app/src/main/java/com/tofly/tyuan/ui/net/Api.java

@@ -161,6 +161,9 @@ public interface Api {
 
     /**
      * 所有码表数据
+     *
+     * 此处 获取数据 是否可以按照指定父级ID 查询. 避免太多非必要数据
+     *
      */
     @GET("/base/syscommoncode/all")
     Observable<BaseResponse<List<MbBean>>> getMbAllList();

+ 7 - 0
app/src/main/java/com/tofly/tyuan/utils/DateUtils.java

@@ -445,6 +445,13 @@ public class DateUtils {
         return cal.getTimeInMillis();
     }
 
+
+    /**
+     * 计算2个时间差 精确到ms
+     * @param time1 起始时间
+     * @param time2 终止时间
+     * @return  时间差 (ms)
+     */
     public static long getTimeOffset(String time1, String time2) {
         long offset = getTimeOffset(time1, time2, null);
         return offset;

+ 422 - 0
app/src/main/res/layout/item_user_info_multiple2.xml

@@ -0,0 +1,422 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="wrap_content"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_margin="@dimen/dp_5"
+    app:cardCornerRadius="@dimen/dp_5"
+    app:cardElevation="@dimen/dp_5"
+
+    android:background="@drawable/edit_bg_white"
+    android:layout_height="wrap_content">
+
+    <LinearLayout
+        android:id="@+id/ll_kh"
+        android:layout_width="300dp"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:visibility="visible">
+
+        <LinearLayout
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="客户编号:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/et_kh_code"
+                    style="@style/PointRepair.Content.EditText"
+                    tools:text="同飞科技" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+ <LinearLayout
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="客户姓名:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/et_kh_name"
+                    style="@style/PointRepair.Content.EditText"
+                    tools:text="同飞科技" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="客户电话:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/et_phone"
+                    style="@style/PointRepair.Content.EditText"
+                    android:inputType="number"
+                    tools:text="13569368668" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="用水地址:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/et_address"
+                    style="@style/PointRepair.Content.EditText"
+                    tools:text="青原区" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="抄表区域:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/et_cbqy"
+                    style="@style/PointRepair.Content.EditText"
+                    tools:text="13569368668" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="抄表区段:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/et_cbqd"
+                    style="@style/PointRepair.Content.EditText"
+                    tools:text="13569368668" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="水表口径:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/et_sbkj"
+                    style="@style/PointRepair.Content.EditText"
+                    tools:text="13569368668" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="用水性质:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/et_ysxz"
+                    style="@style/PointRepair.Content.EditText"
+                    android:inputType="number"
+                    android:maxLength="11"
+                    tools:text="13569368668" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:visibility="gone"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="前月水量:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/et_qysl"
+                    style="@style/PointRepair.Content.EditText"
+                    tools:text="13569368668" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            android:visibility="gone"
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="本月水量:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/et_bysl"
+                    style="@style/PointRepair.Content.EditText"
+                    tools:text="13569368668" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            android:visibility="gone"
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="升降水量:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/tv_sjsl"
+                    style="@style/PointRepair.Content.EditText"
+                    android:inputType="number"
+                    tools:text="13569368668" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            android:visibility="gone"
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="水量同比:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/et_sltb"
+                    style="@style/PointRepair.Content.EditText"
+                    android:inputType="number"
+                    tools:text="13569368668" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            android:visibility="gone"
+            style="@style/ReportDetail.Info.LinearLayout"
+            android:paddingLeft="6dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="  "
+                android:textColor="@color/red" />
+
+            <TextView
+                style="@style/ReportDetail.Info.Title"
+                android:text="水量环比:" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/et_slhb"
+                    style="@style/PointRepair.Content.EditText"
+                    android:inputType="number"
+                    tools:text="13569368668" />
+
+                <View style="@style/ReportDetail.Line.Bottom" />
+            </LinearLayout>
+        </LinearLayout>
+
+    </LinearLayout>
+
+</androidx.cardview.widget.CardView>

+ 8 - 2
app/src/main/res/layout/layout_ywgd_base.xml

@@ -262,29 +262,35 @@
 
                 <LinearLayout
                     android:layout_width="match_parent"
-                    android:layout_height="30.0dp">
+                    android:layout_height="wrap_content">
 
                     <TextView
                         style="@style/RepairDetail.Info.Title"
+                        android:layout_height="30dp"
                         android:text="受理部门:" />
 
                     <TextView
                         android:id="@+id/tv_slbm"
+                        android:layout_height="wrap_content"
                         style="@style/RepairDetail.Info.Content"
                         tools:text="张三" />
                 </LinearLayout>
 
                 <LinearLayout
                     android:layout_width="match_parent"
-                    android:layout_height="30.0dp">
+                    android:layout_height="wrap_content">
 
                     <TextView
+                        android:layout_height="30.0dp"
                         style="@style/RepairDetail.Info.Title"
                         android:text="受理人员:" />
 
                     <TextView
                         android:id="@+id/tv_slry"
+                        android:layout_marginRight="@dimen/dp_10"
+                        android:layout_marginBottom="@dimen/dp_10"
                         style="@style/RepairDetail.Info.Content"
+                        android:layout_height="wrap_content"
                         tools:text="02812345678" />
                 </LinearLayout>
 

+ 8 - 3
app/src/main/res/layout/layout_ywgd_rz.xml

@@ -5,8 +5,8 @@
     android:id="@+id/ll_rzcl"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:visibility="gone"
-    android:orientation="vertical">
+    android:orientation="vertical"
+    android:visibility="gone">
 
     <androidx.cardview.widget.CardView
         android:layout_width="match_parent"
@@ -106,21 +106,26 @@
                     <TextView
                         android:id="@+id/tv_shbm_rz"
                         style="@style/RepairDetail.Info.Content"
+                        android:layout_height="wrap_content"
                         tools:text="张三" />
                 </LinearLayout>
 
                 <LinearLayout
                     android:layout_width="match_parent"
-                    android:layout_height="30.0dp">
+                    android:layout_height="wrap_content">
 
                     <TextView
                         style="@style/RepairDetail.Info.Title"
                         android:layout_height="match_parent"
+                        android:height="30.0dp"
                         android:text="受理人员:" />
 
                     <TextView
                         android:id="@+id/tv_shry_rz"
+                        android:layout_marginRight="@dimen/dp_10"
+                        android:layout_marginBottom="@dimen/dp_10"
                         style="@style/RepairDetail.Info.Content"
+                        android:layout_height="wrap_content"
                         tools:text="工地001" />
                 </LinearLayout>
 

+ 8 - 2
app/src/main/res/layout/layout_ywgd_sh.xml

@@ -101,25 +101,31 @@
 
                     <TextView
                         style="@style/RepairDetail.Info.Title"
+                        android:layout_height="30dp"
                         android:text="处理部门:" />
 
                     <TextView
                         android:id="@+id/tv_zjbm"
+                        android:layout_height="wrap_content"
                         style="@style/RepairDetail.Info.Content"
                         tools:text="张三" />
                 </LinearLayout>
 
                 <LinearLayout
                     android:layout_width="match_parent"
-                    android:layout_height="30.0dp">
+                    android:layout_height="wrap_content">
 
                     <TextView
+
                         style="@style/RepairDetail.Info.Title"
-                        android:layout_height="match_parent"
+                        android:layout_height="30dp"
                         android:text="处理人员:" />
 
                     <TextView
+                        android:layout_height="wrap_content"
                         android:id="@+id/tv_zjry"
+                        android:layout_marginRight="@dimen/dp_10"
+                        android:layout_marginBottom="@dimen/dp_10"
                         style="@style/RepairDetail.Info.Content"
                         tools:text="工地001" />
                 </LinearLayout>

+ 10 - 4
app/src/main/res/layout/layout_ywgd_zj.xml

@@ -2,10 +2,10 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
     android:id="@+id/ll_rzzj"
-    android:visibility="gone"
+    android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    android:visibility="gone"
     android:orientation="vertical">
 
     <androidx.cardview.widget.CardView
@@ -101,27 +101,33 @@
 
                     <TextView
                         style="@style/RepairDetail.Info.Title"
+                        android:layout_height="30dp"
                         android:text="处置部门:" />
 
                     <TextView
                         android:id="@+id/tv_czbm_zj"
                         style="@style/RepairDetail.Info.Content"
+                        android:layout_height="wrap_content"
                         tools:text="张三" />
                 </LinearLayout>
 
                 <LinearLayout
                     android:layout_width="match_parent"
-                    android:layout_height="30.0dp">
+                    android:layout_height="wrap_content">
 
                     <TextView
                         style="@style/RepairDetail.Info.Title"
                         android:layout_height="match_parent"
+                        android:height="30dp"
                         android:text="处置人员:" />
 
                     <TextView
                         android:id="@+id/tv_czry_zj"
                         style="@style/RepairDetail.Info.Content"
-                        tools:text="工地001" />
+                        android:layout_height="wrap_content"
+                        android:layout_marginRight="@dimen/dp_10"
+                        android:layout_marginBottom="@dimen/dp_10"
+                        tools:text="工地001工地001工地001工地001工地001工地001工地001工地001工地001工地001工地001工地001工地001工地001工地001工地001工地001" />
                 </LinearLayout>
             </LinearLayout>
         </LinearLayout>