车站上的引导总锁状态

This commit is contained in:
joylink_zhangsai 2022-05-11 16:40:12 +08:00
parent 379baf50d0
commit 76fe31d729
4 changed files with 13 additions and 6 deletions

View File

@ -31,6 +31,8 @@ public class InterlockBuilder2 {
MapLogicDataNewVO logicData = map.getLogicDataNew();
MapGraphDataNewVO graphData = map.getGraphDataNew();
MapCiGenerateConfig generateConfig = graphData.getGenerateConfig();
Map<String, MapElement> elementMap = mapDataBuildResult.getDeviceMap();
List<String> errMsgList = mapDataBuildResult.getErrMsgList();
// ------------侧防start-------------
@ -47,8 +49,7 @@ public class InterlockBuilder2 {
// 接近区段
InterlockBuilder2.buildApproachSections(logicData, elementMap, errMsgList);
// ------------进路start-------------
List<MapRouteNewVO> routeList = logicData.getRouteList();
if (!CollectionUtils.isEmpty(routeList) && !CollectionUtils.isEmpty(routeList.get(0).getBtnCodeList())) {
if (generateConfig != null && generateConfig.isRailway()) {
InterlockBuilder2.buildRailRoute(graphData, logicData, elementMap, errMsgList, flsMap);
} else {
InterlockBuilder2.buildRoute(logicData, elementMap, errMsgList, flsMap);
@ -88,7 +89,7 @@ public class InterlockBuilder2 {
// if (!errMsgList.isEmpty()) {
// return;
// }
InterlockBuilder2.buildRoutePathFromStationRunLevel(map.getLineCode(), stationRunLevelList, mapDataBuildResult, errMsgList);
InterlockBuilder2.buildRoutePathFromStationRunLevel(generateConfig, stationRunLevelList, mapDataBuildResult, errMsgList);
// buildParkTimes(logicData, elementMap, mapDataBuildResult.getParkTimeMap(), errMsgList);
}
@ -1095,12 +1096,12 @@ public class InterlockBuilder2 {
return stationRunLevelList;
}
private static void buildRoutePathFromStationRunLevel(String lineCode, List<StationRunLevel> stationRunLevelList,
private static void buildRoutePathFromStationRunLevel(MapCiGenerateConfig generateConfig, List<StationRunLevel> stationRunLevelList,
SimulationBuilder.SimulationDeviceBuildResult buildResult,
List<String> errMsgList) {
Map<String, List<RoutePath>> routePathMap = buildResult.getRoutePathMap();
Map<String, MapElement> deviceMap = buildResult.getDeviceMap();
if (lineCode.equals("16")) {
if (generateConfig != null && generateConfig.isRailway()) {
List<Section> sections = deviceMap.values().stream()
.filter(device -> device instanceof Section)
.map(device -> (Section) device)

View File

@ -214,6 +214,8 @@ public class Station extends MayOutOfOrderDevice {
emergencyController = false;
controlApplicant = null;
preResetValidDuration = new AtomicInteger(0);
sGuideMasterLock = false;
xGuideMasterLock = false;
}
public List<Stand> getStandOf(boolean right) {

View File

@ -194,6 +194,8 @@ public class StationStatus extends DeviceStatus {
statusVO.setControlApplicant(controlApplicant);
statusVO.setPreResetValidDuration(preResetValidDuration);
statusVO.setInterlockMachineStarting(interlockMachineStarting);
statusVO.setSGuideMasterLock(sGuideMasterLock);
statusVO.setXGuideMasterLock(xGuideMasterLock);
return statusVO;
}
}

View File

@ -79,9 +79,11 @@ public class StationStatusVO extends DeviceStatusVO {
@JsonSerialize(using = Boolean2NumSerializer.class)
private Boolean interlockMachineStarting;
@JsonSerialize(using = Boolean2NumSerializer.class)
private Boolean sGuideMasterLock;
private Boolean XGuideMasterLock;
@JsonSerialize(using = Boolean2NumSerializer.class)
private Boolean xGuideMasterLock;
public StationStatusVO(Station station) {
super(station.getCode(), station.getDeviceType());