|
|
|
@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo; |
|
|
|
import com.hisense.hiatmp.model.common.*; |
|
|
|
import com.hisense.hiatmp.model.common.*; |
|
|
|
import com.hisense.hiatmp.server_api.mapper.HighDangerMapper; |
|
|
|
import com.hisense.hiatmp.server_api.mapper.HighDangerMapper; |
|
|
|
import com.hisense.hiatmp.server_api.mapper.OperatorMapper; |
|
|
|
import com.hisense.hiatmp.server_api.mapper.OperatorMapper; |
|
|
|
|
|
|
|
import com.hisense.hiatmp.model.common.DangerProblem; |
|
|
|
import com.hisense.hiatmp.server_api.service.HighDangerService; |
|
|
|
import com.hisense.hiatmp.server_api.service.HighDangerService; |
|
|
|
import com.hisense.hiatmp.model.dmr.Point; |
|
|
|
import com.hisense.hiatmp.model.dmr.Point; |
|
|
|
import com.hisense.hiatmp.server_api.utils.CoordinateUtils; |
|
|
|
import com.hisense.hiatmp.server_api.utils.CoordinateUtils; |
|
|
|
@ -15,12 +16,9 @@ import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.text.DecimalFormat; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Slf4j |
|
|
|
@Slf4j |
|
|
|
@RestController |
|
|
|
@RestController |
|
|
|
@ -144,7 +142,6 @@ public class HighDangerController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询指定任务详情任务
|
|
|
|
// 查询指定任务详情任务
|
|
|
|
@GetMapping("/getHigDangerDetail") |
|
|
|
@GetMapping("/getHigDangerDetail") |
|
|
|
public ServerResponse<?> getHighDetail(@RequestParam String businessId){ |
|
|
|
public ServerResponse<?> getHighDetail(@RequestParam String businessId){ |
|
|
|
@ -182,6 +179,7 @@ public class HighDangerController { |
|
|
|
public ServerResponse<?> getNearRoad(@RequestBody Point point, |
|
|
|
public ServerResponse<?> getNearRoad(@RequestBody Point point, |
|
|
|
@RequestParam(defaultValue = "1") Long pageNum, |
|
|
|
@RequestParam(defaultValue = "1") Long pageNum, |
|
|
|
@RequestParam(defaultValue = "10") Long pageSize, |
|
|
|
@RequestParam(defaultValue = "10") Long pageSize, |
|
|
|
|
|
|
|
@RequestParam(defaultValue = "") String search, |
|
|
|
HttpServletRequest request |
|
|
|
HttpServletRequest request |
|
|
|
){ |
|
|
|
){ |
|
|
|
|
|
|
|
|
|
|
|
@ -194,15 +192,16 @@ public class HighDangerController { |
|
|
|
BigDecimal d = new BigDecimal(point.getX()).setScale(1,BigDecimal.ROUND_DOWN); |
|
|
|
BigDecimal d = new BigDecimal(point.getX()).setScale(1,BigDecimal.ROUND_DOWN); |
|
|
|
SectionVO sectionVO = new SectionVO(); |
|
|
|
SectionVO sectionVO = new SectionVO(); |
|
|
|
sectionVO.setPosition(String.valueOf(d)); |
|
|
|
sectionVO.setPosition(String.valueOf(d)); |
|
|
|
|
|
|
|
sectionVO.setSearch(search); |
|
|
|
List<SectionVO> allRoadInfo = highDangerMapper.getAllSection(sectionVO); |
|
|
|
List<SectionVO> allRoadInfo = highDangerMapper.getAllSection(sectionVO); |
|
|
|
HashMap<String, Object> combinedMap = new HashMap<>(); |
|
|
|
// List<SectionVO> allRoadInfo = highDangerMapper.getAllSection(sectionVO);
|
|
|
|
HashMap<String, Object> pointMapSection = new HashMap<>(); |
|
|
|
List<HashMap<String, Object>> combinedMap = new LinkedList<>(); |
|
|
|
HashMap<String, Object> pointMapCrossing = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Point Dpoint = new Point(); |
|
|
|
Point Dpoint = new Point(); |
|
|
|
// 遍历所有路段
|
|
|
|
// 遍历所有路段
|
|
|
|
for(SectionVO dto : allRoadInfo){ |
|
|
|
for(SectionVO dto : allRoadInfo){ |
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
HashMap<String, Object> pointMapSection = new HashMap<>(); |
|
|
|
|
|
|
|
// Map<String,Object> map = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
|
|
LinkedList<Map<String, Float>> pointList = new LinkedList<>(); |
|
|
|
LinkedList<Map<String, Float>> pointList = new LinkedList<>(); |
|
|
|
// 临时存储最短距离
|
|
|
|
// 临时存储最短距离
|
|
|
|
@ -212,18 +211,47 @@ public class HighDangerController { |
|
|
|
} |
|
|
|
} |
|
|
|
// 将单条路段的坐标点依次取出进行对比
|
|
|
|
// 将单条路段的坐标点依次取出进行对比
|
|
|
|
String[] split = dto.getPosition().split(","); |
|
|
|
String[] split = dto.getPosition().split(","); |
|
|
|
float x = Float.parseFloat(split[0]); |
|
|
|
|
|
|
|
float y = Float.parseFloat(split[1]); |
|
|
|
Double minDistance = null; |
|
|
|
if (!(x >= rectangle[0] && x <= rectangle[2] && y >= rectangle[1] && y <= rectangle[3])){ |
|
|
|
for(int i = 0; i < split.length; i += 2) { |
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float x = Float.parseFloat(split[i]); |
|
|
|
|
|
|
|
float y = Float.parseFloat(split[i + 1]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String,Float> pointMap = new LinkedHashMap<>(); |
|
|
|
|
|
|
|
pointMap.put("longitude", x); |
|
|
|
|
|
|
|
pointMap.put("latitude", y); |
|
|
|
|
|
|
|
pointList.add(pointMap); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!(x >= rectangle[0] && x <= rectangle[2] && y >= rectangle[1] && y <= rectangle[3])){ |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dpoint.setX(x); |
|
|
|
|
|
|
|
Dpoint.setY(y); |
|
|
|
|
|
|
|
// 计算两点间的距离
|
|
|
|
|
|
|
|
Double pointDistance = highDangerService.getPointDistance(Dpoint, point); |
|
|
|
|
|
|
|
if(minDistance == null){ |
|
|
|
|
|
|
|
minDistance = pointDistance; |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
if(pointDistance < minDistance){ |
|
|
|
|
|
|
|
minDistance = pointDistance; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// float x = Float.parseFloat(split[0]);
|
|
|
|
|
|
|
|
// float y = Float.parseFloat(split[1]);
|
|
|
|
|
|
|
|
|
|
|
|
//for(int i = 0; i < split.length; i += 2){
|
|
|
|
//for(int i = 0; i < split.length; i += 2){
|
|
|
|
//float x = Float.parseFloat(split[i]);
|
|
|
|
//float x = Float.parseFloat(split[i]);
|
|
|
|
//float y = Float.parseFloat(split[i + 1]);
|
|
|
|
//float y = Float.parseFloat(split[i + 1]);
|
|
|
|
Dpoint.setX(x); |
|
|
|
// Dpoint.setX(x);
|
|
|
|
Dpoint.setY(y); |
|
|
|
// Dpoint.setY(y);
|
|
|
|
// 计算两点间的距离
|
|
|
|
// 计算两点间的距离
|
|
|
|
Double pointDistance = highDangerService.getPointDistance(Dpoint, point); |
|
|
|
// Double pointDistance = highDangerService.getPointDistance(Dpoint, point);
|
|
|
|
// 最短距离为空,初次存入第一个值
|
|
|
|
// 最短距离为空,初次存入第一个值
|
|
|
|
/*if(minDistance == null){ |
|
|
|
/*if(minDistance == null){ |
|
|
|
minDistance = pointDistance; |
|
|
|
minDistance = pointDistance; |
|
|
|
@ -234,20 +262,26 @@ public class HighDangerController { |
|
|
|
} |
|
|
|
} |
|
|
|
}*/ |
|
|
|
}*/ |
|
|
|
//}
|
|
|
|
//}
|
|
|
|
for(int i = 0; i < split.length; i += 2){ |
|
|
|
// for(int i = 0; i < split.length; i += 2){
|
|
|
|
Map<String,Float> pointMap = new LinkedHashMap<>(); |
|
|
|
// Map<String,Float> pointMap = new LinkedHashMap<>();
|
|
|
|
float x1 = Float.parseFloat(split[i]); |
|
|
|
// float x1 = Float.parseFloat(split[i]);
|
|
|
|
float y1 = Float.parseFloat(split[i + 1]); |
|
|
|
// float y1 = Float.parseFloat(split[i + 1]);
|
|
|
|
pointMap.put("longitude", x1); |
|
|
|
// pointMap.put("longitude", x1);
|
|
|
|
pointMap.put("latitude", y1); |
|
|
|
// pointMap.put("latitude", y1);
|
|
|
|
pointList.add(pointMap); |
|
|
|
// pointList.add(pointMap);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(minDistance == null){ |
|
|
|
|
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
pointMapSection.put("distance", (int) Math.ceil(minDistance)); |
|
|
|
|
|
|
|
pointMapSection.put("name",dto.getSectionName()); |
|
|
|
|
|
|
|
pointMapSection.put("position", pointList); |
|
|
|
|
|
|
|
pointMapSection.put("type", "1"); |
|
|
|
|
|
|
|
|
|
|
|
map.put("distance", (int) Math.ceil(pointDistance)); |
|
|
|
combinedMap.add(pointMapSection); |
|
|
|
map.put("position", pointList); |
|
|
|
|
|
|
|
map.put("type", "1"); |
|
|
|
|
|
|
|
// 将路段和最短路线
|
|
|
|
// 将路段和最短路线
|
|
|
|
pointMapSection.put(dto.getSectionName(), map); |
|
|
|
// pointMapSection.put(dto.getSectionName(), map);
|
|
|
|
|
|
|
|
|
|
|
|
//minDistance = null;
|
|
|
|
//minDistance = null;
|
|
|
|
} |
|
|
|
} |
|
|
|
@ -258,10 +292,13 @@ public class HighDangerController { |
|
|
|
crossingDTO.setLatMin(rectangle[1]); |
|
|
|
crossingDTO.setLatMin(rectangle[1]); |
|
|
|
crossingDTO.setLonMax(rectangle[2]); |
|
|
|
crossingDTO.setLonMax(rectangle[2]); |
|
|
|
crossingDTO.setLatMax(rectangle[3]); |
|
|
|
crossingDTO.setLatMax(rectangle[3]); |
|
|
|
|
|
|
|
crossingDTO.setSearch(search); |
|
|
|
List<CrossingDTO> allCrossing = highDangerMapper.getAllCrossing(crossingDTO); |
|
|
|
List<CrossingDTO> allCrossing = highDangerMapper.getAllCrossing(crossingDTO); |
|
|
|
|
|
|
|
// List<CrossingDTO> allCrossing = highDangerMapper.getAllCrossing(crossingDTO);
|
|
|
|
// 遍历集合,将所有坐标点与当前坐标比较
|
|
|
|
// 遍历集合,将所有坐标点与当前坐标比较
|
|
|
|
for(CrossingDTO cross : allCrossing){ |
|
|
|
for(CrossingDTO cross : allCrossing){ |
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
HashMap<String, Object> pointMapCrossing = new HashMap<>(); |
|
|
|
|
|
|
|
// Map<String,Object> map = new HashMap<>();
|
|
|
|
Map<String,Float> pointMap = new HashMap<>(); |
|
|
|
Map<String,Float> pointMap = new HashMap<>(); |
|
|
|
LinkedList<Map<String, Float>> pointList = new LinkedList<>(); |
|
|
|
LinkedList<Map<String, Float>> pointList = new LinkedList<>(); |
|
|
|
|
|
|
|
|
|
|
|
@ -275,40 +312,30 @@ public class HighDangerController { |
|
|
|
// 计算两点间的距离
|
|
|
|
// 计算两点间的距离
|
|
|
|
Double pointDistance = highDangerService.getPointDistance(Dpoint, point); |
|
|
|
Double pointDistance = highDangerService.getPointDistance(Dpoint, point); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pointMap.put("longitude", x); |
|
|
|
pointMap.put("longitude", x); |
|
|
|
pointMap.put("latitude", y); |
|
|
|
pointMap.put("latitude", y); |
|
|
|
pointList.add(pointMap); |
|
|
|
pointList.add(pointMap); |
|
|
|
map.put("distance", (int) Math.ceil(pointDistance)); |
|
|
|
pointMapCrossing.put("distance", (int) Math.ceil(pointDistance)); |
|
|
|
map.put("position", pointList); |
|
|
|
pointMapCrossing.put("position", pointList); |
|
|
|
map.put("type", "2"); |
|
|
|
pointMapCrossing.put("type", "2"); |
|
|
|
// map.put(pointDistance, cross.getLongitude() + "," + cross.getLatitude());
|
|
|
|
// map.put(pointDistance, cross.getLongitude() + "," + cross.getLatitude());
|
|
|
|
pointMapCrossing.put(cross.getCrossingName(), map); |
|
|
|
pointMapCrossing.put("name", cross.getCrossingName()); |
|
|
|
} |
|
|
|
|
|
|
|
log.info("接口被调用,接口传入参数:"+point+","+pageNum+","+pageSize); |
|
|
|
|
|
|
|
combinedMap.putAll(pointMapSection); |
|
|
|
|
|
|
|
combinedMap.putAll(pointMapCrossing); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Map.Entry<String, Object>> sortedList = combinedMap.entrySet().stream() |
|
|
|
|
|
|
|
.sorted(Comparator.comparingDouble(entry -> (int) ((Map) entry.getValue()).get("distance"))) |
|
|
|
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Map<String, Map<Double,String>> collectPage = combinedMap.entrySet().stream()
|
|
|
|
combinedMap.add(pointMapCrossing); |
|
|
|
// .skip((pageNum - 1) * pageSize)
|
|
|
|
} |
|
|
|
// .limit(pageSize)
|
|
|
|
// log.info("接口被调用,接口传入参数:"+point+","+pageNum+","+pageSize);
|
|
|
|
// .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 将路段根据计算的值进行排序
|
|
|
|
combinedMap.sort(new Comparator<HashMap<String, Object>>() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public int compare(HashMap<String, Object> o1, HashMap<String, Object> o2) { |
|
|
|
|
|
|
|
Integer distance1 = (Integer) o1.get("distance"); |
|
|
|
|
|
|
|
Integer distance2 = (Integer) o2.get("distance"); |
|
|
|
|
|
|
|
return distance1.compareTo(distance2); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// LinkedHashMap<String, Map<Double, String>> collect = new LinkedHashMap<>();
|
|
|
|
log.info("/getNearRoadInfo(获取最近道路)接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), combinedMap); |
|
|
|
// if (null != combinedMap) {
|
|
|
|
return ServerResponse.ok(combinedMap); |
|
|
|
// collect = highDangerService.sortMapByValue(combinedMap).entrySet().stream()
|
|
|
|
|
|
|
|
// .skip((pageNum - 1) * pageSize)
|
|
|
|
|
|
|
|
// .limit(pageSize)
|
|
|
|
|
|
|
|
// .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
log.info("/getNearRoadInfo(获取最近道路)接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), sortedList); |
|
|
|
|
|
|
|
return ServerResponse.ok(sortedList); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 查询当前排查所在路段
|
|
|
|
// 查询当前排查所在路段
|
|
|
|
@ -318,6 +345,11 @@ public class HighDangerController { |
|
|
|
log.info("/getDangerRoad(查询当前排查所在路段)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(), businessId); |
|
|
|
log.info("/getDangerRoad(查询当前排查所在路段)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(), businessId); |
|
|
|
|
|
|
|
|
|
|
|
HighDangerRoad roadInfo = highDangerMapper.getRoadInfo(businessId); |
|
|
|
HighDangerRoad roadInfo = highDangerMapper.getRoadInfo(businessId); |
|
|
|
|
|
|
|
roadInfo.setDeptId(operatorMapper.getOperatorById(roadInfo.getOperator()).getCdepartmentid()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(roadInfo.getCoordinate() == null){ |
|
|
|
|
|
|
|
return ServerResponse.ok("无对应路口信息",null); |
|
|
|
|
|
|
|
} |
|
|
|
LinkedList<Map<String, Float>> coordinateMapTemporary = new LinkedList<>(); |
|
|
|
LinkedList<Map<String, Float>> coordinateMapTemporary = new LinkedList<>(); |
|
|
|
|
|
|
|
|
|
|
|
String[] split = roadInfo.getCoordinate().split(","); |
|
|
|
String[] split = roadInfo.getCoordinate().split(","); |
|
|
|
@ -388,6 +420,11 @@ public class HighDangerController { |
|
|
|
|
|
|
|
|
|
|
|
log.info("/saveSectionOrCrossing(新增路段 & 路口)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),sectionOrCrossAdd); |
|
|
|
log.info("/saveSectionOrCrossing(新增路段 & 路口)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),sectionOrCrossAdd); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(highDangerMapper.isRoadExist(sectionOrCrossAdd.getBusinessId()) == 0){ |
|
|
|
|
|
|
|
UUID uuid = UUID.randomUUID(); |
|
|
|
|
|
|
|
String uuidString = uuid.toString().replace("-", ""); |
|
|
|
|
|
|
|
highDangerMapper.insertRoad(uuidString,sectionOrCrossAdd.getBusinessId()); |
|
|
|
|
|
|
|
} |
|
|
|
// 随机生成一个16位的数作为路段id
|
|
|
|
// 随机生成一个16位的数作为路段id
|
|
|
|
// Random random = new Random();
|
|
|
|
// Random random = new Random();
|
|
|
|
// long sectionCode = (long) (random.nextDouble() * 9000000000000000L) + 1000000000000000L;
|
|
|
|
// long sectionCode = (long) (random.nextDouble() * 9000000000000000L) + 1000000000000000L;
|
|
|
|
@ -486,7 +523,7 @@ public class HighDangerController { |
|
|
|
if(sectionInfo != null){ |
|
|
|
if(sectionInfo != null){ |
|
|
|
return ServerResponse.ok(sectionInfo); |
|
|
|
return ServerResponse.ok(sectionInfo); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
return ServerResponse.error("无基本信息内容"); |
|
|
|
return ServerResponse.ok("无基本信息内容",null); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -502,7 +539,7 @@ public class HighDangerController { |
|
|
|
if(sectionTraffic != null){ |
|
|
|
if(sectionTraffic != null){ |
|
|
|
return ServerResponse.ok(sectionTraffic); |
|
|
|
return ServerResponse.ok(sectionTraffic); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
return ServerResponse.error("无基本信息内容"); |
|
|
|
return ServerResponse.ok("无基本信息内容",null); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -561,6 +598,12 @@ public class HighDangerController { |
|
|
|
log.info("/getUserHiddenDangerList(排查第三页--存在隐患列表(用户数据回显))接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),businessId); |
|
|
|
log.info("/getUserHiddenDangerList(排查第三页--存在隐患列表(用户数据回显))接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),businessId); |
|
|
|
|
|
|
|
|
|
|
|
List<HiddenDangerDTO> userHiddenDangerList = highDangerMapper.getUserHiddenDangerList(businessId); |
|
|
|
List<HiddenDangerDTO> userHiddenDangerList = highDangerMapper.getUserHiddenDangerList(businessId); |
|
|
|
|
|
|
|
for(HiddenDangerDTO hiddenDangerDTO : userHiddenDangerList){ |
|
|
|
|
|
|
|
String dangerItems = highDangerMapper.getDangerProblem(hiddenDangerDTO.getBigCategory()) + "/" + |
|
|
|
|
|
|
|
highDangerMapper.getDangerProblem(hiddenDangerDTO.getSmallCategory()) + "/" + |
|
|
|
|
|
|
|
highDangerMapper.getDangerProblem(hiddenDangerDTO.getHdTerm()); |
|
|
|
|
|
|
|
hiddenDangerDTO.setDangerProblem(dangerItems); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
log.info("/getUserHiddenDangerList(排查第三页--存在隐患列表(用户数据回显))接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), userHiddenDangerList); |
|
|
|
log.info("/getUserHiddenDangerList(排查第三页--存在隐患列表(用户数据回显))接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), userHiddenDangerList); |
|
|
|
if(userHiddenDangerList != null){ |
|
|
|
if(userHiddenDangerList != null){ |
|
|
|
@ -592,7 +635,7 @@ public class HighDangerController { |
|
|
|
ThtSectionTrafficDTO sectionTraffic = highDangerMapper.getSectionTraffic(manualInvestigation.getBusinessId()); |
|
|
|
ThtSectionTrafficDTO sectionTraffic = highDangerMapper.getSectionTraffic(manualInvestigation.getBusinessId()); |
|
|
|
|
|
|
|
|
|
|
|
if(sectionTraffic != null){ |
|
|
|
if(sectionTraffic != null){ |
|
|
|
// 更新统计数据(步骤1)
|
|
|
|
// 更新统计数据(步骤2)
|
|
|
|
highDangerMapper.updateSectionTraffic(manualInvestigation); |
|
|
|
highDangerMapper.updateSectionTraffic(manualInvestigation); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
// 保存统计数据(步骤2)
|
|
|
|
// 保存统计数据(步骤2)
|
|
|
|
@ -613,7 +656,7 @@ public class HighDangerController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 隐患排查表--如果存在该记录则更新
|
|
|
|
// 隐患排查表--如果存在该记录则更新
|
|
|
|
if(highDangerMapper.isExtraExistence(manualInvestigation.getBusinessId()) != null){ |
|
|
|
if(!highDangerMapper.isExtraExistence(manualInvestigation.getBusinessId()).isEmpty()){ |
|
|
|
highDangerMapper.deleteRoadInfo(manualInvestigation.getBusinessId()); |
|
|
|
highDangerMapper.deleteRoadInfo(manualInvestigation.getBusinessId()); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
for(HiddenDangerDTO details : manualInvestigation.getDescribe()){ |
|
|
|
for(HiddenDangerDTO details : manualInvestigation.getDescribe()){ |
|
|
|
@ -621,7 +664,6 @@ public class HighDangerController { |
|
|
|
UUID uuid = UUID.randomUUID(); |
|
|
|
UUID uuid = UUID.randomUUID(); |
|
|
|
String uuidString = uuid.toString().replace("-", ""); |
|
|
|
String uuidString = uuid.toString().replace("-", ""); |
|
|
|
details.setNid(uuidString); |
|
|
|
details.setNid(uuidString); |
|
|
|
|
|
|
|
|
|
|
|
details.setBusinessId(manualInvestigation.getBusinessId()); |
|
|
|
details.setBusinessId(manualInvestigation.getBusinessId()); |
|
|
|
// 保存重点排查数据
|
|
|
|
// 保存重点排查数据
|
|
|
|
highDangerMapper.saveDangerExtra(details); |
|
|
|
highDangerMapper.saveDangerExtra(details); |
|
|
|
|