Commit 3eda500c6301963c4feee1c0fe04798f29c0b162
1 parent
1817a503
统计日报查询时,只有1条路单的情况下报错的问题修复。
Showing
1 changed file
with
10 additions
and
1 deletions
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -3245,7 +3245,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3245,7 +3245,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3245 | } | 3245 | } |
| 3246 | List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); | 3246 | List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); |
| 3247 | for (int i = 0; i < list.size(); i++) { | 3247 | for (int i = 0; i < list.size(); i++) { |
| 3248 | - if (i < list.size() - 1) { | 3248 | + if(list.size() == 1){ |
| 3249 | + lists = new ArrayList<ScheduleRealInfo>(); | ||
| 3250 | + lists.add(list.get(i)); | ||
| 3251 | + Map<String, Object> mm=new HashMap<String,Object>(); | ||
| 3252 | + if(mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm())!=null){ | ||
| 3253 | + mm=mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm()); | ||
| 3254 | + } | ||
| 3255 | + Map<String, Object> map = staticTj(lists,mm); | ||
| 3256 | + lMap.add(map); | ||
| 3257 | + } else if (i < list.size() - 1) { | ||
| 3249 | if ((list.get(i+1).getGsBm()+"/"+list.get(i+1).getFgsBm()+"/"+list.get(i+1).getXlBm()).equals( | 3258 | if ((list.get(i+1).getGsBm()+"/"+list.get(i+1).getFgsBm()+"/"+list.get(i+1).getXlBm()).equals( |
| 3250 | list.get(i).getGsBm()+"/"+list.get(i).getFgsBm()+"/"+list.get(i).getXlBm())) { | 3259 | list.get(i).getGsBm()+"/"+list.get(i).getFgsBm()+"/"+list.get(i).getXlBm())) { |
| 3251 | lists.add(list.get(i)); | 3260 | lists.add(list.get(i)); |