Commit 2c557fa455fab96b622ccea82c9560ae2c372a9f

Authored by 娄高锋
1 parent a7a2fbf0

到离站报表,站点按照站点路由序号排序

src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -290,6 +290,8 @@ public class ReportServiceImpl implements ReportService{
290 290 // TODO Auto-generated method stub
291 291  
292 292 List<StationRoute> listSr = stationRoutRepository.findAllByLine(line, zdlx);
  293 + List<String> temp0List = new ArrayList<String>(),
  294 + temp1List = new ArrayList<String>();
293 295 Map<String, List<String>> temp0 = new HashMap<String, List<String>>();
294 296 Map<String, List<String>> temp1 = new HashMap<String, List<String>>();
295 297 for(StationRoute sr : listSr){
... ... @@ -298,18 +300,20 @@ public class ReportServiceImpl implements ReportService{
298 300 if(sr.getDestroy() == 0){
299 301 if(!temp0.containsKey(stationName)){
300 302 temp0.put(stationName, new ArrayList<String>());
  303 + temp0List.add(stationName);
301 304 }
302 305 temp0.get(stationName).add(stationCode);
303 306 } else if(sr.getDestroy() == 1){
304 307 if(!temp1.containsKey(stationName)){
305 308 temp1.put(stationName, new ArrayList<String>());
  309 + temp1List.add(stationName);
306 310 }
307 311 temp1.get(stationName).add(stationCode);
308 312 }
309 313 }
310 314  
311 315 Set<String> keySet = temp0.keySet();
312   - for(String key : temp0.keySet()){
  316 + for(String key : temp0List){
313 317 Map<String, String> reMap = new HashMap<String, String>();
314 318 String stationCode_s = "";
315 319 List<String> list0 = temp0.get(key);
... ... @@ -337,7 +341,7 @@ public class ReportServiceImpl implements ReportService{
337 341 list.add(reMap);
338 342 }
339 343  
340   - for(String key : temp1.keySet()){
  344 + for(String key : temp1List){
341 345 if(!(keySet.contains(key))){
342 346 Map<String, String> reMap = new HashMap<String, String>();
343 347 String stationCode_s = "";
... ...