소스 검색

Merge remote-tracking branch 'origin/master'

guojing 5 년 전
부모
커밋
6235234f6a

+ 9 - 11
whepi-web/src/main/java/com/bofeng/controller/WxUserOpenController.java

@@ -5,7 +5,6 @@ import com.bofeng.entity.*;
 import com.bofeng.service.HomeService;
 import com.bofeng.service.WxUserOpenService;
 import com.yvan.Model;
-import com.yvan.platform.Conv;
 import com.yvan.platform.JsonWapper;
 import com.yvan.platform.StringUtils;
 import com.yvan.springmvc.HttpParameterParser;
@@ -15,7 +14,6 @@ import lombok.val;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletRequest;
@@ -54,15 +52,15 @@ public class WxUserOpenController {
     }
 
     @ApiOperation("用户注册页面点登录")
-    @PostMapping("/userOpen/login")
-    public Model<Long> login(@RequestBody String body) {
-//        val parser = HttpParameterParser.newInstance(HttpUtils.currentRequest());
-//        String openId = parser.getString("openId");
-//        String code = parser.getString("code");
-        JsonWapper jsonWapper = new JsonWapper(body);
-        Map map = jsonWapper.getInnerMap();
-        String openId = Conv.NS(map.get("openId"));
-        String code = Conv.NS(map.get("code"));
+    @GetMapping("/userOpen/login")
+    public Model<Long> login() {
+        val parser = HttpParameterParser.newInstance(HttpUtils.currentRequest());
+        String openId = parser.getString("openId");
+        String code = parser.getString("code");
+//        JsonWapper jsonWapper = new JsonWapper(body);
+//        Map map = jsonWapper.getInnerMap();
+//        String openId = Conv.NS(map.get("openId"));
+//        String code = Conv.NS(map.get("code"));
 
         if (StringUtils.isNullOrEmpty(code)) {
             return Model.newFail("code为空");

+ 3 - 3
whepi-web/src/main/java/com/bofeng/dao/RbMapper.java

@@ -80,7 +80,7 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
     Map<String, Integer> selecthuizong(@Param("uptownId") Long uptownId, @Param("date") String date);
 
     @Select(
-            "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, \n" +
+            "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,\n" +
                     "msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum, \n" +
                     "msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,\n" +
                     "mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult \n" +
@@ -94,7 +94,7 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
     List<ExcelRiBao> selectExcelRiBao(@Param("uptownId") Long uptownId, @Param("date") String date);
 
     @Select(
-            "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, \n" +
+            "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,\n" +
                     "msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum, \n" +
                     "msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,\n" +
                     "mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult \n" +
@@ -108,7 +108,7 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
     List<ExcelRiBaoLY> selectExcelRiBaoLY(@Param("uptownId") Long uptownId, @Param("date") String date);
 
     @Select(
-            "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, \n" +
+            "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,\n" +
                     "msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum, \n" +
                     "msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,\n" +
                     "mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult \n" +

+ 81 - 6
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBao.java

@@ -26,6 +26,12 @@ public class ExcelRiBao {
     private int diarrhea = 0;
     private int singleRoom = 0;
     private int scoreRezult = 0;
+    private int safetyNum = 0;
+    private int reportStatus = 0;
+    private int sureNum = 0;
+    private int singleNum = 0;
+    private int suspectedNum = 0;
+    private int normalNum = 0;
     private String statusDesp = "";
     private String others = "";
 
@@ -56,20 +62,66 @@ public class ExcelRiBao {
     @ExcelProperty(value = "联系电话", index = 3)
     private String phone;
 
+
     @ExcelProperty(value = "今日居家人数", index = 4)
-    private int safetyNum;
+    private String safetyNumStr = "";
+
+    public String getSafetyNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        safetyNumStr = "" + safetyNum;
+
+        return safetyNumStr;
+    }
 
     @ExcelProperty(value = "确诊人数", index = 5)
-    private int sureNum;
+    private String sureNumStr;
+
+    public String getSureNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        sureNumStr = "" + sureNum;
+
+        return sureNumStr;
+    }
 
     @ExcelProperty(value = "隔离人数", index = 6)
-    private int singleNum;
+    private String singleNumStr;
+
+    public String getSingleNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        singleNumStr = "" + singleNum;
+
+        return singleNumStr;
+    }
 
     @ExcelProperty(value = "异常观察人数", index = 7)
-    private int suspectedNum;
+    private String suspectedNumStr;
+
+    public String getSuspectedNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        suspectedNumStr = "" + suspectedNum;
+
+        return suspectedNumStr;
+    }
 
     @ExcelProperty(value = "身体正常人数", index = 8)
-    private int normalNum;
+    private String normalNumStr;
+
+    public String getNormalNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        normalNumStr = "" + normalNum;
+
+        return normalNumStr;
+    }
 
     @ExcelProperty(value = "居家人员姓名", index = 9)
     private String userName;
@@ -93,30 +145,45 @@ public class ExcelRiBao {
 
     @ExcelProperty(value = "体温", index = 10)
     private String temperatureStr;
+
     public String getTemperatureStr() {
-        temperatureStr = temperature.floatValue()>10?temperature+"":"未填报";
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        temperatureStr = temperature.floatValue() > 10 ? temperature + "" : "未填报";
         return temperatureStr;
     }
 
     @ExcelProperty(value = "确诊", index = 11)
     private String medicalStr;
+
     public String getMedicalStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
         if (medical == 0) {
             medicalStr = "否";
         } else {
             medicalStr = "是";
         }
+
+
         return medicalStr;
     }
 
     @ExcelProperty(value = "单间隔离", index = 12)
     private String singleRoomStr;
+
     public String getSingleRoomStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
         if (singleRoom == 0) {
             singleRoomStr = "否";
         } else {
             singleRoomStr = "是";
         }
+
         return singleRoomStr;
     }
 
@@ -125,6 +192,9 @@ public class ExcelRiBao {
 
     public String getBaseDesc() {
 
+        if (reportStatus == 0) {
+            return "未填报";
+        }
         if (Conv.NI(familyStatus.split(",")[0]) == 1) {
             baseDesc += "心血管疾病(服用ARB),";
         } else if (Conv.NI(familyStatus.split(",")[1]) == 1) {
@@ -150,8 +220,13 @@ public class ExcelRiBao {
 
     @ExcelProperty(value = "病情描述", index = 14)
     private String bingqingDesc = "";
+
     public String getBingqingDesc() {
 
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+
         if (medical == 1) {
             bingqingDesc += "已确诊、";
         }

+ 76 - 8
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoLY.java

@@ -26,6 +26,12 @@ public class ExcelRiBaoLY {
     private int diarrhea = 0;
     private int singleRoom = 0;
     private int scoreRezult = 0;
+    private int safetyNum = 0;
+    private int reportStatus = 0;
+    private int sureNum = 0;
+    private int singleNum = 0;
+    private int suspectedNum = 0;
+    private int normalNum = 0;
     private String statusDesp = "";
     private String others = "";
 
@@ -57,19 +63,64 @@ public class ExcelRiBaoLY {
     private String phone;
 
     @ExcelProperty(value = "今日居家人数", index = 4)
-    private int safetyNum;
+    private String safetyNumStr = "";
+
+    public String getSafetyNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        safetyNumStr = "" + safetyNum;
+
+        return safetyNumStr;
+    }
 
     @ExcelProperty(value = "确诊人数", index = 5)
-    private int sureNum;
+    private String sureNumStr;
+
+    public String getSureNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        sureNumStr = "" + sureNum;
+
+        return sureNumStr;
+    }
 
     @ExcelProperty(value = "隔离人数", index = 6)
-    private int singleNum;
+    private String singleNumStr;
+
+    public String getSingleNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        singleNumStr = "" + singleNum;
+
+        return singleNumStr;
+    }
 
     @ExcelProperty(value = "异常观察人数", index = 7)
-    private int suspectedNum;
+    private String suspectedNumStr;
+
+    public String getSuspectedNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        suspectedNumStr = "" + suspectedNum;
+
+        return suspectedNumStr;
+    }
 
     @ExcelProperty(value = "身体正常人数", index = 8)
-    private int normalNum;
+    private String normalNumStr;
+
+    public String getNormalNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        normalNumStr = "" + normalNum;
+
+        return normalNumStr;
+    }
 
     @ExcelProperty(value = "居家人员姓名", index = 9)
     private String userName;
@@ -94,15 +145,23 @@ public class ExcelRiBaoLY {
 
     @ExcelProperty(value = "体温", index = 10)
     private String temperatureStr;
+
     public String getTemperatureStr() {
-        temperatureStr = temperature.floatValue()>10?temperature+"":"未填报";
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        temperatureStr = temperature.floatValue() > 10 ? temperature + "" : "未填报";
         return temperatureStr;
     }
 
 
     @ExcelProperty(value = "确诊", index = 11)
     private String medicalStr;
+
     public String getMedicalStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
         if (medical == 0) {
             medicalStr = "否";
         } else {
@@ -113,7 +172,11 @@ public class ExcelRiBaoLY {
 
     @ExcelProperty(value = "单间隔离", index = 12)
     private String singleRoomStr;
+
     public String getSingleRoomStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
         if (singleRoom == 0) {
             singleRoomStr = "否";
         } else {
@@ -126,7 +189,9 @@ public class ExcelRiBaoLY {
     private String baseDesc = "";
 
     public String getBaseDesc() {
-
+        if (reportStatus == 0) {
+            return "未填报";
+        }
         if (Conv.NI(familyStatus.split(",")[0]) == 1) {
             baseDesc += "心血管疾病(服用ARB),";
         } else if (Conv.NI(familyStatus.split(",")[1]) == 1) {
@@ -152,8 +217,11 @@ public class ExcelRiBaoLY {
 
     @ExcelProperty(value = "病情描述", index = 14)
     private String bingqingDesc = "";
-    public String getBingqingDesc() {
 
+    public String getBingqingDesc() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
         if (medical == 1) {
             bingqingDesc += "已确诊、";
         }

+ 77 - 5
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoPrivate.java

@@ -26,6 +26,12 @@ public class ExcelRiBaoPrivate {
     private int diarrhea = 0;
     private int singleRoom = 0;
     private int scoreRezult = 0;
+    private int safetyNum = 0;
+    private int reportStatus = 0;
+    private int sureNum = 0;
+    private int singleNum = 0;
+    private int suspectedNum = 0;
+    private int normalNum = 0;
     private String statusDesp = "";
     private String others = "";
 
@@ -67,19 +73,64 @@ public class ExcelRiBaoPrivate {
     private String phone;
 
     @ExcelProperty(value = "今日居家人数", index = 5)
-    private int safetyNum;
+    private String safetyNumStr = "";
+
+    public String getSafetyNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        safetyNumStr = "" + safetyNum;
+
+        return safetyNumStr;
+    }
 
     @ExcelProperty(value = "确诊人数", index = 6)
-    private int sureNum;
+    private String sureNumStr;
+
+    public String getSureNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        sureNumStr = "" + sureNum;
+
+        return sureNumStr;
+    }
 
     @ExcelProperty(value = "隔离人数", index = 7)
-    private int singleNum;
+    private String singleNumStr;
+
+    public String getSingleNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        singleNumStr = "" + singleNum;
+
+        return singleNumStr;
+    }
 
     @ExcelProperty(value = "异常观察人数", index = 8)
-    private int suspectedNum;
+    private String suspectedNumStr;
+
+    public String getSuspectedNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        suspectedNumStr = "" + suspectedNum;
+
+        return suspectedNumStr;
+    }
 
     @ExcelProperty(value = "身体正常人数", index = 9)
-    private int normalNum;
+    private String normalNumStr;
+
+    public String getNormalNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        normalNumStr = "" + normalNum;
+
+        return normalNumStr;
+    }
 
     @ExcelProperty(value = "居家人员姓名", index = 10)
     private String userName;
@@ -88,6 +139,9 @@ public class ExcelRiBaoPrivate {
     private String grenderStr;
 
     public String getGrenderStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
         if (grender == 1) {
             grenderStr = "男";
         } else if (grender == 2) {
@@ -105,6 +159,9 @@ public class ExcelRiBaoPrivate {
     private String temperatureStr;
 
     public String getTemperatureStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
         temperatureStr = temperature.floatValue() > 10 ? temperature + "" : "未填报";
         return temperatureStr;
     }
@@ -113,6 +170,9 @@ public class ExcelRiBaoPrivate {
     private String medicalStr;
 
     public String getMedicalStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
         if (medical == 0) {
             medicalStr = "否";
         } else {
@@ -125,6 +185,9 @@ public class ExcelRiBaoPrivate {
     private String singleRoomStr;
 
     public String getSingleRoomStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
         if (singleRoom == 0) {
             singleRoomStr = "否";
         } else {
@@ -137,6 +200,9 @@ public class ExcelRiBaoPrivate {
     private String baseDesc = "";
 
     public String getBaseDesc() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
 
         if (Conv.NI(familyStatus.split(",")[0]) == 1) {
             baseDesc += "心血管疾病(服用ARB),";
@@ -166,6 +232,9 @@ public class ExcelRiBaoPrivate {
     private String bingqingDesc = "";
 
     public String getBingqingDesc() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
 
         if (medical == 1) {
             bingqingDesc += "已确诊、";
@@ -230,6 +299,9 @@ public class ExcelRiBaoPrivate {
     private String scoreRezultStr;
 
     public String getScoreRezultStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
         if (scoreRezult == 0) {
             scoreRezultStr = "未评估";
         } else if (scoreRezult == 1) {

+ 5 - 17
whepi-web/src/main/java/com/bofeng/service/WxUserOpenService.java

@@ -219,30 +219,18 @@ public class WxUserOpenService {
         }
         //判断业委会是否已经建立
         List<Owner> lstSysOwner = ownerMapper.getOwnerByUptownId(myUptownId);
-        boolean hasOwner = false;
         if (lstSysOwner != null && lstSysOwner.size() > 0) {
             for (Owner item : lstSysOwner) {
                 if (item.getUserId() == sysUserId && item.getType() == 1) {
                     //业委会负责人的绑定用户是自己
-                    hasOwner = true;
-                    break;
+                    return 1L;  //该小区已成立业委会,且业委会负责人的绑定用户是自己,可以进入编辑
+//                    break;
                 }
             }
-            if (!hasOwner) {
-                throw new Exception("该小区已建立业委会");
-            }
-        }
-        List<OwnerLinkman> lstOwnerLinkman = ownerLinkmanMapper.getOwnerLinkmanByOwnerId(sysUserId);
-        if (lstOwnerLinkman == null) {
-            return 1L;
-            //throw new Exception("不是业委会成员!");
-        }
-        for (OwnerLinkman item : lstOwnerLinkman) {
-            if (item.getType() == 1) {
-                return 1L;  //业委会负责人可以编辑完善业委会信息
-            }
+            throw new Exception("小区业委会已建立,非业委会负责人不能编辑!");
+        } else {
+            return 1L;  //该小区没有成立业委会,可以进入新增
         }
-        return 0L;
     }
 
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)