【修改实训区段筛选条件】

This commit is contained in:
weizhihong 2022-12-01 13:19:00 +08:00
parent 977029410d
commit 37d9a6d8c8
2 changed files with 4 additions and 2 deletions

View File

@ -104,7 +104,7 @@ public enum MapDeviceRule {
}
Station station = stationList.get(0);
return simulation.getRepository().getSectionList().stream()
.filter(s -> (!s.isAxleCounter()) && s.getParent() == null && station.equals(s.getDeviceStation()))
.filter(s -> s.getParent() == null && station.equals(s.getDeviceStation()))
.limit(1).collect(Collectors.toList());
}
},
@ -118,7 +118,7 @@ public enum MapDeviceRule {
}
Station station = stationList.get(0);
return simulation.getRepository().getSectionList().stream()
.filter(s -> (s.isAxleCounter() || s.getParent() != null) && station.equals(s.getDeviceStation()))
.filter(s -> s.isSwitchTrack() && station.equals(s.getDeviceStation()))
.limit(1).collect(Collectors.toList());
}
}

View File

@ -51,6 +51,8 @@ public enum PropertyValueRule {
return ((Station) mapElement).getCode();
} else if (mapElement instanceof Switch) {
return ((Switch) mapElement).getDeviceStation().getCode();
} else if (mapElement instanceof Section) {
return ((Section) mapElement).getDeviceStation().getCode();
}
return null;
}