From 48721b53f8a58da09c6db038153b0a7d126dac50 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Mon, 20 Jun 2022 17:00:28 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=A1=8C=E8=BD=A6=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E5=90=8C=E6=84=8F=E6=97=B6=E5=A1=AB=E5=85=A5=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=91=20=E3=80=90=E8=A1=8C=E8=BD=A6?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E9=87=8D=E7=BD=AE=E6=97=B6=EF=BC=8C=E5=88=B0?= =?UTF-8?q?=E8=BE=BE=E6=97=B6=E9=97=B4=E9=87=8D=E7=BD=AE=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../club/joylink/rtss/simulation/cbtc/CTC/CTCService.java | 8 ++++---- .../simulation/cbtc/CTC/data/CtcStationRunPlanLog.java | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) 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();