From 8460cd425e4b8dcc7fceec163220bb330f0f60f1 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Thu, 16 Jun 2022 18:11:26 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=BF=90=E8=A1=8C=E6=96=B9=E5=90=91?= =?UTF-8?q?=E6=94=B9=E6=96=B9=E5=90=8E=E4=B8=8D=E8=83=BD=E5=8F=98=E5=9B=9E?= =?UTF-8?q?BUG=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../simulation/cbtc/data/map/StationDirection.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/StationDirection.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/StationDirection.java index 449804731..179850d84 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/StationDirection.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/StationDirection.java @@ -353,11 +353,19 @@ public class StationDirection extends MapNamedElement { public boolean monitorRouteChangeStatus() { boolean isChange = false; for (Route r : this.receiveRouteList) { - isChange = isChange || (changeDirectionTime != null && r.isSetting() && r.getSettingStartTime().isAfter(changeDirectionTime)); + if (changeDirectionTime != null && r.isSetting()) { + isChange = isChange || r.getSettingStartTime().isAfter(changeDirectionTime); + } else { + isChange = isChange || !Objects.equals(r.isSetting(), routeSettingStatusMap.get(r.getCode())); + } routeSettingStatusMap.put(r.getCode(), r.isSetting()); } for (Route r : this.deliverRouteList) { - isChange = isChange || (changeDirectionTime != null && r.isSetting() && r.getSettingStartTime().isAfter(changeDirectionTime)); + if (changeDirectionTime != null && r.isSetting()) { + isChange = isChange || r.getSettingStartTime().isAfter(changeDirectionTime); + } else { + isChange = isChange || !Objects.equals(r.isSetting(), routeSettingStatusMap.get(r.getCode())); + } routeSettingStatusMap.put(r.getCode(), r.isSetting()); } return isChange;