|
@@ -153,6 +153,17 @@ public class ScanController {
|
|
|
model.put("url", url);
|
|
|
model.put("moreUrl", moreUrl);
|
|
|
return new ModelAndView("/user/location.ftl", model);
|
|
|
+ } else {
|
|
|
+ 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())) {
|
|
|
+ model.put("collor", "red");
|
|
|
+ model.put("collor2", "red");
|
|
|
+ model.put("into", "不许进入");
|
|
|
+ model.put("errorMsg", "您当前扫码位置距离" +uptownDoor.getDoorName()+"大门太远,请到门口扫码,如有疑问请与上级管理部门联系。");
|
|
|
+ scanService.saveOutScan(userOpen.getUserId(), inType, coord, address, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
|
|
|
+ return new ModelAndView("/user/scan.ftl", model);
|
|
|
+ }
|
|
|
}
|
|
|
OutUser outUser1 = outUserMapper.getOutUserByPhone(4, uptownHomes.get(0).getLinkman(), Long.parseLong(uptownHomes.get(0).getPhone()));
|
|
|
if (outUser1 != null) {
|
|
@@ -727,6 +738,7 @@ public class ScanController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
// /**
|
|
|
// * 生成进出门二维码
|
|
|
// * @param doorId 小区大门ID
|