Commit d72b135686f2b645f5f83320db9a6bb781c23eb6
1 parent
12105091
处理重新统计中只有一个班次的线路单独统计会报错的问题。
Showing
1 changed file
with
2 additions
and
2 deletions
src/main/java/com/bsth/service/calc/impl/CalcWaybillServiceImpl.java
| @@ -577,7 +577,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -577,7 +577,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 577 | lists=new ArrayList<ScheduleRealInfo>(); | 577 | lists=new ArrayList<ScheduleRealInfo>(); |
| 578 | } | 578 | } |
| 579 | }else{ | 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 | lists.add(list.get(i)); | 581 | lists.add(list.get(i)); |
| 582 | CalcInterval t=null; | 582 | CalcInterval t=null; |
| 583 | if(mapInterval.get(lists.get(0).getXlBm())!=null){ | 583 | if(mapInterval.get(lists.get(0).getXlBm())!=null){ |
| @@ -586,7 +586,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -586,7 +586,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 586 | CalcStatistics s=staticTj(lists,t); | 586 | CalcStatistics s=staticTj(lists,t); |
| 587 | lMap.add(s); | 587 | lMap.add(s); |
| 588 | }else{ | 588 | }else{ |
| 589 | - lists=new ArrayList<ScheduleRealInfo>(); | 589 | + lists=new ArrayList<ScheduleRealInfo>(); |
| 590 | lists.add(list.get(i)); | 590 | lists.add(list.get(i)); |
| 591 | CalcInterval t=null; | 591 | CalcInterval t=null; |
| 592 | if(mapInterval.get(lists.get(0).getXlBm())!=null){ | 592 | if(mapInterval.get(lists.get(0).getXlBm())!=null){ |