diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/CTCService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/CTCService.java index dcb9acc3f..91007adfd 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/CTCService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/CTCService.java @@ -4,15 +4,10 @@ import club.joylink.rtss.simulation.cbtc.CTC.data.CtcRepository; import club.joylink.rtss.simulation.cbtc.CTC.data.CtcStationRunPlanLog; import club.joylink.rtss.simulation.cbtc.CTC.data.RouteSequence; import club.joylink.rtss.simulation.cbtc.Simulation; -import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository; import club.joylink.rtss.simulation.cbtc.data.map.Station; import org.springframework.stereotype.Component; import java.time.LocalTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; @Component public class CTCService { @@ -88,10 +83,10 @@ public class CTCService { /** * 同意发车预告 */ - public void agreeDepartureNotice(Simulation simulation, String stationCode, String tripNumber) { - CtcStationRunPlanLog currentStationPlan = getCtcStationRunPlanByRunPlanCode(simulation, stationCode, tripNumber); + public void agreeDepartureNotice(Simulation simulation, String stationCode, String runPlanCode) { + CtcStationRunPlanLog currentStationPlan = getCtcStationRunPlanByRunPlanCode(simulation, stationCode, runPlanCode); Station previousStation = currentStationPlan.getPreviousStation(); - CtcStationRunPlanLog previousStationPlan = getCtcStationRunPlanByRunPlanCode(simulation, previousStation.getCode(), tripNumber); + CtcStationRunPlanLog previousStationPlan = getCtcStationRunPlanByRunPlanCode(simulation, previousStation.getCode(), runPlanCode); currentStationPlan.finishReceivingNotice(); previousStationPlan.finishDepartureNotice(); } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/build/SimulationBuilder.java b/src/main/java/club/joylink/rtss/simulation/cbtc/build/SimulationBuilder.java index 2ab42c145..065a909cb 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/build/SimulationBuilder.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/build/SimulationBuilder.java @@ -378,7 +378,7 @@ public class SimulationBuilder { for (int index = 0, len = tripPlan.getPlanList().size(); index < len; index++) { ctcRunPlanParam = new CtcRunPlanParam(); stationPlan = tripPlan.getPlanList().get(index); - ctcRunPlanParam.setRunPlanCode(codePrefix + index); + ctcRunPlanParam.setRunPlanCode(codePrefix); // 目前将到达、出发车次一直 ctcRunPlanParam.setTripNumber(tripPlan.getTripNumber()); ctcRunPlanParam.setArriveTripNumber(tripPlan.getTripNumber()); @@ -414,9 +414,9 @@ public class SimulationBuilder { /** * 根据原有的大铁运行计划生成运行参数实体 * - * @param arriveFlag 到达 - * @param stationPlan 运行计划 - * @param ctcRunPlanParam 参数实体 + * @param arriveFlag 到达 + * @param stationPlan 运行计划 + * @param ctcRunPlanParam 参数实体 */ private static void initRunPlanParam(boolean arriveFlag, StationPlan stationPlan, CtcRunPlanParam ctcRunPlanParam, Station adjacentStation) { StationDirection.ReceiveAndDeliverModel defaultRunStatus;