From 4d12f520d18b4ab38c6560c5e9f1a6ad47c4f42a Mon Sep 17 00:00:00 2001 From: weizhihong Date: Mon, 25 Apr 2022 10:15:41 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=94=B9=E6=96=B9=E6=97=B6=E5=88=97?= =?UTF-8?q?=E8=BD=A6=E6=8D=A2=E7=AB=AF=E6=93=8D=E4=BD=9C=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/ATS/service/assist/AssistService.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/assist/AssistService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/assist/AssistService.java index c3d674539..5f4dc5d1c 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/assist/AssistService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/assist/AssistService.java @@ -151,11 +151,11 @@ public class AssistService { if (train == null || !train.isStop()) { throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:未停靠列车"); } - // 判断本站台是否是接车站台 - boolean isReceive = button.getStand().isRight() == train.isRight(); - if (!isReceive) { - throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:非接车方向"); - } + // 判断本站台是否是接车站台,这里不做判断,在改方实际操作时,判断列车 +// boolean isReceive = button.getStand().isRight() == train.isRight(); +// if (!isReceive) { +// throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:非接车方向"); +// } }; /** @@ -171,8 +171,11 @@ public class AssistService { if (train == null || !train.isStop()) { throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:未停靠列车"); } - // 列车换端 - atpService.turnDirectionImmediately(train); + // 判断列车是否要执行换端 + if (button.getStand().isRight() == train.isRight()) { + // 列车换端 + atpService.turnDirectionImmediately(train); + } // 获取发车指示灯 Indicator deliverIndicator = getStationIndicatorByType(button.getStation(), button.getLabel(), IndicatorTypeEnum.DELIVER); // 办进路