Commit 895efb672d0b343376954c48c45a5284fba903a9

Authored by zlz
1 parent a3ca6c6b

运管处路单上传BUG修改

src/main/java/com/bsth/data/BasicData.java
@@ -274,22 +274,23 @@ public class BasicData implements CommandLineRunner { @@ -274,22 +274,23 @@ public class BasicData implements CommandLineRunner {
274 * 加载运管处的站点及序号 274 * 加载运管处的站点及序号
275 * 上行从1开始,下行顺序续编 275 * 上行从1开始,下行顺序续编
276 */ 276 */
277 - List<Object[]> ygcLines = stationRouteRepository.findAllLineWithYgc(); 277 + List<Map<String, String>> ygcLines = stationRouteRepository.findAllLineWithYgc();
278 if(ygcLines != null && ygcLines.size() > 0){ 278 if(ygcLines != null && ygcLines.size() > 0){
279 int size = ygcLines.size(); 279 int size = ygcLines.size();
280 - Object[] tempArray ; 280 + Map<String, String> tempMap ;
281 int num = 1; 281 int num = 1;
282 String key; 282 String key;
283 String lineCode = ""; 283 String lineCode = "";
284 for (int i = 0; i < size; i ++){ 284 for (int i = 0; i < size; i ++){
285 - tempArray = ygcLines.get(i); 285 + tempMap = ygcLines.get(i);
286 if(lineCode.equals("")){ 286 if(lineCode.equals("")){
287 - lineCode = tempArray[0]+"";  
288 - }else if(!lineCode.equals(tempArray[0]+"")){ 287 + lineCode = tempMap.get("lineCode");
  288 + }else if(!lineCode.equals(tempMap.get("lineCode"))){
289 num = 1; 289 num = 1;
290 - lineCode = tempArray[0]+""; 290 + lineCode = tempMap.get("lineCode");
291 } 291 }
292 - key = tempArray[0] + "_"+tempArray[1] + "_"+tempArray[3]; 292 + key = tempMap.get("lineCode") + "_"+String.valueOf(tempMap.get("directions"))
  293 + + "_"+tempMap.get("stationCode")+ "_"+tempMap.get("stationMark");
293 tempStationName2YgcNumber.put(key,num++); 294 tempStationName2YgcNumber.put(key,num++);
294 } 295 }
295 } 296 }