Browse Source

Merge remote-tracking branch 'origin/master'

peiguo 5 years ago
parent
commit
6ebf60526d

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

@@ -97,12 +97,13 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
             "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,\n" +
             "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.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" +
                     "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" +
+                    "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 \n" +
                     "from sys_uptown_house suh\n" +
                     "from sys_uptown_house suh\n" +
                     "inner join sys_uptown_home suho on suho.house_id=suh.house_id\n" +
                     "inner join sys_uptown_home suho on suho.house_id=suh.house_id\n" +
                     "INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId}\n" +
                     "INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId}\n" +
                     "left join ms_report msr on msr.house_id = suh.house_id and msr.report_date = #{date}\n" +
                     "left join ms_report msr on msr.house_id = suh.house_id and msr.report_date = #{date}\n" +
                     "left join ms_suspected mss on mss.report_id=msr.report_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" +
                     "order by suu.unit_id asc "
                     "order by suu.unit_id asc "
     )
     )
     List<ExcelRiBaoLY> selectExcelRiBaoLY(@Param("uptownId") Long uptownId, @Param("date") String date);
     List<ExcelRiBaoLY> selectExcelRiBaoLY(@Param("uptownId") Long uptownId, @Param("date") String date);
@@ -111,12 +112,13 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
             "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,\n" +
             "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.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" +
                     "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" +
+                    "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\n" +
                     "from sys_uptown_house suh\n" +
                     "from sys_uptown_house suh\n" +
                     "inner join sys_uptown_home suho on suho.house_id=suh.house_id\n" +
                     "inner join sys_uptown_home suho on suho.house_id=suh.house_id\n" +
                     "INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId}\n" +
                     "INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId}\n" +
                     "left join ms_report msr on msr.house_id = suh.house_id and msr.report_date = #{date}\n" +
                     "left join ms_report msr on msr.house_id = suh.house_id and msr.report_date = #{date}\n" +
                     "left join ms_suspected mss on mss.report_id=msr.report_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" +
                     "order by suu.unit_id asc "
                     "order by suu.unit_id asc "
     )
     )
     List<ExcelRiBaoPrivate> selectExcelRiBaoPrivate(@Param("uptownId") Long uptownId, @Param("date") String date);
     List<ExcelRiBaoPrivate> selectExcelRiBaoPrivate(@Param("uptownId") Long uptownId, @Param("date") String date);

+ 62 - 3
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoLY.java

@@ -34,6 +34,12 @@ public class ExcelRiBaoLY {
     private int normalNum = 0;
     private int normalNum = 0;
     private String statusDesp = "";
     private String statusDesp = "";
     private String others = "";
     private String others = "";
+    private Long tripId = 0L;
+    private int workLocal = 0;
+    private String workLocalOther = "";
+    private int todayLocal = 0;
+    private String todayLocalOther = "";
+    private int isTrip = 0;
 
 
 
 
     @ExcelProperty(value = "单位", index = 0)
     @ExcelProperty(value = "单位", index = 0)
@@ -163,9 +169,15 @@ public class ExcelRiBaoLY {
             return "未填报";
             return "未填报";
         }
         }
         if (medical == 0) {
         if (medical == 0) {
-            medicalStr = "否";
-        } else {
-            medicalStr = "是";
+            medicalStr = "无";
+        } else if (medical == 1) {
+            medicalStr = "确诊";
+        } else if (medical == 2) {
+            medicalStr = "疑似";
+        } else if (medical == 3) {
+            medicalStr = "有接触史";
+        } else if (medical == 4) {
+            medicalStr = "解除隔离";
         }
         }
         return medicalStr;
         return medicalStr;
     }
     }
@@ -279,4 +291,51 @@ public class ExcelRiBaoLY {
         }
         }
         return bingqingDesc;
         return bingqingDesc;
     }
     }
+
+    @ExcelProperty(value = "工作驻地", index = 15)
+    private String workLoalDesc = "";
+
+    public String getWorkLoalDesc() {
+        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 = 16)
+    private String todayLoalDesc = "";
+
+    public String getTodayLoalDesc() {
+        if (todayLocal == 1) {
+            todayLoalDesc = "武汉";
+        } else if (todayLocal == 2) {
+            todayLoalDesc = "宜昌";
+        } else if (todayLocal == 3) {
+            todayLoalDesc = "当阳";
+        } else if (todayLocal == 4) {
+            todayLoalDesc = todayLocalOther;
+        }
+        return workLoalDesc;
+    }
+
+    @ExcelProperty(value = "是否出行", index = 17)
+    private String isTripDesc = "";
+
+    public String getIsTripDesc() {
+        if (isTrip == 1) {
+            isTripDesc = "是";
+        } else if (isTrip == 0) {
+            isTripDesc = "否";
+        }
+        return isTripDesc;
+    }
+
+    @ExcelProperty(value = "出行详细", index = 18)
+    private String tripDetDesc = "";
+
 }
 }

+ 64 - 6
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoPrivate.java

@@ -34,6 +34,12 @@ public class ExcelRiBaoPrivate {
     private int normalNum = 0;
     private int normalNum = 0;
     private String statusDesp = "";
     private String statusDesp = "";
     private String others = "";
     private String others = "";
+    private Long tripId = 0L;
+    private int workLocal = 0;
+    private String workLocalOther = "";
+    private int todayLocal = 0;
+    private String todayLocalOther = "";
+    private int isTrip = 0;
 
 
 
 
     @ExcelProperty(value = "楼栋", index = 0)
     @ExcelProperty(value = "楼栋", index = 0)
@@ -166,7 +172,7 @@ public class ExcelRiBaoPrivate {
         return temperatureStr;
         return temperatureStr;
     }
     }
 
 
-    @ExcelProperty(value = "确诊", index = 14)
+    @ExcelProperty(value = "新冠病毒", index = 14)
     private String medicalStr;
     private String medicalStr;
 
 
     public String getMedicalStr() {
     public String getMedicalStr() {
@@ -174,9 +180,15 @@ public class ExcelRiBaoPrivate {
             return "未填报";
             return "未填报";
         }
         }
         if (medical == 0) {
         if (medical == 0) {
-            medicalStr = "否";
-        } else {
-            medicalStr = "是";
+            medicalStr = "无";
+        } else if (medical == 1) {
+            medicalStr = "确诊";
+        } else if (medical == 2) {
+            medicalStr = "疑似";
+        } else if (medical == 3) {
+            medicalStr = "有接触史";
+        } else if (medical == 4) {
+            medicalStr = "解除隔离";
         }
         }
         return medicalStr;
         return medicalStr;
     }
     }
@@ -206,8 +218,7 @@ public class ExcelRiBaoPrivate {
 
 
         if (Conv.NI(familyStatus.split(",")[0]) == 1) {
         if (Conv.NI(familyStatus.split(",")[0]) == 1) {
             baseDesc += "心血管疾病(服用ARB),";
             baseDesc += "心血管疾病(服用ARB),";
-        }
-        else if (Conv.NI(familyStatus.split(",")[1]) == 1) {
+        } else if (Conv.NI(familyStatus.split(",")[1]) == 1) {
             baseDesc += "心血管疾病(未服用ARB),";
             baseDesc += "心血管疾病(未服用ARB),";
         }
         }
         if (Conv.NI(familyStatus.split(",")[2]) == 1) {
         if (Conv.NI(familyStatus.split(",")[2]) == 1) {
@@ -318,4 +329,51 @@ public class ExcelRiBaoPrivate {
         return scoreRezultStr;
         return scoreRezultStr;
     }
     }
 
 
+    @ExcelProperty(value = "工作驻地", index = 19)
+    private String workLoalDesc = "";
+
+    public String getWorkLoalDesc() {
+        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 = 20)
+    private String todayLoalDesc = "";
+
+    public String getTodayLoalDesc() {
+        if (todayLocal == 1) {
+            todayLoalDesc = "武汉";
+        } else if (todayLocal == 2) {
+            todayLoalDesc = "宜昌";
+        } else if (todayLocal == 3) {
+            todayLoalDesc = "当阳";
+        } else if (todayLocal == 4) {
+            todayLoalDesc = todayLocalOther;
+        }
+        return workLoalDesc;
+    }
+
+    @ExcelProperty(value = "是否出行", index = 21)
+    private String isTripDesc = "";
+
+    public String getIsTripDesc() {
+        if (isTrip == 1) {
+            isTripDesc = "是";
+        } else if (isTrip == 0) {
+            isTripDesc = "否";
+        }
+        return isTripDesc;
+    }
+
+    @ExcelProperty(value = "出行详细", index = 22)
+    private String tripDetDesc = "";
+
 }
 }

+ 53 - 0
whepi-web/src/main/java/com/bofeng/service/RbService.java

@@ -1,6 +1,7 @@
 package com.bofeng.service;
 package com.bofeng.service;
 
 
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.bofeng.dao.MsSuspectedMapper;
 import com.bofeng.dao.QzTaskDao;
 import com.bofeng.dao.QzTaskDao;
 import com.bofeng.dao.RbMapper;
 import com.bofeng.dao.RbMapper;
 import com.bofeng.entity.*;
 import com.bofeng.entity.*;
@@ -17,6 +18,10 @@ public class RbService {
 
 
     @Autowired
     @Autowired
     private RbMapper rbMapper;
     private RbMapper rbMapper;
+    @Autowired
+    private MsSuspectedMapper msSuspectedMapper;
+    @Autowired
+    private MsReportService msReportService;
 
 
     public List<sysUptownUnit> selectAll (Long userId) {
     public List<sysUptownUnit> selectAll (Long userId) {
         List<sysUptownUnit> sysUptownUnits = rbMapper.selectDY(userId);
         List<sysUptownUnit> sysUptownUnits = rbMapper.selectDY(userId);
@@ -95,4 +100,52 @@ public class RbService {
 
 
         return sysUptownHouses;
         return sysUptownHouses;
     }
     }
+
+    public List<ExcelRiBaoPrivate> selectExcelRiBaoPrivate (Long upId,String date) {
+        List<ExcelRiBaoPrivate> list = rbMapper.selectExcelRiBaoPrivate(upId, date);
+
+        if (list != null && list.size() > 0) {
+            String tripDet;
+            for (ExcelRiBaoPrivate excelRiBaoPrivate : list) {
+                tripDet = "";
+                //出行详细
+                List<MsTripDet> listDet = msSuspectedMapper.selectTripSuspected(excelRiBaoPrivate.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() + ",";
+                    }
+                    excelRiBaoPrivate.setTripDetDesc(tripDet.substring(0, tripDet.length() - 1));
+                }
+            }
+
+        }
+        return list;
+    }
+
+    public List<ExcelRiBaoLY> selectExcelRiBaoLY (Long upId,String date) {
+        List<ExcelRiBaoLY> list = rbMapper.selectExcelRiBaoLY(upId, date);
+
+        if (list != null && list.size() > 0) {
+            String tripDet;
+            for (ExcelRiBaoLY excelRiBaoLY : list) {
+                tripDet = "";
+                //出行详细
+                List<MsTripDet> listDet = msSuspectedMapper.selectTripSuspected(excelRiBaoLY.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() + ",";
+                    }
+                    excelRiBaoLY.setTripDetDesc(tripDet.substring(0, tripDet.length() - 1));
+                }
+            }
+
+        }
+        return list;
+    }
 }
 }

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

@@ -263,7 +263,7 @@ public class YeWeiHuiController {
     String fileName = uptown.getUptownName();
     String fileName = uptown.getUptownName();
     fileName += "上报信息-";
     fileName += "上报信息-";
     fileName += date;
     fileName += date;
-    List<ExcelRiBaoLY> list = rbMapper.selectExcelRiBaoLY(upId, date);
+    List<ExcelRiBaoLY> list = rbService.selectExcelRiBaoLY(upId, date);
     ExcelUtils.writeSheet(ExcelRiBaoLY.class, list).export(resp, fileName);
     ExcelUtils.writeSheet(ExcelRiBaoLY.class, list).export(resp, fileName);
 
 
   }
   }
@@ -280,7 +280,7 @@ public class YeWeiHuiController {
       String fileName = uptown.getUptownName();
       String fileName = uptown.getUptownName();
       fileName += "上报信息-";
       fileName += "上报信息-";
       fileName += date;
       fileName += date;
-      List<ExcelRiBaoPrivate> list = rbMapper.selectExcelRiBaoPrivate(upId, date);
+      List<ExcelRiBaoPrivate> list = rbService.selectExcelRiBaoPrivate(upId, date);
       ExcelUtils.writeSheet(ExcelRiBaoPrivate.class, list).export(resp, fileName);
       ExcelUtils.writeSheet(ExcelRiBaoPrivate.class, list).export(resp, fileName);
     }
     }
   }
   }