lange преди 5 години
родител
ревизия
9684838a3e

+ 26 - 21
whepi-ui/templates/home/home.ftl

@@ -3,6 +3,7 @@
 
 <div class="weui-tab">
     <input id="userId" type="text" hidden="hidden" value=${user_id!}/>
+    <input id="uptownId" type="text" hidden="hidden" value=${uptown_id!}/>
     <div class="weui-tab__bd">
         <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
             <#include "/home/ribao.ftl" /></div>
@@ -54,7 +55,11 @@
             });
         });
 
-
+        var uptownId = $("#uptownId").val();
+        if (uptownId == '1238790987234')
+            $('#none')[0].style.display = '';
+        else
+            $('#none')[0].style.display = 'none';
         ribao_init();
         qiuzhu_init();
         family_init();
@@ -127,7 +132,7 @@
                     $('#newUnitId').append("<option>请选择</option>");
                     var html = "";
                     for (var i = 0; i < data.length; i++) {
-                        html += '<option value="' + data[i].unitId + '">'+data[i].ridgepole+data[i].unit + '</option>';
+                        html += '<option value="' + data[i].unitId + '">' + data[i].ridgepole + data[i].unit + '</option>';
                     }
                     $('#newUnitId').append(html);
                     $("#newUnitId").val('0');
@@ -141,11 +146,11 @@
         var unitId = $("#unitId").val();
         var newUnitId = $("#newUnitId").val();
         var newUnitText = $("#newUnitId").find("option:selected").text();
-        if (!newUnitId || newUnitId=="请选择") {
+        if (!newUnitId || newUnitId == "请选择") {
             $.alert("请选择部门")
             return false;
         }
-        if (newUnitId==unitId) {
+        if (newUnitId == unitId) {
             $.alert("您选择的部门和原来的部门一样")
             return false;
         }
@@ -157,7 +162,7 @@
             data: {
                 userId: $('#userId').val(),
                 newUnitId: newUnitId,
-            },success: function (date) {
+            }, success: function (date) {
                 $("#unitId").val(newUnitId);
                 $("#unitMsg").text(newUnitText);
             }
@@ -205,23 +210,23 @@
     function xiaoQuItemClick(v) {
         window.location.href = "/quzhu/home/quxiao.html?taskId=" + v.taskId + "&userId=" + $('#userId').val();
         /*familyClick();*/
-    /*    $.ajax({
-            url: '/home/home/taskQuery',
-            data: {taskId: v.taskId},
-            type: 'GET',
-            success: function (data) {
-                console.log(data);
-                if ($('#userId').val() != data.data.userId) {
-                    $.alert('当前求助信息不是你的')
-                    return;
-                } else {
-                    window.location.href = "/quzhu/home/quxiao.html?taskId=" + v.taskId + "&userId=" + v.userId;
-                    familyClick()
+        /*    $.ajax({
+                url: '/home/home/taskQuery',
+                data: {taskId: v.taskId},
+                type: 'GET',
+                success: function (data) {
+                    console.log(data);
+                    if ($('#userId').val() != data.data.userId) {
+                        $.alert('当前求助信息不是你的')
+                        return;
+                    } else {
+                        window.location.href = "/quzhu/home/quxiao.html?taskId=" + v.taskId + "&userId=" + v.userId;
+                        familyClick()
+                    }
+                },
+                error: function () {
                 }
-            },
-            error: function () {
-            }
-        });*/
+            });*/
 
     }
 

+ 53 - 2
whepi-ui/templates/home/ribao.js

@@ -650,10 +650,31 @@ function ribao_cell(v) {
   var scoreRezult = "";
   if (v.scoreRezult != 0)
     scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
+
+  var workLocal = "";
+  if (v.workLocal != 0) {
+    if (v.workLocal < 4)
+      workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
+    else
+      workLocal = "工作驻地:" + v.workLocalOther + ";";
+  }
+
+  var todayLocal = "";
+  if (v.todayLocal != 0) {
+    if (v.todayLocal < 4)
+      todayLocal = "今日所在地:" + getLocal(v.todayLocal) + ";";
+    else
+      todayLocal = "今日所在地:" + v.todayLocalOther + ";";
+  }
+
+  var isTrip = "";
+  if (v.isTrip != 0)
+    isTrip = "是否出行:" + getIsTrip(v.isTrip) + ";"
+
   $('#rb_family').append($('<div class="weui-media-box weui-media-box_text" style="height: 15vh">\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 + '</p>\n' +
+    '                                      <p class="weui-media-box__desc" style="height: 80%">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + '</p>\n' +
     '                                    </div>\n' +
     '                              '));
 }
@@ -1151,6 +1172,16 @@ function updateSuspected(suspectedId) {
         $("#js_input_sf").val(getIsTrip(0));
         $("#js_input_sf").attr("data-values", 0);
         //详细
+        $.ajax({
+          url: '/home/selectTripSuspected',
+          get: "get",
+          data: {
+            "suspectedId": suspectedId
+          },
+          success: function (data) {
+            alert(data);
+          },
+        });
       }
     },
   });
@@ -1246,9 +1277,29 @@ function helpValue1(v) {
   var scoreRezult = "";
   if (v.scoreRezult != 0)
     scoreRezult = "评估结果:" + getScoreRezult(v.scoreRezult, v.temperatureScore) + ";";
+
+  var workLocal = "";
+  if (v.workLocal != 0) {
+    if (v.workLocal < 4)
+      workLocal = "工作驻地:" + getLocal(v.workLocal) + ";";
+    else
+      workLocal = "工作驻地:" + v.workLocalOther + ";";
+  }
+
+  var todayLocal = "";
+  if (v.todayLocal != 0) {
+    if (v.todayLocal < 4)
+      todayLocal = "今日所在地:" + getLocal(v.todayLocal) + ";";
+    else
+      todayLocal = "今日所在地:" + v.todayLocalOther + ";";
+  }
+
+  var isTrip = "";
+  if (v.isTrip != 0)
+    isTrip = "是否出行:" + getIsTrip(v.isTrip) + ";"
   $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: 15vh">\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 + '</p>\n' +
+    '                                      <p class="weui-media-box__desc" style="height: 80%">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + scoreRezult + workLocal + todayLocal + isTrip + '</p>\n' +
     '                                    </div>\n' +
     '                              '));
 }

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

@@ -21,6 +21,7 @@ public class EpiLYExportController {
     @GetMapping("/whepi/export/lyReport")
     public @ResponseBody
     void exportSellPlan(HttpServletRequest request, HttpServletResponse response) {
+        Long suspectedId = Long.parseLong(request.getParameter("suspectedId"));
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("userName", "张山");
         map.put("workPlace", "武汉");

+ 4 - 0
whepi-web/src/main/java/com/bofeng/dao/MsSuspectedMapper.java

@@ -4,6 +4,7 @@ package com.bofeng.dao;
 import com.baomidou.mybatisplus.mapper.BaseMapper;
 import com.bofeng.entity.MsReport;
 import com.bofeng.entity.MsSuspected;
+import com.bofeng.entity.MsTripDet;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
@@ -42,4 +43,7 @@ public interface MsSuspectedMapper extends BaseMapper<MsSuspected> {
     //选择家人
     @Select("select a.*,b.* from ms_suspected a LEFT JOIN ms_trip b on a.suspected_id=b.trip_id where a.suspected_id !=#{suspectedId}")
     MsSuspected selectBySuspectedId(@Param("suspectedId") Long suspectedId);
+
+    @Select("select * from ms_trip_det  where trip_id =#{suspectedId}")
+    List<MsTripDet> selectTripSuspected(@Param("suspectedId") Long suspectedId);
 }

+ 6 - 0
whepi-web/src/main/java/com/bofeng/service/MsSuspectedService.java

@@ -8,6 +8,7 @@ import com.bofeng.dao.MsTripMapper;
 import com.bofeng.entity.MsReport;
 import com.bofeng.entity.MsSuspected;
 import com.bofeng.entity.MsTrip;
+import com.bofeng.entity.MsTripDet;
 import com.yvan.platform.Conv;
 import io.swagger.models.auth.In;
 import org.joda.time.DateTime;
@@ -42,6 +43,11 @@ public class MsSuspectedService {
     public MsSuspected selectSuspected(long suspectedId) {
         return msSuspectedMapper.selectBySuspectedId(suspectedId);
     }
+    //查询家人
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public List<MsTripDet> selectTripSuspected(long suspectedId) {
+        return msSuspectedMapper.selectTripSuspected(suspectedId);
+    }
 
     //查询用户最近一天的一个家人
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)

+ 8 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/MsReportController.java

@@ -85,6 +85,14 @@ public class MsReportController {
         return msSuspectedService.selectSuspected(suspectedId);
     }
 
+    //查询出行详细
+    @GetMapping("/home/selectTripSuspected")
+    public List<MsTripDet> selectTripSuspected(HttpServletRequest request) {
+        //初始化今日日报
+        Long suspectedId = Long.parseLong(request.getParameter("suspectedId"));
+        return msSuspectedService.selectTripSuspected(suspectedId);
+    }
+
     //删除家人病例
     @PostMapping("/home/deleteSuspected")
     public MsReport deleteSuspected(HttpServletRequest request) {

+ 1 - 1
whepi-web/src/main/resources/mapper/MsSuspected.xml

@@ -2,6 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.bofeng.dao.MsSuspectedMapper">
     <select id="selectByReportId" resultType="com.bofeng.entity.MsSuspected">
-        select * from ms_suspected where report_id = #{reportId}
+        select a.*,b.* from ms_suspected a left join ms_trip b on a.suspected_id=b.trip_id where a.report_id = #{reportId}
     </select>
 </mapper>