区段ARB预复位bug修改

This commit is contained in:
walker-sheng 2021-09-17 16:37:15 +08:00
parent 09e72d1e7e
commit b95af3b5b5
2 changed files with 10 additions and 12 deletions

View File

@ -520,9 +520,10 @@ public class CiApiServiceImpl2 implements CiApiService {
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(axleSection != null && axleSection.isAxleCounter(), BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(axleSection != null && axleSection.isAxleCounter(),
section.debugStr() + "不是计轴区段也不归属于任何计轴区段"); section.debugStr() + "不是计轴区段也不归属于任何计轴区段");
VirtualRealitySectionAxleCounter virtualAxleCounter = axleSection.getVirtualAxleCounter(); VirtualRealitySectionAxleCounter virtualAxleCounter = axleSection.getVirtualAxleCounter();
if (!virtualAxleCounter.isOccupy()) if (!virtualAxleCounter.isOccupy()){
VirtualRealitySectionAxleCounter.Fault.FAULT.apply(virtualAxleCounter);
Section.AxleFault.ARB.apply(axleSection); Section.AxleFault.ARB.apply(axleSection);
else }
virtualAxleCounter.preReset(); virtualAxleCounter.preReset();
} }

View File

@ -481,9 +481,12 @@ public class Section extends DelayUnlockDevice {
* 计轴占用出清 * 计轴占用出清
*/ */
public void axleCounterClear() { public void axleCounterClear() {
if (AxleFault.FAULT.equals(this.getFault())) { if (AxleFault.FAULT.equals(this.getFault()) || AxleFault.ARB.equals(this.getFault())) {
this.setFault(null); this.setFault(null);
} }
if (this.isInvalid()) {
this.judgeAsValid();
}
this.nctOccupied = false; this.nctOccupied = false;
if (!CollectionUtils.isEmpty(logicList)) { if (!CollectionUtils.isEmpty(logicList)) {
logicList.forEach(Section::axleCounterClear); logicList.forEach(Section::axleCounterClear);
@ -874,15 +877,9 @@ public class Section extends DelayUnlockDevice {
List<Switch> relSwitchList = this.getRelSwitchList(); List<Switch> relSwitchList = this.getRelSwitchList();
for (Switch aSwitch : relSwitchList) { for (Switch aSwitch : relSwitchList) {
aSwitch.getA().setInvalid(false); 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.getB().setInvalid(false);
aSwitch.getC().setInvalid(false); aSwitch.getC().setInvalid(false);
} }
}
} else if (!CollectionUtils.isEmpty(this.logicList)) { } else if (!CollectionUtils.isEmpty(this.logicList)) {
for (Section logic : this.logicList) { for (Section logic : this.logicList) {
logic.setInvalid(false); logic.setInvalid(false);