浏览代码

Merge remote-tracking branch 'origin/master'

guojing 5 年之前
父节点
当前提交
c29eab3778

+ 2 - 2
admin-ui/app/whepi/home/selectUptown.js

@@ -7,9 +7,9 @@ define(function (require) {
       width: 550,
       height: 600,
       grid: {
-        url: api('/getAllUptown'),
+        url: api('/qrImg/getUptown'),
         mtype: 'post',
-        pagination: true,
+        pagination: false,
         autoSizeColumns: true,
         queryParams: {query: context.query},
         // idField: 'userId',

+ 10 - 10
whepi-ui/templates/home/ribao.ftl

@@ -124,61 +124,61 @@
                     <input id="suspectedId" type="text" hidden="hidden" value=""/>
                     <div style="height: 5vh; line-height: 5vh;margin-left: 2vw;">病情描述</div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 70%;">确诊新冠肺炎</div>
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">确诊新冠肺炎</div>
                         <input id="switchQuezhen" class="weui-input" autofocus="" type="text" placeholder="请选择"
                                maxlength="20"
                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%;">单间隔离</div>
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">单间隔离</div>
                         <input id="switchDanjiangeli" class="weui-input" autofocus="" type="text" placeholder="请选择"
                                maxlength="20"
                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
                     </div>
 
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%;">体温</div>
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">体温</div>
                         <input id="js_input_user_tiwen" class="weui-input" autofocus="" type="number" placeholder="请输入"
                                maxlength="4"
                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%;">咳嗽现象</div>
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">咳嗽现象</div>
                         <input id="js_input_user_kesou" class="weui-input" autofocus="" type="text" placeholder="请选择"
                                maxlength="20"
                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 30%;">肌肉酸痛</div>
+                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 55%;">肌肉酸痛</div>
                         <input id="js_input_user_jirou" class="weui-input" autofocus="" type="text" placeholder="请选择"
                                maxlength="20"
                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 30%;">呼吸困难</div>
+                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 55%;">呼吸困难</div>
                         <input id="js_input_user_huxi" class="weui-input" autofocus="" type="text" placeholder="请选择"
                                maxlength="20"
                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%;">乏力现象</div>
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">乏力现象</div>
                         <input id="js_input_user_fali" class="weui-input" autofocus="" type="text" placeholder="请选择"
                                maxlength="20"
                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%;">腹泻现象</div>
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">腹泻现象</div>
                         <input id="js_input_user_fuxie" class="weui-input" autofocus="" type="text" placeholder="请选择"
                                maxlength="20"
                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh;margin-right: 2vw;width: 30%;">其他描述</div>
+                        <div style="color: gray;height: 5vh; line-height: 5vh;width: 55%;">其他描述</div>
                         <textarea id="shuruqita" class="weui-textarea" placeholder="输入内容(300字内)" rows="5"
                                   style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 1vh;"></textarea>
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh;margin-right: 2vw;width: 40%;">
+                        <div style="color: gray;height: 5vh; line-height: 5vh;width: 55%;">
                             <button id="ribao_score" style="height:5vh;"
                                     class="weui-btn weui-btn_mini weui-btn_primary">健康评估
                             </button>

+ 23 - 18
whepi-ui/templates/home/ribao.js

@@ -298,7 +298,7 @@ function ribao_cell(v) {
     diarrhea = "腹泻现象:" + getDiarrhea(v.diarrhea) + ";";
   var others = "";
   if (v.others != "")
-    others = "其他描述:" + v.others+ ";";
+    others = "其他描述:" + v.others + ";";
   var scoreRezult = "";
   if (v.scoreRezult != 0)
     scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
@@ -383,7 +383,7 @@ function ribaoCommit() {
     return;
   }
   //男性不能选择妊娠期
-  if ( $("#js_input_user_sex").attr("data-values")==1 && $("input[name='checkbox7']:checked").val() == "on") {
+  if ($("#js_input_user_sex").attr("data-values") == 1 && $("input[name='checkbox7']:checked").val() == "on") {
     $.alert("男性不能选择妊娠期");
     return;
   }
@@ -631,7 +631,8 @@ function addReport() {
     },
     success: function (data) {
       $.toast(data.msg);
-      document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
+      if (data.msg == "操作成功")
+        document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
     },
   });
 }
@@ -726,21 +727,25 @@ function getGreder(greder) {
 
 function getFamilyStatus(familyStatus) {
   var familyStatusList = familyStatus.split(",");
-  var familyStatusString = "无病史,";
-  if (familyStatusList[0] == 1)
-    familyStatusString += "心脑血管疾病(服用ARB),";
-  if (familyStatusList[1] == 1)
-    familyStatusString += "心脑血管疾病(未服ARB),";
-  if (familyStatusList[2] == 1)
-    familyStatusString += "呼吸系统病史,";
-  if (familyStatusList[3] == 1)
-    familyStatusString += "肿瘤病史,";
-  if (familyStatusList[4] == 1)
-    familyStatusString += "糖尿病史,";
-  if (familyStatusList[5] == 1)
-    familyStatusString += "服用过激素药物,";
-  if (familyStatusList[6] == 1)
-    familyStatusString += "妊娠期,";
+  var familyStatusString = "";
+  if (familyStatus == '0,0,0,0,0,0,0')
+    familyStatusString += "无病史,";
+  else {
+    if (familyStatusList[0] == 1)
+      familyStatusString += "心脑血管疾病(服用ARB),";
+    if (familyStatusList[1] == 1)
+      familyStatusString += "心脑血管疾病(未服ARB),";
+    if (familyStatusList[2] == 1)
+      familyStatusString += "呼吸系统病史,";
+    if (familyStatusList[3] == 1)
+      familyStatusString += "肿瘤病史,";
+    if (familyStatusList[4] == 1)
+      familyStatusString += "糖尿病史,";
+    if (familyStatusList[5] == 1)
+      familyStatusString += "服用过激素药物,";
+    if (familyStatusList[6] == 1)
+      familyStatusString += "妊娠期,";
+  }
   return familyStatusString.substring(0, familyStatusString.length - 1);
 }
 

+ 2 - 2
whepi-ui/templates/user/scanEstate.ftl

@@ -11,9 +11,9 @@
                     <br/>
                     <br/>
                     <br/>
-                    <p class="user-title-long">${doorplate!''}
-                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${name!''}</p>
+                    <p class="user-title-long">${doorplate!''}</p>
                     <br/>
+                    <p class="user-title-long">${name!''}</p>
                     <br/>
                     <h1 class="user-title-big ${collor!''}">${into!""}</h1>
                     <br/>

+ 19 - 18
whepi-web/src/main/java/com/bofeng/service/UserOpenService.java

@@ -65,6 +65,7 @@ public class UserOpenService {
         userRole.setRoleId(1);
         userRole.setUserCreate(userId);
         userRole.setUserUpdate(userId);
+        userRole.setStatus(1);
         UptownHouse uptownHouse = new UptownHouse();
         uptownHouse.setHouseId(IdWorker.getId());
         uptownHouse.setUnitId(unitId);
@@ -82,24 +83,24 @@ public class UserOpenService {
         uptownHome.setStatus(1);
         uptownHomeMapper.insert(uptownHome);
         userRole.setPropertyId(uptownHome.getHouseId());
-        if (userType == 2) {
-            Owner owner = new Owner();
-            owner.setOwnerId(IdWorker.getId());
-            owner.setUptownId(uptownId);
-            owner.setLinkman(linkman);
-            owner.setPhone(phone);
-            owner.setUserCreate(userId);
-            owner.setUserUpdate(userId);
-            ownerMapper.insert(owner);
-            UserRole userRole1 = new UserRole();
-            userRole1.setUrId(IdWorker.getId());
-            userRole1.setUserId(userId);
-            userRole1.setRoleId(userType);
-            userRole1.setUserCreate(userId);
-            userRole1.setUserUpdate(userId);
-            userRole1.setPropertyId(owner.getOwnerId());
-            userRoleMapper.insert(userRole1);
-        }
+//        if (userType == 2) {
+//            Owner owner = new Owner();
+//            owner.setOwnerId(IdWorker.getId());
+//            owner.setUptownId(uptownId);
+//            owner.setLinkman(linkman);
+//            owner.setPhone(phone);
+//            owner.setUserCreate(userId);
+//            owner.setUserUpdate(userId);
+//            ownerMapper.insert(owner);
+//            UserRole userRole1 = new UserRole();
+//            userRole1.setUrId(IdWorker.getId());
+//            userRole1.setUserId(userId);
+//            userRole1.setRoleId(userType);
+//            userRole1.setUserCreate(userId);
+//            userRole1.setUserUpdate(userId);
+//            userRole1.setPropertyId(owner.getOwnerId());
+//            userRoleMapper.insert(userRole1);
+//        }
         userRoleMapper.insert(userRole);
     }
 }

+ 3 - 3
whepi-web/src/main/java/com/bofeng/wx/controller/ScanController.java

@@ -144,7 +144,7 @@ public class ScanController {
                     model.put("collor", "red");
                     model.put("into", "禁止通行");
                     model.put("errorMsg", "健康日报提示您存在健康问题,禁止外出,请配合。");
-                    return new ModelAndView("/user/scanEstate.ftl", model);
+                    return new ModelAndView("/user/scan.ftl", model);
                 }
                 List<MsReport> msReports = msReportMapper.selectMsReportLate(userOpen.getUserId());
                 if (msReports.size() == 0) {
@@ -186,7 +186,7 @@ public class ScanController {
         } else {
             List<UptownHome> uptownHomes =  uptownHomeMapper.getUptownHomeByUserId(userOpen.getUserId());
             UptownUnit unit = uptownUnitMapper.getUptownUnitByUser(userOpen.getUserId());
-            model.put("doorplate", unit.getRidgepole() + "栋" + unit.getUnit() + "单元" +unit.getDoorplate() + "号");
+            model.put("doorplate", unit.getUptownName() + "小区" +unit.getRidgepole() + "栋" + unit.getUnit() + "单元" +unit.getDoorplate() + "号");
             model.put("name", uptownHomes.get(0).getLinkman());
             SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
             model.put("now", format.format(new Date()));
@@ -209,7 +209,7 @@ public class ScanController {
             if (msReports.size() != 3) {
                 model.put("collor", "red");
                 model.put("into", "禁止通行");
-                model.put("errorMsg", "您近期有未提交健康日报,无法判断您健康状态,请尽快返回住处。");
+                model.put("errorMsg", "您近期有漏报健康日报,无法判断您健康状态,请尽快返回住处。");
                 return new ModelAndView("/user/scanEstate.ftl", model);
             }
             MsReport msReport = msReportMapper.selectMsReportToday(userOpen.getUserId());