Commit a2e50374fd49b37a8983c5cbb0f2b90e392b43c4
1 parent
900c8e20
1.解决车辆换线后可能存在第一个班次无法正常执行的问题
Showing
1 changed file
with
5 additions
and
1 deletions
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| @@ -291,6 +291,7 @@ public class DayOfSchedule { | @@ -291,6 +291,7 @@ public class DayOfSchedule { | ||
| 291 | remList.add(sch); | 291 | remList.add(sch); |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | + Set<String> codes = new HashSet<>(); | ||
| 294 | for (ScheduleRealInfo sch : remList) { | 295 | for (ScheduleRealInfo sch : remList) { |
| 295 | if (null != sch) { | 296 | if (null != sch) { |
| 296 | nbbmScheduleMap.remove(sch.getClZbh(), sch); | 297 | nbbmScheduleMap.remove(sch.getClZbh(), sch); |
| @@ -302,9 +303,12 @@ public class DayOfSchedule { | @@ -302,9 +303,12 @@ public class DayOfSchedule { | ||
| 302 | 303 | ||
| 303 | //清除车辆 ——> 执行班次对照 | 304 | //清除车辆 ——> 执行班次对照 |
| 304 | carExecutePlanMap.remove(sch.getClZbh()); | 305 | carExecutePlanMap.remove(sch.getClZbh()); |
| 305 | - reCalcExecPlan(sch.getClZbh()); | 306 | + codes.add(sch.getClZbh()); |
| 306 | } | 307 | } |
| 307 | } | 308 | } |
| 309 | + for (String code : codes) { | ||
| 310 | + reCalcExecPlan(code); | ||
| 311 | + } | ||
| 308 | //清理计划排班 | 312 | //清理计划排班 |
| 309 | schedulePlanMap.remove(lineCode); | 313 | schedulePlanMap.remove(lineCode); |
| 310 | 314 |