新增:列车抵达站台时更新扣车状态

This commit is contained in:
joylink_zhangsai 2021-06-08 13:21:06 +08:00
parent 5807323b89
commit 15338c67d9

View File

@ -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<Stand> 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) {