Merge remote-tracking branch 'origin/test' into ats-restruct

This commit is contained in:
walker-sheng 2021-07-15 16:37:14 +08:00
commit 8e06b39322

View File

@ -175,8 +175,6 @@ public class ZCLogicLoop {
MovementAuthority.End end = checkSwitch(section, right);
if (end != null)
endList.add(end);
//前方列车
MovementAuthority.End trainEnd = checkSectionOccupied(section);
// 轨道尽头/问题道岔
Section temp = section.getNextRunningSectionOf(right);
if (Objects.isNull(temp)) { // 到尽头
@ -185,6 +183,10 @@ public class ZCLogicLoop {
}
break;
}
//前方列车
MovementAuthority.End trainEnd = checkSectionOccupied(temp);
if (trainEnd != null)
endList.add(trainEnd);
//非通信车占用区段
if (temp.isNonCbtcOccupy() && !temp.isInvalid()) {
endList.add(new MovementAuthority.End(temp, MovementAuthority.EndType.NCT_OCCUPIED_SECTION));
@ -194,7 +196,7 @@ public class ZCLogicLoop {
if (cs != null)
endList.add(cs);
if (!CollectionUtils.isEmpty(endList) && endList.size() == 1 && endList.get(0).getType().equals(MovementAuthority.EndType.CLOSED_SIGNAL)) {
if (!CollectionUtils.isEmpty(endList) && endList.size() == 1 && !endList.get(0).getType().equals(MovementAuthority.EndType.CLOSED_SIGNAL)) {
break;
}