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 22931c07b..5140af0c6 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 @@ -520,10 +520,11 @@ public class CiApiServiceImpl2 implements CiApiService { BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(axleSection != null && axleSection.isAxleCounter(), section.debugStr() + "不是计轴区段也不归属于任何计轴区段"); VirtualRealitySectionAxleCounter virtualAxleCounter = axleSection.getVirtualAxleCounter(); - if (!virtualAxleCounter.isOccupy()) + if (!virtualAxleCounter.isOccupy()){ + VirtualRealitySectionAxleCounter.Fault.FAULT.apply(virtualAxleCounter); Section.AxleFault.ARB.apply(axleSection); - else - virtualAxleCounter.preReset(); + } + virtualAxleCounter.preReset(); } @Override diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java index 00d94e200..1e83a1854 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Section.java @@ -481,9 +481,12 @@ public class Section extends DelayUnlockDevice { * 计轴占用出清 */ public void axleCounterClear() { - if (AxleFault.FAULT.equals(this.getFault())) { + if (AxleFault.FAULT.equals(this.getFault()) || AxleFault.ARB.equals(this.getFault())) { this.setFault(null); } + if (this.isInvalid()) { + this.judgeAsValid(); + } this.nctOccupied = false; if (!CollectionUtils.isEmpty(logicList)) { logicList.forEach(Section::axleCounterClear); @@ -874,14 +877,8 @@ public class Section extends DelayUnlockDevice { List relSwitchList = this.getRelSwitchList(); for (Switch aSwitch : relSwitchList) { aSwitch.getA().setInvalid(false); - if (aSwitch.isPosN()) { - aSwitch.getB().setInvalid(false); - } else if (aSwitch.isPosR()) { - aSwitch.getC().setInvalid(false); - } else { - aSwitch.getB().setInvalid(false); - aSwitch.getC().setInvalid(false); - } + aSwitch.getB().setInvalid(false); + aSwitch.getC().setInvalid(false); } } else if (!CollectionUtils.isEmpty(this.logicList)) { for (Section logic : this.logicList) {