diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsPlanService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsPlanService.java index 09008298e..8443fde1a 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsPlanService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/AtsPlanService.java @@ -6,10 +6,7 @@ import club.joylink.rtss.simulation.cbtc.constant.RunLevel; import club.joylink.rtss.simulation.cbtc.constant.SimulationModule; import club.joylink.rtss.simulation.cbtc.data.CalculateService; import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository; -import club.joylink.rtss.simulation.cbtc.data.map.Route; -import club.joylink.rtss.simulation.cbtc.data.map.Section; -import club.joylink.rtss.simulation.cbtc.data.map.Signal; -import club.joylink.rtss.simulation.cbtc.data.map.Station; +import club.joylink.rtss.simulation.cbtc.data.map.*; import club.joylink.rtss.simulation.cbtc.data.plan.RealRun; import club.joylink.rtss.simulation.cbtc.data.plan.StationPlan; import club.joylink.rtss.simulation.cbtc.data.plan.TripPlan; @@ -696,6 +693,15 @@ public class AtsPlanService { this.atsStandService.updateStandParkTime(section, parkTime); // 更新停站时间 this.onboardAtpApiService.updateStationParkTime(simulation, train.getGroupNumber(), parkTime); + // 更新扣车状态 + List standList = section.getStandList(); + if (!CollectionUtils.isEmpty(standList)) { + if (standList.stream().anyMatch(Stand::isHoldTrain)) { + onboardAtpApiService.standHoldTrain(simulation, train.getGroupNumber()); + } else { + onboardAtpApiService.standCancelHoldTrain(simulation, train.getGroupNumber()); + } + } } public void handleTrainOnTransfer(Simulation simulation, TrainInfo train, Section section) {