报错消除(未完)
This commit is contained in:
parent
bcc570afe9
commit
413a2c2b94
@ -1619,9 +1619,7 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createRouting(MapRoutingVO routingVO) {
|
public void createRouting(MapRoutingVO routingVO) {
|
||||||
if (ifRoutingExist(routingVO, null)) {
|
BusinessExceptionAssertEnum.DATA_ALREADY_EXIST.assertNotTrue(ifRoutingExist(routingVO, null));
|
||||||
throw new DBException(ExceptionMapping.DATA_EXISTS);
|
|
||||||
}
|
|
||||||
DraftMapRouting routing = routingVO.convert2Draft();
|
DraftMapRouting routing = routingVO.convert2Draft();
|
||||||
draftMapRoutingDAO.insert(routing);
|
draftMapRoutingDAO.insert(routing);
|
||||||
}
|
}
|
||||||
@ -1632,18 +1630,15 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void createRoutingData(MapRoutingDataVO routingVO) {
|
public void createRoutingData(MapRoutingDataVO routingVO) {
|
||||||
if (ifRoutingDataExist(routingVO, null)) {
|
BusinessExceptionAssertEnum.DATA_ALREADY_EXIST.assertNotTrue(ifRoutingDataExist(routingVO, null));
|
||||||
throw new DBException(ExceptionMapping.DATA_EXISTS);
|
|
||||||
}
|
|
||||||
DraftMapRouting routing = routingVO.convert2Draft();
|
DraftMapRouting routing = routingVO.convert2Draft();
|
||||||
draftMapRoutingDAO.insert(routing);
|
draftMapRoutingDAO.insert(routing);
|
||||||
//同时生成回路
|
//同时生成回路
|
||||||
// routingVO.setWithLoop(true);//测试用
|
// routingVO.setWithLoop(true);//测试用
|
||||||
if (Objects.nonNull(routingVO.getWithLoop()) && routingVO.getWithLoop()) {
|
if (Objects.nonNull(routingVO.getWithLoop()) && routingVO.getWithLoop()) {
|
||||||
MapRoutingDataVO loopRoutingData = generateRoutingLoopData(routingVO);
|
MapRoutingDataVO loopRoutingData = generateRoutingLoopData(routingVO);
|
||||||
if (ifRoutingDataExist(loopRoutingData, null)) {
|
BusinessExceptionAssertEnum.DATA_ALREADY_EXIST.assertNotTrue(ifRoutingDataExist(loopRoutingData, null),
|
||||||
throw new DBException(ExceptionMapping.DATA_EXISTS, "对应回路已存在");
|
"对应回路已经存在");
|
||||||
}
|
|
||||||
draftMapRoutingDAO.insert(loopRoutingData.convert2Draft());
|
draftMapRoutingDAO.insert(loopRoutingData.convert2Draft());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1653,33 +1648,30 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public MapRoutingDataVO generateRoutingData(MapRoutingDataVO routingVO) {
|
public MapRoutingDataVO generateRoutingData(MapRoutingDataVO routingVO) {
|
||||||
if (ifRoutingDataExist(routingVO, null)) {
|
BusinessExceptionAssertEnum.DATA_ALREADY_EXIST.assertNotTrue(ifRoutingDataExist(routingVO, null),
|
||||||
throw new DBException(ExceptionMapping.DATA_EXISTS);
|
"对应回路已经存在");
|
||||||
}
|
|
||||||
MapDataVO mapData = this.iDraftMapService.getMapData(routingVO.getMapId());
|
MapDataVO mapData = this.iDraftMapService.getMapData(routingVO.getMapId());
|
||||||
if (mapData.isDrawWay()) {
|
if (mapData.isDrawWay()) {
|
||||||
MapVO map = new MapVO();
|
MapVO map = new MapVO();
|
||||||
map.setDrawWay(mapData.isDrawWay());
|
map.setDrawWay(mapData.isDrawWay());
|
||||||
map.setMapData(mapData);
|
map.setMapData(mapData);
|
||||||
SimulationBuilder.SimulationDeviceBuildResult buildResult = SimulationBuilder.checkAndBuildMapDeviceData(map);
|
SimulationBuilder.SimulationDeviceBuildResult buildResult = SimulationBuilder.checkAndBuildMapDeviceData(map);
|
||||||
if (!CollectionUtils.isEmpty(buildResult.getErrMsgList())) {
|
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(CollectionUtils.isEmpty(buildResult.getErrMsgList()),
|
||||||
throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, String.format("地图基础数据校验不通过,不能生成"));
|
"地图基础数据校验不通过,不能生成");
|
||||||
}
|
|
||||||
Section startSection = (Section) buildResult.getDeviceMap().get(routingVO.getStartSectionCode());
|
Section startSection = (Section) buildResult.getDeviceMap().get(routingVO.getStartSectionCode());
|
||||||
Section endSection = (Section) buildResult.getDeviceMap().get(routingVO.getEndSectionCode());
|
Section endSection = (Section) buildResult.getDeviceMap().get(routingVO.getEndSectionCode());
|
||||||
if (Objects.isNull(startSection) || Objects.isNull(endSection)) {
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotTrue(Objects.isNull(startSection) || Objects.isNull(endSection),
|
||||||
throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL, String.format("站间从区段code[%s]——至区段code[%s],两个区段中某个区段不存在", routingVO.getStartSectionCode(), routingVO.getEndSectionCode()));
|
String.format("站间从区段code[%s]——至区段code[%s],两个区段中某个区段不存在", routingVO.getStartSectionCode(), routingVO.getEndSectionCode()));
|
||||||
}
|
|
||||||
//中间经停所有站台轨
|
//中间经停所有站台轨
|
||||||
List<Section> passingStandTrack = CalculateService.findPassingStandTrack(startSection, endSection, routingVO.getRight());
|
List<Section> passingStandTrack = CalculateService.findPassingStandTrack(startSection, endSection, routingVO.getRight());
|
||||||
if (Objects.isNull(passingStandTrack))
|
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertNotNull(passingStandTrack,
|
||||||
throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, "没有找到对应方向的中间经停区段,是否可手动添加或者直接保存交路");
|
"没有找到对应方向的中间经停区段,是否可手动添加或者直接保存交路");
|
||||||
LinkedList<MapRoutingSectionNewVO> parkSectionCodeList = passingStandTrack.stream().map(section -> new MapRoutingSectionNewVO(section.getStation().getCode(), section.getCode())).collect(Collectors.toCollection(LinkedList::new));
|
LinkedList<MapRoutingSectionNewVO> parkSectionCodeList = passingStandTrack.stream().map(section -> new MapRoutingSectionNewVO(section.getStation().getCode(), section.getCode())).collect(Collectors.toCollection(LinkedList::new));
|
||||||
parkSectionCodeList.addFirst(new MapRoutingSectionNewVO(routingVO.getStartStationCode(), routingVO.getStartSectionCode()));
|
parkSectionCodeList.addFirst(new MapRoutingSectionNewVO(routingVO.getStartStationCode(), routingVO.getStartSectionCode()));
|
||||||
parkSectionCodeList.addLast(new MapRoutingSectionNewVO(routingVO.getEndStationCode(), routingVO.getEndSectionCode()));
|
parkSectionCodeList.addLast(new MapRoutingSectionNewVO(routingVO.getEndStationCode(), routingVO.getEndSectionCode()));
|
||||||
routingVO.setParkSectionCodeList(parkSectionCodeList);
|
routingVO.setParkSectionCodeList(parkSectionCodeList);
|
||||||
} else {
|
} else {
|
||||||
throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, String.format("旧地图数据不支持此功能"));
|
throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception("意外的旧地图");
|
||||||
}
|
}
|
||||||
return routingVO;
|
return routingVO;
|
||||||
}
|
}
|
||||||
@ -1689,53 +1681,42 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
*/
|
*/
|
||||||
private MapRoutingDataVO generateRoutingLoopData(MapRoutingDataVO routingDataVO) {
|
private MapRoutingDataVO generateRoutingLoopData(MapRoutingDataVO routingDataVO) {
|
||||||
MapRoutingDataVO routingVO = routingDataVO.generateLoopRoutingBasicData();
|
MapRoutingDataVO routingVO = routingDataVO.generateLoopRoutingBasicData();
|
||||||
if (ifRoutingDataExist(routingVO, null)) {
|
BusinessExceptionAssertEnum.DATA_ALREADY_EXIST.assertNotTrue(ifRoutingDataExist(routingVO, null));
|
||||||
throw new DBException(ExceptionMapping.DATA_EXISTS);
|
|
||||||
}
|
|
||||||
MapDataVO mapData = this.iDraftMapService.getMapData(routingVO.getMapId());
|
MapDataVO mapData = this.iDraftMapService.getMapData(routingVO.getMapId());
|
||||||
if (mapData.isDrawWay()) {
|
if (mapData.isDrawWay()) {
|
||||||
MapVO map = new MapVO();
|
MapVO map = new MapVO();
|
||||||
map.setDrawWay(mapData.isDrawWay());
|
map.setDrawWay(mapData.isDrawWay());
|
||||||
map.setMapData(mapData);
|
map.setMapData(mapData);
|
||||||
SimulationBuilder.SimulationDeviceBuildResult buildResult = SimulationBuilder.checkAndBuildMapDeviceData(map);
|
SimulationBuilder.SimulationDeviceBuildResult buildResult = SimulationBuilder.checkAndBuildMapDeviceData(map);
|
||||||
if (!CollectionUtils.isEmpty(buildResult.getErrMsgList())) {
|
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(CollectionUtils.isEmpty(buildResult.getErrMsgList()),
|
||||||
throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, String.format("地图基础数据校验不通过,不能生成"));
|
"地图基础数据校验不通过,不能生成");
|
||||||
}
|
|
||||||
Section startSection = (Section) buildResult.getDeviceMap().get(routingVO.getStartSectionCode());
|
Section startSection = (Section) buildResult.getDeviceMap().get(routingVO.getStartSectionCode());
|
||||||
Section endSection = (Section) buildResult.getDeviceMap().get(routingVO.getEndSectionCode());
|
Section endSection = (Section) buildResult.getDeviceMap().get(routingVO.getEndSectionCode());
|
||||||
routingVO.setDestinationCode(endSection.getDestinationCode());
|
routingVO.setDestinationCode(endSection.getDestinationCode());
|
||||||
if (Objects.isNull(startSection) || Objects.isNull(endSection)) {
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotTrue(Objects.isNull(startSection) || Objects.isNull(endSection),
|
||||||
throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL, String.format("回路生成:站间从区段code[%s]——至区段code[%s],两个区段中某个区段不存在", routingVO.getStartSectionCode(), routingVO.getEndSectionCode()));
|
"回路生成:站间从区段code[%s]——至区段code[%s],两个区段中某个区段不存在");
|
||||||
}
|
|
||||||
//中间经停所有站台轨
|
//中间经停所有站台轨
|
||||||
List<Section> passingStandTrack = CalculateService.findPassingStandTrack(startSection, endSection, routingVO.getRight());
|
List<Section> passingStandTrack = CalculateService.findPassingStandTrack(startSection, endSection, routingVO.getRight());
|
||||||
if (Objects.isNull(passingStandTrack))
|
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertNotNull(Objects.isNull(passingStandTrack), "没有对应的回路");
|
||||||
throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, "没有对应的回路");
|
|
||||||
LinkedList<MapRoutingSectionNewVO> parkSectionCodeList = passingStandTrack.stream().map(section -> new MapRoutingSectionNewVO(section.getStation().getCode(), section.getCode())).collect(Collectors.toCollection(LinkedList::new));
|
LinkedList<MapRoutingSectionNewVO> parkSectionCodeList = passingStandTrack.stream().map(section -> new MapRoutingSectionNewVO(section.getStation().getCode(), section.getCode())).collect(Collectors.toCollection(LinkedList::new));
|
||||||
parkSectionCodeList.addFirst(new MapRoutingSectionNewVO(routingVO.getStartStationCode(), routingVO.getStartSectionCode()));
|
parkSectionCodeList.addFirst(new MapRoutingSectionNewVO(routingVO.getStartStationCode(), routingVO.getStartSectionCode()));
|
||||||
parkSectionCodeList.addLast(new MapRoutingSectionNewVO(routingVO.getEndStationCode(), routingVO.getEndSectionCode()));
|
parkSectionCodeList.addLast(new MapRoutingSectionNewVO(routingVO.getEndStationCode(), routingVO.getEndSectionCode()));
|
||||||
routingVO.setParkSectionCodeList(parkSectionCodeList);
|
routingVO.setParkSectionCodeList(parkSectionCodeList);
|
||||||
} else {
|
} else {
|
||||||
throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, String.format("旧地图数据不支持此功能"));
|
throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception("意外的旧地图");
|
||||||
}
|
}
|
||||||
return routingVO;
|
return routingVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MapRoutingVO getRouting(Long routingId) {
|
public MapRoutingVO getRouting(Long routingId) {
|
||||||
DraftMapRouting routing = draftMapRoutingDAO.selectByPrimaryKey(routingId);
|
DraftMapRouting routing = getDraftMapRoutingEntity(routingId);
|
||||||
if (Objects.isNull(routing)) {
|
|
||||||
throw new DBException(ExceptionMapping.DATA_NOT_EXIST);
|
|
||||||
}
|
|
||||||
return MapRoutingVO.convert2VO(routing);
|
return MapRoutingVO.convert2VO(routing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MapRoutingDataVO getRoutingData(Long routingId) {
|
public MapRoutingDataVO getRoutingData(Long routingId) {
|
||||||
DraftMapRouting routing = draftMapRoutingDAO.selectByPrimaryKey(routingId);
|
DraftMapRouting routing = getDraftMapRoutingEntity(routingId);
|
||||||
if (Objects.isNull(routing)) {
|
|
||||||
throw new DBException(ExceptionMapping.DATA_NOT_EXIST);
|
|
||||||
}
|
|
||||||
return MapRoutingDataVO.convert2VO(routing);
|
return MapRoutingDataVO.convert2VO(routing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1745,24 +1726,15 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
DraftMapRoutingExample.Criteria criteria = routingExample.createCriteria();
|
DraftMapRoutingExample.Criteria criteria = routingExample.createCriteria();
|
||||||
criteria.andMapIdEqualTo(mapId);
|
criteria.andMapIdEqualTo(mapId);
|
||||||
List<DraftMapRouting> routings = draftMapRoutingDAO.selectByExampleWithBLOBs(routingExample);
|
List<DraftMapRouting> routings = draftMapRoutingDAO.selectByExampleWithBLOBs(routingExample);
|
||||||
if (CollectionUtils.isEmpty(routings)) {
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(!CollectionUtils.isEmpty(routings), "没有交路数据");
|
||||||
throw new DBException(ExceptionMapping.DATA_NOT_EXIST, "没有交路数据");
|
|
||||||
}
|
|
||||||
List<MapRoutingDataVO> routingVOList = routings.stream().map(MapRoutingDataVO::convert2VO).collect(Collectors.toList());
|
List<MapRoutingDataVO> routingVOList = routings.stream().map(MapRoutingDataVO::convert2VO).collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
||||||
return routingVOList;
|
return routingVOList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateRouting(Long routingId, MapRoutingVO routingVO) {
|
public void updateRouting(Long routingId, MapRoutingVO routingVO) {
|
||||||
DraftMapRouting routing = draftMapRoutingDAO.selectByPrimaryKey(routingId);
|
DraftMapRouting routing = getDraftMapRoutingEntity(routingId);
|
||||||
if (Objects.isNull(routing)) {
|
BusinessExceptionAssertEnum.DATA_ALREADY_EXIST.assertNotTrue(ifRoutingExist(routingVO, routingId));
|
||||||
throw new DBException(ExceptionMapping.DATA_NOT_EXIST);
|
|
||||||
}
|
|
||||||
if (ifRoutingExist(routingVO, routingId)) {
|
|
||||||
throw new DBException(ExceptionMapping.DATA_EXISTS);
|
|
||||||
}
|
|
||||||
// 更新
|
// 更新
|
||||||
DraftMapRouting newRouting = routingVO.convert2Draft();
|
DraftMapRouting newRouting = routingVO.convert2Draft();
|
||||||
newRouting.setId(routingId);
|
newRouting.setId(routingId);
|
||||||
@ -1771,13 +1743,8 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateRoutingData(Long routingId, MapRoutingDataVO routingVO) {
|
public void updateRoutingData(Long routingId, MapRoutingDataVO routingVO) {
|
||||||
DraftMapRouting routing = draftMapRoutingDAO.selectByPrimaryKey(routingId);
|
DraftMapRouting routing = getDraftMapRoutingEntity(routingId);
|
||||||
if (Objects.isNull(routing)) {
|
BusinessExceptionAssertEnum.DATA_ALREADY_EXIST.assertNotTrue(ifRoutingDataExist(routingVO, routingId));
|
||||||
throw new DBException(ExceptionMapping.DATA_NOT_EXIST);
|
|
||||||
}
|
|
||||||
if (ifRoutingDataExist(routingVO, routingId)) {
|
|
||||||
throw new DBException(ExceptionMapping.DATA_EXISTS);
|
|
||||||
}
|
|
||||||
// 更新
|
// 更新
|
||||||
DraftMapRouting newRouting = routingVO.convert2Draft();
|
DraftMapRouting newRouting = routingVO.convert2Draft();
|
||||||
newRouting.setId(routingId);
|
newRouting.setId(routingId);
|
||||||
@ -1850,10 +1817,7 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update3dMapData(Long map3dId, Map3dDataVO mapData3D) {
|
public void update3dMapData(Long map3dId, Map3dDataVO mapData3D) {
|
||||||
DraftMap3dDataWithBLOBs data = draftMap3dDataDAO.selectByPrimaryKey(map3dId);
|
DraftMap3dDataWithBLOBs data = getDraftMap3dDataEntity(map3dId);
|
||||||
if (Objects.isNull(data)) {
|
|
||||||
throw new DBException(ExceptionMapping.DATA_NOT_EXIST);
|
|
||||||
}
|
|
||||||
data.setAssets(mapData3D.getAssets());
|
data.setAssets(mapData3D.getAssets());
|
||||||
data.setSections(mapData3D.getSections());
|
data.setSections(mapData3D.getSections());
|
||||||
data.setSwitchs(mapData3D.getSwitchs());
|
data.setSwitchs(mapData3D.getSwitchs());
|
||||||
@ -1889,9 +1853,8 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
example.createCriteria()
|
example.createCriteria()
|
||||||
.andMapIdEqualTo(parkingTimeVO.getMapId())
|
.andMapIdEqualTo(parkingTimeVO.getMapId())
|
||||||
.andStationCodeEqualTo(parkingTimeVO.getStationCode());
|
.andStationCodeEqualTo(parkingTimeVO.getStationCode());
|
||||||
if (this.draftMapParkingTimeDAO.countByExample(example) > 0) {
|
BusinessExceptionAssertEnum.DATA_ALREADY_EXIST.assertTrue(this.draftMapParkingTimeDAO.countByExample(example) == 0,
|
||||||
throw new DBException(ExceptionMapping.DATA_EXISTS, "车站(" + parkingTimeVO.getStationCode() + ")停站时间数据已存在");
|
"车站(" + parkingTimeVO.getStationCode() + ")停站时间数据已存在");
|
||||||
}
|
|
||||||
DraftMapParkingTime draftMapParkingTime = parkingTimeVO.convert2Draft();
|
DraftMapParkingTime draftMapParkingTime = parkingTimeVO.convert2Draft();
|
||||||
this.draftMapParkingTimeDAO.insert(draftMapParkingTime);
|
this.draftMapParkingTimeDAO.insert(draftMapParkingTime);
|
||||||
}
|
}
|
||||||
@ -1913,21 +1876,13 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MapStationParkingTimeVO getStationParkTime(Long id) {
|
public MapStationParkingTimeVO getStationParkTime(Long id) {
|
||||||
DraftMapParkingTime draftMapParkingTime = this.draftMapParkingTimeDAO.selectByPrimaryKey(id);
|
DraftMapParkingTime draftMapParkingTime = getDraftMapParkingTimeEntity(id);
|
||||||
if (Objects.isNull(draftMapParkingTime)) {
|
|
||||||
throw new DBException(ExceptionMapping.DATA_NOT_EXIST,
|
|
||||||
String.format("id为[%s]的草稿车站停站时间数据不存在", id));
|
|
||||||
}
|
|
||||||
return MapStationParkingTimeVO.convert2VO(draftMapParkingTime);
|
return MapStationParkingTimeVO.convert2VO(draftMapParkingTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateStationParkTime(Long id, MapStationParkingTimeVO parkingTimeVO) {
|
public void updateStationParkTime(Long id, MapStationParkingTimeVO parkingTimeVO) {
|
||||||
DraftMapParkingTime draftMapParkingTime = this.draftMapParkingTimeDAO.selectByPrimaryKey(id);
|
DraftMapParkingTime draftMapParkingTime = getDraftMapParkingTimeEntity(id);
|
||||||
if (Objects.isNull(draftMapParkingTime)) {
|
|
||||||
throw new DBException(ExceptionMapping.DATA_NOT_EXIST,
|
|
||||||
String.format("id为[%s]的草稿车站停站时间数据不存在", id));
|
|
||||||
}
|
|
||||||
draftMapParkingTime.setSectionParkingTime(JsonUtils.writeValueAsString(parkingTimeVO.getParkingTimeVOList()));
|
draftMapParkingTime.setSectionParkingTime(JsonUtils.writeValueAsString(parkingTimeVO.getParkingTimeVOList()));
|
||||||
this.draftMapParkingTimeDAO.updateByPrimaryKeyWithBLOBs(draftMapParkingTime);
|
this.draftMapParkingTimeDAO.updateByPrimaryKeyWithBLOBs(draftMapParkingTime);
|
||||||
}
|
}
|
||||||
@ -1943,7 +1898,7 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
DraftMapWithBLOBs entity = getEntity(mapId);
|
DraftMapWithBLOBs entity = getEntity(mapId);
|
||||||
String logicData = entity.getLogicData();
|
String logicData = entity.getLogicData();
|
||||||
List<MapDestinationCodeDefinitionVO> list;
|
List<MapDestinationCodeDefinitionVO> list;
|
||||||
if (StringUtils.isBlank(logicData)) {
|
if (logicData.isBlank()) {
|
||||||
list = new ArrayList<>();
|
list = new ArrayList<>();
|
||||||
} else {
|
} else {
|
||||||
list = JsonUtils.read(logicData, JsonUtils.getCollectionType(ArrayList.class, MapDestinationCodeDefinitionVO.class));
|
list = JsonUtils.read(logicData, JsonUtils.getCollectionType(ArrayList.class, MapDestinationCodeDefinitionVO.class));
|
||||||
@ -1968,7 +1923,7 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
public PageVO<MapDestinationCodeDefinitionVO> pagedQueryOperationDefinitions(Long mapId, MapDestinationCodeDefinitionQueryVO queryVO) {
|
public PageVO<MapDestinationCodeDefinitionVO> pagedQueryOperationDefinitions(Long mapId, MapDestinationCodeDefinitionQueryVO queryVO) {
|
||||||
DraftMapWithBLOBs entity = getEntity(mapId);
|
DraftMapWithBLOBs entity = getEntity(mapId);
|
||||||
String logicData = entity.getLogicData();
|
String logicData = entity.getLogicData();
|
||||||
if (StringUtils.isBlank(logicData)) {
|
if (logicData.isBlank()) {
|
||||||
return new PageVO<>(queryVO.getPageNum(), queryVO.getPageSize(), 0, new ArrayList<>());
|
return new PageVO<>(queryVO.getPageNum(), queryVO.getPageSize(), 0, new ArrayList<>());
|
||||||
}
|
}
|
||||||
List<MapDestinationCodeDefinitionVO> vos = JsonUtils.read(logicData, JsonUtils.getCollectionType(ArrayList.class, MapDestinationCodeDefinitionVO.class));
|
List<MapDestinationCodeDefinitionVO> vos = JsonUtils.read(logicData, JsonUtils.getCollectionType(ArrayList.class, MapDestinationCodeDefinitionVO.class));
|
||||||
@ -2021,7 +1976,13 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
private DraftMapAutoSignal getDraftMapAutoSignalEntity(Long autoSignalId){
|
private DraftMapParkingTime getDraftMapParkingTimeEntity(Long id) {
|
||||||
|
DraftMapParkingTime draftMapParkingTime = this.draftMapParkingTimeDAO.selectByPrimaryKey(id);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(draftMapParkingTime, String.format("id为[%s]的草稿车站停站时间数据不存在", id));
|
||||||
|
return draftMapParkingTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
private DraftMapAutoSignal getDraftMapAutoSignalEntity(Long autoSignalId) {
|
||||||
DraftMapAutoSignal autoSignal = findDraftMapAutoSignalEntity(autoSignalId);
|
DraftMapAutoSignal autoSignal = findDraftMapAutoSignalEntity(autoSignalId);
|
||||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(autoSignal, String.format("id为[%s]的自动信号不存在", autoSignalId));
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(autoSignal, String.format("id为[%s]的自动信号不存在", autoSignalId));
|
||||||
return autoSignal;
|
return autoSignal;
|
||||||
@ -2076,4 +2037,16 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(draftMapAutoReentry);
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(draftMapAutoReentry);
|
||||||
return draftMapAutoReentry;
|
return draftMapAutoReentry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private DraftMapRouting getDraftMapRoutingEntity(Long routingId) {
|
||||||
|
DraftMapRouting routing = draftMapRoutingDAO.selectByPrimaryKey(routingId);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(routing);
|
||||||
|
return routing;
|
||||||
|
}
|
||||||
|
|
||||||
|
private DraftMap3dDataWithBLOBs getDraftMap3dDataEntity(Long map3dId) {
|
||||||
|
DraftMap3dDataWithBLOBs data = draftMap3dDataDAO.selectByPrimaryKey(map3dId);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(data);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user