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); }