|
|
|
|
@ -299,6 +299,7 @@ public class HighDangerController { |
|
|
|
|
pointMapSection.put("distance", (int) Math.ceil(minDistance)); |
|
|
|
|
pointMapSection.put("name", dto.getSectionName()); |
|
|
|
|
pointMapSection.put("position", pointList); |
|
|
|
|
pointMapSection.put("sectionCode",dto.getSectionCode()); |
|
|
|
|
pointMapSection.put("type", "1"); |
|
|
|
|
|
|
|
|
|
combinedMap.add(pointMapSection); |
|
|
|
|
@ -339,6 +340,7 @@ public class HighDangerController { |
|
|
|
|
pointList.add(pointMap); |
|
|
|
|
pointMapCrossing.put("distance", (int) Math.ceil(pointDistance)); |
|
|
|
|
pointMapCrossing.put("position", pointList); |
|
|
|
|
pointMapCrossing.put("sectionCode",cross.getCrossingCode()); |
|
|
|
|
pointMapCrossing.put("type", "2"); |
|
|
|
|
// map.put(pointDistance, cross.getLongitude() + "," + cross.getLatitude());
|
|
|
|
|
pointMapCrossing.put("name", cross.getCrossingName()); |
|
|
|
|
@ -462,7 +464,8 @@ public class HighDangerController { |
|
|
|
|
|
|
|
|
|
log.info("/saveSectionOrCrossing(新增路段 & 路口)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(), sectionOrCrossAdd); |
|
|
|
|
|
|
|
|
|
if(highDangerMapper.isRoadExist(sectionOrCrossAdd.getBusinessId()) == 0){ |
|
|
|
|
HighDangerRoad roadInfo = highDangerMapper.getRoadInfo(sectionOrCrossAdd.getBusinessId()); |
|
|
|
|
if (roadInfo != null) { |
|
|
|
|
UUID uuid = UUID.randomUUID(); |
|
|
|
|
String uuidString = uuid.toString().replace("-", ""); |
|
|
|
|
highDangerMapper.insertRoad(uuidString, sectionOrCrossAdd.getBusinessId()); |
|
|
|
|
@ -479,15 +482,16 @@ public class HighDangerController { |
|
|
|
|
// 插入路段表
|
|
|
|
|
int i = highDangerMapper.saveSection(sectionOrCrossAdd); |
|
|
|
|
if (i > 0) { |
|
|
|
|
return ServerResponse.ok("道路新增成功"); |
|
|
|
|
assert roadInfo != null; |
|
|
|
|
return ServerResponse.ok("道路新增成功","2079028191469929"); |
|
|
|
|
} else { |
|
|
|
|
return ServerResponse.error("道路新增失败"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else if("2".equals(sectionOrCrossAdd.getAddType())){ |
|
|
|
|
} else if ("2".equals(sectionOrCrossAdd.getAddType())) { |
|
|
|
|
int i = highDangerMapper.saveCrossing(sectionOrCrossAdd); |
|
|
|
|
if (i > 0) { |
|
|
|
|
return ServerResponse.ok("道路新增成功"); |
|
|
|
|
assert roadInfo != null; |
|
|
|
|
return ServerResponse.ok("道路新增成功","2079028191469929"); |
|
|
|
|
} else { |
|
|
|
|
return ServerResponse.error("道路新增失败"); |
|
|
|
|
} |
|
|
|
|
@ -606,7 +610,26 @@ public class HighDangerController { |
|
|
|
|
@GetMapping("/getImportDangerDisplay") |
|
|
|
|
public ServerResponse<?> getImportDangerDisplay(@RequestParam String businessId, HttpServletRequest request) { |
|
|
|
|
log.info("/getImportDangerDisplay(排查第三页--重点排查项标签)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(), businessId); |
|
|
|
|
LinkedList<String> checkedList = new LinkedList<>(); |
|
|
|
|
|
|
|
|
|
List<ImportDangerDTO> item = highDangerMapper.getImportDangerDisplayItem(businessId); |
|
|
|
|
List<ThtHiddenDataCollectConfigExtra> importDangerList = highDangerMapper.getImportDangerDisplay(businessId, null); |
|
|
|
|
for (ThtHiddenDataCollectConfigExtra importDanger : importDangerList) { |
|
|
|
|
checkedList.add(importDanger.getDangerId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (ImportDangerDTO importDangerDTO : item) { |
|
|
|
|
List<ThtDangerItems> importDangerItemsValue = new LinkedList<>(); |
|
|
|
|
List<ThtDangerItems> importDangerItems = highDangerMapper.getImportDangerItems(importDangerDTO.getNid()); |
|
|
|
|
for (ThtDangerItems items : importDangerItems) { |
|
|
|
|
if (checkedList.contains(items.getId())) { |
|
|
|
|
items.setChecked("1"); |
|
|
|
|
} |
|
|
|
|
// assert importDangerItemsValue != null;
|
|
|
|
|
importDangerItemsValue.add(items); |
|
|
|
|
} |
|
|
|
|
importDangerDTO.setDangerItems(importDangerItemsValue); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
log.info("/getImportDangerDisplay(排查第三页--重点排查项标签)接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), item); |
|
|
|
|
if (item != null) { |
|
|
|
|
@ -639,7 +662,7 @@ public class HighDangerController { |
|
|
|
|
@GetMapping("/getUserHiddenDangerList") |
|
|
|
|
public ServerResponse<?> getUserHiddenDangerList(@RequestParam String businessId, |
|
|
|
|
@RequestParam String pcType, |
|
|
|
|
@RequestParam String hdTerm, |
|
|
|
|
@RequestParam(defaultValue = "") String hdTerm, |
|
|
|
|
HttpServletRequest request |
|
|
|
|
) { |
|
|
|
|
|
|
|
|
|
@ -774,6 +797,21 @@ public class HighDangerController { |
|
|
|
|
// return ServerResponse.ok(manualInvestigation);
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 智能排查 & 人工排查保存状态
|
|
|
|
|
@GetMapping("/HighDangerSaveStatus") |
|
|
|
|
public ServerResponse<?> HighDangerSaveStatus( |
|
|
|
|
@RequestParam String businessId, |
|
|
|
|
@RequestParam String pcType, |
|
|
|
|
HttpServletRequest request |
|
|
|
|
) { |
|
|
|
|
log.info("/HighDangerSaveStatus(智能排查 & 人工排查状态)接口被调用, 调用ip: {}, 入参: businessId={}, pcType={}", request.getRemoteAddr(), businessId, pcType); |
|
|
|
|
|
|
|
|
|
// 保存排查类型
|
|
|
|
|
highDangerMapper.HighDangerSaveStatus(businessId, pcType); |
|
|
|
|
log.info("/HighDangerSaveStatus(智能排查 & 人工排查状态)接口返回, 客户端ip: {}, 返回数据:{},{}", request.getRemoteAddr(), "数据已保存"); |
|
|
|
|
return ServerResponse.ok("状态修改成功,状态为:" + pcType, pcType); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 图片上传接口
|
|
|
|
|
/*@PostMapping("/uploadImage") |
|
|
|
|
public ServerResponse<?> uploadImage(@RequestBody MultipartFile multipartFile) throws IOException { |
|
|
|
|
|