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 953cd86f9..e97c43cfa 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 @@ -19,7 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import java.util.List; import java.util.Optional; @@ -125,13 +124,14 @@ public class AssistService { if (button == null) { throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:按钮不存在"); } - List stationList = simulation.getRepository().getStationList(); - // 当前站位置 - int index = stationList.indexOf(button.getStation()); - // 检查是否是首站 - if (index == 0 || index == stationList.size() - 1) { - throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:首站不可改方"); - } + // 由数据控制,不做逻辑判断 +// List stationList = simulation.getRepository().getStationList(); +// // 当前站位置 +// int index = stationList.indexOf(button.getStation()); +// // 检查是否是首站 +// if (index == 0 || index == stationList.size() - 1) { +// throw new SimulationException(SimulationExceptionType.Operation_Cannot_handed, "操作异常:首站不可改方"); +// } // 获取区间指示灯 Indicator sectionIndicator = getStationIndicatorByType(button.getStation(), button.getLabel(), IndicatorTypeEnum.SECTION); // 获取区间路径,判断本站台与相邻站台是否空闲