From f42923f100237aa49c0e27006e45aae3c84bc1bc Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Wed, 10 Aug 2022 09:52:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=A7=E9=93=81=E5=BC=95?= =?UTF-8?q?=E5=AF=BC=E8=BF=9B=E8=B7=AF=E7=AD=9B=E9=80=89=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/CI/CiApiServiceImpl2.java | 9 ++++++++- .../cbtc/CI/device/CiSwitchControlService.java | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiServiceImpl2.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiServiceImpl2.java index 80b11e3f6..5000ad0b8 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiServiceImpl2.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/CiApiServiceImpl2.java @@ -458,7 +458,14 @@ public class CiApiServiceImpl2 implements CiApiService { collect = signal.getRouteList().stream() .filter(Route::isTrainRoute) .filter(route1 -> !route1.hasReverseSwitch()) - .filter(Route::isAllSwitchIsOnPos) //大铁直接办理引导进路需道岔在正确位置 + .filter(route1 -> { + List switchList = route1.getSwitchList(); + if (!CollectionUtils.isEmpty(switchList)) { + return switchList.stream() + .allMatch(se -> se.isOnPosition() || se.getASwitch().isGuideMasterLock()); + } + return true; + }) //大铁直接办理引导进路需道岔在正确位置或道岔引导总锁 .collect(Collectors.toList()); BusinessExceptionAssertEnum.OPERATION_FAIL.assertCollectionNotEmpty(collect, signal.debugStr() + "无符合条件的进路"); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiSwitchControlService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiSwitchControlService.java index a39d8df72..14be447c2 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiSwitchControlService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiSwitchControlService.java @@ -157,7 +157,7 @@ public class CiSwitchControlService { } /** - * 批量转动道岔到指定位置 + * 确保道岔位置正确 */ public boolean ensureSwitchPosCurrent(Simulation simulation, List switchElements, boolean guideSetting) { boolean allOn = true;