From 6825eb02bdcad85e874b1d0384c09a93ecd5fd1f Mon Sep 17 00:00:00 2001 From: tiger_zhou <123456> Date: Thu, 4 May 2023 14:06:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=BD=A6=E5=9B=BE=E4=BE=8B=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BD=8D=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ATS/service/diagram/InOutBoundService.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/diagram/InOutBoundService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/diagram/InOutBoundService.java index 8a3332ae9..c7c8cdde8 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/diagram/InOutBoundService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/diagram/InOutBoundService.java @@ -21,21 +21,17 @@ public class InOutBoundService implements CalculateDiagram{ @Override public Optional calculate(Simulation simulation, TrainInfo trainInfo, VirtualRealityTrain train, SortDiagramStation diagramStation){ - if(trainInfo.isInbound()){ - StationDiagram sd = new StationDiagram(train); - sd.setShowTrainDiagram(false); - return Optional.of(sd); - } Station nextStation = train.getNextStation(); -// SectionPosition headPos = train.getHeadPosition(); - SectionPosition tailPos = train.getTailPosition(); - Station startStation = diagramStation.findFirstNotDepotStation(train.isRight()); - if(Objects.isNull(nextStation)){ + if(trainInfo.isInbound() || Objects.isNull(nextStation)){ StationDiagram sd = new StationDiagram(train); sd.setShowTrainDiagram(false); log.debug("列车[{}] 出库 方向[{}]",train.getGroupNumber(),train.isRight()); return Optional.of(sd); - } else if(nextStation.isDepot() && !tailPos.getSection().isStandTrack()) { + } +// SectionPosition headPos = train.getHeadPosition(); + SectionPosition tailPos = train.getTailPosition(); + Station startStation = diagramStation.findFirstNotDepotStation(train.isRight()); + if(nextStation.isDepot() && !tailPos.getSection().isStandTrack()) { //列车入库,车尾离开站台轨 StationDiagram sd = new StationDiagram(train); sd.setShowTrainDiagram(false);