diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/build/InterlockBuilder2.java b/src/main/java/club/joylink/rtss/simulation/cbtc/build/InterlockBuilder2.java index 2e52113a1..effa53598 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/build/InterlockBuilder2.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/build/InterlockBuilder2.java @@ -1686,6 +1686,9 @@ public class InterlockBuilder2 { model.setSectionList(sectionList); } model.modifyRunStatus(); + if (model.getCurrentRouteList() != null) { // 获取默认方向 + model.setRight(model.getCurrentRouteList().stream().anyMatch(Route::isRight)); + } Station station = (Station) elementMap.get(stationDirection.getStationCode()); model.setStation(station); station.getStationDirectionMap().put(model.getLabelEnum(), model); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/StationDirection.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/StationDirection.java index 2b46f93a9..cbdc100f6 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/StationDirection.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/StationDirection.java @@ -167,9 +167,6 @@ public class StationDirection extends MapNamedElement { this.runStatus = this.getDefaultReceiveAndDeliver(); this.defaultRunStatus = this.getDefaultReceiveAndDeliver(); this.currentRouteList = getNowRouteList(); - if (DirectionRunModel.A.equals(this.runModel)) { - this.right = this.currentRouteList.stream().anyMatch(Route::isRight); - } } public StationDirection(DraftMapStationDirection draftMapStationDirection) { @@ -180,9 +177,6 @@ public class StationDirection extends MapNamedElement { this.defaultRunStatus = draftMapStationDirection.getRunStatus(); this.currentRouteList = getNowRouteList(); this.isDataConfig = true; - if (DirectionRunModel.A.equals(this.runModel)) { - this.right = this.currentRouteList.stream().anyMatch(Route::isRight); - } } public StationDirection(String code, String name) {