Selaa lähdekoodia

凌云集团更改公司

peiguo 5 vuotta sitten
vanhempi
commit
08ddc2fd0b

+ 11 - 2
admin-ui/app/whepi/lingyun/lingyunUser.js

@@ -229,8 +229,17 @@ define(function (require) {
                     {field: 'linkman', title: '姓名', maxWidth: 200, align: 'left',},
                     {field: 'loudong', title: '部门名称', maxWidth: 200, align: 'left',},
                     {
-                      field: 'msStatus', title: '个人上报状态', maxWidth: 100, align: 'center', formatter: function (value, row) {
-                        if (row.rowData.reportStatus == 0) {
+                      field: 'returnWork', title: '今日复工', maxWidth: 100, align: 'center', formatter: function (value) {
+                        if (value == 1) {
+                          return "<span style='color: green;'>允许复工<span>";
+                        } else if (value == 0) {
+                          return "<span style='color: red;'>禁止复工<span>";
+                        }
+                      }
+                    },
+                    {
+                      field: 'reportStatus', title: '个人上报状态', maxWidth: 100, align: 'center', formatter: function (value) {
+                        if (value == 0) {
                           return "<span style='color: #ffb717;'>未上报<span>";
                         } else if (value == 1) {
                           return "<span style='color: green;'>正常<span>";

+ 11 - 2
admin-ui/app/whepi/lingyun/lingyunUser2.js

@@ -210,8 +210,17 @@ define(function (require) {
                     {field: 'linkman', title: '姓名', maxWidth: 200, align: 'left',},
                     {field: 'loudong', title: '部门名称', maxWidth: 200, align: 'left',},
                     {
-                      field: 'msStatus', title: '个人上报状态', maxWidth: 100, align: 'center', formatter: function (value, row) {
-                        if (row.rowData.reportStatus == 0) {
+                      field: 'returnWork', title: '今日复工', maxWidth: 100, align: 'center', formatter: function (value) {
+                        if (value == 1) {
+                          return "<span style='color: green;'>允许复工<span>";
+                        } else if (value == 0) {
+                          return "<span style='color: red;'>禁止复工<span>";
+                        }
+                      }
+                    },
+                    {
+                      field: 'reportStatus', title: '个人上报状态', maxWidth: 100, align: 'center', formatter: function (value) {
+                        if (value == 0) {
                           return "<span style='color: #ffb717;'>未上报<span>";
                         } else if (value == 1) {
                           return "<span style='color: green;'>正常<span>";

+ 11 - 2
admin-ui/app/whepi/lingyun/lingyunUser7.js

@@ -229,8 +229,17 @@ define(function (require) {
                     {field: 'linkman', title: '姓名', maxWidth: 200, align: 'left',},
                     {field: 'loudong', title: '部门名称', maxWidth: 200, align: 'left',},
                     {
-                      field: 'msStatus', title: '个人上报状态', maxWidth: 100, align: 'center', formatter: function (value, row) {
-                        if (row.rowData.reportStatus == 0) {
+                      field: 'returnWork', title: '今日复工', maxWidth: 100, align: 'center', formatter: function (value) {
+                        if (value == 1) {
+                          return "<span style='color: green;'>允许复工<span>";
+                        } else if (value == 0) {
+                          return "<span style='color: red;'>禁止复工<span>";
+                        }
+                      }
+                    },
+                    {
+                      field: 'reportStatus', title: '个人上报状态', maxWidth: 100, align: 'center', formatter: function (value) {
+                        if (value == 0) {
                           return "<span style='color: #ffb717;'>未上报<span>";
                         } else if (value == 1) {
                           return "<span style='color: green;'>正常<span>";

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

@@ -47,6 +47,7 @@ public class ExcelRiBaoLYBM4 {
     private int isTrip = 0;
     private int isContact = 0;
     private int isSuspected = 0;
+    private int returnWork = 0;
 
     private Date reportDate;
     private int msStatus;
@@ -63,7 +64,7 @@ public class ExcelRiBaoLYBM4 {
         return loudong;
     }
 
-    @ExcelProperty(value = "工号", index = 3)
+    @ExcelProperty(value = "工号", index = 4)
     private String fanghao = "";
 
     public String getFanghao() {
@@ -76,7 +77,7 @@ public class ExcelRiBaoLYBM4 {
     @ExcelProperty(value = "姓名", index = 0)
     private String linkman;
 
-    @ExcelProperty(value = "联系电话", index = 2)
+    @ExcelProperty(value = "联系电话", index = 3)
     private String phone;
 
     private String safetyNumStr = "";
@@ -227,7 +228,7 @@ public class ExcelRiBaoLYBM4 {
         return baseDesc;
     }
 
-    @ExcelProperty(value = "病情描述", index = 4)
+    @ExcelProperty(value = "病情描述", index = 5)
     private String bingqingDesc = "";
 
     public String getBingqingDesc() {
@@ -318,7 +319,7 @@ public class ExcelRiBaoLYBM4 {
         return bingqingDesc;
     }
 
-    @ExcelProperty(value = "工作驻地", index = 5)
+    @ExcelProperty(value = "工作驻地", index = 6)
     private String workLoalDesc = "";
 
     public String getWorkLoalDesc() {
@@ -337,7 +338,7 @@ public class ExcelRiBaoLYBM4 {
         return workLoalDesc;
     }
 
-    @ExcelProperty(value = "今晚住地", index = 6)
+    @ExcelProperty(value = "今晚住地", index = 7)
     private String todayLoalDesc = "";
 
     public String getTodayLoalDesc() {
@@ -356,7 +357,7 @@ public class ExcelRiBaoLYBM4 {
         return todayLoalDesc;
     }
 
-    @ExcelProperty(value = "是否出行", index = 7)
+    @ExcelProperty(value = "是否出行", index = 8)
     private String isTripDesc = "";
 
     public String getIsTripDesc() {
@@ -371,13 +372,16 @@ public class ExcelRiBaoLYBM4 {
         return isTripDesc;
     }
 
-    @ExcelProperty(value = "出行详细", index = 1)
+    @ExcelProperty(value = "出行详细", index = 11)
     private String tripDetDesc = "";
 
-    @ExcelProperty(value = "家人确诊或接触", index = 8)
+    @ExcelProperty(value = "家人确诊或接触", index = 9)
     private String isContactDesc = "";
 
-    @ExcelProperty(value = "家人健康异常", index = 9)
+    @ExcelProperty(value = "家人健康异常", index = 10)
     private String isSuspectedDesc = "";
 
+    @ExcelProperty(value = "个人上报状态", index = 2)
+    private String reportStatusDesc = "";
+
 }

+ 76 - 0
whepi-web/src/main/java/com/bofeng/service/ScanService.java

@@ -91,6 +91,10 @@ public class ScanService {
         return new GeodeticCalculator().calculateGeodeticCurve(Ellipsoid.Sphere, source, target).getEllipsoidalDistance();
     }
 
+    /**
+     * 复工导出
+     * @param unitId
+     */
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
     public void returnWorkLY(Long unitId) {
         new Runnable() {
@@ -179,6 +183,78 @@ public class ScanService {
     }
 
     /**
+     * 页面复工检索
+     */
+    public int returnWorkLYlist(Long userId, String linkman, String phone) throws ParseException {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
+        OutUser outUser1 = outUserMapper.getOutUserByPhone(4, linkman, Long.parseLong(phone));
+        if (outUser1 != null) {
+            return 0;
+        }
+        OutUser outUser = outUserMapper.getOutUserByPhone(1, linkman, Long.parseLong(phone));
+        if (outUser != null) {
+            // 六类
+            return 1;
+        }
+        Boolean ly2 = false;
+        String startDate = "";
+        int intSize = 4;
+        OutUser outUser2 = outUserMapper.getOutUserByPhoneNotTime(5, linkman, Long.parseLong(phone));
+        if (outUser2 != null) {
+            ly2 = true;
+            startDate = s.format(outUser2.getStartDate());
+            Long day = (new Date().getTime() - outUser2.getStartDate().getTime()) / (1000 * 60 * 60 * 24);
+            intSize = Integer.parseInt(Long.toString(day)) < 4 ? Integer.parseInt(Long.toString(day)) : 4;
+        }
+        MsReport msReport = msReportMapper.queryMsReportIsXG(userId);
+        if (msReport != null) {
+            if (ly2 && outUser2.getStartDate().getTime() < msReport.getReportDate().getTime()) {
+                return 0;
+            } else if (!ly2) {
+                return 0;
+            }
+        }
+        List<MsReport> msReportList = msReportMapper.queryMsReportIsXGHome(userId);
+        if (msReportList.size() > 0) {
+            if (ly2 && outUser2.getStartDate().getTime() < msReportList.get(0).getReportDate().getTime()) {
+                return 0;
+            } else if (!ly2) {
+                return 0;
+            }
+        }
+        List<MsReport> msReports = msReportMapper.selectMsReportLate(userId, startDate);
+        if (msReports.size() < intSize) {
+            return 0;
+        }
+        List<MsReport> msReports2 = msReportMapper.selectMsReportThereError(userId, startDate);
+        if (msReports2.size() > 0) {
+            return 0;
+        }
+        List<MsReport> msReports3 = msReportMapper.selectMsReportThereErrorFamily(userId, startDate);
+        if (msReports3.size() > 0) {
+            return 0;
+        }
+        MsTripDet work = msReportMapper.returnWork(userId);
+        if (work != null) {
+            if (ly2 && outUser2.getStartDate().getTime() < s.parse(work.getReturnWork()).getTime()) {
+                if (sdf.parse(work.getReturnWork() + " 00:00:00").getTime() + 1000L * 3600 * 24 * 15 > sdf.parse(s.format(new Date()) + " 00:00:00").getTime()) {
+                    return 0;
+                }
+            } else if (!ly2) {
+                if (sdf.parse(work.getReturnWork() + " 00:00:00").getTime() + 1000L * 3600 * 24 * 15 > sdf.parse(s.format(new Date()) + " 00:00:00").getTime()) {
+                    return 0;
+                }
+            }
+        }
+        MsReport msReport1 = msReportMapper.msAddr(userId);
+        if (msReport1 != null &&msReport1.getWorkMsg() != null &&msReport1.getTodayMsg() != null && !msReport1.getWorkMsg().equals(msReport1.getTodayMsg()) && !compareWhere(msReport1.getWorkMsg(), msReport1.getTodayMsg())) {
+            return 0;
+        }
+        return 1;
+    }
+
+    /**
      * 比较出发地和目地地是否一样, 一样返回true,不一样返回false
      */
     public Boolean compareWhere(String str1, String str2) {

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

@@ -12,6 +12,7 @@ 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.List;
 import java.util.Map;
 
@@ -29,6 +30,8 @@ public class SweepCodeService {
     private MsSuspectedMapper msSuspectedMapper;
     @Autowired
     private MsReportService msReportService;
+    @Autowired
+    private ScanService scanService;
 
     public List<SysUptownHouse> selectCode(PageDb pageDb, Map<String, Object> queryParam) {
         List<SysUptownHouse> sysUptownHouses = sweepCodeMapper.selectCode(pageDb,queryParam);
@@ -46,7 +49,7 @@ public class SweepCodeService {
 //        return sysUptownHouses;
 //    }
 
-    public List<ExcelRiBaoLYBM4> selectLingyunUser(PageDb pageDb, Map<String, Object> queryParam) {
+    public List<ExcelRiBaoLYBM4> selectLingyunUser(PageDb pageDb, Map<String, Object> queryParam) throws ParseException {
         Long userId = JwtHelper.getUserId();
         if (userId > 7000 && userId < 8000) {
             queryParam.put("unitId", userId);
@@ -78,6 +81,8 @@ public class SweepCodeService {
                     }
                     excelRiBaoLYBM4.setTripDetDesc(tripDet.substring(0, tripDet.length() - 1));
                 }
+                // 复工
+                excelRiBaoLYBM4.setReturnWork(scanService.returnWorkLYlist(excelRiBaoLYBM4.getUserId(), excelRiBaoLYBM4.getLinkman(), excelRiBaoLYBM4.getPhone()));
             }
         }
         return sysUptownHouses;
@@ -166,6 +171,13 @@ public class SweepCodeService {
                 } else if (excelRiBaoLYBM4.getIsSuspected() == 1) {
                     excelRiBaoLYBM4.setIsSuspectedDesc("是");
                 }
+                if (excelRiBaoLYBM4.getReportStatus() == 0) {
+                    excelRiBaoLYBM4.setReportStatusDesc("未上报");
+                } else if (excelRiBaoLYBM4.getReportStatus() == 1) {
+                    excelRiBaoLYBM4.setReportStatusDesc("正常");
+                } else {
+                    excelRiBaoLYBM4.setReportStatusDesc("异常");
+                }
                 tripDet = "";
                 //出行详细
                 List<MsTripDet> listDet = msSuspectedMapper.selectTripSuspected(excelRiBaoLYBM4.getTripId());

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

@@ -87,7 +87,7 @@ public class ScanAdminController {
 
     @ApiOperation("凌云用户管理")
     @PostMapping("/whepi/sweepCode/selectLingyunUser")
-    public Model<List<ExcelRiBaoLYBM4>> selectLingyunUser(PageDb pageDb,HttpParameterParser parser) {
+    public Model<List<ExcelRiBaoLYBM4>> selectLingyunUser(PageDb pageDb,HttpParameterParser parser) throws ParseException {
 //        HttpServletResponse response,HttpServletRequest request
         List<ExcelRiBaoLYBM4> sysUptownHouses = sweepCodeService.selectLingyunUser(pageDb,parser.getMap());
         return Model.newSuccess(pageDb,sysUptownHouses);