yuliang 5 سال پیش
والد
کامیت
91958783ca

+ 83 - 0
admin-ui/app/whepi/lingyun/dialogDetail.js

@@ -0,0 +1,83 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $grid;
+
+    function queryGrid1() {
+      $grid.reload({
+        mtype: 'GET',
+        url: api('/sweepCode/selectLingyunUserHistory'),
+        queryParams: {userId: context.userId}
+      }, true);
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogDetail',
+      title: '历史上报' + context.linkman,
+      width: '80%',
+      height: '60%',
+      onOpen: function () {
+        $dlg = $(this);
+      },
+      center: {
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          idField: "userId",
+          pagination: false,
+          columns: [[
+            {field: 'reportDate', title: '上报时间', align: 'left', formatter: 'tsymd'},
+            {field: 'userId', title: '用户ID', hidden: true},
+            // {field: 'linkman', title: '姓名', maxWidth: 200, align: 'left',},
+            {
+              field: 'reportStatus', title: '上报', maxWidth: 100, align: 'center', formatter: function (value) {
+                if (value == 0) {
+                  return "<span style='color: #ffb717;'>未上报<span>";
+                } else {
+                  return "<span style='color: green;'>已上报<span>";
+                }
+              }
+            },
+            {
+              field: 'msStatus', title: '上报状态', maxWidth: 100, align: 'center', formatter: function (value, row) {
+                if (row.rowData.reportStatus  == 0) {
+                  return "<span style='color: #ffb717;'>未上报<span>";
+                } else if (value == 1) {
+                  return "<span style='color: green;'>正常<span>";
+                } else {
+                  return "<span style='color: red;'>异常<span>";
+                }
+              }
+            },
+            {field: 'temperature', title: '温度', maxWidth: 100, align: 'right',},
+            {field: 'bingqingDesc', title: '病情表述', maxWidth: 300, align: 'left',},
+            {field: 'workLoalDesc', title: '工作驻地', maxWidth: 100, align: 'left',},
+            {field: 'todayLoalDesc', title: '今晚住地', maxWidth: 100, align: 'left',},
+            {field: 'isTrip', title: '是否出行', maxWidth: 100, align: 'center',formatter: function (value) {
+                if (value == 0) {
+                  return "<span style='color: green;'>否<span>";
+                } else {
+                  return "<span style='color: #ff6d02;'>是<span>";
+                }
+              }
+            },
+            {field: 'tripDetDesc', title: '出行详细', align: 'left'}
+
+          ]],
+        }
+      },
+      buttons: [
+        {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    }
+      ;
+  };
+});

+ 18 - 0
admin-ui/app/whepi/lingyun/lingyunUser.js

@@ -165,6 +165,24 @@ define(function (require) {
                     }
                   },
                   {
+                    text: '查看人员上报情况', iconCls: 'fa fa-search', onClick: function () {
+                      var row = $grid1.rowData();
+                      if ( row == null || row == undefined || row.userId == null || row.userId == "") {
+                        $.yvan.msg('请选择数据');
+                        return
+                      }
+                      $.yvan.showDialog(this,
+                        require('/app/whepi/lingyun/dialogDetail.js')({
+                          userId: row.userId,
+                          linkman: row.linkman,
+                          confirm: function () {
+                            // $grid2.reload();
+                          }
+                        })
+                      );
+                    }
+                  },
+                  {
                     text: '查看人员可复工状况', iconCls: 'fa fa-search', onClick: function () {
                       var row = $grid1.rowData();
                       if ( row == null || row == undefined || row.userId == null || row.userId == "") {

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

@@ -85,7 +85,8 @@
         getUptownUnitLY();
 
 
-        <#if msReport ??>var msReport = ${msReport}</#if>;
+        var msReport = {};
+        <#if msReport ??> msReport = ${msReport!{}}</#if>;
         $('#ribao_jinrijujian').append(msReport.safetyNum);
         if (msReport.reportStatus == 1) {
             var date = new Date(msReport.timeUpdate*1);

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

@@ -453,7 +453,7 @@
 
                     } else {
                         console.log("小区");
-                        $("#yaoqingmaSS")[0].style.display = '';
+                        $("#yaoqingmaSS")[0].style.display = 'none';
                         $("#danweiTitle").text("栋/单元");
                         $("#menpaiTitle").text("门牌号码");
                         $("#doorplate").attr("placeholder", "请输入门牌号码: 如 108");

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

@@ -101,6 +101,24 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
     List<ExcelRiBaoLYBM4> exSelectLingyunUserPage(PageDb pagination, Map<String, Object> queryParam);
 
     @Select(
+            "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,msr.ms_status as msStatus,\n" +
+                    "msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum, msr.report_date as reportDate,\n" +
+                    "msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,\n" +
+                    "mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult,\n" +
+                    "tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other,ur.user_id as userId\n" +
+                    "from ms_report msr\n" +
+                    "inner join sys_user_role ur on ur.property_id = msr.house_id and ur.role_id = 1 \n" +
+                    "inner join sys_uptown_house suh on suh.house_id = msr.house_id\n" +
+                    "inner join sys_uptown_home suho on suho.house_id = msr.house_id\n" +
+                    "inner join sys_uptown_unit suu on suu.unit_id = suh.unit_id\n" +
+                    "left join ms_suspected mss on mss.report_id=msr.report_id\n" +
+                    "left join ms_trip tr on mss.suspected_id=trip_id\n" +
+                    "where ur.user_id=#{userId}\n" +
+                    "order by msr.report_date desc"
+    )
+    List<ExcelRiBaoLYBM4> exSelectLingyunUserHistory(PageDb pagination, @Param("userId")Long userId);
+
+    @Select(
             "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,\n" +
                     "msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum, \n" +
                     "msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,\n" +

+ 13 - 0
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoLYBM4.java

@@ -7,6 +7,7 @@ import lombok.Getter;
 import lombok.Setter;
 
 import java.math.BigDecimal;
+import java.util.Date;
 
 @Getter
 @Setter
@@ -41,6 +42,9 @@ public class ExcelRiBaoLYBM4 {
     private String todayLocalOther = "";
     private int isTrip = 0;
 
+    private Date reportDate;
+    private int msStatus;
+
     private Long userId;
 
     @ExcelProperty(value = "部门名称", index = 1)
@@ -297,6 +301,9 @@ public class ExcelRiBaoLYBM4 {
     private String workLoalDesc = "";
 
     public String getWorkLoalDesc() {
+        if (reportStatus == 0) {
+            return "";
+        }
         if (workLocal == 1) {
             workLoalDesc = "武汉";
         } else if (workLocal == 2) {
@@ -313,6 +320,9 @@ public class ExcelRiBaoLYBM4 {
     private String todayLoalDesc = "";
 
     public String getTodayLoalDesc() {
+        if (reportStatus == 0) {
+            return "";
+        }
         if (todayLocal == 1) {
             todayLoalDesc = "武汉";
         } else if (todayLocal == 2) {
@@ -329,6 +339,9 @@ public class ExcelRiBaoLYBM4 {
     private String isTripDesc = "";
 
     public String getIsTripDesc() {
+        if (reportStatus == 0) {
+            return "";
+        }
         if (isTrip == 1) {
             isTripDesc = "是";
         } else if (isTrip == 0) {

+ 23 - 0
whepi-web/src/main/java/com/bofeng/service/SweepCodeService.java

@@ -73,6 +73,29 @@ public class SweepCodeService {
         return sysUptownHouses;
     }
 
+    public List<ExcelRiBaoLYBM4> selectLingyunUserHistory(PageDb pageDb, Long userId) {
+
+        List<ExcelRiBaoLYBM4> sysUptownHouses = rbMapper.exSelectLingyunUserHistory(pageDb,userId);
+        if (sysUptownHouses != null && sysUptownHouses.size() > 0) {
+            String tripDet;
+            for (ExcelRiBaoLYBM4 excelRiBaoLYBM4 : sysUptownHouses) {
+                tripDet = "";
+                //出行详细
+                List<MsTripDet> listDet = msSuspectedMapper.selectTripSuspected(excelRiBaoLYBM4.getTripId());
+                if (listDet != null && listDet.size() > 0) {
+                    for (MsTripDet msTripDet : listDet) {
+                        tripDet += "出发地:" + msReportService.getLocalOther(msTripDet.getStartLocal(), msTripDet.getStartLocalOther()) + ",";
+                        tripDet += "目的地:" + msReportService.getLocalOther(msTripDet.getEndLocal(), msTripDet.getEndLocalOther()) + ",";
+                        tripDet += "出行方式:" + msReportService.getTripType(msTripDet.getTripType()) + ",";
+                        tripDet += "车次/航班/车牌:" + msTripDet.getTripTypeDesp() + ",";
+                    }
+                    excelRiBaoLYBM4.setTripDetDesc(tripDet.substring(0, tripDet.length() - 1));
+                }
+            }
+        }
+        return sysUptownHouses;
+    }
+
     public List<ExcelRiBaoLYBM4> exSelectLingyunUser(Map<String, Object> queryParam) {
         queryParam.put("uptownId", 1238790987234L);
         List<ExcelRiBaoLYBM4> sysUptownHouses = rbMapper.exSelectLingyunUser(queryParam);

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

@@ -85,6 +85,14 @@ public class ScanAdminController {
         return Model.newSuccess(pageDb,sysUptownHouses);
     }
 
+    @ApiOperation("凌云用户管理,上报明细")
+    @GetMapping("/whepi/sweepCode/selectLingyunUserHistory")
+    public Model<List<ExcelRiBaoLYBM4>> selectLingyunUserHistory(PageDb pageDb,@Pd(name = "userId") Long userId) {
+//        HttpServletResponse response,HttpServletRequest request
+        List<ExcelRiBaoLYBM4> sysUptownHouses = sweepCodeService.selectLingyunUserHistory(pageDb,userId);
+        return Model.newSuccess(pageDb,sysUptownHouses);
+    }
+
     @ApiOperation("凌云用户管理导出")
     @GetMapping("/whepi/sweepCode/exSelectLingyunUser")
     @SneakyThrows

+ 18 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/UserOpenController.java

@@ -115,6 +115,24 @@ public class UserOpenController {
         } else {
             model.put("user", userOpenMapper.selectByUserId(userId));
             model.put("user_id", "\"" + userId + "\"");
+            List<Uptown> uptowns = rbMapper.selectUptown(userId);
+            if (uptowns != null && uptowns.size() > 0) {
+                Long uptown_id = uptowns.get(0).getUptownId();
+                String uptown_name = uptowns.get(0).getUptownName();
+                model.put("uptown_id", "\"" + uptown_id + "\"");
+                model.put("uptownId", uptown_id);
+                model.put("uptown_name", uptown_name);
+                // 凌云集团的可以更改unit
+                if (uptown_id == 1238790987234L || uptown_id == 5L) {
+                    UptownUnit unit = uptownUnitMapper.getUptownUnitByUser(userId);
+                    model.put("ridgepole", unit.getRidgepole());
+                    model.put("unit", unit.getUnit());
+                    model.put("unitId", unit.getUnitId());
+                    model.put("doorplate", unit.getDoorplate());
+                    List<UptownHome> uptownHomes =  uptownHomeMapper.getUptownHomeByUserId(userId);
+                    model.put("linkman", uptownHomes.get(0).getLinkman());
+                }
+            }
             if (userType == 1) {
                 MsReport msReport = msReportService.getReportByDateNow(userId);
                 model.put("msReport", new JsonWapper(msReport));

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

@@ -89,5 +89,4 @@
         </where>
         order by suu.unit_id asc,suho.linkman
     </select>
-
 </mapper>