From 83b92094c52ae0da74b373b8cc3a34e1c70a829f Mon Sep 17 00:00:00 2001 From: weizhihong Date: Fri, 22 Apr 2022 15:37:51 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E9=82=BB=E7=AB=99?= =?UTF-8?q?=E8=BF=9B=E8=B7=AF=E5=8A=9E=E7=90=86=E3=80=91=20=E3=80=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8C=87=E7=A4=BA=E7=81=AF=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=8D=E5=8F=98=E5=8C=96BUG=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: weizhihong --- .../cbtc/ATS/operation/handler/AssistOperateHandler.java | 8 ++++---- .../simulation/cbtc/ATS/service/assist/AssistService.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/AssistOperateHandler.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/AssistOperateHandler.java index 79ebe8d4c..e7da27dbc 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/AssistOperateHandler.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/operation/handler/AssistOperateHandler.java @@ -25,9 +25,9 @@ public class AssistOperateHandler { * @param label 按钮类型 */ @OperateHandlerMapping(type = Operation.Type.ASSIST_PRESS_DOWN_TURN_DIRECTION) - public void pressDownTurnDirection(Simulation simulation, String stationCode, DirectionLabelEnum label) { + public void pressDownTurnDirection(Simulation simulation, String stationCode, DirectionLabelEnum labelEnum) { assistService.changeButtonAspect(simulation, - stationCode, label, ButtonTypeEnum.CHANGE_DIRECTION, Boolean.TRUE + stationCode, labelEnum, ButtonTypeEnum.CHANGE_DIRECTION, Boolean.TRUE , assistService.turnDirectionPressDownValid , assistService.turnDirectionPressDownDo); } @@ -40,9 +40,9 @@ public class AssistOperateHandler { * @param label 按钮类型 */ @OperateHandlerMapping(type = Operation.Type.ASSIST_PRESS_UP_TURN_DIRECTION) - public void pressUpTurnDirection(Simulation simulation, String stationCode, DirectionLabelEnum label) { + public void pressUpTurnDirection(Simulation simulation, String stationCode, DirectionLabelEnum labelEnum) { assistService.changeButtonAspect(simulation, - stationCode, label, ButtonTypeEnum.CHANGE_DIRECTION, Boolean.FALSE + stationCode, labelEnum, ButtonTypeEnum.CHANGE_DIRECTION, Boolean.FALSE , null , assistService.turnDirectionPressUpDo); } 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 604ea061b..540e6250a 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 @@ -147,7 +147,7 @@ public class AssistService { if (!CollectionUtils.isEmpty(nextStation.getIndicatorList())) { nextStation.getIndicatorList() .stream() - .filter(indicator -> routeCode.equals(indicator.getCode())) + .filter(indicator -> indicator.getRoute() != null && routeCode.equals(indicator.getRoute().getCode())) .forEach(indicator -> { log.info(indicator.getCode() + indicator.getType()); indicator.setChangeDirection(Boolean.FALSE); @@ -194,7 +194,7 @@ public class AssistService { throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:未停靠列车"); } // 判断本站台是否是接车站台 - boolean isReceive = sectionIndicator.getStand().isRight() == train.isRight(); + boolean isReceive = button.getStand().isRight() == train.isRight(); if (!isReceive) { throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:非接车方向"); }