From 6bfb45f10963c5206c7a29d0751d207997d8b906 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Wed, 15 Jun 2022 09:12:26 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=BF=90=E8=A1=8C=E6=96=B9=E5=90=91?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=A4=84=E7=90=86=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/build/InterlockBuilder2.java | 3 +++ .../rtss/simulation/cbtc/data/map/StationDirection.java | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) 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) {