From a3846f459b70304e2764bb3a2b4f492dc0784681 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Wed, 15 Feb 2023 09:54:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=97=E8=BD=A6=E5=81=9C?= =?UTF-8?q?=E7=AB=99=E5=90=8E=E6=97=A0=E6=B3=95=E5=BC=80=E7=AB=99=E5=8F=B0?= =?UTF-8?q?=E9=97=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/CI/device/CiStandService.java | 8 ++++---- .../rtss/simulation/cbtc/data/vr/VirtualRealityIbp.java | 2 +- .../rtss/simulation/cbtc/data/vr/VirtualRealityPsl.java | 3 +-- .../simulation/cbtc/robot/SimulationRobotService.java | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiStandService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiStandService.java index 6df7bb299..4da4a1fbf 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiStandService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/CI/device/CiStandService.java @@ -42,25 +42,25 @@ public class CiStandService { switch (source) { case SIG: { VirtualRealityPsl vrPsl = stand.getVrPsl(); - if (vrPsl != null && vrPsl.isAllowOperation()) { + if (vrPsl != null && vrPsl.isAllowOperate()) { return false; } VirtualRealityIbp vrIbp = stand.getStation().getVrIbp(); - if (vrIbp != null && vrIbp.isAllowOperation(true, config.isUp(stand.isRight()))) { + if (vrIbp != null && !vrIbp.isAllowOperate(true, config.isUp(stand.isRight()))) { return false; } break; } case PSL: { VirtualRealityPsl vrPsl = stand.getVrPsl(); - if (vrPsl == null || !vrPsl.isAllowOperation()) { + if (vrPsl == null || !vrPsl.isAllowOperate()) { return false; } break; } case IBP: { VirtualRealityIbp vrIbp = stand.getStation().getVrIbp(); - if (vrIbp == null || !vrIbp.isAllowOperation(false, config.isUp(stand.isRight()))) { + if (vrIbp == null || !vrIbp.isAllowOperate(false, config.isUp(stand.isRight()))) { return false; } break; diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityIbp.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityIbp.java index 0ad7aeae7..79d59b3d2 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityIbp.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityIbp.java @@ -125,7 +125,7 @@ public class VirtualRealityIbp extends VirtualRealityDevice { * @param up 是否是上行 * @return */ - public boolean isAllowOperation(boolean signal, boolean up) { + public boolean isAllowOperate(boolean signal, boolean up) { List elements = up ? queryByMean(Mean.SXYS) : queryByMean(Mean.XXYS); if (CollectionUtils.isEmpty(elements)) { return true; diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityPsl.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityPsl.java index bba8e67c0..cff8d5421 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityPsl.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityPsl.java @@ -1,6 +1,5 @@ package club.joylink.rtss.simulation.cbtc.data.vr; -import club.joylink.rtss.simulation.cbtc.data.map.MapNamedElement; import club.joylink.rtss.simulation.cbtc.data.map.Stand; import lombok.Getter; import lombok.Setter; @@ -52,7 +51,7 @@ public class VirtualRealityPsl extends VirtualRealityDevice { this.sdButton = false; } - public boolean isAllowOperation() { + public boolean isAllowOperate() { return this.isYxjzKey(); } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java index 69ec040fa..ad98e0f06 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java @@ -130,7 +130,7 @@ public class SimulationRobotService { } } VirtualRealityPsl vrPsl = stand.getVrPsl(); - if (!vrPsl.isAllowOperation()) { //确保此时允许操作 + if (!vrPsl.isAllowOperate()) { //确保此时允许操作 iVirtualRealityPslService.pressTheButton(simulation, stand.getCode(), VirtualRealityPsl.Button.YXJZ); } @@ -141,7 +141,7 @@ public class SimulationRobotService { iVirtualRealityPslService.pressTheButton(simulation, stand.getCode(), VirtualRealityPsl.Button.GM); } - if (vrPsl.isAllowOperation()) { //将允许禁止钥匙打到禁止位 + if (vrPsl.isAllowOperate()) { //将允许禁止钥匙打到禁止位 iVirtualRealityPslService.pressTheButton(simulation, stand.getCode(), VirtualRealityPsl.Button.YXJZ); }