|
@@ -91,7 +91,7 @@ public class ScanController {
|
|
model.put("uptownId", unit.getUptownId());
|
|
model.put("uptownId", unit.getUptownId());
|
|
model.put("tittle", "电子出入许可");
|
|
model.put("tittle", "电子出入许可");
|
|
if (unit.getUptownId() == 1238790987234L || unit.getUptownId() == 5) {
|
|
if (unit.getUptownId() == 1238790987234L || unit.getUptownId() == 5) {
|
|
- model.put("tittle", "凌云集团电子通行");
|
|
|
|
|
|
+ model.put("tittle", "江中耀华电子通行");
|
|
ly = true;
|
|
ly = true;
|
|
}
|
|
}
|
|
if (unit.getUptownId() == 100000002L) {
|
|
if (unit.getUptownId() == 100000002L) {
|
|
@@ -138,18 +138,18 @@ public class ScanController {
|
|
}
|
|
}
|
|
if (ly) {
|
|
if (ly) {
|
|
if ("".equals(coord)) {
|
|
if ("".equals(coord)) {
|
|
- String url = oauth2+appId +"&redirect_uri="+URLEncoder.encode(domain()+"user/scan.html?doorId="+doorId+"&inType="+inType + "&coord=","utf-8");
|
|
|
|
|
|
+ String url = oauth2 + appId + "&redirect_uri=" + URLEncoder.encode(domain() + "user/scan.html?doorId=" + doorId + "&inType=" + inType + "&coord=", "utf-8");
|
|
model.put("url", url);
|
|
model.put("url", url);
|
|
model.put("moreUrl", moreUrl);
|
|
model.put("moreUrl", moreUrl);
|
|
return new ModelAndView("/user/location.ftl", model);
|
|
return new ModelAndView("/user/location.ftl", model);
|
|
} else {
|
|
} else {
|
|
String[] coor = coord.split(",");
|
|
String[] coor = coord.split(",");
|
|
- Double dis = scanService.getDistance(Double.parseDouble(coor[0]),Double.parseDouble(coor[1]),Double.parseDouble(uptownDoor.getLongitude()), Double.parseDouble(uptownDoor.getLatitude()));
|
|
|
|
- if(dis > Double.parseDouble(uptownDoor.getDistance().toString())) {
|
|
|
|
|
|
+ Double dis = scanService.getDistance(Double.parseDouble(coor[0]), Double.parseDouble(coor[1]), Double.parseDouble(uptownDoor.getLongitude()), Double.parseDouble(uptownDoor.getLatitude()));
|
|
|
|
+ if (dis > Double.parseDouble(uptownDoor.getDistance().toString())) {
|
|
model.put("collor", "red");
|
|
model.put("collor", "red");
|
|
model.put("collor2", "red");
|
|
model.put("collor2", "red");
|
|
model.put("into", "不许进入");
|
|
model.put("into", "不许进入");
|
|
- model.put("errorMsg", "您当前扫码位置距离" +uptownDoor.getDoorName()+"太远,请到门口扫码,如有疑问请与上级管理部门联系。");
|
|
|
|
|
|
+ model.put("errorMsg", "您当前扫码位置距离" + uptownDoor.getDoorName() + "太远,请到门口扫码,如有疑问请与上级管理部门联系。");
|
|
scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
|
|
scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
}
|
|
}
|
|
@@ -159,7 +159,7 @@ public class ScanController {
|
|
model.put("collor", "red");
|
|
model.put("collor", "red");
|
|
model.put("collor2", "red");
|
|
model.put("collor2", "red");
|
|
model.put("into", "不许进入");
|
|
model.put("into", "不许进入");
|
|
- model.put("errorMsg", "声明:根据凌云集团防疫指挥部复工条件,您属于不可复工六类人员之一,如有疑问请与上级管理部门联系。");
|
|
|
|
|
|
+ model.put("errorMsg", "声明:根据江中耀华防疫指挥部复工条件,您属于不可复工六类人员之一,如有疑问请与上级管理部门联系。");
|
|
scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
|
|
scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
}
|
|
}
|
|
@@ -168,7 +168,7 @@ public class ScanController {
|
|
model.put("collor", "green");
|
|
model.put("collor", "green");
|
|
model.put("collor2", "green");
|
|
model.put("collor2", "green");
|
|
model.put("into", "允许通行");
|
|
model.put("into", "允许通行");
|
|
- model.put("errorMsg", "声明:复工许可证是根据员工自主填写健康日报,结合凌云集团复工条件自动产生。原则上代表员工可复工,在厂门口扫描二维码生成绿色复工通行证,并接受检查后,可入厂。");
|
|
|
|
|
|
+ model.put("errorMsg", "声明:复工许可证是根据员工自主填写健康日报,结合江中耀华复工条件自动产生。原则上代表员工可复工,在厂门口扫描二维码生成绿色复工通行证,并接受检查后,可入厂。");
|
|
scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
}
|
|
}
|
|
@@ -180,8 +180,8 @@ public class ScanController {
|
|
if (outUser2 != null) {
|
|
if (outUser2 != null) {
|
|
ly2 = true;
|
|
ly2 = true;
|
|
startDate = s.format(outUser2.getStartDate());
|
|
startDate = s.format(outUser2.getStartDate());
|
|
- Long day = (new Date().getTime() - outUser2.getStartDate().getTime()) / (1000 * 60 * 60 * 24) -1;
|
|
|
|
- intSize = Integer.parseInt(Long.toString(day)) < 3 ? Integer.parseInt(Long.toString(day)) : 3;
|
|
|
|
|
|
+ Long day = (new Date().getTime() - outUser2.getStartDate().getTime()) / (1000 * 60 * 60 * 24) - 1;
|
|
|
|
+ intSize = Integer.parseInt(Long.toString(day)) < 3 ? Integer.parseInt(Long.toString(day)) : 3;
|
|
}
|
|
}
|
|
if (!unit.getUptownId().equals(uptownDoor.getUptownId())) {
|
|
if (!unit.getUptownId().equals(uptownDoor.getUptownId())) {
|
|
model.put("collor", "red");
|
|
model.put("collor", "red");
|
|
@@ -200,7 +200,7 @@ public class ScanController {
|
|
model.put("errorMsg", "由于您上报过新冠确诊、新冠疑似或密切接触者,不许进入,如有疑问请联系直管领导。");
|
|
model.put("errorMsg", "由于您上报过新冠确诊、新冠疑似或密切接触者,不许进入,如有疑问请联系直管领导。");
|
|
scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
|
|
scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
- } else if (!ly2) {
|
|
|
|
|
|
+ } else if (!ly2) {
|
|
model.put("collor", "red");
|
|
model.put("collor", "red");
|
|
model.put("collor2", "red");
|
|
model.put("collor2", "red");
|
|
model.put("into", "不许进入");
|
|
model.put("into", "不许进入");
|
|
@@ -227,7 +227,7 @@ public class ScanController {
|
|
model.put("errorMsg", "由于您的家庭成员有新冠确诊或密切接触史人员,不许进入,如有疑问请联系直管领导。");
|
|
model.put("errorMsg", "由于您的家庭成员有新冠确诊或密切接触史人员,不许进入,如有疑问请联系直管领导。");
|
|
scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
|
|
scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
- } else if (!ly2) {
|
|
|
|
|
|
+ } else if (!ly2) {
|
|
model.put("collor", "red");
|
|
model.put("collor", "red");
|
|
model.put("collor2", "red");
|
|
model.put("collor2", "red");
|
|
model.put("into", "不许进入");
|
|
model.put("into", "不许进入");
|
|
@@ -307,13 +307,13 @@ public class ScanController {
|
|
model.put("collor", "green");
|
|
model.put("collor", "green");
|
|
model.put("collor2", "green");
|
|
model.put("collor2", "green");
|
|
model.put("into", "允许进入");
|
|
model.put("into", "允许进入");
|
|
- model.put("errorMsg", "声明:复工通行证是根据员工自主填写健康日报,结合凌云集团复工条件自动产生。原则上代表员工可以通行,在接受规定检查后,方可入厂。");
|
|
|
|
|
|
+ model.put("errorMsg", "声明:复工通行证是根据员工自主填写健康日报,结合江中耀华复工条件自动产生。原则上代表员工可以通行,在接受规定检查后,方可入厂。");
|
|
scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
}
|
|
}
|
|
if (hc) {
|
|
if (hc) {
|
|
if ("".equals(coord)) {
|
|
if ("".equals(coord)) {
|
|
- String url = oauth2+appId +"&redirect_uri="+URLEncoder.encode(domain()+"user/scan.html?doorId="+doorId+"&inType="+inType + "&coord=","utf-8");
|
|
|
|
|
|
+ String url = oauth2 + appId + "&redirect_uri=" + URLEncoder.encode(domain() + "user/scan.html?doorId=" + doorId + "&inType=" + inType + "&coord=", "utf-8");
|
|
model.put("url", url);
|
|
model.put("url", url);
|
|
model.put("moreUrl", moreUrl);
|
|
model.put("moreUrl", moreUrl);
|
|
return new ModelAndView("/user/location.ftl", model);
|
|
return new ModelAndView("/user/location.ftl", model);
|
|
@@ -624,7 +624,7 @@ public class ScanController {
|
|
|
|
|
|
@ApiOperation("复工查询")
|
|
@ApiOperation("复工查询")
|
|
@GetMapping("/whepi/user/returnWork.html")
|
|
@GetMapping("/whepi/user/returnWork.html")
|
|
- public ModelAndView adminSelectReturnWork(@Pd(name = "userId")Long userId, ModelMap model) throws ParseException {
|
|
|
|
|
|
+ public ModelAndView adminSelectReturnWork(@Pd(name = "userId") Long userId, ModelMap model) throws ParseException {
|
|
return returnWork(userId, model);
|
|
return returnWork(userId, model);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -633,75 +633,51 @@ public class ScanController {
|
|
UptownUnit unit = uptownUnitMapper.getUptownUnitByUser(userId);
|
|
UptownUnit unit = uptownUnitMapper.getUptownUnitByUser(userId);
|
|
model.put("uptownId", unit.getUptownId());
|
|
model.put("uptownId", unit.getUptownId());
|
|
if (unit.getUptownId() == 1238790987234L || unit.getUptownId() == 5) {
|
|
if (unit.getUptownId() == 1238790987234L || unit.getUptownId() == 5) {
|
|
- model.put("tittle", "凌云集团");
|
|
|
|
|
|
+ model.put("tittle", "江中耀华");
|
|
model.put("doorplate", unit.getRidgepole() + unit.getUnit());
|
|
model.put("doorplate", unit.getRidgepole() + unit.getUnit());
|
|
model.put("name", uptownHomes.get(0).getLinkman());
|
|
model.put("name", uptownHomes.get(0).getLinkman());
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
|
|
SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
|
|
model.put("now", sdf.format(new Date()));
|
|
model.put("now", sdf.format(new Date()));
|
|
- OutUser outUser1 = outUserMapper.getOutUserByPhone(4, uptownHomes.get(0).getLinkman(), Long.parseLong(uptownHomes.get(0).getPhone()));
|
|
|
|
- if (outUser1 != null) {
|
|
|
|
- model.put("collor", "red");
|
|
|
|
- model.put("collor2", "red");
|
|
|
|
- model.put("into", "不可复工");
|
|
|
|
- model.put("errorMsg", "声明:根据凌云集团防疫指挥部复工条件,您属于不可复工六类人员之一,如有疑问请与上级管理部门联系。");
|
|
|
|
- return new ModelAndView("/user/returnWork.ftl", model);
|
|
|
|
- }
|
|
|
|
|
|
+// OutUser outUser1 = outUserMapper.getOutUserByPhone(4, uptownHomes.get(0).getLinkman(), Long.parseLong(uptownHomes.get(0).getPhone()));
|
|
|
|
+// if (outUser1 != null) {
|
|
|
|
+// model.put("collor", "red");
|
|
|
|
+// model.put("collor2", "red");
|
|
|
|
+// model.put("into", "不可复工");
|
|
|
|
+// model.put("errorMsg", "声明:根据江中耀华防疫指挥部复工条件,您属于不可复工六类人员之一,如有疑问请与上级管理部门联系。");
|
|
|
|
+// return new ModelAndView("/user/returnWork.ftl", model);
|
|
|
|
+// }
|
|
OutUser outUser = outUserMapper.getOutUserByPhone(1, uptownHomes.get(0).getLinkman(), Long.parseLong(uptownHomes.get(0).getPhone()));
|
|
OutUser outUser = outUserMapper.getOutUserByPhone(1, uptownHomes.get(0).getLinkman(), Long.parseLong(uptownHomes.get(0).getPhone()));
|
|
if (outUser != null) {
|
|
if (outUser != null) {
|
|
model.put("collor", "blue-ly");
|
|
model.put("collor", "blue-ly");
|
|
model.put("collor2", "blue-ly");
|
|
model.put("collor2", "blue-ly");
|
|
model.put("into", "允许复工");
|
|
model.put("into", "允许复工");
|
|
- model.put("errorMsg", "声明:复工许可证是根据员工自主填写健康日报,结合凌云集团复工条件自动产生。原则上代表员工可复工,在厂门口扫描二维码生成绿色复工通行证,并接受检查后,可入厂。");
|
|
|
|
|
|
+ model.put("errorMsg", "声明:复工许可证是根据员工自主填写健康日报,结合江中耀华复工条件自动产生。原则上代表员工可复工,可入厂。");
|
|
return new ModelAndView("/user/returnWork.ftl", model);
|
|
return new ModelAndView("/user/returnWork.ftl", model);
|
|
}
|
|
}
|
|
- Boolean ly2 = false;
|
|
|
|
String startDate = "";
|
|
String startDate = "";
|
|
int intSize = 3;
|
|
int intSize = 3;
|
|
OutUser outUser2 = outUserMapper.getOutUserByPhoneNotTime(5, uptownHomes.get(0).getLinkman(), Long.parseLong(uptownHomes.get(0).getPhone()));
|
|
OutUser outUser2 = outUserMapper.getOutUserByPhoneNotTime(5, uptownHomes.get(0).getLinkman(), Long.parseLong(uptownHomes.get(0).getPhone()));
|
|
if (outUser2 != null) {
|
|
if (outUser2 != null) {
|
|
- ly2 = true;
|
|
|
|
startDate = s.format(outUser2.getStartDate());
|
|
startDate = s.format(outUser2.getStartDate());
|
|
- Long day = (new Date().getTime() - outUser2.getStartDate().getTime()) / (1000 * 60 * 60 * 24) -1;
|
|
|
|
- intSize = Integer.parseInt(Long.toString(day)) < 3 ? Integer.parseInt(Long.toString(day)) : 3;
|
|
|
|
|
|
+ Long day = (new Date().getTime() - outUser2.getStartDate().getTime()) / (1000 * 60 * 60 * 24) - 1;
|
|
|
|
+ intSize = Integer.parseInt(Long.toString(day)) < 3 ? Integer.parseInt(Long.toString(day)) : 3;
|
|
}
|
|
}
|
|
MsReport msReport = msReportMapper.queryMsReportIsXG(userId);
|
|
MsReport msReport = msReportMapper.queryMsReportIsXG(userId);
|
|
if (msReport != null) {
|
|
if (msReport != null) {
|
|
- if (ly2 && outUser2.getStartDate().getTime() < msReport.getReportDate().getTime()) {
|
|
|
|
- model.put("collor", "red");
|
|
|
|
- model.put("collor2", "red");
|
|
|
|
- model.put("into", "不可复工");
|
|
|
|
- model.put("errorMsg", "由于您上报过新冠确诊、新冠疑似或密切接触者,不可复工,如有疑问请联系直管领导。");
|
|
|
|
- return new ModelAndView("/user/returnWork.ftl", model);
|
|
|
|
-// List<MsReport> msReports1 = msReportMapper.queryLateStatus(userId, s.format(msReport.getReportDate()));
|
|
|
|
-// if (msReports1.size() == 0) {
|
|
|
|
-// model.put("collor", "red");
|
|
|
|
-// model.put("collor2", "red");
|
|
|
|
-// model.put("into", "不可复工");
|
|
|
|
-// model.put("errorMsg", "由于您上报过新冠确诊、新冠疑似或密切接触者,且未解除医学隔离,不可复工,如有疑问请联系直管领导。");
|
|
|
|
-// return new ModelAndView("/user/returnWork.ftl", model);
|
|
|
|
-// }
|
|
|
|
- } else if (!ly2) {
|
|
|
|
- model.put("collor", "red");
|
|
|
|
- model.put("collor2", "red");
|
|
|
|
- model.put("into", "不可复工");
|
|
|
|
- model.put("errorMsg", "由于您上报过新冠确诊、新冠疑似或密切接触者,不可复工,如有疑问请联系直管领导。");
|
|
|
|
- return new ModelAndView("/user/returnWork.ftl", model);
|
|
|
|
- }
|
|
|
|
|
|
+ model.put("collor", "red");
|
|
|
|
+ model.put("collor2", "red");
|
|
|
|
+ model.put("into", "不可复工");
|
|
|
|
+ model.put("errorMsg", "由于您上报过新冠确诊、新冠疑似或密切接触者,不可复工,如有疑问请联系直管领导。");
|
|
|
|
+ return new ModelAndView("/user/returnWork.ftl", model);
|
|
}
|
|
}
|
|
List<MsReport> msReportList = msReportMapper.queryMsReportIsXGHome(userId);
|
|
List<MsReport> msReportList = msReportMapper.queryMsReportIsXGHome(userId);
|
|
if (msReportList.size() > 0) {
|
|
if (msReportList.size() > 0) {
|
|
- if (ly2 && outUser2.getStartDate().getTime() < msReportList.get(0).getReportDate().getTime()) {
|
|
|
|
|
|
+ if (outUser2.getStartDate().getTime() < msReportList.get(0).getReportDate().getTime()) {
|
|
model.put("collor", "red");
|
|
model.put("collor", "red");
|
|
model.put("collor2", "red");
|
|
model.put("collor2", "red");
|
|
model.put("into", "不可复工");
|
|
model.put("into", "不可复工");
|
|
- model.put("errorMsg", "由于您的家庭成员有新冠确诊或密切接触史人员,不可复工,如有疑问请联系直管领导。");
|
|
|
|
- return new ModelAndView("/user/returnWork.ftl", model);
|
|
|
|
- } else if (!ly2) {
|
|
|
|
- model.put("collor", "red");
|
|
|
|
- model.put("collor2", "red");
|
|
|
|
- model.put("into", "不可复工");
|
|
|
|
- model.put("errorMsg", "由于您的家庭成员有新冠确诊或密切接触史人员,不可复工,如有疑问请联系直管领导。");
|
|
|
|
|
|
+ model.put("errorMsg", "由于您的同住成员有新冠确诊或密切接触史人员,不可复工,如有疑问请联系直管领导。");
|
|
return new ModelAndView("/user/returnWork.ftl", model);
|
|
return new ModelAndView("/user/returnWork.ftl", model);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -729,23 +705,33 @@ public class ScanController {
|
|
model.put("errorMsg", "由于近期您的家庭成员健康评估存在问题,不可复工,如有疑问请联系直管领导。");
|
|
model.put("errorMsg", "由于近期您的家庭成员健康评估存在问题,不可复工,如有疑问请联系直管领导。");
|
|
return new ModelAndView("/user/returnWork.ftl", model);
|
|
return new ModelAndView("/user/returnWork.ftl", model);
|
|
}
|
|
}
|
|
-// List<MsReport> msReports3 = msReportMapper.selectMsReportThirtyError(userId);
|
|
|
|
-// if (msReports3.size() > 0) {
|
|
|
|
-// model.put("collor", "red");
|
|
|
|
-// model.put("collor2", "red");
|
|
|
|
-// model.put("into", "不可复工");
|
|
|
|
-// model.put("errorMsg", "由于最近30天您健康评估存在问题,不可复工,如有疑问请联系直管领导。");
|
|
|
|
-// return new ModelAndView("/user/returnWork.ftl", model);
|
|
|
|
-// }
|
|
|
|
-// MsReport msReport1 = msReportMapper.msAddr(userId);
|
|
|
|
-// if (msReport1 != null &&msReport1.getWorkMsg() != null &&msReport1.getTodayMsg() != null && !msReport1.getWorkMsg().equals(msReport1.getTodayMsg()) && !compareWhere(msReport1.getWorkMsg(), msReport1.getTodayMsg())) {
|
|
|
|
-// model.put("collor", "red");
|
|
|
|
-// model.put("collor2", "red");
|
|
|
|
-// model.put("into", "不可复工");
|
|
|
|
-// model.put("errorMsg", "您本人不在工作驻地,不能入场复工。");
|
|
|
|
-// return new ModelAndView("/user/returnWork.ftl", model);
|
|
|
|
-// }
|
|
|
|
-// MsTripDet work = msReportMapper.returnWork(userId);
|
|
|
|
|
|
+ List<MsReport> msReports4 = msReportMapper.selectMsReportThirtyError(userId);
|
|
|
|
+ if (msReports4.size() > 0) {
|
|
|
|
+ model.put("collor", "red");
|
|
|
|
+ model.put("collor2", "red");
|
|
|
|
+ model.put("into", "不可复工");
|
|
|
|
+ model.put("errorMsg", "由于最近30天您健康评估存在问题,不可复工,如有疑问请联系直管领导。");
|
|
|
|
+ return new ModelAndView("/user/returnWork.ftl", model);
|
|
|
|
+ }
|
|
|
|
+ MsReport msReport1 = msReportMapper.msAddr(userId);
|
|
|
|
+ if (msReport1 != null && !msReport1.getAutoLocal().equals(uptownHomes.get(0).getWorkAddr())) {
|
|
|
|
+ model.put("collor", "red");
|
|
|
|
+ model.put("collor2", "red");
|
|
|
|
+ model.put("into", "不可复工");
|
|
|
|
+ model.put("errorMsg", "您本人不在工作驻地,不能入场复工。");
|
|
|
|
+ return new ModelAndView("/user/returnWork.ftl", model);
|
|
|
|
+ }
|
|
|
|
+ // 最近三天是否出行
|
|
|
|
+ MsTripDet work = msReportMapper.returnWork(userId);
|
|
|
|
+ if (outUser2.getStartDate().getTime() < s.parse(work.getReturnWork()).getTime()) {
|
|
|
|
+ if (sdf.parse(work.getReturnWork() + " 00:00:00").getTime() + 1000L * 3600 * 24 * 3 > sdf.parse(s.format(new Date()) + " 00:00:00").getTime()) {
|
|
|
|
+ model.put("collor", "red");
|
|
|
|
+ model.put("collor2", "red");
|
|
|
|
+ model.put("into", "不可复工");
|
|
|
|
+ model.put("errorMsg", "您返回工作驻地后未满3日,不可复工。" + dayHow(s.parse(work.getReturnWork()), 3) + "起方可进入!");
|
|
|
|
+ return new ModelAndView("/user/returnWork.ftl", model);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
// if (work != null) {
|
|
// if (work != null) {
|
|
// if (ly2 && outUser2.getStartDate().getTime() < s.parse(work.getReturnWork()).getTime()) {
|
|
// 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()) {
|
|
// if (sdf.parse(work.getReturnWork() + " 00:00:00").getTime() + 1000L * 3600 * 24 * 15 > sdf.parse(s.format(new Date()) + " 00:00:00").getTime()) {
|
|
@@ -768,72 +754,9 @@ public class ScanController {
|
|
model.put("collor", "blue-ly");
|
|
model.put("collor", "blue-ly");
|
|
model.put("collor2", "blue-ly");
|
|
model.put("collor2", "blue-ly");
|
|
model.put("into", "允许复工");
|
|
model.put("into", "允许复工");
|
|
- model.put("errorMsg", "声明:复工许可证是根据员工自主填写健康日报,结合凌云集团复工条件自动产生。原则上代表员工可以复工,在厂门口扫描二维码生成绿色复工通行证,并接受规定检查后,方可入厂。");
|
|
|
|
|
|
+ model.put("errorMsg", "声明:复工许可证是根据员工自主填写健康日报,结合江中耀华复工条件自动产生。原则上代表员工可以复工,在厂门口扫描二维码生成绿色复工通行证,并接受规定检查后,方可入厂。");
|
|
return new ModelAndView("/user/returnWork.ftl", model);
|
|
return new ModelAndView("/user/returnWork.ftl", model);
|
|
//您近期内离开过工作单位驻地,请遵守返回工作驻地15日隔离规定,您目前未满15日,禁止进入。
|
|
//您近期内离开过工作单位驻地,请遵守返回工作驻地15日隔离规定,您目前未满15日,禁止进入。
|
|
- }else if (unit.getUptownId() == 100000002L) {
|
|
|
|
- model.put("tittle", "湖北和昌");
|
|
|
|
- model.put("doorplate", unit.getRidgepole() + unit.getUnit());
|
|
|
|
- model.put("name", uptownHomes.get(0).getLinkman());
|
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
- SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
- model.put("now", sdf.format(new Date()));
|
|
|
|
- OutUser outUser = outUserMapper.getOutUserByPhone(3, uptownHomes.get(0).getLinkman(), Long.parseLong(uptownHomes.get(0).getPhone()));
|
|
|
|
- if (outUser != null) {
|
|
|
|
- model.put("collor", "blue-ly");
|
|
|
|
- model.put("collor2", "blue-ly");
|
|
|
|
- model.put("into", "允许复工");
|
|
|
|
- model.put("errorMsg", "特殊人员允许通行,请保证生产同时注意自身安全。");
|
|
|
|
- return new ModelAndView("/user/returnWorkHC.ftl", model);
|
|
|
|
- }
|
|
|
|
- MsReport msReport = msReportMapper.queryMsReportIsXG(userId);
|
|
|
|
- if (msReport != null) {
|
|
|
|
- List<MsReport> msReports1 = msReportMapper.queryLateStatus(userId, s.format(msReport.getReportDate()));
|
|
|
|
- if (msReports1.size() == 0) {
|
|
|
|
- model.put("collor", "red");
|
|
|
|
- model.put("collor2", "red");
|
|
|
|
- model.put("into", "不可复工");
|
|
|
|
- model.put("errorMsg", "由于您上报过新冠确诊、新冠疑似或密切接触者,且未解除医学隔离,不可复工,如有疑问请联系直管领导。");
|
|
|
|
- return new ModelAndView("/user/returnWorkHC.ftl", model);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- List<MsReport> msReportList = msReportMapper.queryMsReportIsXGHome(userId);
|
|
|
|
- if (msReportList.size() > 0) {
|
|
|
|
- model.put("collor", "red");
|
|
|
|
- model.put("collor2", "red");
|
|
|
|
- model.put("into", "不许进入");
|
|
|
|
- model.put("errorMsg", "由于您的家庭成员有新冠确诊或密切接触史人员,不许进入,如有疑问请联系直管领导。");
|
|
|
|
- return new ModelAndView("/user/returnWorkHC.ftl", model);
|
|
|
|
- }
|
|
|
|
- List<MsReport> msReports = msReportMapper.selectMsReportLate(userId, "");
|
|
|
|
- if (msReports.size() < 4) {
|
|
|
|
- model.put("collor", "red");
|
|
|
|
- model.put("collor2", "red");
|
|
|
|
- model.put("into", "不可复工");
|
|
|
|
- model.put("errorMsg", "由于您前3日未连续报告日报,不可复工,如有疑问请联系直管领导。");
|
|
|
|
- return new ModelAndView("/user/returnWorkHC.ftl", model);
|
|
|
|
- }
|
|
|
|
- List<MsReport> msReports2 = msReportMapper.selectMsReportThereError(userId,"");
|
|
|
|
- if (msReports2.size() > 0) {
|
|
|
|
- model.put("collor", "red");
|
|
|
|
- model.put("collor2", "red");
|
|
|
|
- model.put("into", "不可复工");
|
|
|
|
- model.put("errorMsg", "由于近期您健康评估存在问题,不可复工,如有疑问请联系直管领导。");
|
|
|
|
- return new ModelAndView("/user/returnWorkHC.ftl", model);
|
|
|
|
- }
|
|
|
|
- List<MsReport> msReports3 = msReportMapper.selectMsReportThereErrorFamily(userId, "");
|
|
|
|
- if (msReports3.size() > 0) {
|
|
|
|
- model.put("collor", "red");
|
|
|
|
- model.put("collor2", "red");
|
|
|
|
- model.put("into", "不许进入");
|
|
|
|
- model.put("errorMsg", "由于近期您的家庭成员健康评估存在问题,不许进入,如有疑问请联系直管领导。");
|
|
|
|
- return new ModelAndView("/user/returnWorkHC.ftl", model);
|
|
|
|
- }
|
|
|
|
- model.put("collor", "blue-ly");
|
|
|
|
- model.put("collor2", "blue-ly");
|
|
|
|
- model.put("into", "允许复工");
|
|
|
|
- model.put("errorMsg", "声明:复工许可证是根据员工自主填写健康日报,结合湖北和昌新材料科技股份有限公司复工条件自动产生。原则上代表员工可以复工,在厂门口扫描二维码生成绿色复工通行证,并接受规定检查后,方可入厂。");
|
|
|
|
- return new ModelAndView("/user/returnWorkHC.ftl", model);
|
|
|
|
} else {
|
|
} else {
|
|
model.put("into", "此功能暂未开放");
|
|
model.put("into", "此功能暂未开放");
|
|
model.put("errorMsg", "复工期间请请注意安全。");
|
|
model.put("errorMsg", "复工期间请请注意安全。");
|
|
@@ -889,9 +812,9 @@ public class ScanController {
|
|
return time.substring(0, time.length() - 1);
|
|
return time.substring(0, time.length() - 1);
|
|
}
|
|
}
|
|
|
|
|
|
- public String day15(Date returnWork) {
|
|
|
|
|
|
+ public String dayHow(Date returnWork, int day) {
|
|
SimpleDateFormat sdf = new SimpleDateFormat("MM月dd日");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("MM月dd日");
|
|
- return sdf.format(new Date(returnWork.getTime() + 1000L * 3600 * 24 * 15));
|
|
|
|
|
|
+ return sdf.format(new Date(returnWork.getTime() + 1000L * 3600 * 24 * day));
|
|
}
|
|
}
|
|
|
|
|
|
public String day15(List<MsReport> list, String returnWork) throws ParseException {
|
|
public String day15(List<MsReport> list, String returnWork) throws ParseException {
|
|
@@ -907,7 +830,7 @@ public class ScanController {
|
|
}
|
|
}
|
|
|
|
|
|
public String domain() {
|
|
public String domain() {
|
|
- if (domain.substring(domain.length()-1).equals("/")) {
|
|
|
|
|
|
+ if (domain.substring(domain.length() - 1).equals("/")) {
|
|
return domain;
|
|
return domain;
|
|
} else {
|
|
} else {
|
|
return domain + "/";
|
|
return domain + "/";
|