Commit c7432f92a909b3d1d4ae0e8ed670cfc10cdc68eb

Authored by 娄高锋
1 parent 8aebb0a7

LGF 更新行车路单导出

src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -2365,7 +2365,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf @@ -2365,7 +2365,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf
2365 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName); 2365 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName);
2366 int jhbc = 0,cjbc = 0,ljbc = 0; 2366 int jhbc = 0,cjbc = 0,ljbc = 0;
2367 double jhlc = 0, yygl = 0, ksgl = 0,tempJhlc = 0,jcclc=0; 2367 double jhlc = 0, yygl = 0, ksgl = 0,tempJhlc = 0,jcclc=0;
2368 - float addMileage = 0l,remMileage = 0l; 2368 + float addMileage = 0l,remMileage = 0l, addgl = 0, remgl = 0;
2369 int xyz=1; 2369 int xyz=1;
2370 Map<String,Object> map; 2370 Map<String,Object> map;
2371 for(ScheduleRealInfo scheduleRealInfo : scheduleRealInfos){ 2371 for(ScheduleRealInfo scheduleRealInfo : scheduleRealInfos){
@@ -2375,6 +2375,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2375,6 +2375,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2375 //烂班里程(主任务烂班), 2375 //烂班里程(主任务烂班),
2376 //临加里程(主任务临加), 2376 //临加里程(主任务临加),
2377 //计划班次,烂班班次,增加班次 2377 //计划班次,烂班班次,增加班次
  2378 + double jh = 0, sj = 0;
2378 tempJhlc = scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc(); 2379 tempJhlc = scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc();
2379 if(scheduleRealInfo.isSflj()){ 2380 if(scheduleRealInfo.isSflj()){
2380 ljbc++; 2381 ljbc++;
@@ -2382,7 +2383,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2382,7 +2383,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2382 if( !(scheduleRealInfo.getBcType().equals("in") 2383 if( !(scheduleRealInfo.getBcType().equals("in")
2383 ||scheduleRealInfo.getBcType().equals("out")) ){ 2384 ||scheduleRealInfo.getBcType().equals("out")) ){
2384 jhbc++; 2385 jhbc++;
2385 - jhlc += tempJhlc; 2386 + jh += tempJhlc;
2386 } 2387 }
2387 if(scheduleRealInfo.getStatus() == -1){ 2388 if(scheduleRealInfo.getStatus() == -1){
2388 remMileage += tempJhlc; 2389 remMileage += tempJhlc;
@@ -2405,7 +2406,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2405,7 +2406,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2405 if(scheduleRealInfo.isSflj()){ 2406 if(scheduleRealInfo.isSflj()){
2406 addMileage += tempJhlc; 2407 addMileage += tempJhlc;
2407 } 2408 }
2408 - yygl += tempJhlc; 2409 + sj += tempJhlc;
2409 } 2410 }
2410 } 2411 }
2411 }else{ 2412 }else{
@@ -2429,7 +2430,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2429,7 +2430,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2429 if(scheduleRealInfo.isSflj()){ 2430 if(scheduleRealInfo.isSflj()){
2430 addMileage += tempJhlc; 2431 addMileage += tempJhlc;
2431 } 2432 }
2432 - yygl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); 2433 + sj += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage();
2433 } 2434 }
2434 } 2435 }
2435 } 2436 }
@@ -2480,6 +2481,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2480,6 +2481,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2480 e.printStackTrace(); 2481 e.printStackTrace();
2481 } 2482 }
2482 } 2483 }
  2484 + jhlc += jh;
  2485 + yygl += sj;
  2486 + if(jh > sj){
  2487 + remgl += jh - sj;
  2488 + } else {
  2489 + addgl += sj - jh;
  2490 + }
2483 } 2491 }
2484 } 2492 }
2485 2493
@@ -2496,18 +2504,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2496,18 +2504,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2496 map.put("jzl", jzl); 2504 map.put("jzl", jzl);
2497 map.put("jhlc", format.format(jhlc+jcclc)); 2505 map.put("jhlc", format.format(jhlc+jcclc));
2498 map.put("yygljh", format.format(jhlc)); 2506 map.put("yygljh", format.format(jhlc));
2499 - map.put("ssgl", format.format(remMileage)); 2507 + map.put("ssgl", format.format(remgl));
2500 map.put("ksgl", format.format(ksgl)); 2508 map.put("ksgl", format.format(ksgl));
2501 -// map.put("yyglsj", format.format(yygl+remMileage));  
2502 map.put("yyglsj", format.format(yygl)); 2509 map.put("yyglsj", format.format(yygl));
2503 map.put("jhbc", jhbc); 2510 map.put("jhbc", jhbc);
2504 map.put("jcclc", jcclc); 2511 map.put("jcclc", jcclc);
2505 2512
2506 - map.put("ljgl", format.format(addMileage)); 2513 + map.put("ljgl", format.format(addgl));
2507 map.put("ssbc", cjbc); 2514 map.put("ssbc", cjbc);
2508 map.put("ysgl", format.format(yygl)); 2515 map.put("ysgl", format.format(yygl));
2509 map.put("sjbc", jhbc-cjbc+ljbc); 2516 map.put("sjbc", jhbc-cjbc+ljbc);
2510 -// map.put("zgl", format.format(yygl+remMileage+ksgl+jcclc));  
2511 map.put("zgl", format.format(yygl+ksgl+jcclc)); 2517 map.put("zgl", format.format(yygl+ksgl+jcclc));
2512 map.put("ljbc", ljbc); 2518 map.put("ljbc", ljbc);
2513 String zdp="",zwdp="",wdp=""; 2519 String zdp="",zwdp="",wdp="";
@@ -2559,8 +2565,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2559,8 +2565,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2559 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName); 2565 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName);
2560 int jhbc = 0,cjbc = 0,ljbc = 0; 2566 int jhbc = 0,cjbc = 0,ljbc = 0;
2561 double jhlc = 0, yygl = 0, ksgl = 0,tempJhlc = 0,jcclc=0; 2567 double jhlc = 0, yygl = 0, ksgl = 0,tempJhlc = 0,jcclc=0;
2562 - float addMileage = 0l,remMileage = 0l;  
2563 - float addgl = 0, remgl = 0; 2568 + float addMileage = 0l,remMileage = 0l, addgl = 0, remgl = 0;
2564 Map<String,Object> map = new HashMap<String, Object>(); 2569 Map<String,Object> map = new HashMap<String, Object>();
2565 for(ScheduleRealInfo scheduleRealInfo : list){ 2570 for(ScheduleRealInfo scheduleRealInfo : list){
2566 if(scheduleRealInfo != null){ 2571 if(scheduleRealInfo != null){