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