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 f23d9396c..cebd939ec 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 @@ -10,10 +10,9 @@ import club.joylink.rtss.simulation.cbtc.data.map.Route; import club.joylink.rtss.simulation.cbtc.data.map.Station; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; import java.time.LocalTime; -import java.util.Objects; +import java.time.format.DateTimeFormatter; @Component public class CTCService { @@ -98,8 +97,9 @@ public class CTCService { CtcStationRunPlanLog previousStationPlan = getCtcStationRunPlanByRunPlanCode(simulation, previousStation.getCode(), runPlanCode); currentStationPlan.finishReceivingNotice(); previousStationPlan.finishDepartureNotice(); - currentStationPlan.getArriveRunPlan().setAdjacentMessageTime(simulation.getSystemTime().toString()); - previousStationPlan.getDepartRunPlan().setAdjacentMessageTime(simulation.getSystemTime().toString()); + String systemTime = simulation.getCorrectSystemTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:dd")); + currentStationPlan.getArriveRunPlan().setAdjacentMessageTime(systemTime); + previousStationPlan.getDepartRunPlan().setAdjacentMessageTime(systemTime); } /** diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/CtcStationRunPlanLog.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/CtcStationRunPlanLog.java index f2f13c5b9..c76e72fe7 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/CtcStationRunPlanLog.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CTC/data/CtcStationRunPlanLog.java @@ -365,6 +365,7 @@ public class CtcStationRunPlanLog { this.adjacentDepart = null; this.adjacentMessage = NO; this.occupiedCode = null; + this.adjacentMessageTime = null; this.trainTypeMap.clear(); this.processTypeMap.clear();