增加<是大铁线路?>联锁生成配置

This commit is contained in:
joylink_zhangsai 2022-05-05 16:37:05 +08:00
parent 0a7c4b2533
commit 9136e3e19e
2 changed files with 22 additions and 7 deletions

View File

@ -52,7 +52,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
MapCiGenerateConfig generateConfig = mapVO.getGraphDataNew().getGenerateConfig();
Map<String, MapElement> deviceMap = buildResult.getDeviceMap();
// 联锁关系数据生成
CiGenerateResult result = this.generate(deviceMap, generateConfig);
CiGenerateResult result = this.generate(mapId, deviceMap, generateConfig);
if (!CollectionUtils.isEmpty(result.getErrMsgList())) {
for (String errMsg : result.getErrMsgList()) {
log.warn(String.format("联锁数据生成警告信息:[%s]", errMsg));
@ -269,7 +269,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
}
private CiGenerateResult generate(Map<String, MapElement> deviceMap, MapCiGenerateConfig config) {
private CiGenerateResult generate(Long mapId, Map<String, MapElement> deviceMap, MapCiGenerateConfig config) {
List<String> errorList = new ArrayList<>();
List<AutoSignal> autoSignalList = new ArrayList<>();
List<Route> generatedRouteList = new ArrayList<>();
@ -422,6 +422,20 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
// List<MapStationParkingTimeVO> parkTimeList = this.parkTimeGenerator.generate(deviceMap, errorList);
//目的地码生成
List<DestinationCodeDefinition> destinationCodeDefinitionList
= generateDestinationCodeDefination(config, sectionList, stationList);
//大铁进路在生成的结果里看不到进路
if (config.isRailway()) {
draftMapRouteService.generateRailwayRoute(mapId);
}
return new CiGenerateResult(errorList, approachList,
autoSignalList, generatedRouteList, generatedOverlapList, flsList,
generateCycleList, generateRoutingList, destinationCodeDefinitionList);
}
private List<DestinationCodeDefinition> generateDestinationCodeDefination(MapCiGenerateConfig config, List<Section> sectionList, List<Station> stationList) {
List<DestinationCodeDefinition> destinationCodeDefinitionList = new ArrayList<>();
if (config.isGenerateDestination()) {
String code = null;
@ -481,11 +495,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator {
}
}
}
return new CiGenerateResult(errorList, approachList,
autoSignalList, generatedRouteList, generatedOverlapList, flsList,
generateCycleList, generateRoutingList, destinationCodeDefinitionList);
return destinationCodeDefinitionList;
}
/**

View File

@ -130,6 +130,11 @@ public class MapCiGenerateConfig {
/** 是否处理停车场/车辆段逻辑 */
private boolean handleDepot;
/**
* 是大铁线路
*/
private boolean railway;
//--------------------联锁数据生成配置end-------------------
}