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 | 2498 | map.put("yygljh", format.format(jhlc)); |
| 2499 | 2499 | map.put("ssgl", format.format(remMileage)); |
| 2500 | 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 | 2503 | map.put("jhbc", jhbc); |
| 2503 | 2504 | map.put("jcclc", jcclc); |
| 2504 | 2505 | |
| ... | ... | @@ -2506,7 +2507,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2506 | 2507 | map.put("ssbc", cjbc); |
| 2507 | 2508 | map.put("ysgl", format.format(yygl)); |
| 2508 | 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 | 2512 | map.put("ljbc", ljbc); |
| 2511 | 2513 | String zdp="",zwdp="",wdp=""; |
| 2512 | 2514 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| ... | ... | @@ -2558,6 +2560,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2558 | 2560 | int jhbc = 0,cjbc = 0,ljbc = 0; |
| 2559 | 2561 | double jhlc = 0, yygl = 0, ksgl = 0,tempJhlc = 0,jcclc=0; |
| 2560 | 2562 | float addMileage = 0l,remMileage = 0l; |
| 2563 | + float addgl = 0, remgl = 0; | |
| 2561 | 2564 | Map<String,Object> map = new HashMap<String, Object>(); |
| 2562 | 2565 | for(ScheduleRealInfo scheduleRealInfo : list){ |
| 2563 | 2566 | if(scheduleRealInfo != null){ |
| ... | ... | @@ -2565,6 +2568,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2565 | 2568 | //烂班里程(主任务烂班), |
| 2566 | 2569 | //临加里程(主任务临加), |
| 2567 | 2570 | //计划班次,烂班班次,增加班次 |
| 2571 | + double jh = 0, sj = 0; | |
| 2568 | 2572 | tempJhlc = scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc(); |
| 2569 | 2573 | if(scheduleRealInfo.isSflj()){ |
| 2570 | 2574 | ljbc++; |
| ... | ... | @@ -2572,7 +2576,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2572 | 2576 | if( !(scheduleRealInfo.getBcType().equals("in") |
| 2573 | 2577 | ||scheduleRealInfo.getBcType().equals("out")) ){ |
| 2574 | 2578 | jhbc++; |
| 2575 | - jhlc += tempJhlc; | |
| 2579 | + jh += tempJhlc; | |
| 2576 | 2580 | } |
| 2577 | 2581 | |
| 2578 | 2582 | if(scheduleRealInfo.getStatus() == -1){ |
| ... | ... | @@ -2597,7 +2601,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2597 | 2601 | if(scheduleRealInfo.isSflj()){ |
| 2598 | 2602 | addMileage += tempJhlc; |
| 2599 | 2603 | } |
| 2600 | - yygl += tempJhlc; | |
| 2604 | + sj += tempJhlc; | |
| 2601 | 2605 | } |
| 2602 | 2606 | } |
| 2603 | 2607 | }else{ |
| ... | ... | @@ -2621,26 +2625,33 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2621 | 2625 | if(scheduleRealInfo.isSflj()){ |
| 2622 | 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 | 2642 | map.put("jhlc", format.format(jhlc+jcclc)); |
| 2632 | 2643 | map.put("yygljh", format.format(jhlc)); |
| 2633 | - map.put("ssgl", format.format(remMileage)); | |
| 2644 | + map.put("ssgl", format.format(remgl)); | |
| 2634 | 2645 | map.put("ksgl", format.format(ksgl)); |
| 2635 | - map.put("yyglsj", format.format(yygl+remMileage)); | |
| 2646 | + map.put("yyglsj", format.format(yygl)); | |
| 2636 | 2647 | map.put("jhbc", jhbc); |
| 2637 | 2648 | map.put("jcclc", jcclc); |
| 2638 | 2649 | |
| 2639 | - map.put("ljgl", format.format(addMileage)); | |
| 2650 | + map.put("ljgl", format.format(addgl)); | |
| 2640 | 2651 | map.put("ssbc", cjbc); |
| 2641 | 2652 | map.put("ysgl", format.format(yygl)); |
| 2642 | 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 | 2655 | map.put("ljbc", ljbc); |
| 2645 | 2656 | |
| 2646 | 2657 | return map; | ... | ... |