修改区段非通信车占用判断逻辑

This commit is contained in:
walker-sheng 2021-01-29 10:20:37 +08:00
parent fb343bba80
commit a268d69305

View File

@ -491,18 +491,16 @@ public class Section extends MayOutOfOrderDevice {
* @return
*/
public boolean isNonCbtcOccupy() {
synchronized (this){
boolean ctOcc = this.ctOccupied;
if (!CollectionUtils.isEmpty(this.logicList)) {
for (Section logic : this.logicList) {
if (logic.isCtOccupied()) {
ctOcc = true;
break;
}
boolean nct = this.nctOccupied && !this.ctOccupied;
if (!CollectionUtils.isEmpty(this.logicList)) {
for (Section logic : this.logicList) {
if (logic.isCtOccupied() || !logic.isNctOccupied()) {
nct = false;
break;
}
}
return !ctOcc && this.nctOccupied;
}
return nct;
}
public List<Section> getAtpSectionListBy(float offset1, float offset2) {