From 202e0bb01f5340cdd4bf1bac18b9400e3eb0d038 Mon Sep 17 00:00:00 2001 From: walker-sheng Date: Mon, 1 Feb 2021 13:53:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E8=B7=AF=E9=80=BB=E8=BE=91bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/CI/service/RouteService.java | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/RouteService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/RouteService.java index 4d5b0fa56..283d94616 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/RouteService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/service/RouteService.java @@ -390,27 +390,24 @@ public class RouteService { log.debug(section.debugStr() + "因<预先锁闭>锁闭"); } } - if (!route.isRequisition()) { - // 征用设备 - // 道岔位置转换 - List switchList = route.getSwitchList(); - this.routeSwitchTurn(simulation, switchList); - this.routeFlsControl(simulation, route.getFlsList()); - if (config.isLockFirst()) { - for (SwitchElement switchElement : switchList) { - switchElement.getASwitch().routeLock(); - } - if (!CollectionUtils.isEmpty(route.getFlsList())) { - for (RouteFls routeFls : route.getFlsList()) { - routeFls.lock(); - } + // 征用设备 + // 道岔位置转换 + List switchList = route.getSwitchList(); + this.routeSwitchTurn(simulation, switchList); + this.routeFlsControl(simulation, route.getFlsList()); + if (config.isLockFirst()) { + for (SwitchElement switchElement : switchList) { + switchElement.getASwitch().routeLock(); + } + if (!CollectionUtils.isEmpty(route.getFlsList())) { + for (RouteFls routeFls : route.getFlsList()) { + routeFls.lock(); } } - route.updateRequisition(true); - return; } // 设备已征用,检查进路条件 - boolean onPosition = this.checkSwitchPosition(simulation, route); + boolean onPosition = this.checkSwitchPosition(simulation, route) && + this.isFlsSwitchOnPosition(route.getFlsList()); if (!onPosition) { // 还未转换到位置 return; } @@ -1234,9 +1231,16 @@ public class RouteService { boolean interlocked = this.isInterlocked(route); if (!interlocked) { // 进路信号开放,联锁逻辑不满足,需关闭信号 - this.routeClose(simulation, route); - log.info(String.format("进路[%s]始端信号联锁条件不满足,信号机[%s(%s)]关灯", - route.debugStr(), route.getStart().getName(), route.getStart().getCode())); + if (route.isOpen()) { + this.routeClose(simulation, route); + log.info(String.format("进路[%s]始端信号联锁条件不满足,信号机[%s(%s)]关灯", + route.debugStr(), route.getStart().getName(), route.getStart().getCode())); + } + } + if (route.isOpen()) { + if (this.checkCanOverlapSet(simulation, route) && !route.getOverlap().isLock()) { + this.checkAndSetLockedRouteOverlap(simulation, route); + } } }