|
|
|
|
@ -139,17 +139,17 @@ public class HighDangerController { |
|
|
|
|
|
|
|
|
|
// 获取用户权限
|
|
|
|
|
List<String> roleById = operatorMapper.getRoleById(nuserid); |
|
|
|
|
if(roleById.contains("领导")){ |
|
|
|
|
if (roleById.contains("领导")) { |
|
|
|
|
role = 1; |
|
|
|
|
}else if(roleById.contains("排查治理人员")){ |
|
|
|
|
} else if (roleById.contains("排查治理人员")) { |
|
|
|
|
role = 2; |
|
|
|
|
}else if (roleById.contains("治理人员")){ |
|
|
|
|
} else if (roleById.contains("治理人员")) { |
|
|
|
|
role = 3; |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
role = 4; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<HighDangerBaseNum> statusCounts = highDangerMapper.getStatusCounts(departmentid, nuserid,role); |
|
|
|
|
List<HighDangerBaseNum> statusCounts = highDangerMapper.getStatusCounts(departmentid, nuserid, role); |
|
|
|
|
log.info("/getHighDangerStatusNum(查询各个状态的数据情况)接口数据返回,调用ip: {}, 出参:{}", request.getRemoteAddr(), statusCounts); |
|
|
|
|
|
|
|
|
|
return ServerResponse.ok(statusCounts); |
|
|
|
|
@ -165,6 +165,8 @@ public class HighDangerController { |
|
|
|
|
@RequestParam(defaultValue = "") String search, |
|
|
|
|
@RequestParam(defaultValue = "") String approve, |
|
|
|
|
@RequestParam(defaultValue = "") String classification, // 1 已完成 2 个人上报 3 系统下发
|
|
|
|
|
@RequestParam(defaultValue = "", required = false) Float longitude, |
|
|
|
|
@RequestParam(defaultValue = "", required = false) Float latitude, |
|
|
|
|
@RequestParam(value = "startTime", required = false) String startTime, |
|
|
|
|
@RequestParam(value = "endTime", required = false) String endTime, |
|
|
|
|
HttpServletRequest request |
|
|
|
|
@ -208,15 +210,18 @@ public class HighDangerController { |
|
|
|
|
int nearDay = base.getNearDay(); |
|
|
|
|
int nearHour = base.getNearHour(); |
|
|
|
|
|
|
|
|
|
// 获取审批流程列表
|
|
|
|
|
List<ThtApprove> processRecord = highDangerService.getProcessRecord(base.getBusinessId()); |
|
|
|
|
|
|
|
|
|
// 待办状态数据
|
|
|
|
|
if (Objects.equals(approve, "1")) { |
|
|
|
|
if (!processRecord.isEmpty()) { |
|
|
|
|
// 取审批流程最后一条流程
|
|
|
|
|
ThtApprove thtApprove = processRecord.get(processRecord.size() - 1); |
|
|
|
|
|
|
|
|
|
// 状态不是驳回
|
|
|
|
|
if (!Objects.equals(thtApprove.getApproveResult(), "-1")) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String approveTime = ""; |
|
|
|
|
String approveStatus = ""; |
|
|
|
|
String format = dateFormat.format(thtApprove.getOperateTime()); |
|
|
|
|
@ -244,7 +249,8 @@ public class HighDangerController { |
|
|
|
|
// base.setEnumname(base.getEnumname() + "(" + approveTime + ") " + approveStatus + " " + format);
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
} else { // 已完成
|
|
|
|
|
// 获取审批状态流程表
|
|
|
|
|
ThtApprove thtApprove = highDangerMapper.getProcessRecordByNid(base.getBusinessId()); |
|
|
|
|
if (thtApprove != null) { |
|
|
|
|
String approveTime = ""; |
|
|
|
|
@ -282,13 +288,14 @@ public class HighDangerController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (base.getTimeStatus() == null || base.getTimeStatus().equals("9")) { |
|
|
|
|
base.setDeadlineStatus("正常"); |
|
|
|
|
base.setDeadlineType("3"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 超期
|
|
|
|
|
if (Objects.equals(base.getTimeStatus(), "1")) { |
|
|
|
|
if (base.getTimeStatus() == null || base.getTimeStatus().equals("9")) { |
|
|
|
|
base.setDeadlineStatus("正常"); |
|
|
|
|
base.setDeadlineType("3"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 超期
|
|
|
|
|
if (Objects.equals(base.getTimeStatus(), "1")) { |
|
|
|
|
// // 获取相差的时间戳
|
|
|
|
|
// double timeDiffSeconds = Double.parseDouble(base.getTimeDiffEnd());
|
|
|
|
|
// // 计算天数
|
|
|
|
|
@ -298,55 +305,16 @@ public class HighDangerController { |
|
|
|
|
// // 计算小时数
|
|
|
|
|
// int hours = (int)Math.ceil(remainingSeconds / 3600);
|
|
|
|
|
|
|
|
|
|
if (delayDay == 0) { |
|
|
|
|
base.setDeadlineStatus("超期" + delayHour + "小时"); |
|
|
|
|
} else if (delayHour == 0) { |
|
|
|
|
base.setDeadlineStatus("超期" + delayDay + "天"); |
|
|
|
|
} else { |
|
|
|
|
base.setDeadlineStatus("超期" + delayDay + "天" + delayHour + "小时"); |
|
|
|
|
} |
|
|
|
|
base.setDeadlineType("1"); |
|
|
|
|
// System.out.println("时间差为 " + days + " 天 " + hours + " 小时");
|
|
|
|
|
|
|
|
|
|
// String[] split = base.getTimeDiffEnd().split(" ");
|
|
|
|
|
// if(split.length > 1){
|
|
|
|
|
// base.setDeadlineStatus("正常");
|
|
|
|
|
// base.setDeadlineType("3");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// // 使用正则表达式匹配天数和小时数
|
|
|
|
|
// Pattern pattern = Pattern.compile("(\\d+) days (\\d+):(\\d+):(\\d+\\.\\d+)");
|
|
|
|
|
// Matcher matcher = pattern.matcher(base.getTimeDiffEnd());
|
|
|
|
|
//
|
|
|
|
|
// if (matcher.find()) {
|
|
|
|
|
// int days = Integer.parseInt(matcher.group(1));
|
|
|
|
|
// int hours = Integer.parseInt(matcher.group(2));
|
|
|
|
|
// int minutes = Integer.parseInt(matcher.group(3));
|
|
|
|
|
// int seconds = Integer.parseInt(matcher.group(4));
|
|
|
|
|
// base.setDeadlineStatus("超期" + days + " 天 " + hours + " 小时");
|
|
|
|
|
// base.setDeadlineType("1");
|
|
|
|
|
// System.out.println("时间差为: " + days + " 天 " + hours + " 小时 " + minutes + " 分钟 " + seconds + " 秒");
|
|
|
|
|
// } else {
|
|
|
|
|
// System.out.println("无法匹配时间差格式");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// Duration timeDiffEnd = Duration.parse(base.getTimeDiffEnd());
|
|
|
|
|
// // 获取总的秒数
|
|
|
|
|
// long totalSeconds = timeDiffEnd.getSeconds();
|
|
|
|
|
//
|
|
|
|
|
// // 计算天数
|
|
|
|
|
// long days = totalSeconds / (24 * 3600);
|
|
|
|
|
// // 计算剩余小时数
|
|
|
|
|
// long hours = (totalSeconds % (24 * 3600)) / 3600;
|
|
|
|
|
//
|
|
|
|
|
// base.setDeadlineStatus("超期" + days + " 天 " + hours + " 小时");
|
|
|
|
|
//
|
|
|
|
|
//// System.out.println("时间差为: " + days + " 天 " + hours + " 小时");
|
|
|
|
|
// base.setDeadlineType("1");
|
|
|
|
|
// continue;
|
|
|
|
|
} |
|
|
|
|
if (Objects.equals(base.getTimeStatus(), "2")) { |
|
|
|
|
if (delayDay == 0) { |
|
|
|
|
base.setDeadlineStatus("超期" + delayHour + "小时"); |
|
|
|
|
} else if (delayHour == 0) { |
|
|
|
|
base.setDeadlineStatus("超期" + delayDay + "天"); |
|
|
|
|
} else { |
|
|
|
|
base.setDeadlineStatus("超期" + delayDay + "天" + delayHour + "小时"); |
|
|
|
|
} |
|
|
|
|
base.setDeadlineType("1"); |
|
|
|
|
} |
|
|
|
|
if (Objects.equals(base.getTimeStatus(), "2")) { |
|
|
|
|
// // 获取相差的时间戳
|
|
|
|
|
// double timeDiffSeconds = Double.parseDouble(base.getTimeDiffStart());
|
|
|
|
|
// // 计算天数
|
|
|
|
|
@ -356,140 +324,82 @@ public class HighDangerController { |
|
|
|
|
// // 计算小时数
|
|
|
|
|
// int hours = (int)Math.ceil(remainingSeconds / 3600);
|
|
|
|
|
|
|
|
|
|
if (nearDay == 0) { |
|
|
|
|
base.setDeadlineStatus("临期" + nearHour + "小时"); |
|
|
|
|
} else if (nearHour == 0) { |
|
|
|
|
base.setDeadlineStatus("临期" + nearDay + "天"); |
|
|
|
|
} else { |
|
|
|
|
base.setDeadlineStatus("临期" + nearDay + "天" + nearHour + "小时"); |
|
|
|
|
} |
|
|
|
|
base.setDeadlineType("2"); |
|
|
|
|
} |
|
|
|
|
// Date pcEndTime = base.getPcEndTime();
|
|
|
|
|
// Date pcStartTime = base.getPcStartTime();
|
|
|
|
|
//
|
|
|
|
|
// if (pcEndTime != null) {
|
|
|
|
|
// long diff = nowDate.getTime() - pcEndTime.getTime();
|
|
|
|
|
// // 时间差,天数
|
|
|
|
|
// long diffDays = diff / (24 * 60 * 60 * 1000);
|
|
|
|
|
// diffDays = Math.abs(diffDays);
|
|
|
|
|
//
|
|
|
|
|
// // 小时
|
|
|
|
|
// long remainingHours = (diff % (24 * 60 * 60 * 1000)) / (60 * 60 * 1000);
|
|
|
|
|
// remainingHours = Math.abs(remainingHours);
|
|
|
|
|
//
|
|
|
|
|
// // 判断不足一小时
|
|
|
|
|
// long diffHours = diff / (60 * 60 * 1000);
|
|
|
|
|
// diffHours = Math.abs(diffHours);
|
|
|
|
|
//
|
|
|
|
|
// int comparison = nowDate.compareTo(pcEndTime);
|
|
|
|
|
// if (comparison > 0) { // 超期逻辑
|
|
|
|
|
// if (diffHours < 1) {
|
|
|
|
|
// base.setDeadlineStatus("超期不足一小时");
|
|
|
|
|
// base.setDeadlineType("1");
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// if(diffDays == 0){
|
|
|
|
|
// base.setDeadlineStatus("超期" + remainingHours + "小时");
|
|
|
|
|
// base.setDeadlineType("1");
|
|
|
|
|
// continue;
|
|
|
|
|
// }else if(remainingHours == 0){
|
|
|
|
|
// base.setDeadlineStatus("超期" + diffDays + "天");
|
|
|
|
|
// base.setDeadlineType("1");
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// base.setDeadline(diffDays);
|
|
|
|
|
// base.setDeadlineStatus("超期" + diffDays + "天" + remainingHours + "小时");
|
|
|
|
|
// base.setDeadlineType("1");
|
|
|
|
|
// } else if (comparison < 0 && diffDays <= 3) { // 临期逻辑
|
|
|
|
|
// if (diffHours < 1) {
|
|
|
|
|
// base.setDeadlineStatus("临期不足一小时");
|
|
|
|
|
// base.setDeadlineType("2");
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// base.setDeadline(diffDays);
|
|
|
|
|
// if(diffDays == 0){
|
|
|
|
|
// base.setDeadlineStatus("临期" + remainingHours + "小时");
|
|
|
|
|
// base.setDeadlineType("2");
|
|
|
|
|
// continue;
|
|
|
|
|
// }else if(remainingHours == 0){
|
|
|
|
|
// base.setDeadlineStatus("临期" + diffDays + "天");
|
|
|
|
|
// base.setDeadlineType("2");
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// base.setDeadlineStatus("临期" + diffDays + "天" + remainingHours + "小时");
|
|
|
|
|
// base.setDeadlineType("2");
|
|
|
|
|
// } else { // 正常
|
|
|
|
|
// base.setDeadline(diffDays);
|
|
|
|
|
// base.setDeadlineStatus("正常");
|
|
|
|
|
// base.setDeadlineType("3");
|
|
|
|
|
// }
|
|
|
|
|
// // 排查开始时间判断
|
|
|
|
|
// } else if(pcStartTime != null){
|
|
|
|
|
// // 无排查结束时间,根据开始时间判断
|
|
|
|
|
// long diff = nowDate.getTime() - pcStartTime.getTime();
|
|
|
|
|
//
|
|
|
|
|
// // 时间差,天数
|
|
|
|
|
// long diffDays = diff / (24 * 60 * 60 * 1000);
|
|
|
|
|
// diffDays = Math.abs(diffDays);
|
|
|
|
|
//
|
|
|
|
|
// // 小时
|
|
|
|
|
// long remainingHours = (diff % (24 * 60 * 60 * 1000)) / (60 * 60 * 1000);
|
|
|
|
|
// remainingHours = Math.abs(remainingHours);
|
|
|
|
|
//
|
|
|
|
|
// // 判断不足一小时
|
|
|
|
|
// long diffHours = diff / (60 * 60 * 1000);
|
|
|
|
|
// diffHours = Math.abs(diffHours);
|
|
|
|
|
//
|
|
|
|
|
// int comparison = nowDate.compareTo(pcStartTime);
|
|
|
|
|
// if (comparison > 0) { // 超期
|
|
|
|
|
// if (diffHours < 1) {
|
|
|
|
|
// base.setDeadlineStatus("超期不足一小时");
|
|
|
|
|
// base.setDeadlineType("1");
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// if(diffDays == 0){
|
|
|
|
|
// base.setDeadlineStatus("超期" + remainingHours + "小时");
|
|
|
|
|
// base.setDeadlineType("1");
|
|
|
|
|
// continue;
|
|
|
|
|
// }else if(remainingHours == 0){
|
|
|
|
|
// base.setDeadlineStatus("超期" + diffDays + "天");
|
|
|
|
|
// base.setDeadlineType("1");
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// base.setDeadline(diffDays);
|
|
|
|
|
// base.setDeadlineStatus("超期" + diffDays + "天" + remainingHours + "小时");
|
|
|
|
|
// base.setDeadlineType("1");
|
|
|
|
|
// } else if (comparison < 0 && diffDays <= termTime) { // 临期
|
|
|
|
|
// if (diffHours < 1) {
|
|
|
|
|
// base.setDeadlineStatus("临期不足一小时");
|
|
|
|
|
// base.setDeadlineType("2");
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// base.setDeadline(diffDays);
|
|
|
|
|
// if (diffDays == 0) {
|
|
|
|
|
// base.setDeadlineStatus("临期" + remainingHours + "小时");
|
|
|
|
|
// base.setDeadlineType("2");
|
|
|
|
|
// continue;
|
|
|
|
|
// } else if (remainingHours == 0) {
|
|
|
|
|
// base.setDeadlineStatus("临期" + diffDays + "天");
|
|
|
|
|
// base.setDeadlineType("2");
|
|
|
|
|
// continue;
|
|
|
|
|
// }
|
|
|
|
|
// base.setDeadlineStatus("临期" + diffDays + "天" + remainingHours + "小时");
|
|
|
|
|
// base.setDeadlineType("2");
|
|
|
|
|
// }else{
|
|
|
|
|
// base.setDeadlineStatus("正常");
|
|
|
|
|
// base.setDeadlineType("3");
|
|
|
|
|
// }
|
|
|
|
|
//// base.setDeadlineStatus("无排查结束时间");
|
|
|
|
|
//// base.setDeadlineType("3");
|
|
|
|
|
// }else{
|
|
|
|
|
// base.setDeadlineStatus("无排查结束和开始时间");
|
|
|
|
|
// base.setDeadlineType("3");
|
|
|
|
|
if (nearDay == 0) { |
|
|
|
|
base.setDeadlineStatus("临期" + nearHour + "小时"); |
|
|
|
|
} else if (nearHour == 0) { |
|
|
|
|
base.setDeadlineStatus("临期" + nearDay + "天"); |
|
|
|
|
} else { |
|
|
|
|
base.setDeadlineStatus("临期" + nearDay + "天" + nearHour + "小时"); |
|
|
|
|
} |
|
|
|
|
base.setDeadlineType("2"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if("1".equals(approve) && "3".equals(classification)){ |
|
|
|
|
// 为列表数据添加时间
|
|
|
|
|
LinkedList<Map<String, Double>> pointList = new LinkedList<>(); |
|
|
|
|
|
|
|
|
|
SectionDTO sectionDTO = new SectionDTO(); |
|
|
|
|
// 路口
|
|
|
|
|
if("1".equals(base.getIfCross())){ |
|
|
|
|
sectionDTO = highDangerMapper.getCrossingByCode(base.getCrossCode()); |
|
|
|
|
} |
|
|
|
|
// 路段
|
|
|
|
|
if("2".equals(base.getIfCross())){ |
|
|
|
|
sectionDTO = highDangerMapper.getSectionByCode(base.getSectionCode()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (sectionDTO.getPosition() == null) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
// 将单条路段的坐标点依次取出进行对比
|
|
|
|
|
String[] split = sectionDTO.getPosition().split(","); |
|
|
|
|
Point Dpoint = new Point(); |
|
|
|
|
Double minDistance = 0.0; |
|
|
|
|
|
|
|
|
|
Point point = new Point(); |
|
|
|
|
point.setX(longitude); |
|
|
|
|
point.setY(latitude); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < split.length; i += 2) { |
|
|
|
|
|
|
|
|
|
float xPoint = Float.parseFloat(split[i]); |
|
|
|
|
float yPoint = Float.parseFloat(split[i + 1]); |
|
|
|
|
|
|
|
|
|
Map<String, Double> pointMap = new LinkedHashMap<>(); |
|
|
|
|
|
|
|
|
|
CoordinateConverter.AMap aMap = CoordinateConverter.transform(longitude, latitude); |
|
|
|
|
pointMap.put("longitude", aMap.getLongitude()); |
|
|
|
|
pointMap.put("latitude", aMap.getLatitude()); |
|
|
|
|
|
|
|
|
|
pointList.add(pointMap); |
|
|
|
|
|
|
|
|
|
Dpoint.setX(xPoint); |
|
|
|
|
Dpoint.setY(yPoint); |
|
|
|
|
// 计算两点间的距离
|
|
|
|
|
Double pointDistance = highDangerService.getPointDistance(Dpoint, point); |
|
|
|
|
if (minDistance == null || minDistance == 0) { |
|
|
|
|
minDistance = pointDistance; |
|
|
|
|
continue; |
|
|
|
|
} else { |
|
|
|
|
if (pointDistance < minDistance) { |
|
|
|
|
minDistance = pointDistance; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 设置距离
|
|
|
|
|
base.setDistance((int) Math.ceil(minDistance)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if("1".equals(approve) && "3".equals(classification)) { |
|
|
|
|
// 根据距离排序
|
|
|
|
|
statusCounts.sort(new Comparator<HighDangerBase>() { |
|
|
|
|
@Override |
|
|
|
|
public int compare(HighDangerBase o1, HighDangerBase o2) { |
|
|
|
|
return o1.getDistance() - o2.getDistance(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
PageInfo<HighDangerBase> pageInfo = new PageInfo<>(statusCounts); |
|
|
|
|
|
|
|
|
|
log.info("/getHigDangerDealt(查询各个状态的数据列表)接口数据返回,调用ip: {}, 出参:{}", request.getRemoteAddr(), statusCounts); |
|
|
|
|
@ -734,10 +644,10 @@ public class HighDangerController { |
|
|
|
|
/* |
|
|
|
|
根据路口查询上下游路段信息 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/getSectionByCrossing") |
|
|
|
|
public ServerResponse<?> getSectionByCrossing(HttpServletRequest request,@RequestParam String crossingCode) { |
|
|
|
|
@GetMapping("/getSectionByCrossing") |
|
|
|
|
public ServerResponse<?> getSectionByCrossing(HttpServletRequest request, @RequestParam String crossingCode) { |
|
|
|
|
|
|
|
|
|
log.info("/getSectionByCrossing(根据路口找到上下游路段)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),crossingCode); |
|
|
|
|
log.info("/getSectionByCrossing(根据路口找到上下游路段)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(), crossingCode); |
|
|
|
|
|
|
|
|
|
List<SectionVO> sectionByCrossing = highDangerService.getSectionByCrossing(crossingCode); |
|
|
|
|
|
|
|
|
|
@ -755,7 +665,7 @@ public class HighDangerController { |
|
|
|
|
SectionDTO sectionByCode = new SectionDTO(); |
|
|
|
|
log.info("/getDangerRoad(查询当前排查所在路段)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(), businessId); |
|
|
|
|
|
|
|
|
|
HighDangerRoad roadInfo = highDangerMapper.getRoadInfo(businessId,ifCross); |
|
|
|
|
HighDangerRoad roadInfo = highDangerMapper.getRoadInfo(businessId, ifCross); |
|
|
|
|
roadInfo.setDeptId(operatorMapper.getOperatorById(roadInfo.getOperator()).getCdepartmentid()); |
|
|
|
|
|
|
|
|
|
// 路段
|
|
|
|
|
@ -824,7 +734,7 @@ public class HighDangerController { |
|
|
|
|
|
|
|
|
|
log.info("/saveSectionOrCrossing(新增路段 & 路口)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(), sectionOrCrossAdd); |
|
|
|
|
|
|
|
|
|
HighDangerRoad roadInfo = highDangerMapper.getRoadInfo(sectionOrCrossAdd.getBusinessId(),"2"); |
|
|
|
|
HighDangerRoad roadInfo = highDangerMapper.getRoadInfo(sectionOrCrossAdd.getBusinessId(), "2"); |
|
|
|
|
if (roadInfo != null) { |
|
|
|
|
UUID uuid = UUID.randomUUID(); |
|
|
|
|
String uuidString = uuid.toString().replace("-", ""); |
|
|
|
|
@ -935,11 +845,11 @@ public class HighDangerController { |
|
|
|
|
// } else {
|
|
|
|
|
// if(!sectionInfo.isEmpty()){
|
|
|
|
|
for (int i = 0; i < sectionInfo.size(); i++) { |
|
|
|
|
if(Objects.equals(sectionInfo.get(i).getIfCross(), "2")){ |
|
|
|
|
if (Objects.equals(sectionInfo.get(i).getIfCross(), "2")) { |
|
|
|
|
SectionDTO sectionByCode = highDangerMapper.getSectionByCode(sectionInfo.get(i).getSectionCode()); |
|
|
|
|
sectionInfo.get(i).setSectionName(sectionByCode.getSectionName()); |
|
|
|
|
} |
|
|
|
|
if(Objects.equals(sectionInfo.get(i).getIfCross(), "1")){ |
|
|
|
|
if (Objects.equals(sectionInfo.get(i).getIfCross(), "1")) { |
|
|
|
|
sectionInfo.get(i).setSectionCode(sectionInfo.get(i).getRoadCode()); |
|
|
|
|
} |
|
|
|
|
// 是否该排查有绑定的辖区街道信息,有则展示
|
|
|
|
|
@ -1143,7 +1053,7 @@ public class HighDangerController { |
|
|
|
|
highDangerRoad.setBusinessId(hidden_businessId); |
|
|
|
|
// 绑定路段
|
|
|
|
|
highDangerRoad.setSectionCode(manualInvestigation.getSectionCode()); |
|
|
|
|
if(Objects.equals(manualInvestigation.getIfCross(), "1")){ |
|
|
|
|
if (Objects.equals(manualInvestigation.getIfCross(), "1")) { |
|
|
|
|
highDangerRoad.setCrossCode(manualInvestigation.getSectionCode()); |
|
|
|
|
} |
|
|
|
|
highDangerRoad.setIfCross(manualInvestigation.getIfCross()); |
|
|
|
|
@ -1187,10 +1097,11 @@ public class HighDangerController { |
|
|
|
|
for (BasicInfoVO basicInfoVO : manualInvestigation.getBasicInfo()) { |
|
|
|
|
basicInfoVO.setIfCross(manualInvestigation.getIfCross()); |
|
|
|
|
// 路口类型,将路口code存入 bis_section_info 表中
|
|
|
|
|
if(manualInvestigation.getIfCross() != null && manualInvestigation.getIfCross().equals("1")){ |
|
|
|
|
if (manualInvestigation.getIfCross() != null && manualInvestigation.getIfCross().equals("1")) { |
|
|
|
|
basicInfoVO.setRoadCode(manualInvestigation.getSectionCode()); |
|
|
|
|
} |
|
|
|
|
basicInfoVO.setBusinessId(hidden_businessId); |
|
|
|
|
// 插入列表
|
|
|
|
|
highDangerMapper.insertSectionInfo(basicInfoVO); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -1260,7 +1171,7 @@ public class HighDangerController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(manualInvestigation.getTemporary() != 2){ |
|
|
|
|
if (manualInvestigation.getTemporary() != 2) { |
|
|
|
|
// 新增时间线表
|
|
|
|
|
ThtTimeLineDTO thtTimeLineDTO = new ThtTimeLineDTO(); |
|
|
|
|
thtTimeLineDTO.setNid(String.valueOf(uuid)); |
|
|
|
|
@ -1752,8 +1663,8 @@ public class HighDangerController { |
|
|
|
|
@GetMapping("/updateCurOperator") |
|
|
|
|
public ServerResponse<?> updateCurOperator(@RequestParam String nuserId, |
|
|
|
|
@RequestParam String businessId |
|
|
|
|
){ |
|
|
|
|
highDangerMapper.updateCurOperator(nuserId,businessId); |
|
|
|
|
) { |
|
|
|
|
highDangerMapper.updateCurOperator(nuserId, businessId); |
|
|
|
|
return ServerResponse.ok(nuserId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1791,25 +1702,26 @@ public class HighDangerController { |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/getNewestVersion") |
|
|
|
|
public ServerResponse<?> getNewestVersion( |
|
|
|
|
){ |
|
|
|
|
) { |
|
|
|
|
ThtAppVersionHis newestVersion = highDangerMapper.getNewestVersion(); |
|
|
|
|
return ServerResponse.ok(newestVersion); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
获取最新版本号 |
|
|
|
|
*/ |
|
|
|
|
获取当前操作人信息 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/getCurOperator") |
|
|
|
|
public ServerResponse<?> getCurOperator(@RequestParam String businessId){ |
|
|
|
|
HighDangerBase curOperator = highDangerMapper.getCurOperator(businessId); |
|
|
|
|
public ServerResponse<?> getCurOperator(@RequestParam String businessId) { |
|
|
|
|
|
|
|
|
|
HighDangerBase curOperator = highDangerService.getCurOperator(businessId); |
|
|
|
|
return ServerResponse.ok(curOperator.getCurOperUser()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
获取单个隐患数据 |
|
|
|
|
获取单条隐患数据 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/getHiddenDangerBaseById") |
|
|
|
|
public ServerResponse<?> getHiddenDangerBaseById(@RequestParam String businessId){ |
|
|
|
|
public ServerResponse<?> getHiddenDangerBaseById(@RequestParam String businessId) { |
|
|
|
|
HighDangerBase highDangerBase = highDangerMapper.getHiddenDangerBaseById(businessId); |
|
|
|
|
return ServerResponse.ok(highDangerBase); |
|
|
|
|
} |
|
|
|
|
|