区段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,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

View File

@ -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<Switch> 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) {