【增加邻站进路办理】

【修改指示灯状态不变化BUG】

Signed-off-by: weizhihong <weizhihong@joylink.club>
This commit is contained in:
weizhihong 2022-04-22 15:37:51 +08:00
parent 739ac78060
commit 83b92094c5
2 changed files with 6 additions and 6 deletions

View File

@ -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);
}

View File

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