소스 검색

Merge remote-tracking branch 'origin/master'

yuliang 5 년 전
부모
커밋
0a2ec4df7d

+ 73 - 0
admin-ui/app/whepi/lingyun/HCDialogDetail.js

@@ -0,0 +1,73 @@
+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: 'autoLocal', title: '定位地区', maxWidth: 200, align: 'left',},
+            {field: 'autoAddr', title: '定位地址', maxWidth: 200, align: 'left',},
+          ]],
+        }
+      },
+      buttons: [
+        {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    }
+      ;
+  };
+});

+ 2 - 36
admin-ui/app/whepi/lingyun/HCUser.js

@@ -133,36 +133,6 @@ define(function (require) {
                 title: '用户列表',
                 items: [
                   {
-                    text: '生成健康及旅居申请表', iconCls: 'fa fa-cloud-upload', onClick: function () {
-                      var row = $grid1.checkedData();
-                      if (row.length == 0) {
-                        $.yvan.msg('请至少选择一行数据');
-                        return;
-                      }
-                      var ids = "";
-                      for (var i = 0; i < row.length; i++) {
-                        ids += row[i].userId + ","
-                      }
-                      ids=ids.substring(0,ids.length-1);
-                      window.open(api('/export/lyReports?userId=' + ids));
-                    }
-                  },
-                  {
-                    text: '生成隔离人员解除隔离审批表', iconCls: 'fa fa-cloud-upload', onClick: function () {
-                      var row = $grid1.checkedData();
-                      if (row.length == 0) {
-                        $.yvan.msg('请至少选择一行数据');
-                        return;
-                      }
-                      var ids = "";
-                      for (var i = 0; i < row.length; i++) {
-                        ids += row[i].userId + ","
-                      }
-                      ids=ids.substring(0,ids.length-1);
-                      window.open(api('/export/lyApproves?userId=' + ids));
-                    }
-                  },
-                  {
                     text: '导出人员报表', iconCls: 'fa fa-cloud-upload', onClick: function () {
                       var queryProperties = $form.formGet().queryProperties;
                       var unitId = $form.formGet().unitId;
@@ -171,7 +141,7 @@ define(function (require) {
                         $.yvan.msg('请选择导出时间');
                         return
                       }
-                      window.open(api('/sweepCode/exSelectLingyunUser?queryProperties='+queryProperties+"&unitId="+unitId + "&date="+date));
+                      window.open(api('/sweepCode/exSelectHCUser?queryProperties='+queryProperties+"&unitId="+unitId + "&date="+date));
                     }
                   },
                   {
@@ -182,7 +152,7 @@ define(function (require) {
                         return
                       }
                       $.yvan.showDialog(this,
-                        require('/app/whepi/lingyun/dialogDetail.js')({
+                        require('/app/whepi/lingyun/HCDialogDetail.js')({
                           userId: row.userId,
                           linkman: row.linkman,
                           confirm: function () {
@@ -225,10 +195,6 @@ define(function (require) {
                     {field: 'phone', title: '联系电话', maxWidth: 200, align: 'left',},
                     {field: 'doorplate', title: '工号', maxWidth: 200, align: 'left',},
                     {field: 'bingqingDesc', title: '病情表述', align: 'left',},
-                    {field: 'workLoalDesc', title: '工作驻地', maxWidth: 200, align: 'left',},
-                    {field: 'todayLoalDesc', title: '今晚住地', maxWidth: 200, align: 'left',},
-                    {field: 'isTripDesc', title: '是否出行', maxWidth: 200, align: 'left',},
-                    {field: 'tripDetDesc', title: '出行详细', align: 'left',},
                   ]
                 ]
             }

+ 1 - 1
admin-ui/app/whepi/mock/menu.json

@@ -86,7 +86,7 @@
     },
     {
       "id": "ENT102",
-      "text": "和昌信息",
+      "text": "湖北和昌信息",
       "href": "",
       "iconCls": "icon-blank fa fa-bars",
       "state": "closed",

+ 1 - 1
admin-ui/app/whepi/mock/menu8.json

@@ -4,7 +4,7 @@
   "data": [
     {
       "id": "ENT10001",
-      "text": "导出报表",
+      "text": "湖北和昌导出报表",
       "href": "/app/whepi/lingyun/HCUser.js",
       "iconCls": "icon-blank fa fa-align-justify",
       "state": "close",

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

@@ -98,6 +98,8 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
 
     List<ExcelRiBaoLYBM4> exSelectLingyunUser(Map<String, Object> queryParam);
 
+    List<ExcelRiBaoHCBM4> exSelectHCUser(Map<String, Object> queryParam);
+
     List<ExcelRiBaoLYBM4> exSelectLingyunUserPage(PageDb pagination, Map<String, Object> queryParam);
 
     @Select(

+ 368 - 0
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoHCBM4.java

@@ -0,0 +1,368 @@
+package com.bofeng.entity;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.google.common.base.Strings;
+import com.yvan.platform.Conv;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Getter
+@Setter
+public class ExcelRiBaoHCBM4 {
+
+    private String ridgepole = "";
+    private String unit = "";
+    private String doorplate = "";
+    private BigDecimal temperature = new BigDecimal(0);
+    private int grender = 0;
+    private String familyStatus = "0,0,0,0,0,0,0";
+    private int medical = 0;
+    private int cough = 0;
+    private int muscle = 0;
+    private int dyspnea = 0;
+    private int fatigue = 0;
+    private int diarrhea = 0;
+    private int singleRoom = 0;
+    private int scoreRezult = 0;
+    private int temperatureScore = 0;
+    private int safetyNum = 0;
+    private int reportStatus = 0;
+    private int sureNum = 0;
+    private int singleNum = 0;
+    private int suspectedNum = 0;
+    private int normalNum = 0;
+    private String statusDesp = "";
+    private String others = "";
+    private Long tripId = 0L;
+    private int workLocal = 0;
+    private String workLocalOther = "";
+    private int todayLocal = 0;
+    private String todayLocalOther = "";
+    private String autoLocal="";
+    private String autoAddr="";
+    private int isTrip = 0;
+
+    private Date reportDate;
+    private int msStatus;
+
+    private Long userId;
+
+    @ExcelProperty(value = "部门名称", index = 1)
+    private String loudong = "";
+
+    public String getLoudong() {
+        if (loudong.length() <= 0) {
+            loudong = ridgepole + unit;
+        }
+        return loudong;
+    }
+
+    @ExcelProperty(value = "工号", index = 3)
+    private String fanghao = "";
+
+    public String getFanghao() {
+        if (fanghao.length() <= 0) {
+            fanghao = doorplate;
+        }
+        return fanghao;
+    }
+
+    @ExcelProperty(value = "姓名", index = 0)
+    private String linkman;
+
+    @ExcelProperty(value = "联系电话", index = 2)
+    private String phone;
+
+    private String safetyNumStr = "";
+
+    public String getSafetyNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        safetyNumStr = "" + safetyNum;
+
+        return safetyNumStr;
+    }
+
+    private String sureNumStr;
+
+    public String getSureNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        sureNumStr = "" + sureNum;
+
+        return sureNumStr;
+    }
+
+    private String singleNumStr;
+
+    public String getSingleNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        singleNumStr = "" + singleNum;
+
+        return singleNumStr;
+    }
+
+    private String suspectedNumStr;
+
+    public String getSuspectedNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        suspectedNumStr = "" + suspectedNum;
+
+        return suspectedNumStr;
+    }
+
+    private String normalNumStr;
+
+    public String getNormalNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        normalNumStr = "" + normalNum;
+
+        return normalNumStr;
+    }
+
+    private String userName;
+//
+//    @ExcelProperty(value = "性别", index = 10)
+//    private String grenderStr;
+
+//    public String getGrenderStr() {
+//        if (grender == 1) {
+//            grenderStr = "男";
+//        } else if (grender == 2) {
+//            grenderStr = "女";
+//        } else {
+//            grenderStr = "未知";
+//        }
+//        return grenderStr;
+//    }
+
+//    @ExcelProperty(value = "年龄", index = 11)
+//    private String age;
+
+
+    private String temperatureStr;
+
+    public String getTemperatureStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        temperatureStr = temperature.floatValue() > 10 ? temperature + "" : "未填报";
+        return temperatureStr;
+    }
+
+    private String medicalStr;
+
+    public String getMedicalStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        if (medical == 0) {
+            medicalStr = "无";
+        } else if (medical == 1) {
+            medicalStr = "确诊";
+        } else if (medical == 2) {
+            medicalStr = "疑似";
+        } else if (medical == 3) {
+            medicalStr = "有接触史";
+        } else if (medical == 4) {
+            medicalStr = "解除隔离";
+        }
+        return medicalStr;
+    }
+
+    private String singleRoomStr;
+
+    public String getSingleRoomStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        if (singleRoom == 0) {
+            singleRoomStr = "否";
+        } else {
+            singleRoomStr = "是";
+        }
+        return singleRoomStr;
+    }
+
+    private String baseDesc = "";
+
+    public String getBaseDesc() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        if (Conv.NI(familyStatus.split(",")[0]) == 1) {
+            baseDesc += "心血管疾病(服用ARB),";
+        } else if (Conv.NI(familyStatus.split(",")[1]) == 1) {
+            baseDesc += "心血管疾病(未服用ARB),";
+        }
+        if (Conv.NI(familyStatus.split(",")[2]) == 1) {
+            baseDesc += "呼吸系统病史,";
+        }
+        if (Conv.NI(familyStatus.split(",")[3]) == 1) {
+            baseDesc += "肿瘤病史,";
+        }
+        if (Conv.NI(familyStatus.split(",")[4]) == 1) {
+            baseDesc += "糖尿病史,";
+        }
+        if (Conv.NI(familyStatus.split(",")[5]) == 1) {
+            baseDesc += "服用过激素药物,";
+        }
+        if (Conv.NI(familyStatus.split(",")[6]) == 1) {
+            baseDesc += "妊娠期";
+        }
+        return baseDesc;
+    }
+
+    @ExcelProperty(value = "病情描述", index = 4)
+    private String bingqingDesc = "";
+
+    public String getBingqingDesc() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        if (medical == 1) {
+            bingqingDesc += "已确诊、";
+        } else if (medical == 2) {
+            bingqingDesc += "疑似、";
+        } else if (medical == 3) {
+            bingqingDesc += "有接触史、";
+        } else if (medical == 5) {
+            bingqingDesc += "解除隔离、";
+        }
+
+        if (singleRoom == 1) {
+            bingqingDesc += "单间隔离、";
+        }
+
+        bingqingDesc = bingqingDesc + "体温:" + getTemperatureStr() + "、";
+
+        if (cough == 1) {
+            bingqingDesc += "偶尔短暂咳嗽、";
+        } else if (cough == 2) {
+            bingqingDesc += "咳嗽轻度影响生活、";
+        } else if (cough == 3) {
+            bingqingDesc += "咳嗽严重影响生活、";
+        }
+        if (muscle == 1) {
+            bingqingDesc += "肌肉按压有酸痛、";
+        } else if (muscle == 2) {
+            bingqingDesc += "偶尔肌肉按压酸痛、";
+        } else if (muscle == 3) {
+            bingqingDesc += "肌肉按压持续酸痛、";
+        }
+        if (dyspnea == 1) {
+            bingqingDesc += "呼吸急走或上坡气短、";
+        } else if (dyspnea == 2) {
+            bingqingDesc += "呼吸气短而走路变慢、";
+        } else if (dyspnea == 3) {
+            bingqingDesc += "呼吸走路数分钟后气短、";
+        } else if (dyspnea == 4) {
+            bingqingDesc += "呼吸气短无法离开房间、";
+        }
+        if (fatigue == 1) {
+            bingqingDesc += "可体力劳动但觉得累、";
+        } else if (fatigue == 2) {
+            bingqingDesc += "轻体力劳动后长时间不能恢复、";
+        } else if (fatigue == 3) {
+            bingqingDesc += "不能正常生活、";
+        }
+        if (diarrhea == 1) {
+            bingqingDesc += "轻度腹泻少于于3次、";
+        } else if (diarrhea == 2) {
+            bingqingDesc += "中度腹泻4-6次、";
+        } else if (diarrhea == 3) {
+            bingqingDesc += "重度腹泻超过6次、";
+        }
+
+        if (!Strings.isNullOrEmpty(statusDesp)) {
+            bingqingDesc += statusDesp;
+            bingqingDesc += "、";
+        }
+        if (!Strings.isNullOrEmpty(others)) {
+            bingqingDesc += others;
+        }
+        bingqingDesc += "评估结果:";
+        if (scoreRezult == 0)
+            bingqingDesc += "未评估";
+        else if (scoreRezult == 1) {
+            if (temperatureScore > 1)
+                bingqingDesc += "正常,间隔时间服用退烧药,多休息,多喝水";
+            else
+                bingqingDesc += "正常";
+        } else if (scoreRezult == 2) {
+            if (temperatureScore > 1)
+                bingqingDesc += "注意观察,间隔时间服用退烧药,多休息,多喝水";
+            else
+                bingqingDesc += "注意观察";
+        } else if (scoreRezult == 3)
+            bingqingDesc += "联系社区医生(或者在线问诊)";
+        else if (scoreRezult == 4)
+            bingqingDesc += "尽快就诊";
+        return bingqingDesc;
+    }
+
+    private String workLoalDesc = "";
+
+    public String getWorkLoalDesc() {
+        if (reportStatus == 0) {
+            return "";
+        }
+        if (workLocal == 1) {
+            workLoalDesc = "武汉市";
+        } else if (workLocal == 2) {
+            workLoalDesc = "宜昌市";
+        } else if (workLocal == 3) {
+            workLoalDesc = "当阳市";
+        } else if (workLocal == 4) {
+            workLoalDesc = "其它地点_" + workLocalOther;
+        }
+        return workLoalDesc;
+    }
+
+    private String todayLoalDesc = "";
+
+    public String getTodayLoalDesc() {
+        if (reportStatus == 0) {
+            return "";
+        }
+        if (todayLocal == 1) {
+            todayLoalDesc = "武汉市";
+        } else if (todayLocal == 2) {
+            todayLoalDesc = "宜昌市";
+        } else if (todayLocal == 3) {
+            todayLoalDesc = "当阳市";
+        } else if (todayLocal == 4) {
+            todayLoalDesc = "其它地点_" + todayLocalOther;
+        }
+        return todayLoalDesc;
+    }
+
+    private String isTripDesc = "";
+
+    public String getIsTripDesc() {
+        if (reportStatus == 0) {
+            return "";
+        }
+        if (isTrip == 1) {
+            isTripDesc = "是";
+        } else if (isTrip == 0) {
+            isTripDesc = "否";
+        }
+        return isTripDesc;
+    }
+
+    private String tripDetDesc = "";
+
+}

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

@@ -143,6 +143,30 @@ public class SweepCodeService {
         return sysUptownHouses;
     }
 
+    public List<ExcelRiBaoHCBM4> exSelectHCUser(Map<String, Object> queryParam) {
+        queryParam.put("uptownId", 100000002L);
+        List<ExcelRiBaoHCBM4> sysUptownHouses = rbMapper.exSelectHCUser(queryParam);
+
+        if (sysUptownHouses != null && sysUptownHouses.size() > 0) {
+            String tripDet;
+            for (ExcelRiBaoHCBM4 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<SysUptownHouse> export(Map<String, Object> queryParam) {
         List<SysUptownHouse> sysUptownHouses = sweepCodeMapper.export(queryParam);

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

@@ -125,6 +125,27 @@ public class ScanAdminController {
         ExcelUtils.writeSheet(ExcelRiBaoLYBM4.class, list).export(resp, unitName + "上报信息-" + date);
     }
 
+    @ApiOperation("凌云用户管理导出")
+    @GetMapping("/whepi/sweepCode/exSelectHCUser")
+    @SneakyThrows
+    public void exSelectHCUser(HttpParameterParser parser,HttpServletResponse resp,
+                                    @Pd(name = "queryProperties", required = false, defaultValue = "") String queryProperties,
+                                    @Pd(name = "unitId", required = false, defaultValue = "0") Long unitId,
+                                    @Pd(name = "date") String date) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Map<String, Object> map = new HashMap<>();
+        map.put("queryProperties", queryProperties);
+        map.put("unitId", unitId);
+        map.put("date", date);
+        String unitName = "";
+        List<UptownUnit> uptownUnits = sysUptownUnitMapper.selectByUnitId(unitId);
+        if (uptownUnits!=null && uptownUnits.size()>0) {
+            unitName = uptownUnits.get(0).getRidgepole()+uptownUnits.get(0).getUnit();
+        }
+        List<ExcelRiBaoHCBM4> list = sweepCodeService.exSelectHCUser(map);
+        ExcelUtils.writeSheet(ExcelRiBaoHCBM4.class, list).export(resp, unitName + "上报信息-" + date);
+    }
+
     @ApiOperation("导出")
     @PostMapping("/whepi/sweepCode/export")
     @SneakyThrows

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

@@ -64,6 +64,40 @@
         order by suu.unit_id asc,suho.linkman
     </select>
 
+    <select id="exSelectHCUser" resultType="com.bofeng.entity.ExcelRiBaoHCBM4">
+        select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,
+        msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,
+        msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,
+        mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult,
+        tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other, tr.auto_local, tr.auto_addr,ur.user_id as userId
+        from sys_uptown_house suh
+        inner join sys_uptown_home suho on suho.house_id=suh.house_id
+        INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId}
+        left join ms_report msr on msr.house_id = suh.house_id and
+        <if test="date!=null and date!=''">
+            msr.report_date = #{date}
+        </if>
+        <if test="date==null or date==''">
+            msr.report_date = curdate()
+        </if>
+        left join ms_suspected mss on mss.report_id=msr.report_id
+        left join ms_trip tr on mss.suspected_id=trip_id
+        INNER JOIN sys_user_role ur on ur.property_id = suho.house_id and ur.role_id = 1
+        <where>
+            <if test="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
+                and suu.unit_id=#{unitId}
+            </if>
+            <if test="queryProperties != null and queryProperties != ''">
+                and (suho.linkman like concat('%',#{queryProperties},'%')
+                or suho.phone like concat('%',#{queryProperties},'%'))
+            </if>
+            <if test="reportStatus != null and reportStatus != ''">
+                and msr.report_status=#{reportStatus}
+            </if>
+        </where>
+        order by suu.unit_id asc,suho.linkman
+    </select>
+
     <select id="exSelectLingyunUserPage" resultType="com.bofeng.entity.ExcelRiBaoLYBM4">
         select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,
         msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,