修改仿真仓库运行图空指针bug

This commit is contained in:
walker-sheng 2021-07-05 15:30:56 +08:00
parent 889f45fe40
commit b4b5be759f

View File

@ -720,16 +720,18 @@ public class SimulationDataRepository {
this.tdtStatusMap.clear();
// 运行图
this.changeTrips.clear();
serviceTripsMap.forEach((k, v) -> {
for (Iterator<TripPlan> iterator = v.iterator(); iterator.hasNext(); ) {
TripPlan tripPlan = iterator.next();
if (tripPlan.isAdd()) {
iterator.remove();
} else if (tripPlan.isInvalid()) {
tripPlan.setInvalid(false);
if (serviceTripsMap != null) {
serviceTripsMap.forEach((k, v) -> {
for (Iterator<TripPlan> iterator = v.iterator(); iterator.hasNext(); ) {
TripPlan tripPlan = iterator.next();
if (tripPlan.isAdd()) {
iterator.remove();
} else if (tripPlan.isInvalid()) {
tripPlan.setInvalid(false);
}
}
}
});
});
}
}
/**