Commit c838f1d2ba06f2a52ae0d147c81f7b64e9b52167

Authored by 潘钊
1 parent 2caf5f9a

update...

src/main/java/com/bsth/data/schedule/late_adjust/LateAdjustHandle.java
@@ -68,13 +68,17 @@ public class LateAdjustHandle implements ApplicationContextAware{ @@ -68,13 +68,17 @@ public class LateAdjustHandle implements ApplicationContextAware{
68 ScheduleRealInfo cancel = null; 68 ScheduleRealInfo cancel = null;
69 //之前存在误点班次没有发出 69 //之前存在误点班次没有发出
70 ScheduleRealInfo old = lateSchMap.get(sch.getClZbh()); 70 ScheduleRealInfo old = lateSchMap.get(sch.getClZbh());
71 - //如果之前班次的 待发应到时间已经过了  
72 - long t = System.currentTimeMillis();  
73 - if(old != null && (old.getDfsjT() + (old.getBcsj() * 60 * 1000) > t)  
74 - && old.getDfsjT() < sch.getDfsjT()){  
75 - remove(old);  
76 - cancel = old;  
77 - logger.info("【应发未到】old 班次 " + old.getId() + " -被覆盖!"); 71 +
  72 + if(old != null && old.getDfsjT() < sch.getDfsjT()){
  73 + //如果之前班次的 待发应到时间已经过了 3 分钟
  74 + long t = System.currentTimeMillis();
  75 + long dfEndTime = old.getDfsjT() + (old.getBcsj() * 60 * 1000);
  76 + if((t - dfEndTime) > 1000 * 60 * 3){
  77 +
  78 + remove(old);
  79 + cancel = old;
  80 + logger.info("【应发未到】old 班次 " + old.getId() + " -被覆盖!");
  81 + }
78 } 82 }
79 83
80 lateSchMap.put(sch.getClZbh(), sch); 84 lateSchMap.put(sch.getClZbh(), sch);