添加校验所有地图数据接口
This commit is contained in:
parent
a4b42d13d8
commit
fb2f66f275
@ -209,6 +209,12 @@ public class MapController {
|
|||||||
return this.iMapService.isMapNameExist(name);
|
return this.iMapService.isMapNameExist(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("校验所有地图数据")
|
||||||
|
@GetMapping("/all/simulationCheck")
|
||||||
|
public List<MapVO> doSimulationCheckAll(@ApiIgnore @RequestAttribute UserVO user) {
|
||||||
|
return this.iMapService.doSimulationCheckAll(user);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "检测地图仿真数据是否存在错误")
|
@ApiOperation(value = "检测地图仿真数据是否存在错误")
|
||||||
@GetMapping(path = "/{id}/simulationCheck")
|
@GetMapping(path = "/{id}/simulationCheck")
|
||||||
public List<String> doSimulationCheck(@PathVariable Long id, @ApiIgnore @RequestAttribute UserVO user) {
|
public List<String> doSimulationCheck(@PathVariable Long id, @ApiIgnore @RequestAttribute UserVO user) {
|
||||||
|
@ -297,4 +297,10 @@ public interface IMapService {
|
|||||||
* 查询属于该集中站的区段
|
* 查询属于该集中站的区段
|
||||||
*/
|
*/
|
||||||
List<MapSectionNewVO> querySectionBelongTheDeviceStation(Long mapId, String stationCode);
|
List<MapSectionNewVO> querySectionBelongTheDeviceStation(Long mapId, String stationCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验所有地图数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MapVO> doSimulationCheckAll(UserVO user);
|
||||||
}
|
}
|
||||||
|
@ -882,6 +882,25 @@ public class MapService implements IMapService {
|
|||||||
.filter(section -> section.getStationCode().equals(stationCode)).collect(Collectors.toList());
|
.filter(section -> section.getStationCode().equals(stationCode)).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MapVO> doSimulationCheckAll(UserVO user) {
|
||||||
|
List<MapVO> mapVOS = listOnline();
|
||||||
|
List<MapVO> errorMaps = new ArrayList<>();
|
||||||
|
for (MapVO map : mapVOS) {
|
||||||
|
List<String> list = null;
|
||||||
|
try {
|
||||||
|
list = doSimulationCheck(map.getId(), user);
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
errorMaps.add(map);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
|
errorMaps.add(map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return errorMaps;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 该版本的地图数据是否存在
|
* 该版本的地图数据是否存在
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user