Commit d72b135686f2b645f5f83320db9a6bb781c23eb6

Authored by 娄高锋
1 parent 12105091

处理重新统计中只有一个班次的线路单独统计会报错的问题。

src/main/java/com/bsth/service/calc/impl/CalcWaybillServiceImpl.java
... ... @@ -577,7 +577,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer
577 577 lists=new ArrayList<ScheduleRealInfo>();
578 578 }
579 579 }else{
580   - if(list.get(i).getXlBm().equals(list.get(i-1).getXlBm())){
  580 + if(list.size() > 1 && list.get(i).getXlBm().equals(list.get(i-1).getXlBm())){
581 581 lists.add(list.get(i));
582 582 CalcInterval t=null;
583 583 if(mapInterval.get(lists.get(0).getXlBm())!=null){
... ... @@ -586,7 +586,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
586 586 CalcStatistics s=staticTj(lists,t);
587 587 lMap.add(s);
588 588 }else{
589   - lists=new ArrayList<ScheduleRealInfo>();
  589 + lists=new ArrayList<ScheduleRealInfo>();
590 590 lists.add(list.get(i));
591 591 CalcInterval t=null;
592 592 if(mapInterval.get(lists.get(0).getXlBm())!=null){
... ...