From 548564d14693b14b04bb0314094516b7a19d14ce Mon Sep 17 00:00:00 2001 From: Jade Date: Tue, 28 Sep 2021 14:53:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E6=AE=B5=E8=81=94=E9=94=81?= =?UTF-8?q?=E7=94=9F=E6=88=90-=E7=BB=88=E7=AB=AF=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DraftMapCiDataGeneratorImpl.java | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/main/java/club/joylink/rtss/services/draftData/DraftMapCiDataGeneratorImpl.java b/src/main/java/club/joylink/rtss/services/draftData/DraftMapCiDataGeneratorImpl.java index 96e2e42b3..b2918421f 100644 --- a/src/main/java/club/joylink/rtss/services/draftData/DraftMapCiDataGeneratorImpl.java +++ b/src/main/java/club/joylink/rtss/services/draftData/DraftMapCiDataGeneratorImpl.java @@ -755,7 +755,8 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator { || (Signal.SignalType.OUTBOUND.equals(endSignalType) && Signal.SignalType.SHUNTING2.equals(startSignalType))) { // 列车进路 signalAspect = SignalAspect.Y; - if (Objects.nonNull(endOpSignal) && endOpSignalType.equals(startSignalType)) { + if (Objects.nonNull(endOpSignal) && (Signal.SignalType.SHUNTING2.equals(endOpSignalType) + || Signal.SignalType.OUTBOUND.equals(endOpSignalType))) { clickEnd = endOpSignal; } else { clickEnd = endSignal; @@ -766,9 +767,8 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator { if (Objects.nonNull(nextOpSignal)) { // 下个区段反向信号机存在,则使用 clickEnd = nextOpSignal; - } else if ((Objects.isNull(nextSection) || Signal.SignalType.BLOCKING.equals(endSignalType)) - && Objects.nonNull(endOpSignal) && sectionPath.getSectionList().size() > 1) { - // 尽头/阻挡信号机,使用反向信号机,过滤列车兼调车信号机至尽头 + } else if (Objects.nonNull(endOpSignal) && sectionPath.getSectionList().size() > 1) { + // 使用反向信号机,过滤列车兼调车信号机至尽头 clickEnd = endOpSignal; } else { // 其余设置为终端信号机,可能为null @@ -1961,17 +1961,11 @@ public class DraftMapCiDataGeneratorImpl implements DraftMapCiDataGenerator { return; } // 调车信号机 -> 列车兼调车信号机, 存在只有一个区段的情况 - if (signal.getType().equals(Signal.SignalType.SHUNTING2)) { - routePathList.add(tempPath); - return; - } // 调车信号机 -> 阻挡信号机 - if (signal.getType().equals(Signal.SignalType.BLOCKING)) { - routePathList.add(tempPath); - return; - } // 调车信号机 -> 出段信号机 - if (signal.getType().equals(Signal.SignalType.OUTBOUND)) { + if (Signal.SignalType.SHUNTING2.equals(signal.getType()) + || Signal.SignalType.BLOCKING.equals(signal.getType()) + || Signal.SignalType.OUTBOUND.equals(signal.getType())) { routePathList.add(tempPath); return; }