Commit 30e89d0a83b7c352f7e220c759e98d75e8a2aa26

Authored by 潘钊
1 parent d7d44988

update...

src/main/java/com/bsth/data/schedule/DayOfSchedule.java
... ... @@ -70,6 +70,8 @@ public class DayOfSchedule {
70 70 // 排序器
71 71 private static ScheduleComparator.FCSJ schFCSJComparator;
72 72  
  73 + private static ScheduleComparator.DFSJ schDFSJComparator;
  74 +
73 75 private static Long sch_max_id=-1L;
74 76  
75 77 @Autowired
... ... @@ -580,6 +582,8 @@ public class DayOfSchedule {
580 582 */
581 583 public ScheduleRealInfo next(ScheduleRealInfo sch) {
582 584 List<ScheduleRealInfo> list = nbbmScheduleMap.get(sch.getClZbh());
  585 + //排序
  586 + Collections.sort(list, schDFSJComparator);
583 587 return next(list, sch);
584 588 }
585 589  
... ... @@ -916,7 +920,7 @@ public class DayOfSchedule {
916 920  
917 921 public void reCalcExecPlan(String nbbm) {
918 922 List<ScheduleRealInfo> list = nbbmScheduleMap.get(nbbm);
919   - Collections.sort(list, schFCSJComparator);
  923 + Collections.sort(list, schDFSJComparator);
920 924  
921 925 ScheduleRealInfo sch = schAttrCalculator.calcCurrentExecSch(list);
922 926 if(null != sch)
... ...
src/main/java/com/bsth/data/schedule/late_adjust/LateAdjustHandle.java
... ... @@ -68,7 +68,10 @@ public class LateAdjustHandle implements ApplicationContextAware{
68 68 ScheduleRealInfo cancel = null;
69 69 //之前存在误点班次没有发出
70 70 ScheduleRealInfo old = lateSchMap.get(sch.getClZbh());
71   - if(old != null && old.getDfsjT() < sch.getDfsjT()){
  71 + //如果之前班次的 待发应到时间已经过了
  72 + long t = System.currentTimeMillis();
  73 + if(old != null && (old.getDfsjT() + (old.getBcsj() * 60 * 1000) > t)
  74 + && old.getDfsjT() < sch.getDfsjT()){
72 75 remove(old);
73 76 cancel = old;
74 77 logger.info("【应发未到】old 班次 " + old.getId() + " -被覆盖!");
... ...