From 5916cd765e638e061f56c63d30e22b89ef78a07c Mon Sep 17 00:00:00 2001 From: tiger_zhou <123456> Date: Wed, 7 Sep 2022 18:12:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AD=A6=E6=B1=898=E5=8F=B7=E7=BA=BF=E5=88=97?= =?UTF-8?q?=E8=BD=A6=E4=BD=8D=E7=BD=AE=E6=98=BE=E7=A4=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/ATS/service/TrainPositionService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/TrainPositionService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/TrainPositionService.java index a83cb1c57..fa27dd591 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/TrainPositionService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/service/TrainPositionService.java @@ -98,7 +98,7 @@ public class TrainPositionService { List
list = ROAD_TYPE_CACHE.getIfPresent(roadType); if(Objects.equals(true,CollectionUtils.isEmpty(list))){ list = sim.getRepository().getSectionList(); - list = list.stream().filter(d->d.getRoadType() == roadType) + list = list.stream().filter(d->d.getRoadType() == roadType && Objects.nonNull(d.getKmMin())) .sorted(Comparator.comparing(Section::getKmMin)).collect(Collectors.toList()); ROAD_TYPE_CACHE.put(roadType,list); }