【修改实训区段筛选条件】
This commit is contained in:
parent
977029410d
commit
37d9a6d8c8
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user