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 2365 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName);
2366 2366 int jhbc = 0,cjbc = 0,ljbc = 0;
2367 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 2369 int xyz=1;
2370 2370 Map<String,Object> map;
2371 2371 for(ScheduleRealInfo scheduleRealInfo : scheduleRealInfos){
... ... @@ -2375,6 +2375,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2375 2375 //烂班里程(主任务烂班),
2376 2376 //临加里程(主任务临加),
2377 2377 //计划班次,烂班班次,增加班次
  2378 + double jh = 0, sj = 0;
2378 2379 tempJhlc = scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc();
2379 2380 if(scheduleRealInfo.isSflj()){
2380 2381 ljbc++;
... ... @@ -2382,7 +2383,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2382 2383 if( !(scheduleRealInfo.getBcType().equals("in")
2383 2384 ||scheduleRealInfo.getBcType().equals("out")) ){
2384 2385 jhbc++;
2385   - jhlc += tempJhlc;
  2386 + jh += tempJhlc;
2386 2387 }
2387 2388 if(scheduleRealInfo.getStatus() == -1){
2388 2389 remMileage += tempJhlc;
... ... @@ -2405,7 +2406,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2405 2406 if(scheduleRealInfo.isSflj()){
2406 2407 addMileage += tempJhlc;
2407 2408 }
2408   - yygl += tempJhlc;
  2409 + sj += tempJhlc;
2409 2410 }
2410 2411 }
2411 2412 }else{
... ... @@ -2429,7 +2430,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2429 2430 if(scheduleRealInfo.isSflj()){
2430 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 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 2504 map.put("jzl", jzl);
2497 2505 map.put("jhlc", format.format(jhlc+jcclc));
2498 2506 map.put("yygljh", format.format(jhlc));
2499   - map.put("ssgl", format.format(remMileage));
  2507 + map.put("ssgl", format.format(remgl));
2500 2508 map.put("ksgl", format.format(ksgl));
2501   -// map.put("yyglsj", format.format(yygl+remMileage));
2502 2509 map.put("yyglsj", format.format(yygl));
2503 2510 map.put("jhbc", jhbc);
2504 2511 map.put("jcclc", jcclc);
2505 2512  
2506   - map.put("ljgl", format.format(addMileage));
  2513 + map.put("ljgl", format.format(addgl));
2507 2514 map.put("ssbc", cjbc);
2508 2515 map.put("ysgl", format.format(yygl));
2509 2516 map.put("sjbc", jhbc-cjbc+ljbc);
2510   -// map.put("zgl", format.format(yygl+remMileage+ksgl+jcclc));
2511 2517 map.put("zgl", format.format(yygl+ksgl+jcclc));
2512 2518 map.put("ljbc", ljbc);
2513 2519 String zdp="",zwdp="",wdp="";
... ... @@ -2559,8 +2565,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2559 2565 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName);
2560 2566 int jhbc = 0,cjbc = 0,ljbc = 0;
2561 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 2569 Map<String,Object> map = new HashMap<String, Object>();
2565 2570 for(ScheduleRealInfo scheduleRealInfo : list){
2566 2571 if(scheduleRealInfo != null){
... ...