瀏覽代碼

Merge remote-tracking branch 'origin/master'

peiguo 5 年之前
父節點
當前提交
54786962d1

+ 3 - 2
whepi-doc/mrsb.sql

@@ -7,10 +7,11 @@ CREATE TABLE ms_report  (
   house_id          bigint(20) NOT NULL DEFAULT 0                           COMMENT '门牌ID',
   safety_num        int(11) NOT NULL DEFAULT 0                              COMMENT '今日居家人数',
   sure_num          int(11) NOT NULL DEFAULT 0                              COMMENT '确诊人数',
-  suspected_num     int(11) NOT NULL DEFAULT 0                              COMMENT '疑似人数',
+  suspected_num     int(11) NOT NULL DEFAULT 0                              COMMENT '异常疑似人数',
+  normal_num        int(11) NOT NULL DEFAULT 0                              COMMENT '正常人数',
   remarks           varchar(200)  NOT NULL DEFAULT ''                       COMMENT '异常备注',
   report_date       date                                                    COMMENT '上报日期',
-  report_status     int(11) NOT NULL DEFAULT 1                              COMMENT '上报状态:0草稿,1正常',
+  report_status     int(11) NOT NULL DEFAULT 0                              COMMENT '上报状态:0草稿,1正常',
   ms_status         int(11) NOT NULL DEFAULT 1                              COMMENT '健康状态:1正常,2异常',
   user_create       bigint(20) NOT NULL DEFAULT 0                           COMMENT '新增人',
   time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0)       COMMENT '新增时间',

+ 2 - 2
whepi-ui/templates/home/frag.head.ftl

@@ -9,13 +9,13 @@
     <link rel="stylesheet" href="${s3('/jquery-weui/1.2.1/css/jquery-weui.min.css')}" type="text/css">
     <style>
         .demos-header {
-            padding: 15px 0 5px 0;
+            padding: 10px 0 5px 0;
             background-color: #16ae9d;
         }
 
         .demos-title {
             text-align: center;
-            font-size: 30px;
+            font-size: 25px;
             color: white;
             font-weight: 300;
             margin: 0 15%;

+ 26 - 22
whepi-ui/templates/home/ribao.ftl

@@ -35,7 +35,7 @@
                         注:请如实上报情况,便以相互帮助,小区是我家,团结就是力量!
                     </span></div>
                     <div class="weui-btn-area">
-                        <a class="weui-btn weui-btn_primary" href="javascript:" id="showTooltips" onclick="addReport()">全家报平安</a>
+                        <a id="btn_shangbao" class="weui-btn weui-btn_primary" href="javascript:" id="showTooltips" onclick="addReport()">全家报平安</a>
                     </div>
                 </div>
                 <div id="ribao" class="weui-btn-area" style="display: none">
@@ -46,15 +46,14 @@
                         <input id="js_input_user_age" 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; width: 25%; text-align: center;" />
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="width: 20%;height: 5vh; line-height: 5vh;margin-left: 2vw;">基本状况</div>
+                        <div style="height: 5vh; line-height: 5vh;margin-left: 2vw;">基本状况</div>
                         <input id="js_input_user_status" 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; width: 75%;" />
                     </div>
                     <textarea id="jibenmiaoshu" class="weui-textarea" placeholder="身体基本状况描述" rows="5" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 1vh;"></textarea>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="width: 20%;height: 5vh; line-height: 5vh;margin-left: 2vw;">病情描述</div>
+                        <div style="height: 5vh; line-height: 5vh;margin-left: 2vw;">病情描述</div>
                         <div style="width: 70%;display:flex; flex-direction: row;">
                             <div style="color: gray;height: 5vh; line-height: 5vh;margin-right: 5vw;">是否确诊</div>
-<#--                            <input id="switchQuezhen" class="weui-switch" type="checkbox">-->
                             <input hidden="hidden" name="switchQuezhen" id="switchQuezhen" value="off" type="radio" checked="checked"/>
                             <div class="weui-cell__ft">
                                 <input class="weui-switch" type="checkbox" id="rb_switch" name="rb_switch">
@@ -62,33 +61,38 @@
                         </div>
                     </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: 10%;">体温</div>
-                        <input id="js_input_user_tiwen" 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; width: 35%;" />
-                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 10%;margin-left: 5vw;">咳嗽</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; width: 35%;" />
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%;">体温</div>
+                        <input id="js_input_user_tiwen" class="weui-input" autofocus="" type="number" 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: 2.5vh; width: 10%;">肌肉酸痛</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; width: 35%;" />
-                        <div style="color: gray;height: 5vh;line-height: 2.5vh; width: 10%;margin-left: 5vw;">呼吸困难</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; width: 35%;" />
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%;">咳嗽</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: 10%;">胸闷</div>
-                        <input id="js_input_user_xiongmen" 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; width: 35%;" />
-                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 10%;margin-left: 5vw;">乏力</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; width: 35%;" />
+                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 30%;">肌肉酸痛</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: 10%;">腹泻</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; width: 35%;" />
-                        <div style="width: 50%; display: flex; flex-direction: row;">
-                            <input id="js_input_user_cishu" 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; width: 30%;" />
-                            <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%; margin-left: 3vw;">次/日</div>
+                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 30%;">呼吸困难</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>
+                        <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>
+                        <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; margin-top: 1vh;">
+                        <div style="color: gray;height: 5vh; line-height: 5vh; margin-right: 2vw;">是否单间隔离</div>
+                        <input hidden="hidden" name="js_input_user_danjiangeli" id="switchQuezhen" value="off" type="radio" checked="checked"/>
+                        <div class="weui-cell__ft">
+                            <input class="weui-switch" type="checkbox" id="rb_switch_2" name="rb_switch">
                         </div>
                     </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: 10%;margin-right: 2vw;">其他</div>
+                        <div style="color: gray;height: 5vh; line-height: 5vh;margin-right: 2vw;width: 13%;">其他</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; justify-content: center;">

+ 34 - 26
whepi-ui/templates/home/ribao.js

@@ -1,4 +1,7 @@
 function ribao_init() {
+
+  $("#js_input_user_sex").val("女");   //设置初始值
+
   $('#btnRB').on('click', function () {
     window.location.href = "/yeweihui/home.html";
   });
@@ -20,6 +23,9 @@ function ribao_init() {
     title: "选择基本状况",
     items: [
       {
+        title: "正常",
+        value: "0",
+      }, {
         title: "心脑血管疾病(服用ARB)",
         value: "1",
       },
@@ -119,7 +125,7 @@ function ribao_init() {
       }]
   });
 
-  $("#js_input_user_xiongmen").select({
+  $("#js_input_user_danjiangeli").select({
     title: "选择胸闷情况",
     items: [
       {
@@ -127,16 +133,8 @@ function ribao_init() {
         value: "0",
       },
       {
-        title: "端坐呼吸",
+        title: "",
         value: "1",
-      },
-      {
-        title: "活动无耐力",
-        value: "2",
-      },
-      {
-        title: "无变化",
-        value: "3",
       }]
   });
 
@@ -182,6 +180,13 @@ function ribao_init() {
     }
   });
 
+  $("#rb_switch2").bind("click", function () {
+    if ($("#js_input_user_danjiangeli").val() == "off") {
+      $("#js_input_user_danjiangeli").val("on");
+    } else {
+      $("#js_input_user_danjiangeli").val("off");
+    }
+  });
 }
 
 //近日报告
@@ -197,12 +202,13 @@ function ribaoInitialization(reportId) {
     success: function (data) {
       console.log(data);
       if (data.data.length > 0) {
+        $('#btn_shangbao').text('上报');
         hasData = true;
         data.data.forEach(function (v) {
           ribao_cell(v);
         });
       } else {
-
+        $('#btn_shangbao').text('全家报平安');
       }
     },
     error: function () {
@@ -222,12 +228,12 @@ function ribao_refrash() {
     success: function (data) {
       console.log(data);
       if (data.data == undefined) {
-        $('#ribao_famliy').empty();
+        $('#rb_family').empty();
       }
       else {
+        $('#rb_family').empty();
         if (data.data.length > 0) {
           hasData = true;
-          $('#rb_family').empty();
           data.data.forEach(function (v) {
             ribao_cell(v);
           });
@@ -310,20 +316,20 @@ function ribaoCommit() {
   // return;
   var userId = $("#userId").val();
   var userName = $("#js_input_user_name").val();
-  var grender = $("#js_input_user_sex").attr("data-values");
-  var age = $("#js_input_user_age").val();
-  var familyStatus = $("#js_input_user_status").attr("data-values");
-  var statusDesp = $("#jibenmiaoshu").val();
+  var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
+  var age = $("#js_input_user_age").val()== "" ? 0 :  $("#js_input_user_age").val();
+  var familyStatus = $("#js_input_user_status").attr("data-values") == undefined ? 0 : $("#js_input_user_status").attr("data-values");
+  var statusDesp = $("#jibenmiaoshu").val()== undefined ? "" : $("#jibenmiaoshu").val();
   var medical = $("#switchQuezhen").val() == "on" ? 1 : 0;
-  var temperature = $("#js_input_user_tiwen").val();
-  var cough = $("#js_input_user_kesou").attr("data-values");
-  var muscle = $("#js_input_user_jirou").attr("data-values");
-  var dyspnea = $("#js_input_user_huxi").attr("data-values");
-  var chest = $("#js_input_user_xiongmen").attr("data-values");
-  var fatigue = $("#js_input_user_fali").attr("data-values");
-  var diarrhea = $("#js_input_user_fuxie").attr("data-values");
-  var diarrheaNum = $("#js_input_user_cishu").val();
-  var others = $("#shuruqita").val();
+  var temperature = $("#js_input_user_tiwen").val()== "" ? 0 : $("#js_input_user_tiwen").val();
+  var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
+  var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
+  var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
+  var chest = $("#js_input_user_xiongmen").attr("data-values") == undefined ? 0 : $("#js_input_user_xiongmen").attr("data-values");
+  var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
+  var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
+  var diarrheaNum = $("#js_input_user_cishu").val()== "" ? 0 : $("#jibenmiaoshu").val();
+  var others = $("#shuruqita").val()== undefined ? "" : $("#jibenmiaoshu").val();
   $.ajax({
     url: '/home/addRibao',
     type: "post",
@@ -459,6 +465,8 @@ function getGreder(greder) {
 }
 
 function getFamilyStatus(familyStatus) {
+  if (familyStatus == 0)
+    return "正常";
   if (familyStatus == 1)
     return "心脑血管疾病(服用ARB)";
   else if (familyStatus == 2)

+ 1 - 1
whepi-ui/templates/user/changeRole.ftl

@@ -43,7 +43,7 @@
                         <br/>
                         <div class="weui-form__opr-area">
                             <a class="weui-btn weui-btn_primary" href="javascript:;" onclick="login();"
-                               id="login">登陆</a>
+                               id="login">用户登录</a>
                         </div>
                     </div>
                 </div>

+ 3 - 3
whepi-ui/templates/user/home.ftl

@@ -1,4 +1,4 @@
-<#assign title="业委会"/>
+<#assign title="用户登录"/>
 <#include "/home/frag.head.ftl" />
 
 <div class="weui-tab">
@@ -11,7 +11,7 @@
                         <br/>
                         <h1 class="user-title">家园抗击疫情公共服务平台</h1>
                         <br/>
-                        <h1 class="user-title">用户登</h1>
+                        <h1 class="user-title">用户登</h1>
                     </header>
                     <br/>
                     <br/>
@@ -28,7 +28,7 @@
                             <div class="leftdiv">
                                 <br/>
                                 <div class="weui-cells__title" style="font-weight: 300;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<#if user ??>${user.nickName!''}</#if></div>
-                                <div class="weui-cells__title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;登陆</div>
+                                <div class="weui-cells__title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户登录</div>
                                 <br/>
                             </div>
                             <div class="centerdiv"></div>

+ 5 - 7
whepi-ui/templates/yeweihui/ribao.ftl

@@ -77,9 +77,10 @@
                         tr = $("<tr></tr>");
                     }
                     var td;
-                    if(v.msStatus == 2 && v.reportStatus == 2){//异常
-                        td = '<td style="background-color: yellow" align="center" value="'+v.houseId+'"><button style="height: 100%;width: 100%;background-color: yellow" value="'+v.houseId+'" onclick="ribao_ycxq(this.value)">'+v.doorplate+'</button></td>';
-                    }else if(v.msStatus != 2 && v.reportStatus == 2 && v.msStatus != null && v.reportStatus !=null){//已报
+
+                    if(v.msStatus == 2 && v.reportStatus == 1){//异常
+                        td = '<td style="background-color: yellow" align="center" value="'+v.houseId+'"><a style="height: 100%;width: 100%;background-color: yellow" onclick=\'ribao_ycxq('+JSON.stringify(v.houseId) +');\'>'+v.doorplate+'</a></td>';
+                    }else if(v.msStatus != 2 && v.reportStatus == 1 && v.msStatus != null && v.reportStatus !=null){//已报
                         td = '<td style="background-color: #0bb20c" align="center">'+v.doorplate+'</td>';
                     }else if(v.reportStatus == 1 || v.reportStatus == 0){//待报
                         td = '<td style="background-color: #75859f" align="center">'+v.doorplate+'</td>';
@@ -95,10 +96,7 @@
     })(jQuery);
 
     function ribao_ycxq(houseId) {
-        $('#tableId').on('click', function () {
-            window.location.href = "/yeweihui/ribaoXq.html?"+houseId
-        });
-
+        window.location.href = "/yeweihui/ribaoXq.html?"+houseId;
     }
 
     $('#return').on('click', function () {

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

@@ -38,6 +38,6 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
             "inner join sys_uptown_house b on b.house_id = a.house_id " +
             "inner join sys_uptown_unit e on e.unit_id = b.unit_id " +
             "left join ms_suspected c on c.report_id = a.report_id " +
-            "where b.house_id = #{houseId}")
+            "where b.house_id = #{houseId} and DATE_FORMAT(a.time_update,'%Y-%m-%d') = #{dateStr}")
     List<MsSuspected> selectYcXq(@Param("houseId") Long houseId, @Param("dateStr") String dateStr);
 }

+ 7 - 2
whepi-web/src/main/java/com/bofeng/service/MsSuspectedService.java

@@ -94,8 +94,9 @@ public class MsSuspectedService {
                 msReport.setSuspectedNum(isTrue);
             if (medical == 1)
                 msReport.setSureNum(isTrue);
-            msReport.setUserUpdate(userCreate);
-            msReport.setTimeUpdate(DateTime.now());
+            msReport.setMsStatus(2);
+            // msReport.setUserUpdate(userCreate);
+            // msReport.setTimeUpdate(DateTime.now());
             msReportMapper.updateById(msReport);
         }
 
@@ -115,6 +116,10 @@ public class MsSuspectedService {
                     msReport.setSuspectedNum(isTrue);
                 if (msSuspected.getMedical() == 1)
                     msReport.setSureNum(isTrue);
+                if(isTrue==0)
+                    msReport.setMsStatus(1);
+                else
+                    msReport.setMsStatus(2);
                 msReport.setUserUpdate(msReport.getUserCreate());
                 msReport.setTimeUpdate(DateTime.now());
                 msReportMapper.updateById(msReport);

+ 0 - 2
whepi-web/src/main/java/com/bofeng/service/RbService.java

@@ -42,8 +42,6 @@ public class RbService {
             for (int i = 0; i < sysUptownHouses.size(); i++) {
 
 
-
-
                 if(sysUptownHouses.get(i).getCough()==0){
                     sysUptownHouses.get(i).setChestStr("无咳嗽");
                 }else if(sysUptownHouses.get(i).getCough()==1){

+ 1 - 1
whepi-web/src/main/java/com/bofeng/wx/controller/HomeController.java

@@ -51,7 +51,7 @@ public class HomeController {
         //初始化今日日报
         UserOpen userOpen = homeService.getUserOpen();
         Long userId = userOpen.getUserId();
-        //Long userId = 1224706869998772226L;
+       // Long userId = 1224706869998772226L;
         MsReport msReport = msReportService.getReportByDateNow(userId);
         model.put("msReport", new JsonWapper(msReport));
         return new ModelAndView("/home/home.ftl", model);

+ 1 - 1
whepi-web/src/main/resources/application-dev.yml

@@ -22,7 +22,7 @@ yvan:
   upload_domain: /static
   wechat:
     #测试帐号
-    token: guojing
+    token: yuliang
     appID: wxa3991865de920847
     appsecret: 4ac7ffba92e934f944a9d78ecc1807b5