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, "操作异常:非接车方向"); }