Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	whepi-web/src/main/java/com/bofeng/dao/MsReportMapper.java
peiguo 5 anni fa
parent
commit
f24115a17a

+ 5 - 1
whepi-ui/templates/home/home.ftl

@@ -39,6 +39,9 @@
 
 <#include "/home/frag.foot.ftl" />
 <script>
+    var xiaoquId = '1238790987234'; //1238790987234
+    var ceshixiaoquId = '5';
+    var canSahngbao = true;
     <#include "/home/ribao.js" />
     <#include "/home/qiuzhu.js" />
     (function ($) {
@@ -56,7 +59,7 @@
         });
 
         var uptownId = $("#uptownId").val();
-        if (uptownId == '5'){ //1238790987234
+        if (uptownId == xiaoquId || uptownId == ceshixiaoquId){
             $('#ribao_trip')[0].style.display = '';
             $('#ribao_djgl')[0].style.display = 'none';
             $('#ribao_jbqk')[0].style.display = 'none';
@@ -75,6 +78,7 @@
         <#if msReport ??>var msReport = ${msReport}</#if>;
         $('#ribao_jinrijujian').append(msReport.safetyNum);
         if (msReport.reportStatus == 1) {
+            canSahngbao = false;
             document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
         }
         ribaoInitialization(msReport.reportId);

+ 34 - 9
whepi-ui/templates/home/ribao.ftl

@@ -38,6 +38,7 @@
                     <#--</div>-->
                     </div>
                     <div class="weui-cells__tips"> <span style="color: red">
+                        <br/>
                         注:请如实上报情况,便以相互帮助,小区是我家,团结就是力量!后期会有医生跟踪分析,给予大家医疗建议,请认真填报!
                     </span></div>
                     <div class="weui-btn-area">
@@ -132,11 +133,34 @@
                 <#--style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 1vh;"></textarea>-->
                     <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: 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;"/>
+                    <#--<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 class="weui-cells weui-cells_checkbox" style="width: 125%">
+                            <label class="weui-cell weui-cell_active weui-check__label" for="s18">
+                                <input type="radio" name="radio" value="0" class="weui-check" id="s18">
+                                <i class="weui-icon-checked"></i>无
+                            </label>
+                            <label class="weui-cell weui-cell_active weui-check__label" for="s19">
+                                <input type="radio" name="radio" value="1" class="weui-check" id="s19">
+                                <i class="weui-icon-checked"></i>确诊
+                            </label>
+                            <label class="weui-cell weui-cell_active weui-check__label" for="s20">
+                                <input type="radio" name="radio" value="2" class="weui-check" id="s20">
+                                <i class="weui-icon-checked"></i>疑似
+                            </label>
+                            <label class="weui-cell weui-cell_active weui-check__label" for="s21">
+                                <input type="radio" name="radio" value="3" class="weui-check" id="s21">
+                                <i class="weui-icon-checked"></i>有接触史
+                            </label>
+                            <label class="weui-cell weui-cell_active weui-check__label" for="s22">
+                                <input type="radio" name="radio" value="4" class="weui-check" id="s22">
+                                <i class="weui-icon-checked"></i>解除隔离
+                            </label>
+                        </div>
                     </div>
                     <div id="ribao_djgl">
                         <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
@@ -201,6 +225,12 @@
                         <input id="js_input_score_histroy" type="text" hidden="hidden"/>
                         <input id="js_input_score" type="text" hidden="hidden"/>
                     </div>
+                    <div style="display: flex; justify-content: center;">
+                        <div style="width: 70%;color: red; text-align: center;">
+                            <br/>
+                            自愿填写病情描述(温度为必填项),提交后会根据每天病情描述变化趋势给出更加科学的健康评估建议
+                        </div>
+                    </div>
                     <div id="ribao_trip" class="weui-btn-area"><#--style="display: none"-->
                         <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 6vh;">
                             <div style="height: 5vh; line-height: 5vh; width: 55%;">工作驻地</div>
@@ -212,7 +242,7 @@
                                    style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 5vh;font-size:inherit;color:inherit;"/>
                         </div>
                         <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                            <div style="height: 5vh; line-height: 5vh; width: 55%;">今日所在地</div>
+                            <div style="height: 5vh; line-height: 5vh; width: 55%;">今晚住地</div>
                             <input id="js_input_jrszd" class="weui-input" type="text" placeholder="请选择"
                                    style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 50%"
                                    onchange="selectinput2(this)"/>
@@ -287,11 +317,6 @@
                         </div>
 
                     </div>
-                    <div style="display: flex; justify-content: center;">
-                        <div style="width: 70%;color: red; text-align: center;">
-                            自愿填写病情描述(温度为必填项),提交后会根据每天病情描述变化趋势给出更加科学的健康评估建议
-                        </div>
-                    </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh; margin-bottom: 5vh;">
                         <a id="cancel" href="javascript:;" class="weui-btn weui-btn_default" style="width: 30%;">取消</a>
                         <a id="commit" href="javascript:;" onclick="ribaoCommit();" class="weui-btn weui-btn_primary"

+ 126 - 78
whepi-ui/templates/home/ribao.js

@@ -28,7 +28,7 @@ function ribao_init() {
   });
 
   $("#js_input_jrszd").select({
-    title: "选择今日所在地",
+    title: "选择今晚住地",
     items: [
       {
         title: "武汉市",
@@ -448,16 +448,28 @@ function insertlingyun() {
   var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
   var cfd = $("#js_input_cfd").attr("data-values") == undefined ? 0 : $("#js_input_cfd").attr("data-values");
   var mdd = $("#js_input_mdd").attr("data-values") == undefined ? 0 : $("#js_input_mdd").attr("data-values");
-    var jrszq = $('#js_input_jrszq').val();
+  // var jrszq = $('#js_input_jrszq').val();
+  // var cfdq = $('#js_input_cfdq').val();
+  // if (cfd != jrszd) {
+  //   $.alert("出发地与今晚住地不是同一地点");
+  //   return;
+  // }
+  // if (jrszq != cfdq) {
+  //   $.alert("出发地与今晚住地不是同一地点");
+  //   return;
+  // }
+    var cxfsq = $('#js_input_cxfsq').val();
     var cfdq = $('#js_input_cfdq').val();
-  if(cfd != jrszd){
-      $.alert("出发地与今日所在地不是同一地点");
-      return;
-  }
-  if(jrszq != cfdq){
-      $.alert("出发地与今日所在地不是同一地点");
-      return;
-  }
+    var mddq = $('#js_input_mddq').val();
+    for (var i = 0; i < listcx.length; i++){
+      if(listcx[i].tripTypeDesp == cxfsq && listcx[i].tripType == cxfs && listcx[i].startLocal == cfd && listcx[i].startLocalOther == cfdq && listcx[i].endLocal == mdd && listcx[i].endLocalOther == mddq){
+
+              $.alert("此行程已添加");
+              return;
+
+      }
+    }
+
   if (cxfs != 4 && cxfs != 0) {
     var val = $('#js_input_cxfsq').val();
     if (val == "") {
@@ -666,10 +678,15 @@ function ribao_cell(v) {
   if (v.medical != 0)
     medical = "新冠肺炎:" + getMedical(v.medical) + ";";
   var singleRoom = "";
-  if (v.singleRoom != 0)
-    singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
-  if (v.singleRoom == 0 && v.medical != 0)
-    singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+  var uptownId = $("#uptownId").val();
+  if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
+
+    if (v.singleRoom != 0)
+      singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+
+    if (v.singleRoom == 0 && v.medical != 0)
+      singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+  }
   var temperature = "体温:" + v.temperature + ";";
   var cough = "";
   if (v.cough != 0)
@@ -698,8 +715,7 @@ function ribao_cell(v) {
   var isTrip = "";
   var tripDet = "";
 
-  var uptownId = $("#uptownId").val();
-  if (uptownId == '5') {
+  if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
     if (v.workLocal != 0) {
       if (v.workLocal < 4)
         workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
@@ -709,11 +725,11 @@ function ribao_cell(v) {
 
     if (v.todayLocal != 0) {
       if (v.todayLocal < 4)
-        todayLocal = "今日所在地:" + getLocal(v.todayLocal) + ";";
+        todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
       else
-        todayLocal = "今日所在地:" + v.todayLocalOther + ";";
+        todayLocal = "今晚住地:" + v.todayLocalOther + ";";
     }
-    if (v.isTrip != undefined )
+    if (v.isTrip != undefined)
       isTrip = "是否出行:" + getIsTrip(v.isTrip) + ";"
 
     if (v.tripDet != undefined)
@@ -721,10 +737,10 @@ function ribao_cell(v) {
 
   }
 
-  $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: 15vh">\n' +
+  $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
     '                                      <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="color: #bc4246" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a>\n' +
     '                                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="color: #2a62bc" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改</a></h4>\n' +
-    '                                      <p class="weui-media-box__desc" style="height: 80%">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</p>\n' +
+    '                                      <div style="height: auto">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</>\n' +
     '                                    </div>\n' +
     '                              '));
 }
@@ -933,6 +949,10 @@ function ribao_add() {
   });
 }
 
+function tt() {
+  alert($("input[name='radio']:checked").val())
+}
+
 function ribao_cancel() {
   $('#cancel').on('click', function () {
 
@@ -1019,10 +1039,19 @@ function ribaoCommit() {
     familyStatus += ",1";
   else
     familyStatus += ",0";
+
+
+  var medical = $("input[name='radio']:checked").val();
+  if(medical ==undefined){
+      $.alert("请选择新冠肺炎");
+      return;
+  }
+
+
   //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 statusDesp = "";
-  var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
+  // var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
   var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
   var singleRoom = $("#switchDanjiangeli").attr("data-values") == undefined ? 0 : $("#switchDanjiangeli").attr("data-values");
   var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
@@ -1066,7 +1095,7 @@ function ribaoCommit() {
   //如果是凌云
 
   var uptownId = $("#uptownId").val();
-  if (uptownId == '5') {
+  if (uptownId == xiaoquId  || uptownId == ceshixiaoquId) {
     //lingyun
     var gzzd = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
     var qtdd = $("#js_input_qtdd").val();
@@ -1098,10 +1127,10 @@ function ribaoCommit() {
     var todyLocal = "";
     var todyLocalOther = "";
     if (jrszd == 0) {
-      $.alert("请选择今日所在地");
+      $.alert("请选择今晚住地");
       return;
     } else if (jrszd == 4 && jrszq == "") {
-      $.alert("请填写今日所在地");
+      $.alert("请填写今晚住地");
       return;
     } else if (jrszd != 0 && jrszd != 4) {
       if (jrszd == 1) {
@@ -1184,6 +1213,7 @@ function ribaoCommit() {
       ribao_refrash();
 
       clearShow();
+      canSahngbao = true;
       document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
     },
   });
@@ -1329,51 +1359,56 @@ function updateSuspected(suspectedId) {
             "suspectedId": suspectedId
           },
           success: function (data) {
-            if(data.data.length != 0){
+            if (data.data.length != 0) {
 
             }
-              listcx.splice(0, listcx.length);
-              $('#tabtr').empty();
-              var person = new Object();
-            var xxIds = [];
-            var xxName = [
-              "序号",
-              "出发地",
-              "目的地",
-              "出行方式",
-              "车次/航班/车牌",
-              "操作"
-            ];
-            for (var i = 0; i < xxName.length; i++) {
-              xxIds.push({
-                name: xxName[i]
-              });
-            }
+            listcx.splice(0, listcx.length);
             $('#tabtr').empty();
-            var html = "<tr style='background-color: #f8f8f8;'>";
-            for (var i = 0; i < xxIds.length; i++) {
-              html += "<th>" + xxIds[i].name + "</th>";
-            }
-            html += "</tr>"
+            var person = new Object();
+            // var xxIds = [];
+            // var xxName = [
+            //   "序号",
+            //   "出发地",
+            //   "目的地",
+            //   "出行方式",
+            //   "车次/航班/车牌",
+            //   "操作"
+            // ];
+            // for (var i = 0; i < xxName.length; i++) {
+            //   xxIds.push({
+            //     name: xxName[i]
+            //   });
+            // }
+            // $('#tabtr').empty();
+            // var html = "<tr style='background-color: #f8f8f8;'>";
+            // for (var i = 0; i < xxIds.length; i++) {
+            //   html += "<th>" + xxIds[i].name + "</th>";
+            // }
+            // html += "</tr>"
             data.data.forEach(function (v) {
               {
-                  person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
-                  person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
-                  person.tripTypeStr = getTripType(v.tripType);
-                  person.tripTypeDesp = v.tripTypeDesp;
-                  listcx.push(person);
-                html += "<tr>";
-                html += "<td style='text-align: center;'>" + v.sort + "</td>";
-                html += "<td style='text-align: center;' >" + getLocalOther(v.startLocal, v.startLocalOther) + " </td>";
-                html += "<td style='text-align: center;' >" + getLocalOther(v.endLocal, v.endLocalOther) + " </td>";
-                html += "<td style='text-align: center;' >" + getTripType(v.tripType) + " </td>";
-                html += "<td style='text-align: center;' >" + v.tripTypeDesp + " </td>";
-                html += "<td style='text-align: center;' ><button value=" + i + " style='height:5vh;background-color: red;text-align: center; with:60%' class='weui-btn weui-btn_mini weui-btn_primary' onclick='splice(this.value)'>" + "删除" + " </button></td>";
-                html += "</tr>";
-                $("#tabtr").html(html);
+                person.startLocal = v.startLocal;
+                person.startLocalOther = v.startLocalOther;
+                person.endlocal = v.endLocal;
+                person.endLocalOther = v.endLocalOther;
+                person.tripType = v.tripType;
+                person.startLocalStr = getLocalOther(v.startLocal, v.startLocalOther);
+                person.endlocalStr = getLocalOther(v.endLocal, v.endLocalOther);
+                person.tripTypeStr = getTripType(v.tripType);
+                person.tripTypeDesp = v.tripTypeDesp;
+                listcx.push(person);
+                // html += "<tr>";
+                // html += "<td style='text-align: center;'>" + v.sort + "</td>";
+                // html += "<td style='text-align: center;' >" + getLocalOther(v.startLocal, v.startLocalOther) + " </td>";
+                // html += "<td style='text-align: center;' >" + getLocalOther(v.endLocal, v.endLocalOther) + " </td>";
+                // html += "<td style='text-align: center;' >" + getTripType(v.tripType) + " </td>";
+                // html += "<td style='text-align: center;' >" + v.tripTypeDesp + " </td>";
+                // html += "<td style='text-align: center;' ><button value=" + i + " style='height:5vh;background-color: red;text-align: center; with:60%' class='weui-btn weui-btn_mini weui-btn_primary' onclick='splice(this.value)'>" + "删除" + " </button></td>";
+                // html += "</tr>";
+                // $("#tabtr").html(html);
               }
             });
-
+            tab();
           },
         });
       }
@@ -1384,6 +1419,9 @@ function updateSuspected(suspectedId) {
 
 
 function addReport() {
+  if (!canSahngbao) {
+    return;
+  }
   var userId = $("#userId").val();
   $.ajax({
     url: '/home/addReport',
@@ -1393,8 +1431,11 @@ function addReport() {
     },
     success: function (data) {
       $.toast(data.msg);
-      if (data.msg == "操作成功")
+      if (data.msg == "操作成功"){
+        canSahngbao = false;
         document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
+      }
+
     },
   });
 }
@@ -1441,14 +1482,21 @@ function helpValue1(v) {
   var familyStatus = "";
   if (v.familyStatus != 0)
     familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
+
   var medical = "";
   if (v.medical != 0)
     medical = "新冠肺炎:" + getMedical(v.medical) + ";";
   var singleRoom = "";
-  if (v.singleRoom != 0)
-    singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
-  if (v.singleRoom == 0 && v.medical != 0)
-    singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+
+  var uptownId = $("#uptownId").val();
+  if (uptownId != xiaoquId && uptownId != ceshixiaoquId) {
+
+    if (v.singleRoom != 0)
+      singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+
+    if (v.singleRoom == 0 && v.medical != 0)
+      singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+  }
   var temperature = "体温:" + v.temperature + ";";
   var cough = "";
   if (v.cough != 0)
@@ -1478,7 +1526,7 @@ function helpValue1(v) {
   var tripDet = "";
 
   var uptownId = $("#uptownId").val();
-  if (uptownId == '5') {
+  if (uptownId == xiaoquId || uptownId == ceshixiaoquId) {
     if (v.workLocal != 0) {
       if (v.workLocal < 4)
         workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
@@ -1488,9 +1536,9 @@ function helpValue1(v) {
 
     if (v.todayLocal != 0) {
       if (v.todayLocal < 4)
-        todayLocal = "今日所在地:" + getLocal(v.todayLocal) + ";";
+        todayLocal = "今晚住地:" + getLocal(v.todayLocal) + ";";
       else
-        todayLocal = "今日所在地:" + v.todayLocalOther + ";";
+        todayLocal = "今晚住地:" + v.todayLocalOther + ";";
     }
 
     if (v.isTrip != undefined)
@@ -1500,9 +1548,9 @@ function helpValue1(v) {
       tripDet = "出行详细:" + v.tripDet + ";"
   }
 
-  $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: 15vh">\n' +
+  $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: auto">\n' +
     '                                      <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '</h4>\n' +
-    '                                      <p class="weui-media-box__desc" style="height: 80%">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</p>\n' +
+    '                                      <div style="height: auto">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + tripDet + '</div>\n' +
     '                                    </div>\n' +
     '                              '));
 }
@@ -1594,13 +1642,13 @@ function getMedical(medical) {
   if (medical == 0)
     return "无";
   else if (medical == 1)
-    return "新冠确诊";
+    return "确诊";
   else if (medical == 2)
-    return "新冠疑似";
+    return "疑似";
   else if (medical == 3)
-    return "密切接触者";
+    return "有接触史";
   else if (medical == 4)
-    return "解除观察";
+    return "解除隔离";
   return "";
 }
 
@@ -1738,7 +1786,7 @@ $('#ribao_score').on('click', function () {
   var suspectedId = $("#suspectedId").val();
   var userId = $("#userId").val();
   var userName = $("#js_input_user_name").val();
-  var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
+  var medical = $("input[name='radio']:checked").val() == undefined ? 0 : $("input[name='radio']:checked").val();
   var medicalzz = $("#switchQuezhen_zz").attr("data-values") == undefined ? 0 : $("#switchQuezhen_zz").attr("data-values");
   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");

+ 1 - 0
whepi-ui/templates/lingyun/home.ftl

@@ -64,6 +64,7 @@
         <#if msReport ??>var msReport = ${msReport}</#if>;
         $('#ribao_jinrijujian').append(msReport.safetyNum);
         if (msReport.reportStatus == 1) {
+          canSahngbao = false;
             document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
         }
         ribaoInitialization(msReport.reportId);

+ 9 - 6
whepi-ui/templates/lingyun/ribao.ftl

@@ -33,6 +33,7 @@
                     <#--</div>-->
                     </div>
                     <div class="weui-cells__tips"> <span style="color: red">
+                        <br/>
                         注:请如实上报情况,便以相互帮助,小区是我家,团结就是力量!后期会有医生跟踪分析,给予大家医疗建议,请认真填报!
                     </span></div>
                     <div class="weui-btn-area">
@@ -190,6 +191,12 @@
                         <input id="js_input_score_histroy" type="text" hidden="hidden"/>
                         <input id="js_input_score" type="text" hidden="hidden"/>
                     </div>
+                    <div style="display: flex; justify-content: center;">
+                        <div style="width: 70%;color: red; text-align: center;">
+                            <br/>
+                            自愿填写病情描述(温度为必填项),提交后会根据每天病情描述变化趋势给出更加科学的健康评估建议
+                        </div>
+                    </div>
                     <div id="ribao" class="weui-btn-area"><#--style="display: none"-->
                         <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 6vh;">
                             <div style="height: 5vh; line-height: 5vh; width: 55%;">工作驻地</div>
@@ -199,7 +206,7 @@
                             <input id="js_input_qtdd" placeholder="其它地点" disabled="disabled" type="text" style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 5vh;font-size:inherit;color:inherit;" />
                         </div>
                         <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                            <div style="height: 5vh; line-height: 5vh; width: 55%;">今日所在地</div>
+                            <div style="height: 5vh; line-height: 5vh; width: 55%;">今晚住地</div>
                             <input id="js_input_jrszd" class="weui-input" type="text" placeholder="请选择"
                                    style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 50%" onchange="selectinput2(this)"/>
                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@@ -265,11 +272,7 @@
                         </div>
 
                     </div>
-                    <div style="display: flex; justify-content: center;">
-                        <div style="width: 70%;color: red; text-align: center;">
-                            自愿填写病情描述(温度为必填项),提交后会根据每天病情描述变化趋势给出更加科学的健康评估建议
-                        </div>
-                    </div>
+                    
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh; margin-bottom: 5vh;">
                         <a id="cancel" href="javascript:;" class="weui-btn weui-btn_default" style="width: 30%;">取消</a>
                         <a id="commit" href="javascript:;" onclick="ribaoCommit();" class="weui-btn weui-btn_primary"

+ 12 - 5
whepi-ui/templates/lingyun/ribao.js

@@ -31,7 +31,7 @@ function ribao_init() {
     });
 
     $("#js_input_jrszd").select({
-        title: "选择今日所在地",
+        title: "选择今晚住地",
         items: [
             {
                 title: "武汉市",
@@ -940,10 +940,10 @@ function ribaoCommit() {
     var todyLocal ="";
     var todyLocalOther = "";
     if(jrszd == 0){
-        $.alert("请选择今日所在地");
+        $.alert("请选择今晚住地");
         return;
     }else if(jrszd == 4 && jrszq == ""){
-        $.alert("请填写今日所在地");
+        $.alert("请填写今晚住地");
         return;
     }else if(jrszd != 0 && jrszd !=4){
         if(jrszd ==1){
@@ -1018,6 +1018,7 @@ function ribaoCommit() {
             ribao_refrash();
 
             clearShow();
+          canSahngbao = true;
             document.getElementById("btn_shangbao").style['background-color'] = "#0bb20c";
         },
     });
@@ -1137,6 +1138,9 @@ function updateSuspected(suspectedId) {
 
 
 function addReport() {
+    if (!canSahngbao) {
+        return;
+    }
     var userId = $("#userId").val();
     $.ajax({
         url: '/home/addReport',
@@ -1146,8 +1150,11 @@ function addReport() {
         },
         success: function (data) {
             $.toast(data.msg);
-            if (data.msg == "操作成功")
-                document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
+            if (data.msg == "操作成功"){
+                canSahngbao = false;
+              document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
+            }
+
         },
     });
 }

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

@@ -79,7 +79,7 @@ public class EpiAdminController {
         System.out.println("==============执行定时任务完毕================");
     }
 
-    @Scheduled(cron = "0 0 0 * * ?") //每天0点执行一次
+//    @Scheduled(cron = "0 0 0 * * ?") //每天0点执行一次
     public void scheduledReportByFixedDelay() {
         System.out.println("==============执行定时任务开始================");
         msReportService.getNowByYesterdayDate();

+ 6 - 0
whepi-web/src/main/java/com/bofeng/dao/MsReportMapper.java

@@ -47,8 +47,13 @@ public interface MsReportMapper extends BaseMapper<MsReport> {
     @Select("select count(suspected_id) from ms_suspected where report_id=#{reportId} and suspected_status=1")
     Integer selectisNoSuspectedNum(@Param("reportId") Long reportId);
 
+    //异常
+    @Select("select count(suspected_id) from ms_suspected where report_id=#{reportId} and  medical in (1,2,3)")
+    Integer selectAbnormalNum(@Param("reportId") Long reportId);
+
     /**
      * 最近3天是否都有上报
+     *
      * @param userId
      * @return
      */
@@ -61,6 +66,7 @@ public interface MsReportMapper extends BaseMapper<MsReport> {
 
     /**
      * 最近提交的日报, msStatus 健康状态:1正常,2异常
+     *
      * @param userId
      * @return
      */

+ 13 - 4
whepi-web/src/main/java/com/bofeng/service/MsSuspectedService.java

@@ -256,7 +256,7 @@ public class MsSuspectedService {
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
     public void updateReport(Long reportId, Integer medical, Integer singleRoom, BigDecimal temperature) {
         //更新今日日报
-        Integer trueNum = 0, singleNum = 0, isSuspected = 0, isNoSuspected = 0, isFamliy = 0;
+        Integer trueNum = 0, singleNum = 0, isSuspected = 0, isNoSuspected = 0, isFamliy = 0, abnormalNum = 0;
 
         //确诊
         trueNum = msReportMapper.selectSuspectedNum(reportId);
@@ -270,6 +270,9 @@ public class MsSuspectedService {
         //疑似
         isNoSuspected = msReportMapper.selectisNoSuspectedNum(reportId);
 
+        //异常人数
+        abnormalNum = msReportMapper.selectAbnormalNum(reportId);
+
         //今日居家
         List<MsSuspected> list = msSuspectedMapper.selectByReportId(reportId);
         if (list != null && list.size() > 0)
@@ -281,7 +284,7 @@ public class MsSuspectedService {
             msReport.setSuspectedNum(isNoSuspected);
             msReport.setNormalNum(isSuspected);
             msReport.setSafetyNum(isFamliy);
-            if (isNoSuspected > 0)
+            if (isNoSuspected > 0 || abnormalNum > 0)
                 msReport.setMsStatus(2);
             else
                 msReport.setMsStatus(1);
@@ -324,8 +327,11 @@ public class MsSuspectedService {
     public Integer addScore(Integer medical, BigDecimal temperature, Integer cough, Integer muscle, Integer dyspnea, Integer fatigue, Integer diarrhea) {
         Integer score = 0;
 
-        if (medical == 1)
+        //确诊,疑似尽快就医
+        if (medical == 1 || medical==2)
             score = 5;
+        else if (medical == 3)
+            score = 1;
         else {
             //温度
             score += getTemperatureScore(temperature);
@@ -348,7 +354,10 @@ public class MsSuspectedService {
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
     public Integer scoreRezulte(Integer medical, Integer scoreHistory, Integer score) {
         Integer scoreRezult = 0;
-        if (medical == 1) scoreRezult = 4;
+        if (medical == 1 || medical==2)
+            scoreRezult = 4;
+        else if (medical == 3)
+            scoreRezult = 2;
         else {
             //判断用户是否含有历史评分
             if (scoreHistory == null) {

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

@@ -69,11 +69,11 @@ public class MsTripController {
                 Map<String, Object> mm = (Map) jsonWapper.asList("tripDet").get(i);
                 msTripDet = new MsTripDet();
                 msTripDet.setSort(i+1);
-                msTripDet.setStartLocal(Integer.parseInt(mm.get("startLocal").toString()));
+                msTripDet.setStartLocal(Conv.NI(mm.get("startLocal")));
                 msTripDet.setStartLocalOther(mm.get("startLocalOther").toString());
-                msTripDet.setEndLocal(Integer.parseInt(mm.get("endLocal").toString()));
+                msTripDet.setEndLocal(Conv.NI(mm.get("endLocal")));
                 msTripDet.setEndLocalOther(mm.get("endLocalOther").toString());
-                msTripDet.setTripType(Integer.parseInt(mm.get("tripType").toString()));
+                msTripDet.setTripType(Conv.NI(mm.get("tripType")));
                 msTripDet.setTripTypeDesp(mm.get("tripTypeDesp").toString());
                 listTripDet.add(msTripDet);
             }