Commit 64abfd210eabacfe818e46ea98034949e478a62c
1 parent
c81af188
update
Showing
1 changed file
with
24 additions
and
24 deletions
src/main/java/com/bsth/data/BasicData.java
| ... | ... | @@ -270,36 +270,36 @@ public class BasicData implements CommandLineRunner { |
| 270 | 270 | Map<String, String> code2SHcode = new HashMap<String, String>(); |
| 271 | 271 | Map<String, Integer> tempStationName2YgcNumber = new HashMap<String, Integer>(); |
| 272 | 272 | |
| 273 | + /** | |
| 274 | + * 加载运管处的站点及序号 | |
| 275 | + * 上行从1开始,下行顺序续编 | |
| 276 | + */ | |
| 277 | + List<Object[]> ygcLines = stationRouteRepository.findAllLineWithYgc(); | |
| 278 | + if(ygcLines != null && ygcLines.size() > 0){ | |
| 279 | + int size = ygcLines.size(); | |
| 280 | + Object[] tempArray ; | |
| 281 | + int num = 1; | |
| 282 | + String key; | |
| 283 | + String lineCode = ""; | |
| 284 | + for (int i = 0; i < size; i ++){ | |
| 285 | + tempArray = ygcLines.get(i); | |
| 286 | + if(lineCode.equals("")){ | |
| 287 | + lineCode = tempArray[0]+""; | |
| 288 | + }else if(!lineCode.equals(tempArray[0]+"")){ | |
| 289 | + num = 1; | |
| 290 | + lineCode = tempArray[0]+""; | |
| 291 | + } | |
| 292 | + key = tempArray[0] + "_"+tempArray[1] + "_"+tempArray[2]; | |
| 293 | + tempStationName2YgcNumber.put(key,num++); | |
| 294 | + } | |
| 295 | + } | |
| 296 | + | |
| 273 | 297 | while (iterator.hasNext()) { |
| 274 | 298 | line = iterator.next(); |
| 275 | 299 | biMap.put(line.getId(), line.getLineCode()); |
| 276 | 300 | code2name.put(line.getLineCode(), line.getName()); |
| 277 | 301 | id2SHcode.put(line.getId(), line.getShanghaiLinecode()); |
| 278 | 302 | code2SHcode.put(line.getLineCode(), line.getShanghaiLinecode()); |
| 279 | - | |
| 280 | - /** | |
| 281 | - * 加载运管处的站点及序号 | |
| 282 | - * 上行从1开始,下行顺序续编 | |
| 283 | - */ | |
| 284 | - List<Object[]> ygcLines = stationRouteRepository.findAllLineWithYgc(); | |
| 285 | - if(ygcLines != null && ygcLines.size() > 0){ | |
| 286 | - int size = ygcLines.size(); | |
| 287 | - Object[] tempArray ; | |
| 288 | - int num = 1; | |
| 289 | - String key; | |
| 290 | - String lineCode = ""; | |
| 291 | - for (int i = 0; i < size; i ++){ | |
| 292 | - tempArray = ygcLines.get(i); | |
| 293 | - if(lineCode.equals("")){ | |
| 294 | - lineCode = tempArray[0]+""; | |
| 295 | - }else if(!lineCode.equals(tempArray[0]+"")){ | |
| 296 | - num = 1; | |
| 297 | - lineCode = tempArray[0]+""; | |
| 298 | - } | |
| 299 | - key = tempArray[0] + "_"+tempArray[1] + "_"+tempArray[2]; | |
| 300 | - tempStationName2YgcNumber.put(key,num++); | |
| 301 | - } | |
| 302 | - } | |
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | lineId2CodeMap = biMap; | ... | ... |