Forráskód Böngészése

行程重复添加

maoyunfeng 5 éve
szülő
commit
45acb09590

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

@@ -145,19 +145,19 @@
                             </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>新冠确诊
+                                <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>新冠疑似
+                                <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>密切接触者
+                                <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>接触观察
+                                <i class="weui-icon-checked"></i>解除隔离
                             </label>
                         </div>
                     </div>

+ 65 - 56
whepi-ui/templates/home/ribao.js

@@ -448,6 +448,16 @@ 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 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();
     var mddq = $('#js_input_mddq').val();
@@ -460,21 +470,6 @@ function insertlingyun() {
       }
     }
 
-
-
-
-
-
-   /* var jrszq = $('#js_input_jrszq').val();
-    var cfdq = $('#js_input_cfdq').val();
-  if(cfd != jrszd){
-      $.alert("出发地与今日所在地不是同一地点");
-      return;
-  }
-  if(jrszq != cfdq){
-      $.alert("出发地与今日所在地不是同一地点");
-      return;
-  }*/
   if (cxfs != 4 && cxfs != 0) {
     var val = $('#js_input_cxfsq').val();
     if (val == "") {
@@ -955,6 +950,10 @@ function ribao_add() {
   });
 }
 
+function tt() {
+  alert($("input[name='radio']:checked").val())
+}
+
 function ribao_cancel() {
   $('#cancel').on('click', function () {
 
@@ -1041,10 +1040,15 @@ function ribaoCommit() {
     familyStatus += ",1";
   else
     familyStatus += ",0";
+
+
+  var medical = $("input[name='radio']:checked").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 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();
@@ -1351,51 +1355,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();
           },
         });
       }
@@ -1507,7 +1516,7 @@ function helpValue1(v) {
   var isTrip = "";
   var tripDet = "";
 
-
+  var uptownId = $("#uptownId").val();
   if (uptownId == xiaoquId) {
     if (v.workLocal != 0) {
       if (v.workLocal < 4)
@@ -1768,7 +1777,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");

+ 3 - 0
whepi-ui/templates/lingyun/ribao.js

@@ -1137,6 +1137,9 @@ function updateSuspected(suspectedId) {
 
 
 function addReport() {
+    if (document.getElementById("btn_shangbao").style['background-color'] == "#D9D9D9") {
+        return;
+    }
     var userId = $("#userId").val();
     $.ajax({
         url: '/home/addReport',

+ 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();

+ 7 - 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
      */
@@ -69,6 +75,7 @@ public interface MsReportMapper extends BaseMapper<MsReport> {
 
     /**
      * 最近15天确诊
+     *
      * @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) {