|
@@ -83,11 +83,12 @@ public class ScanController {
|
|
|
@GetMapping("/user/scan.html")
|
|
|
public ModelAndView scan(HttpServletRequest request, ModelMap model, @RequestParam(value = "doorId", required = false, defaultValue = "0") Long doorId,
|
|
|
@RequestParam(value = "inType", required = false, defaultValue = "0") Integer inType,
|
|
|
- @RequestParam(value = "coord", required = false, defaultValue = "") String coord) throws ParseException, UnsupportedEncodingException {
|
|
|
- UserOpen userOpen = homeService.getUserOpenByCode(request.getParameter("code"));
|
|
|
- List<UserRole> list = userRoleMapper.getUserRoleByUserId(userOpen.getUserId());
|
|
|
-// List<UserRole> list = userRoleMapper.getUserRoleByUserId(1228565481837944834L);
|
|
|
-// UserOpen userOpen = userOpenMapper.selectByUserId(1228565481837944834L);
|
|
|
+ @RequestParam(value = "coord", required = false, defaultValue = "") String coord,
|
|
|
+ @RequestParam(value = "address", required = false, defaultValue = "") String address) throws ParseException, UnsupportedEncodingException {
|
|
|
+// UserOpen userOpen = homeService.getUserOpenByCode(request.getParameter("code"));
|
|
|
+// List<UserRole> list = userRoleMapper.getUserRoleByUserId(userOpen.getUserId());
|
|
|
+ List<UserRole> list = userRoleMapper.getUserRoleByUserId(1228565481837944834L);
|
|
|
+ UserOpen userOpen = userOpenMapper.selectByUserId(1228565481837944834L);
|
|
|
model.put("user", userOpen);
|
|
|
model.put("user_id", "\"" + userOpen.getUserId() + "\"");
|
|
|
if (list.size() == 0) {
|
|
@@ -124,7 +125,7 @@ public class ScanController {
|
|
|
model.put("into", "禁止" + getMsg(inType));
|
|
|
model.put("collor", "red");
|
|
|
model.put("errorMsg", "非本小区居民,禁止" + getMsg(inType) + "。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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);
|
|
|
}
|
|
|
}
|
|
@@ -142,7 +143,7 @@ public class ScanController {
|
|
|
model.put("collor", "orange");
|
|
|
model.put("into", "允许进入");
|
|
|
model.put("errorMsg", "您在外驻留时间超过1日,请尽快上报您的健康状况,防止在外长时间逗留。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
+ scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
|
}
|
|
|
}
|
|
@@ -159,7 +160,7 @@ public class ScanController {
|
|
|
model.put("collor2", "red");
|
|
|
model.put("into", "不许进入");
|
|
|
model.put("errorMsg", "声明:根据凌云集团防疫指挥部复工条件,您属于不可复工六类人员之一,如有疑问请与上级管理部门联系。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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);
|
|
|
}
|
|
|
OutUser outUser = outUserMapper.getOutUserByPhone(1, uptownHomes.get(0).getLinkman(), Long.parseLong(uptownHomes.get(0).getPhone()));
|
|
@@ -168,7 +169,7 @@ public class ScanController {
|
|
|
model.put("collor2", "green");
|
|
|
model.put("into", "允许通行");
|
|
|
model.put("errorMsg", "声明:复工许可证是根据员工自主填写健康日报,结合凌云集团复工条件自动产生。原则上代表员工可复工,在厂门口扫描二维码生成绿色复工通行证,并接受检查后,可入厂。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
+ scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
|
}
|
|
|
MsReport msReport = msReportMapper.queryMsReportIsXG(userOpen.getUserId());
|
|
@@ -180,7 +181,7 @@ public class ScanController {
|
|
|
model.put("collor2", "red");
|
|
|
model.put("into", "不许进入");
|
|
|
model.put("errorMsg", "由于您上报过新冠确诊、新冠疑似或密切接触者,且未解除医学隔离,不许进入,如有疑问请联系直管领导。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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);
|
|
|
}
|
|
|
}
|
|
@@ -190,7 +191,7 @@ public class ScanController {
|
|
|
model.put("collor2", "red");
|
|
|
model.put("into", "不许进入");
|
|
|
model.put("errorMsg", "由于您今日和前3日未连续报告日报,不许进入,如有疑问请联系直管领导。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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);
|
|
|
}
|
|
|
List<MsReport> msReports2 = msReportMapper.selectMsReportThereError(userOpen.getUserId());
|
|
@@ -199,7 +200,7 @@ public class ScanController {
|
|
|
model.put("collor2", "red");
|
|
|
model.put("into", "不许进入");
|
|
|
model.put("errorMsg", "由于近期您健康评估存在问题,不许进入,如有疑问请联系直管领导。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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);
|
|
|
}
|
|
|
String returnWork = msReportMapper.returnWork(userOpen.getUserId());
|
|
@@ -209,7 +210,7 @@ public class ScanController {
|
|
|
model.put("collor2", "red");
|
|
|
model.put("into", "不许进入");
|
|
|
model.put("errorMsg", "您返回工作驻地后未满14日,不许进入。" + day15(s.parse(returnWork)) + "起方可进入!");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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);
|
|
|
}
|
|
|
}
|
|
@@ -219,7 +220,7 @@ public class ScanController {
|
|
|
model.put("collor2", "red");
|
|
|
model.put("into", "不许进入");
|
|
|
model.put("errorMsg", "您本人不在工作驻地,不能入场复工。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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);
|
|
|
}
|
|
|
//您近期内离开过工作单位驻地,请遵守返回工作驻地15日隔离规定,您目前未满15日,禁止进入。
|
|
@@ -227,7 +228,7 @@ public class ScanController {
|
|
|
model.put("collor2", "green");
|
|
|
model.put("into", "允许进入");
|
|
|
model.put("errorMsg", "声明:复工通行证是根据员工自主填写健康日报,结合凌云集团复工条件自动产生。原则上代表员工可以通行,在接受规定检查后,方可入厂。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
+ scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
|
}
|
|
|
if (hc) {
|
|
@@ -243,7 +244,7 @@ public class ScanController {
|
|
|
model.put("collor2", "green");
|
|
|
model.put("into", "允许通行");
|
|
|
model.put("errorMsg", "声明:复工许可证是根据员工自主填写健康日报,结合凌云集团复工条件自动产生。原则上代表员工可复工,在厂门口扫描二维码生成绿色复工通行证,并接受检查后,可入厂。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
+ scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
return new ModelAndView("/user/scanHC.ftl", model);
|
|
|
}
|
|
|
MsReport msReport = msReportMapper.queryMsReportIsXG(userOpen.getUserId());
|
|
@@ -255,7 +256,7 @@ public class ScanController {
|
|
|
model.put("collor2", "red");
|
|
|
model.put("into", "不许进入");
|
|
|
model.put("errorMsg", "由于您上报过新冠确诊、新冠疑似或密切接触者,且未解除医学隔离,不许进入,如有疑问请联系直管领导。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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/scanHC.ftl", model);
|
|
|
}
|
|
|
}
|
|
@@ -265,7 +266,7 @@ public class ScanController {
|
|
|
model.put("collor2", "red");
|
|
|
model.put("into", "不许进入");
|
|
|
model.put("errorMsg", "由于您今日和前3日未连续报告日报,不许进入,如有疑问请联系直管领导。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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/scanHC.ftl", model);
|
|
|
}
|
|
|
List<MsReport> msReports2 = msReportMapper.selectMsReportThereError(userOpen.getUserId());
|
|
@@ -274,14 +275,14 @@ public class ScanController {
|
|
|
model.put("collor2", "red");
|
|
|
model.put("into", "不许进入");
|
|
|
model.put("errorMsg", "由于近期您健康评估存在问题,不许进入,如有疑问请联系直管领导。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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/scanHC.ftl", model);
|
|
|
}
|
|
|
model.put("collor", "green");
|
|
|
model.put("collor2", "green");
|
|
|
model.put("into", "允许进入");
|
|
|
model.put("errorMsg", "声明:复工通行证是根据员工自主填写健康日报,结合湖北和昌新材料科技股份有限公司复工条件自动产生。原则上代表员工可以通行,在接受规定检查后,方可入厂。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
+ scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
return new ModelAndView("/user/scanHC.ftl", model);
|
|
|
}
|
|
|
}
|
|
@@ -291,7 +292,7 @@ public class ScanController {
|
|
|
model.put("collor", "green");
|
|
|
model.put("into", "允许通行");
|
|
|
model.put("errorMsg", "外出请佩戴口罩,避免近距离接触,保生产同时注意自身安全。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
+ scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
|
}
|
|
|
OutScanConf outScanConf = outScanConfMapper.getOutScanConfByUptown(uptownDoor.getUptownId());
|
|
@@ -299,7 +300,7 @@ public class ScanController {
|
|
|
model.put("collor", "red");
|
|
|
model.put("into", "禁止外出");
|
|
|
model.put("errorMsg", "根据武汉市小区封闭管理规定,非特殊人员禁止出行!");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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);
|
|
|
}
|
|
|
OutScan outScan = outScanMapper.getOutScanThreeday(userOpen.getUserId(), 2, outScanConf.getGoOutFre());
|
|
@@ -307,7 +308,7 @@ public class ScanController {
|
|
|
model.put("collor", "red");
|
|
|
model.put("into", "禁止" + getMsg(inType));
|
|
|
model.put("errorMsg", "距您上次外出时间未满" + outScanConf.getGoOutFre() + "日,禁止外出,请配合。上次外出登记时间 " + sdf.format(new Date(outScan.getDate().getMillis())) + "。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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);
|
|
|
}
|
|
|
MsReport msReport = msReportMapper.selectMsReportToday(userOpen.getUserId());
|
|
@@ -315,7 +316,7 @@ public class ScanController {
|
|
|
model.put("collor", "red");
|
|
|
model.put("into", "禁止通行");
|
|
|
model.put("errorMsg", "健康日报提示您存在健康问题,禁止外出,请配合。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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);
|
|
|
}
|
|
|
List<MsReport> msReports = msReportMapper.selectMsReportLate(userOpen.getUserId());
|
|
@@ -323,13 +324,13 @@ public class ScanController {
|
|
|
model.put("collor", "red");
|
|
|
model.put("into", "禁止" + getMsg(inType));
|
|
|
model.put("errorMsg", "您最近三日未上报健康日报,请说明原因,配合监测人员。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, 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);
|
|
|
} else if (msReports.size() < 4) {
|
|
|
model.put("collor", "orange");
|
|
|
model.put("into", "可以" + getMsg(inType));
|
|
|
model.put("errorMsg", "您今日或前3日未连续报告日报,请说明原因并及时填报,配合监测人员。");
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
+ scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
|
}
|
|
|
}
|
|
@@ -340,7 +341,7 @@ public class ScanController {
|
|
|
} else if (inType == 1) {
|
|
|
model.put("errorMsg", "欢迎归来,注意防护。");
|
|
|
}
|
|
|
- scanService.saveOutScan(userOpen.getUserId(), inType, coord, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
+ scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
|
|
|
return new ModelAndView("/user/scan.ftl", model);
|
|
|
}
|
|
|
}
|