diff --git a/src/main/java/club/joylink/rtss/vo/training2/rule/MapDeviceRule.java b/src/main/java/club/joylink/rtss/vo/training2/rule/MapDeviceRule.java index 32cc68197..5808f8e29 100644 --- a/src/main/java/club/joylink/rtss/vo/training2/rule/MapDeviceRule.java +++ b/src/main/java/club/joylink/rtss/vo/training2/rule/MapDeviceRule.java @@ -20,7 +20,7 @@ public enum MapDeviceRule { @Override public List filterMapDeviceList(Simulation simulation) { List stationList = simulation.getBuildParams().getMap().getGraphDataNew().getStationList() - .stream().filter(s -> s.isVisible() && s.isCentralized() && s.isCiStation()) + .stream().filter(s -> s.isVisible() && s.isCentralized() && s.isCiStation() && !s.isDepot()) .sorted(Comparator.comparing(MapStationNewVO::getSn)) .map(MapStationNewVO::getCode) .map(code -> simulation.getRepository().getByCode(code, Station.class)) @@ -56,11 +56,15 @@ public enum MapDeviceRule { ROUTE_LIST("进路列表") { @Override public List filterMapDeviceList(Simulation simulation) { - boolean routeLikeHa1 = simulation.getRepository().getConfig().isRouteLikeHa1(); boolean railway = simulation.getRepository().getConfig().isRailway(); List routeList = simulation.getRepository().getRouteList().stream().filter(route -> { - if (route.getStart() == null || route.getStart().isVirtual() - || (route.getStart().getStation()!= null && route.getStart().getStation().isDepot())) { + if (route.getStart() == null || route.getStart().isVirtual()) { + return false; + } + if (route.getStart().getStation()!= null && route.getStart().getStation().isDepot()) { + return false; + } + if (route.getStart().getDeviceStation()!= null && route.getStart().getDeviceStation().isDepot()) { return false; } if (route.isGuide()) { // 引导进路跳过 @@ -138,7 +142,8 @@ public enum MapDeviceRule { SECTION_AXLE_COUNTER_LIST("道岔计轴区段列表") { @Override public List
filterMapDeviceList(Simulation simulation) { - List
sectionList = querySectionListByFunction(simulation, Section::isSwitchAxleCounterSection); + List
sectionList = querySectionListByFunction(simulation, + (section) -> section.isAxleCounter() && !section.isSwitchAxleCounterSection()); return generateRandomElement(sectionList, NUMBER); } },