diff --git a/src/main/java/club/joylink/rtss/services/draftData/DraftMapCiDataGeneratorImpl.java b/src/main/java/club/joylink/rtss/services/draftData/DraftMapCiDataGeneratorImpl.java index 3d328b86e..7b2689c52 100644 --- a/src/main/java/club/joylink/rtss/services/draftData/DraftMapCiDataGeneratorImpl.java +++ b/src/main/java/club/joylink/rtss/services/draftData/DraftMapCiDataGeneratorImpl.java @@ -746,8 +746,10 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator { Signal nextOpSignal = Objects.nonNull(nextSection) ? nextSection.getSignalOf(!right) : null; Signal clickEnd; + SignalAspect signalAspect; if (startSignalType.equals(endSignalType) && Signal.SignalType.SHUNTING2.equals(startSignalType)) { // 列车进路 + signalAspect = SignalAspect.Y; if (Objects.nonNull(endOpSignal) && endOpSignalType.equals(startSignalType)) { clickEnd = endOpSignal; } else { @@ -755,6 +757,7 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator { } } else { // 调车进路 + signalAspect = SignalAspect.W; if (Objects.nonNull(nextOpSignal)) { // 下个区段反向信号机存在,则使用 clickEnd = nextOpSignal; @@ -772,12 +775,12 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator { // 构建进路 String code = routeCodeGenerator.next(); String name = String.format("%s-%s", startSignal.getShowName(), endName); - Route route = this.buildRoute(code, name, startSignal, endSignal, clickEnd, sectionPath, - null, config.isRouteSignalAlwaysGreen(), config.isRouteInterlockDoNotIncludeStandHoldTrain()); + Route route = this.buildRouteDepot(code, name, startSignal, endSignal, clickEnd, sectionPath, signalAspect); routeList.add(route); } } else { - errorList.add(String.format("以[%s(%s)]为始端信号的进路未搜索到", startSignal.getShowName(), startSignal.getCode())); + errorList.add(String.format("以[%s(%s)]为始端信号(%s)的进路未搜索到", startSignal.getShowName(), + startSignal.getCode(), startSignal.getType())); } return routeList; } @@ -1493,6 +1496,24 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator { return route; } + /** + * 构建车辆段进路 + */ + private Route buildRouteDepot(String code, String name, Signal start, Signal end, + Signal endButton, SectionPath sectionPath, SignalAspect signalAspect) { + Route route = new Route(code, name); + route.setInterlockStation(start.getInterlockStation()); + route.setStart(start); + route.setDestination(end); + route.setDestinationButtonSignal(endButton); + route.setSectionList(sectionPath.getSectionList()); + route.setSwitchList(sectionPath.getSwitchList()); + route.setAspect(signalAspect); + route.setPsdList(Collections.emptyList()); + route.setEspList(Collections.emptyList()); + return route; + } + /** * 根据路径创建延续保护 *