peiguo 5 лет назад
Родитель
Сommit
bdcb342616

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

@@ -61,6 +61,9 @@ public class ExcelRiBaoLYBM4 {
     @ExcelProperty(value = {"二级部门"}, index = 2)
     private String departmentName;
 
+    @ExcelProperty(value = "今日复工", index = 3)
+    private String returnWorkMsg;
+
     public String getLoudong() {
         if (loudong.length() <= 0) {
             loudong = ridgepole + unit;
@@ -68,7 +71,7 @@ public class ExcelRiBaoLYBM4 {
         return loudong;
     }
 
-    @ExcelProperty(value = "工号", index = 5)
+    @ExcelProperty(value = "工号", index = 6)
     private String fanghao = "";
 
     public String getFanghao() {
@@ -81,7 +84,7 @@ public class ExcelRiBaoLYBM4 {
     @ExcelProperty(value = "姓名", index = 0)
     private String linkman;
 
-    @ExcelProperty(value = "联系电话", index = 4)
+    @ExcelProperty(value = "联系电话", index = 5)
     private String phone;
 
     private String safetyNumStr = "";
@@ -232,7 +235,7 @@ public class ExcelRiBaoLYBM4 {
         return baseDesc;
     }
 
-    @ExcelProperty(value = "病情描述", index = 6)
+    @ExcelProperty(value = "病情描述", index = 7)
     private String bingqingDesc = "";
 
     public String getBingqingDesc() {
@@ -323,7 +326,7 @@ public class ExcelRiBaoLYBM4 {
         return bingqingDesc;
     }
 
-    @ExcelProperty(value = "工作驻地", index = 7)
+    @ExcelProperty(value = "工作驻地", index = 10)
     private String workLoalDesc = "";
 
     public String getWorkLoalDesc() {
@@ -342,7 +345,7 @@ public class ExcelRiBaoLYBM4 {
         return workLoalDesc;
     }
 
-    @ExcelProperty(value = "今晚住地", index = 8)
+    @ExcelProperty(value = "今晚住地", index = 11)
     private String todayLoalDesc = "";
 
     public String getTodayLoalDesc() {
@@ -361,7 +364,7 @@ public class ExcelRiBaoLYBM4 {
         return todayLoalDesc;
     }
 
-    @ExcelProperty(value = "是否出行", index = 9)
+    @ExcelProperty(value = "是否出行", index = 12)
     private String isTripDesc = "";
 
     public String getIsTripDesc() {
@@ -376,16 +379,16 @@ public class ExcelRiBaoLYBM4 {
         return isTripDesc;
     }
 
-    @ExcelProperty(value = "出行详细", index = 12)
+    @ExcelProperty(value = "出行详细", index = 13)
     private String tripDetDesc = "";
 
-    @ExcelProperty(value = "家人确诊或接触", index = 10)
+    @ExcelProperty(value = "家人确诊或接触", index = 8)
     private String isContactDesc = "";
 
-    @ExcelProperty(value = "家人健康异常", index = 11)
+    @ExcelProperty(value = "家人健康异常", index = 9)
     private String isSuspectedDesc = "";
 
-    @ExcelProperty(value = "个人上报状态", index = 3)
+    @ExcelProperty(value = "个人上报状态", index = 4)
     private String reportStatusDesc = "";
 
 }

+ 389 - 0
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoZJBM4.java

@@ -0,0 +1,389 @@
+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 ExcelRiBaoZJBM4 {
+
+    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 int isContact = 0;
+    private int isSuspected = 0;
+    private int returnWork = 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 = 2)
+    private String returnWorkMsg;
+    @ExcelProperty(value = "工号", index = 5)
+    private String fanghao = "";
+
+    public String getFanghao() {
+        if (fanghao.length() <= 0) {
+            fanghao = doorplate;
+        }
+        return fanghao;
+    }
+
+    @ExcelProperty(value = "姓名", index = 0)
+    private String linkman;
+
+    @ExcelProperty(value = "联系电话", index = 4)
+    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 = 6)
+    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 (isContact == 1) {
+//            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;
+    }
+
+    @ExcelProperty(value = "工作驻地", index = 9)
+    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;
+    }
+
+    @ExcelProperty(value = "今晚住地", index = 10)
+    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;
+    }
+
+    @ExcelProperty(value = "是否出行", index = 11)
+    private String isTripDesc = "";
+
+    public String getIsTripDesc() {
+        if (reportStatus == 0) {
+            return "";
+        }
+        if (isTrip == 1) {
+            isTripDesc = "是";
+        } else if (isTrip == 0) {
+            isTripDesc = "否";
+        }
+        return isTripDesc;
+    }
+
+    @ExcelProperty(value = "出行详细", index = 12)
+    private String tripDetDesc = "";
+
+    @ExcelProperty(value = "家人确诊或接触", index = 7)
+    private String isContactDesc = "";
+
+    @ExcelProperty(value = "家人健康异常", index = 8)
+    private String isSuspectedDesc = "";
+
+    @ExcelProperty(value = "个人上报状态", index = 3)
+    private String reportStatusDesc = "";
+
+}

+ 37 - 1
whepi-web/src/main/java/com/bofeng/service/SweepCodeService.java

@@ -8,11 +8,15 @@ import com.bofeng.dao.RbMapper;
 import com.bofeng.dao.SweepCodeMapper;
 import com.bofeng.entity.*;
 import com.yvan.PageDb;
+import org.apache.shiro.util.CollectionUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
@@ -154,7 +158,7 @@ public class SweepCodeService {
         return sysUptownHouses;
     }
 
-    public List<ExcelRiBaoLYBM4> exSelectLingyunUser(Map<String, Object> queryParam, Long uptownId) {
+    public List<ExcelRiBaoLYBM4> exSelectLingyunUser(Map<String, Object> queryParam, Long uptownId) throws ParseException {
         queryParam.put("uptownId", uptownId);
         List<ExcelRiBaoLYBM4> sysUptownHouses = rbMapper.exSelectLingyunUser(queryParam);
 
@@ -189,6 +193,12 @@ public class SweepCodeService {
                         tripDet += "车次/航班/车牌:" + msTripDet.getTripTypeDesp() + ",";
                     }
                     excelRiBaoLYBM4.setTripDetDesc(tripDet.substring(0, tripDet.length() - 1));
+                }// 复工
+                excelRiBaoLYBM4.setReturnWork(scanService.returnWorkLYlist(excelRiBaoLYBM4.getUserId(), excelRiBaoLYBM4.getLinkman(), excelRiBaoLYBM4.getPhone()));
+                if (excelRiBaoLYBM4.getReturnWork() == 1) {
+                    excelRiBaoLYBM4.setReturnWorkMsg("允许复工");
+                } else {
+                    excelRiBaoLYBM4.setReturnWorkMsg("禁止复工");
                 }
             }
         }
@@ -328,4 +338,30 @@ public class SweepCodeService {
         }
         return outScanEstates;
     }
+
+    /**
+     * 复制list实体 list -> another list
+     * @param target 目标list实体
+     * @param soucreList 源list实体
+     * @param <T>
+     * @param <F>
+     * @return
+     */
+    public <T, F> List<F> listCopyToAotherList(Class<F> target, List<T> soucreList) {
+        if (!CollectionUtils.isEmpty(soucreList)) {
+            List<F> targetList = new ArrayList<>();
+            for (T t : soucreList) {
+                try {
+                    F f = target.newInstance();
+                    BeanUtils.copyProperties(t, f);
+                    targetList.add(f);
+                } catch (Exception e) {
+                    //
+                }
+            }
+            return targetList;
+        } else {
+            return null;
+        }
+    }
 }

+ 2 - 1
whepi-web/src/main/java/com/bofeng/wx/controller/ScanAdminController.java

@@ -181,7 +181,8 @@ public class ScanAdminController {
             unitName = uptownUnits.get(0).getRidgepole()+uptownUnits.get(0).getUnit();
         }
         List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map, 5L);
-        ExcelUtils.writeSheet(ExcelRiBaoLYBM4.class, list).export(resp, unitName + "上报信息-" + date);
+        List<ExcelRiBaoZJBM4> excelRiBaoZJBM4s = sweepCodeService.listCopyToAotherList(ExcelRiBaoZJBM4.class, list);
+        ExcelUtils.writeSheet(ExcelRiBaoZJBM4.class, excelRiBaoZJBM4s).export(resp, unitName + "上报信息-" + date);
     }
 
     @ApiOperation("凌云用户管理导出")