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); MovementAuthority.End end = checkSwitch(section, right);
if (end != null) if (end != null)
endList.add(end); endList.add(end);
//前方列车
MovementAuthority.End trainEnd = checkSectionOccupied(section);
// 轨道尽头/问题道岔 // 轨道尽头/问题道岔
Section temp = section.getNextRunningSectionOf(right); Section temp = section.getNextRunningSectionOf(right);
if (Objects.isNull(temp)) { // 到尽头 if (Objects.isNull(temp)) { // 到尽头
@ -185,6 +183,10 @@ public class ZCLogicLoop {
} }
break; break;
} }
//前方列车
MovementAuthority.End trainEnd = checkSectionOccupied(temp);
if (trainEnd != null)
endList.add(trainEnd);
//非通信车占用区段 //非通信车占用区段
if (temp.isNonCbtcOccupy() && !temp.isInvalid()) { if (temp.isNonCbtcOccupy() && !temp.isInvalid()) {
endList.add(new MovementAuthority.End(temp, MovementAuthority.EndType.NCT_OCCUPIED_SECTION)); endList.add(new MovementAuthority.End(temp, MovementAuthority.EndType.NCT_OCCUPIED_SECTION));
@ -194,7 +196,7 @@ public class ZCLogicLoop {
if (cs != null) if (cs != null)
endList.add(cs); 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; break;
} }