Commit 8aebb0a7334be82ae71aa877d4891db103d8a0a9
1 parent
a2d7d791
LGF 行车路单实际总公里去掉损失公里
Showing
1 changed file
with
20 additions
and
9 deletions
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -2498,7 +2498,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2498,7 +2498,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2498 | map.put("yygljh", format.format(jhlc)); | 2498 | map.put("yygljh", format.format(jhlc)); |
| 2499 | map.put("ssgl", format.format(remMileage)); | 2499 | map.put("ssgl", format.format(remMileage)); |
| 2500 | map.put("ksgl", format.format(ksgl)); | 2500 | map.put("ksgl", format.format(ksgl)); |
| 2501 | - map.put("yyglsj", format.format(yygl+remMileage)); | 2501 | +// map.put("yyglsj", format.format(yygl+remMileage)); |
| 2502 | + map.put("yyglsj", format.format(yygl)); | ||
| 2502 | map.put("jhbc", jhbc); | 2503 | map.put("jhbc", jhbc); |
| 2503 | map.put("jcclc", jcclc); | 2504 | map.put("jcclc", jcclc); |
| 2504 | 2505 | ||
| @@ -2506,7 +2507,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2506,7 +2507,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2506 | map.put("ssbc", cjbc); | 2507 | map.put("ssbc", cjbc); |
| 2507 | map.put("ysgl", format.format(yygl)); | 2508 | map.put("ysgl", format.format(yygl)); |
| 2508 | map.put("sjbc", jhbc-cjbc+ljbc); | 2509 | map.put("sjbc", jhbc-cjbc+ljbc); |
| 2509 | - map.put("zgl", format.format(yygl+remMileage+ksgl+jcclc)); | 2510 | +// map.put("zgl", format.format(yygl+remMileage+ksgl+jcclc)); |
| 2511 | + map.put("zgl", format.format(yygl+ksgl+jcclc)); | ||
| 2510 | map.put("ljbc", ljbc); | 2512 | map.put("ljbc", ljbc); |
| 2511 | String zdp="",zwdp="",wdp=""; | 2513 | String zdp="",zwdp="",wdp=""; |
| 2512 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm"); | 2514 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| @@ -2558,6 +2560,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2558,6 +2560,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2558 | int jhbc = 0,cjbc = 0,ljbc = 0; | 2560 | int jhbc = 0,cjbc = 0,ljbc = 0; |
| 2559 | double jhlc = 0, yygl = 0, ksgl = 0,tempJhlc = 0,jcclc=0; | 2561 | double jhlc = 0, yygl = 0, ksgl = 0,tempJhlc = 0,jcclc=0; |
| 2560 | float addMileage = 0l,remMileage = 0l; | 2562 | float addMileage = 0l,remMileage = 0l; |
| 2563 | + float addgl = 0, remgl = 0; | ||
| 2561 | Map<String,Object> map = new HashMap<String, Object>(); | 2564 | Map<String,Object> map = new HashMap<String, Object>(); |
| 2562 | for(ScheduleRealInfo scheduleRealInfo : list){ | 2565 | for(ScheduleRealInfo scheduleRealInfo : list){ |
| 2563 | if(scheduleRealInfo != null){ | 2566 | if(scheduleRealInfo != null){ |
| @@ -2565,6 +2568,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2565,6 +2568,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2565 | //烂班里程(主任务烂班), | 2568 | //烂班里程(主任务烂班), |
| 2566 | //临加里程(主任务临加), | 2569 | //临加里程(主任务临加), |
| 2567 | //计划班次,烂班班次,增加班次 | 2570 | //计划班次,烂班班次,增加班次 |
| 2571 | + double jh = 0, sj = 0; | ||
| 2568 | tempJhlc = scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc(); | 2572 | tempJhlc = scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc(); |
| 2569 | if(scheduleRealInfo.isSflj()){ | 2573 | if(scheduleRealInfo.isSflj()){ |
| 2570 | ljbc++; | 2574 | ljbc++; |
| @@ -2572,7 +2576,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2572,7 +2576,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2572 | if( !(scheduleRealInfo.getBcType().equals("in") | 2576 | if( !(scheduleRealInfo.getBcType().equals("in") |
| 2573 | ||scheduleRealInfo.getBcType().equals("out")) ){ | 2577 | ||scheduleRealInfo.getBcType().equals("out")) ){ |
| 2574 | jhbc++; | 2578 | jhbc++; |
| 2575 | - jhlc += tempJhlc; | 2579 | + jh += tempJhlc; |
| 2576 | } | 2580 | } |
| 2577 | 2581 | ||
| 2578 | if(scheduleRealInfo.getStatus() == -1){ | 2582 | if(scheduleRealInfo.getStatus() == -1){ |
| @@ -2597,7 +2601,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2597,7 +2601,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2597 | if(scheduleRealInfo.isSflj()){ | 2601 | if(scheduleRealInfo.isSflj()){ |
| 2598 | addMileage += tempJhlc; | 2602 | addMileage += tempJhlc; |
| 2599 | } | 2603 | } |
| 2600 | - yygl += tempJhlc; | 2604 | + sj += tempJhlc; |
| 2601 | } | 2605 | } |
| 2602 | } | 2606 | } |
| 2603 | }else{ | 2607 | }else{ |
| @@ -2621,26 +2625,33 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2621,26 +2625,33 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2621 | if(scheduleRealInfo.isSflj()){ | 2625 | if(scheduleRealInfo.isSflj()){ |
| 2622 | addMileage += tempJhlc; | 2626 | addMileage += tempJhlc; |
| 2623 | } | 2627 | } |
| 2624 | - yygl += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | 2628 | + sj += childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); |
| 2625 | } | 2629 | } |
| 2626 | } | 2630 | } |
| 2627 | } | 2631 | } |
| 2628 | } | 2632 | } |
| 2633 | + jhlc += jh; | ||
| 2634 | + yygl += sj; | ||
| 2635 | + if(jh > sj){ | ||
| 2636 | + remgl += jh - sj; | ||
| 2637 | + } else if(sj > jh){ | ||
| 2638 | + addgl += sj - jh; | ||
| 2639 | + } | ||
| 2629 | } | 2640 | } |
| 2630 | } | 2641 | } |
| 2631 | map.put("jhlc", format.format(jhlc+jcclc)); | 2642 | map.put("jhlc", format.format(jhlc+jcclc)); |
| 2632 | map.put("yygljh", format.format(jhlc)); | 2643 | map.put("yygljh", format.format(jhlc)); |
| 2633 | - map.put("ssgl", format.format(remMileage)); | 2644 | + map.put("ssgl", format.format(remgl)); |
| 2634 | map.put("ksgl", format.format(ksgl)); | 2645 | map.put("ksgl", format.format(ksgl)); |
| 2635 | - map.put("yyglsj", format.format(yygl+remMileage)); | 2646 | + map.put("yyglsj", format.format(yygl)); |
| 2636 | map.put("jhbc", jhbc); | 2647 | map.put("jhbc", jhbc); |
| 2637 | map.put("jcclc", jcclc); | 2648 | map.put("jcclc", jcclc); |
| 2638 | 2649 | ||
| 2639 | - map.put("ljgl", format.format(addMileage)); | 2650 | + map.put("ljgl", format.format(addgl)); |
| 2640 | map.put("ssbc", cjbc); | 2651 | map.put("ssbc", cjbc); |
| 2641 | map.put("ysgl", format.format(yygl)); | 2652 | map.put("ysgl", format.format(yygl)); |
| 2642 | map.put("sjbc", jhbc-cjbc+ljbc); | 2653 | map.put("sjbc", jhbc-cjbc+ljbc); |
| 2643 | - map.put("zgl", format.format(yygl+remMileage+ksgl+jcclc)); | 2654 | + map.put("zgl", format.format(yygl+ksgl+jcclc)); |
| 2644 | map.put("ljbc", ljbc); | 2655 | map.put("ljbc", ljbc); |
| 2645 | 2656 | ||
| 2646 | return map; | 2657 | return map; |