Commit d618f3c9b090c51c46dc022fb68baaecc003e902
1 parent
e3c63e2e
在‘行车路单’与‘班次日报表’中显示电量接口接入的充电量
Showing
7 changed files
with
386 additions
and
210 deletions
src/main/java/com/bsth/entity/oil/Dlb.java
| @@ -39,11 +39,13 @@ public class Dlb { | @@ -39,11 +39,13 @@ public class Dlb { | ||
| 39 | private String jhsj; | 39 | private String jhsj; |
| 40 | //耗电 | 40 | //耗电 |
| 41 | private Double hd=0.0; | 41 | private Double hd=0.0; |
| 42 | + //损耗 | ||
| 42 | private Double sh=0.0; | 43 | private Double sh=0.0; |
| 43 | private String shyy; | 44 | private String shyy; |
| 44 | private Double zlc=0.0; | 45 | private Double zlc=0.0; |
| 45 | private int yhlx; | 46 | private int yhlx; |
| 46 | - | 47 | + |
| 48 | + //当前存入百公里油耗 | ||
| 47 | private Double ns=0.0; | 49 | private Double ns=0.0; |
| 48 | private Double fyylc=0.0; | 50 | private Double fyylc=0.0; |
| 49 | private Double jhzlc=0.0; | 51 | private Double jhzlc=0.0; |
src/main/java/com/bsth/repository/oil/DlbRepository.java
| @@ -26,13 +26,22 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -26,13 +26,22 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 26 | List<Dlb> obtainYlbefore(String rq,String gsdm,String fgsdm,String xlbm,String nbbm); | 26 | List<Dlb> obtainYlbefore(String rq,String gsdm,String fgsdm,String xlbm,String nbbm); |
| 27 | /** | 27 | /** |
| 28 | * 当天DLB信息 | 28 | * 当天DLB信息 |
| 29 | - * @param rq | 29 | + * @param rq, xlbm(like) |
| 30 | * @return | 30 | * @return |
| 31 | */ | 31 | */ |
| 32 | @Query(value="SELECT * FROM bsth_c_dlb where rq=?1 and ssgsdm like %?2% " | 32 | @Query(value="SELECT * FROM bsth_c_dlb where rq=?1 and ssgsdm like %?2% " |
| 33 | + " and fgsdm like %?3%" | 33 | + " and fgsdm like %?3%" |
| 34 | + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc",nativeQuery=true) | 34 | + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc",nativeQuery=true) |
| 35 | List<Dlb> obtainDl(String rq,String gsbm,String fgsdm,String xlbm,String nbbm,String px); | 35 | List<Dlb> obtainDl(String rq,String gsbm,String fgsdm,String xlbm,String nbbm,String px); |
| 36 | + /** | ||
| 37 | + * 当天DLB信息 | ||
| 38 | + * @param rq, xlbm(=) | ||
| 39 | + * @return | ||
| 40 | + */ | ||
| 41 | + @Query(value="SELECT * FROM bsth_c_dlb where rq=?1 and ssgsdm like %?2% " | ||
| 42 | + + " and fgsdm like %?3%" | ||
| 43 | + + " and xlbm = ?4 and nbbm like %?5% order by ?6 asc",nativeQuery=true) | ||
| 44 | + List<Dlb> obtainDlEq(String rq,String gsbm,String fgsdm,String xlbm,String nbbm,String px); | ||
| 36 | 45 | ||
| 37 | @Query(value="select s from Dlb s " | 46 | @Query(value="select s from Dlb s " |
| 38 | + " where to_days(s.rq)=to_days(?1) " | 47 | + " where to_days(s.rq)=to_days(?1) " |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| @@ -2682,6 +2682,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -2682,6 +2682,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 2682 | double jzl = 0.0; | 2682 | double jzl = 0.0; |
| 2683 | double zlc = 0.0; | 2683 | double zlc = 0.0; |
| 2684 | String rylx=""; | 2684 | String rylx=""; |
| 2685 | + double ccyl_ = 0.0; | ||
| 2686 | + double jcyl_ = 0.0; | ||
| 2687 | + double yh_ = 0.0; | ||
| 2688 | + double jzl_ = 0.0; | ||
| 2685 | // List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(),xlbm); | 2689 | // List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(),xlbm); |
| 2686 | // List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(),xlbm); | 2690 | // List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(),xlbm); |
| 2687 | List<Ylb> listYlb = ylbMap.get(jsy + nbbm); | 2691 | List<Ylb> listYlb = ylbMap.get(jsy + nbbm); |
| @@ -2690,57 +2694,105 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -2690,57 +2694,105 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 2690 | // List<Cars> listCars = carsRepository.findCarsByCode(s.getClZbh()); | 2694 | // List<Cars> listCars = carsRepository.findCarsByCode(s.getClZbh()); |
| 2691 | List<Cars> listCars = carMap.get(s.getClZbh()); | 2695 | List<Cars> listCars = carMap.get(s.getClZbh()); |
| 2692 | if (listCars != null && listCars.size() > 0) { | 2696 | if (listCars != null && listCars.size() > 0) { |
| 2693 | - if(listCars.get(0).getSfdc()!=null){ | ||
| 2694 | - if (listCars.get(0).getSfdc()) { | ||
| 2695 | - type = 1; | ||
| 2696 | - if(listDlb != null) | ||
| 2697 | - for (int i = 0; i < listDlb.size(); i++) { | ||
| 2698 | - Dlb d = listDlb.get(i); | ||
| 2699 | - if (d.getLp() == null) { | ||
| 2700 | - ccyl = Arith.add(ccyl, d.getCzcd()); | ||
| 2701 | - jcyl = Arith.add(jcyl, d.getJzcd()); | ||
| 2702 | - yh = Arith.add(yh, d.getHd()); | ||
| 2703 | - jzl = Arith.add(jzl, d.getCdl()); | ||
| 2704 | - zlc = Arith.add(zlc, d.getZlc()); | ||
| 2705 | - } else { | ||
| 2706 | - if (d.getLp().equals(s.getLpName())) { | ||
| 2707 | - ccyl = Arith.add(ccyl, d.getCzcd()); | ||
| 2708 | - jcyl = Arith.add(jcyl, d.getJzcd()); | ||
| 2709 | - yh = Arith.add(yh, d.getHd()); | ||
| 2710 | - jzl = Arith.add(jzl, d.getCdl()); | ||
| 2711 | - zlc = Arith.add(zlc, d.getZlc()); | ||
| 2712 | - } | ||
| 2713 | - } | ||
| 2714 | - | ||
| 2715 | - } | ||
| 2716 | - } else { | ||
| 2717 | - type = 0; | ||
| 2718 | - if(listYlb != null) | ||
| 2719 | - for (int i = 0; i < listYlb.size(); i++) { | ||
| 2720 | - Ylb y = listYlb.get(i); | ||
| 2721 | - if (y.getLp() == null) { | ||
| 2722 | - ccyl = Arith.add(ccyl, y.getCzyl()); | ||
| 2723 | - jcyl = Arith.add(jcyl, y.getJzyl()); | ||
| 2724 | - yh = Arith.add(yh, y.getYh()); | ||
| 2725 | - jzl = Arith.add(jzl, y.getJzl()); | ||
| 2726 | - zlc = Arith.add(zlc, y.getZlc()); | ||
| 2727 | - if(dMap.get(y.getRylx())!=null) | ||
| 2728 | - rylx=dMap.get(y.getRylx()).toString(); | ||
| 2729 | - } else { | ||
| 2730 | - if (y.getLp().equals(s.getLpName())) { | ||
| 2731 | - ccyl = Arith.add(ccyl, y.getCzyl()); | ||
| 2732 | - jcyl = Arith.add(jcyl, y.getJzyl()); | ||
| 2733 | - yh = Arith.add(yh, y.getYh()); | ||
| 2734 | - jzl = Arith.add(jzl, y.getJzl()); | ||
| 2735 | - zlc = Arith.add(zlc, y.getZlc()); | ||
| 2736 | - if(dMap.get(y.getRylx())!=null) | ||
| 2737 | - rylx=dMap.get(y.getRylx()).toString(); | ||
| 2738 | - | ||
| 2739 | - } | ||
| 2740 | - } | ||
| 2741 | - } | ||
| 2742 | - } | ||
| 2743 | - } | 2697 | + if (listCars.get(0).getNyType() != null) { |
| 2698 | + if ("1".equals(listCars.get(0).getNyType().toString())) { //全电 | ||
| 2699 | +// List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(), xlbm); | ||
| 2700 | + type = 1; | ||
| 2701 | + if(listDlb != null){ | ||
| 2702 | + for (int i = 0; i < listDlb.size(); i++) { | ||
| 2703 | + Dlb d = listDlb.get(i); | ||
| 2704 | + if (d.getLp() == null) { | ||
| 2705 | + ccyl = Arith.add(ccyl, d.getCzcd()); | ||
| 2706 | + jcyl = Arith.add(jcyl, d.getJzcd()); | ||
| 2707 | + yh = Arith.add(yh, d.getHd()); | ||
| 2708 | + jzl = Arith.add(jzl, d.getCdl()); | ||
| 2709 | + zlc = Arith.add(zlc, d.getZlc()); | ||
| 2710 | + } else { | ||
| 2711 | + if (d.getLp().equals(s.getLpName())) { | ||
| 2712 | + ccyl = Arith.add(ccyl, d.getCzcd()); | ||
| 2713 | + jcyl = Arith.add(jcyl, d.getJzcd()); | ||
| 2714 | + yh = Arith.add(yh, d.getHd()); | ||
| 2715 | + jzl = Arith.add(jzl, d.getCdl()); | ||
| 2716 | + zlc = Arith.add(zlc, d.getZlc()); | ||
| 2717 | + } | ||
| 2718 | + } | ||
| 2719 | + } | ||
| 2720 | + } | ||
| 2721 | + } else if("2".equals(listCars.get(0).getNyType().toString())){ //油点混合 | ||
| 2722 | +// List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(), xlbm); | ||
| 2723 | +// List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(), xlbm); | ||
| 2724 | + type = 2; | ||
| 2725 | + if(listYlb != null){ | ||
| 2726 | + for (int i = 0; i < listYlb.size(); i++) { | ||
| 2727 | + Ylb y = listYlb.get(i); | ||
| 2728 | + if (y.getLp() == null) { | ||
| 2729 | + ccyl = Arith.add(ccyl, y.getCzyl()); | ||
| 2730 | + jcyl = Arith.add(jcyl, y.getJzyl()); | ||
| 2731 | + yh = Arith.add(yh, y.getYh()); | ||
| 2732 | + jzl = Arith.add(jzl, y.getJzl()); | ||
| 2733 | + zlc = Arith.add(zlc, y.getZlc()); | ||
| 2734 | + if(dMap.get(y.getRylx())!=null) | ||
| 2735 | + rylx =dMap.get(y.getRylx()).toString(); | ||
| 2736 | + } else { | ||
| 2737 | + if (y.getLp().equals(s.getLpName())) { | ||
| 2738 | + ccyl = Arith.add(ccyl, y.getCzyl()); | ||
| 2739 | + jcyl = Arith.add(jcyl, y.getJzyl()); | ||
| 2740 | + yh = Arith.add(yh, y.getYh()); | ||
| 2741 | + jzl = Arith.add(jzl, y.getJzl()); | ||
| 2742 | + zlc = Arith.add(zlc, y.getZlc()); | ||
| 2743 | + if(dMap.get(y.getRylx())!=null) | ||
| 2744 | + rylx =dMap.get(y.getRylx()).toString(); | ||
| 2745 | + } | ||
| 2746 | + } | ||
| 2747 | + } | ||
| 2748 | + } | ||
| 2749 | + if(listDlb != null){ | ||
| 2750 | + for (int i = 0; i < listDlb.size(); i++) { | ||
| 2751 | + Dlb d = listDlb.get(i); | ||
| 2752 | + if (d.getLp() == null) { | ||
| 2753 | + ccyl_ = Arith.add(ccyl_, d.getCzcd()); | ||
| 2754 | + jcyl_ = Arith.add(jcyl_, d.getJzcd()); | ||
| 2755 | + yh_ = Arith.add(yh_, d.getHd()); | ||
| 2756 | + jzl_ = Arith.add(jzl, d.getCdl()); | ||
| 2757 | + } else { | ||
| 2758 | + if (d.getLp().equals(s.getLpName())) { | ||
| 2759 | + ccyl_ = Arith.add(ccyl_, d.getCzcd()); | ||
| 2760 | + jcyl_ = Arith.add(jcyl_, d.getJzcd()); | ||
| 2761 | + yh_ = Arith.add(yh_, d.getHd()); | ||
| 2762 | + jzl_ = Arith.add(jzl_, d.getCdl()); | ||
| 2763 | + } | ||
| 2764 | + } | ||
| 2765 | + } | ||
| 2766 | + } | ||
| 2767 | + } else { | ||
| 2768 | +// List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(), xlbm); | ||
| 2769 | + type = 0; | ||
| 2770 | + if(listYlb != null){ | ||
| 2771 | + for (int i = 0; i < listYlb.size(); i++) { | ||
| 2772 | + Ylb y = listYlb.get(i); | ||
| 2773 | + if (y.getLp() == null) { | ||
| 2774 | + ccyl = Arith.add(ccyl, y.getCzyl()); | ||
| 2775 | + jcyl = Arith.add(jcyl, y.getJzyl()); | ||
| 2776 | + yh = Arith.add(yh, y.getYh()); | ||
| 2777 | + jzl = Arith.add(jzl, y.getJzl()); | ||
| 2778 | + zlc = Arith.add(zlc, y.getZlc()); | ||
| 2779 | + if(dMap.get(y.getRylx())!=null) | ||
| 2780 | + rylx =dMap.get(y.getRylx()).toString(); | ||
| 2781 | + } else { | ||
| 2782 | + if (y.getLp().equals(s.getLpName())) { | ||
| 2783 | + ccyl = Arith.add(ccyl, y.getCzyl()); | ||
| 2784 | + jcyl = Arith.add(jcyl, y.getJzyl()); | ||
| 2785 | + yh = Arith.add(yh, y.getYh()); | ||
| 2786 | + jzl = Arith.add(jzl, y.getJzl()); | ||
| 2787 | + zlc = Arith.add(zlc, y.getZlc()); | ||
| 2788 | + if(dMap.get(y.getRylx())!=null) | ||
| 2789 | + rylx =dMap.get(y.getRylx()).toString(); | ||
| 2790 | + } | ||
| 2791 | + } | ||
| 2792 | + } | ||
| 2793 | + } | ||
| 2794 | + } | ||
| 2795 | + } | ||
| 2744 | } | 2796 | } |
| 2745 | double jylc=ylbMapJylc.get(line+"-"+jGh+"-"+nbbm+"-"+lpName)==null?0.0:ylbMapJylc.get(line+"-"+jGh+"-"+nbbm+"-"+lpName); | 2797 | double jylc=ylbMapJylc.get(line+"-"+jGh+"-"+nbbm+"-"+lpName)==null?0.0:ylbMapJylc.get(line+"-"+jGh+"-"+nbbm+"-"+lpName); |
| 2746 | Map.put("jylc", jylc); | 2798 | Map.put("jylc", jylc); |
| @@ -2749,6 +2801,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -2749,6 +2801,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 2749 | Map.put("yh", yh); | 2801 | Map.put("yh", yh); |
| 2750 | Map.put("ccyl", ccyl); | 2802 | Map.put("ccyl", ccyl); |
| 2751 | Map.put("jcyl", jcyl); | 2803 | Map.put("jcyl", jcyl); |
| 2804 | + Map.put("jzl_", jzl_); | ||
| 2805 | + Map.put("yh_", yh_); | ||
| 2806 | + Map.put("ccyl_", ccyl_); | ||
| 2807 | + Map.put("jcyl_", jcyl_); | ||
| 2752 | Map.put("type", type); | 2808 | Map.put("type", type); |
| 2753 | Map.put("zlc", zlc); | 2809 | Map.put("zlc", zlc); |
| 2754 | Map.put("xlName", s.getXlName()); | 2810 | Map.put("xlName", s.getXlName()); |
| @@ -2964,8 +3020,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -2964,8 +3020,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 2964 | String xls=""; | 3020 | String xls=""; |
| 2965 | if(Map.get("type").toString().equals("0")){ | 3021 | if(Map.get("type").toString().equals("0")){ |
| 2966 | xls="waybill_minhang.xls"; | 3022 | xls="waybill_minhang.xls"; |
| 2967 | - }else{ | 3023 | + } else if(Map.get("type").toString().equals("1")){ |
| 2968 | xls="waybill_minhang_dl.xls"; | 3024 | xls="waybill_minhang_dl.xls"; |
| 3025 | + } else { | ||
| 3026 | + xls="waybill_minhang_yd.xls"; | ||
| 2969 | } | 3027 | } |
| 2970 | Map.put("sheetName", jName + "-" + clZbh + "-" + lpName); | 3028 | Map.put("sheetName", jName + "-" + clZbh + "-" + lpName); |
| 2971 | ee.excelReplace(list1, new Object[]{Map}, path1 + "mould/"+xls, | 3029 | ee.excelReplace(list1, new Object[]{Map}, path1 + "mould/"+xls, |
src/main/java/com/bsth/service/jdtest/impl/JdtestServiceImpl.java
| @@ -14,13 +14,13 @@ import org.springframework.jdbc.core.JdbcTemplate; | @@ -14,13 +14,13 @@ import org.springframework.jdbc.core.JdbcTemplate; | ||
| 14 | import org.springframework.jdbc.core.RowMapper; | 14 | import org.springframework.jdbc.core.RowMapper; |
| 15 | import org.springframework.stereotype.Service; | 15 | import org.springframework.stereotype.Service; |
| 16 | 16 | ||
| 17 | -import com.bsth.entity.mcy_forms.Daily; | ||
| 18 | import com.bsth.entity.oil.Dlb; | 17 | import com.bsth.entity.oil.Dlb; |
| 19 | import com.bsth.entity.oil.Ylb; | 18 | import com.bsth.entity.oil.Ylb; |
| 20 | import com.bsth.entity.oil.Ylxxb; | 19 | import com.bsth.entity.oil.Ylxxb; |
| 21 | import com.bsth.entity.realcontrol.ChildTaskPlan; | 20 | import com.bsth.entity.realcontrol.ChildTaskPlan; |
| 22 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 21 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 23 | import com.bsth.entity.sys.Dictionary; | 22 | import com.bsth.entity.sys.Dictionary; |
| 23 | +import com.bsth.repository.oil.DlbRepository; | ||
| 24 | import com.bsth.repository.oil.YlbRepository; | 24 | import com.bsth.repository.oil.YlbRepository; |
| 25 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | 25 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 26 | import com.bsth.service.jdtest.JdtestService; | 26 | import com.bsth.service.jdtest.JdtestService; |
| @@ -40,6 +40,8 @@ public class JdtestServiceImpl implements JdtestService { | @@ -40,6 +40,8 @@ public class JdtestServiceImpl implements JdtestService { | ||
| 40 | @Autowired | 40 | @Autowired |
| 41 | YlbRepository ylbRepository; | 41 | YlbRepository ylbRepository; |
| 42 | @Autowired | 42 | @Autowired |
| 43 | + DlbRepository dlbRepository; | ||
| 44 | + @Autowired | ||
| 43 | DictionaryService dictionaryService; | 45 | DictionaryService dictionaryService; |
| 44 | @Override | 46 | @Override |
| 45 | public List<Ylxxb> cwjyList(Map<String, Object> map) { | 47 | public List<Ylxxb> cwjyList(Map<String, Object> map) { |
| @@ -159,13 +161,26 @@ public class JdtestServiceImpl implements JdtestService { | @@ -159,13 +161,26 @@ public class JdtestServiceImpl implements JdtestService { | ||
| 159 | }else{ | 161 | }else{ |
| 160 | listYlb=ylbRepository.obtainYlEq(map.get("date").toString(), "", "", xlbm, "", "xlbm"); | 162 | listYlb=ylbRepository.obtainYlEq(map.get("date").toString(), "", "", xlbm, "", "xlbm"); |
| 161 | } | 163 | } |
| 162 | - Map<String, Ylb> mapYlb=new HashMap<>(); | 164 | + Map<String, Ylb> mapYlb=new HashMap<String, Ylb>(); |
| 163 | for (int j = 0; j < listYlb.size(); j++) { | 165 | for (int j = 0; j < listYlb.size(); j++) { |
| 164 | Ylb y=listYlb.get(j); | 166 | Ylb y=listYlb.get(j); |
| 165 | if(mapYlb.get(y.getXlbm()+y.getJsy()+y.getNbbm()+y.getLp())==null){ | 167 | if(mapYlb.get(y.getXlbm()+y.getJsy()+y.getNbbm()+y.getLp())==null){ |
| 166 | mapYlb.put(y.getXlbm()+y.getJsy()+y.getNbbm()+y.getLp(), y); | 168 | mapYlb.put(y.getXlbm()+y.getJsy()+y.getNbbm()+y.getLp(), y); |
| 167 | } | 169 | } |
| 168 | } | 170 | } |
| 171 | + List<Dlb> listDlb=new ArrayList<Dlb>(); | ||
| 172 | + if(xlbm.equals("")){ | ||
| 173 | + listDlb=dlbRepository.obtainDl(map.get("date").toString(), gsbm, fgsbm, xlbm, "", "xlbm"); | ||
| 174 | + }else{ | ||
| 175 | + listDlb=dlbRepository.obtainDlEq(map.get("date").toString(), "", "", xlbm, "", "xlbm"); | ||
| 176 | + } | ||
| 177 | + Map<String, Dlb> mapDlb=new HashMap<String, Dlb>(); | ||
| 178 | + for (int i = 0; i < listDlb.size(); i++) { | ||
| 179 | + Dlb d = listDlb.get(i); | ||
| 180 | + if(mapDlb.get(d.getXlbm()+d.getJsy()+d.getNbbm()+d.getLp()) == null){ | ||
| 181 | + mapDlb.put(d.getXlbm()+d.getJsy()+d.getNbbm()+d.getLp(), d); | ||
| 182 | + } | ||
| 183 | + } | ||
| 169 | 184 | ||
| 170 | List<ScheduleRealInfo> sList; | 185 | List<ScheduleRealInfo> sList; |
| 171 | List<ScheduleRealInfo> jList; | 186 | List<ScheduleRealInfo> jList; |
| @@ -180,6 +195,7 @@ public class JdtestServiceImpl implements JdtestService { | @@ -180,6 +195,7 @@ public class JdtestServiceImpl implements JdtestService { | ||
| 180 | double czyl_z=0.0; | 195 | double czyl_z=0.0; |
| 181 | double jzl_z=0.0; | 196 | double jzl_z=0.0; |
| 182 | double yh_z=0.0; | 197 | double yh_z=0.0; |
| 198 | + double dh_z=0.0; | ||
| 183 | int jhbc_z=0; | 199 | int jhbc_z=0; |
| 184 | double jhlc_z=0.0; | 200 | double jhlc_z=0.0; |
| 185 | int sjbc_z=0; | 201 | int sjbc_z=0; |
| @@ -193,6 +209,7 @@ public class JdtestServiceImpl implements JdtestService { | @@ -193,6 +209,7 @@ public class JdtestServiceImpl implements JdtestService { | ||
| 193 | double czyl_line=0.0; | 209 | double czyl_line=0.0; |
| 194 | double jzl_line=0.0; | 210 | double jzl_line=0.0; |
| 195 | double yh_line=0.0; | 211 | double yh_line=0.0; |
| 212 | + double dh_line=0.0; | ||
| 196 | int jhbc_line=0; | 213 | int jhbc_line=0; |
| 197 | double jhlc_line=0.0; | 214 | double jhlc_line=0.0; |
| 198 | int sjbc_line=0; | 215 | int sjbc_line=0; |
| @@ -209,6 +226,7 @@ public class JdtestServiceImpl implements JdtestService { | @@ -209,6 +226,7 @@ public class JdtestServiceImpl implements JdtestService { | ||
| 209 | double czyl=0.0; | 226 | double czyl=0.0; |
| 210 | double jzl=0.0; | 227 | double jzl=0.0; |
| 211 | double yh=0.0; | 228 | double yh=0.0; |
| 229 | + double dh=0.0; //电耗 | ||
| 212 | String rylx=""; | 230 | String rylx=""; |
| 213 | if(mapYlb.get(m.get("xlBm").toString()+m.get("jGh").toString()+m.get("clZbh").toString()+m.get("lp").toString())!=null){ | 231 | if(mapYlb.get(m.get("xlBm").toString()+m.get("jGh").toString()+m.get("clZbh").toString()+m.get("lp").toString())!=null){ |
| 214 | Ylb t=mapYlb.get(m.get("xlBm").toString()+m.get("jGh").toString()+m.get("clZbh").toString()+m.get("lp").toString()); | 232 | Ylb t=mapYlb.get(m.get("xlBm").toString()+m.get("jGh").toString()+m.get("clZbh").toString()+m.get("lp").toString()); |
| @@ -225,6 +243,10 @@ public class JdtestServiceImpl implements JdtestService { | @@ -225,6 +243,10 @@ public class JdtestServiceImpl implements JdtestService { | ||
| 225 | } | 243 | } |
| 226 | } | 244 | } |
| 227 | } | 245 | } |
| 246 | + if(mapDlb.get(m.get("xlBm").toString()+m.get("jGh").toString()+m.get("clZbh").toString()+m.get("lp").toString())!=null){ | ||
| 247 | + Dlb d=mapDlb.get(m.get("xlBm").toString()+m.get("jGh").toString()+m.get("clZbh").toString()+m.get("lp").toString()); | ||
| 248 | + dh = d.getHd(); | ||
| 249 | + } | ||
| 228 | m.put("jylc",jylc); | 250 | m.put("jylc",jylc); |
| 229 | jylc_z=Arith.add(jylc, jylc_z); | 251 | jylc_z=Arith.add(jylc, jylc_z); |
| 230 | m.put("jzyl",jzyl); | 252 | m.put("jzyl",jzyl); |
| @@ -236,7 +258,8 @@ public class JdtestServiceImpl implements JdtestService { | @@ -236,7 +258,8 @@ public class JdtestServiceImpl implements JdtestService { | ||
| 236 | m.put("yh", yh); | 258 | m.put("yh", yh); |
| 237 | yh_z=Arith.add(yh, yh_z); | 259 | yh_z=Arith.add(yh, yh_z); |
| 238 | m.put("rylx", rylx); | 260 | m.put("rylx", rylx); |
| 239 | - m.put("dh", ""); | 261 | + m.put("dh", dh); |
| 262 | + dh_z=Arith.add(dh, dh_z); | ||
| 240 | for (int j = 0; j < lists.size(); j++) { | 263 | for (int j = 0; j < lists.size(); j++) { |
| 241 | ScheduleRealInfo s=lists.get(j); | 264 | ScheduleRealInfo s=lists.get(j); |
| 242 | if(m.get("xlBm").toString().equals(s.getXlBm()) && | 265 | if(m.get("xlBm").toString().equals(s.getXlBm()) && |
| @@ -263,6 +286,7 @@ public class JdtestServiceImpl implements JdtestService { | @@ -263,6 +286,7 @@ public class JdtestServiceImpl implements JdtestService { | ||
| 263 | double jhlc=culateMileageService.culateJhgl(jList); | 286 | double jhlc=culateMileageService.culateJhgl(jList); |
| 264 | jhlc_z=Arith.add(jhlc, jhlc_z); | 287 | jhlc_z=Arith.add(jhlc, jhlc_z); |
| 265 | int sjbc=culateMileageService.culateSjbc(sList, "")+culateMileageService.culateLjbc(sList, ""); | 288 | int sjbc=culateMileageService.culateSjbc(sList, "")+culateMileageService.culateLjbc(sList, ""); |
| 289 | + sjbc_z=sjbc+sjbc_z; | ||
| 266 | double ljgl=culateMileageService.culateLjgl(sList); | 290 | double ljgl=culateMileageService.culateLjgl(sList); |
| 267 | double sjgl=culateMileageService.culateSjgl(sList); | 291 | double sjgl=culateMileageService.culateSjgl(sList); |
| 268 | double sjzlc=Arith.add(ljgl, sjgl); | 292 | double sjzlc=Arith.add(ljgl, sjgl); |
| @@ -284,127 +308,154 @@ public class JdtestServiceImpl implements JdtestService { | @@ -284,127 +308,154 @@ public class JdtestServiceImpl implements JdtestService { | ||
| 284 | m.put("zlc2", zlc2); | 308 | m.put("zlc2", zlc2); |
| 285 | listAll.add(m); | 309 | listAll.add(m); |
| 286 | //线路小计 | 310 | //线路小计 |
| 287 | - if (i < list.size() - 1) { | ||
| 288 | - if ((list.get(i+1).get("xlBm").toString()).equals(list.get(i).get("xlBm").toString())) { | ||
| 289 | - jylc_line=Arith.add(jylc_line, jylc); | ||
| 290 | - jzyl_line=Arith.add(jzyl_line, jzyl); | ||
| 291 | - czyl_line=Arith.add(czyl_line, czyl); | ||
| 292 | - jzl_line=Arith.add(jzl_line, jzl); | ||
| 293 | - yh_line=Arith.add(yh_line, yh); | ||
| 294 | - jhbc_line=jhbc_line+jhbc; | ||
| 295 | - jhlc_line=Arith.add(jhlc_line,jhlc); | ||
| 296 | - sjbc_line=sjbc_line+sjbc; | ||
| 297 | - sjzlc_line=Arith.add(sjzlc_line, sjzlc); | ||
| 298 | - kszlc_line=Arith.add(kszlc_line,kszlc); | ||
| 299 | - zlc_line=Arith.add(zlc_line, zlc); | ||
| 300 | - zlc_line2=Arith.add(zlc_line2, zlc2); | ||
| 301 | - } else { | ||
| 302 | - jylc_line=Arith.add(jylc_line, jylc); | ||
| 303 | - jzyl_line=Arith.add(jzyl_line, jzyl); | ||
| 304 | - czyl_line=Arith.add(czyl_line, czyl); | ||
| 305 | - jzl_line=Arith.add(jzl_line, jzl); | ||
| 306 | - yh_line=Arith.add(yh_line, yh); | ||
| 307 | - jhbc_line=jhbc_line+jhbc; | ||
| 308 | - jhlc_line=Arith.add(jhlc_line,jhlc); | ||
| 309 | - sjbc_line=sjbc_line+sjbc; | ||
| 310 | - sjzlc_line=Arith.add(sjzlc_line, sjzlc); | ||
| 311 | - kszlc_line=Arith.add(kszlc_line,kszlc); | ||
| 312 | - zlc_line=Arith.add(zlc_line, zlc); | ||
| 313 | - zlc_line2=Arith.add(zlc_line2, zlc2); | ||
| 314 | - | ||
| 315 | - Map<String, Object> mmm=new HashMap<>(); | ||
| 316 | - mmm.put("xlName", "小计"); | ||
| 317 | - mmm.put("lp", ""); | ||
| 318 | - mmm.put("jGh", ""); | ||
| 319 | - mmm.put("clZbh", ""); | ||
| 320 | - mmm.put("jName", ""); | ||
| 321 | - mmm.put("jhbc", jhbc_line); | ||
| 322 | - mmm.put("jhlc", jhlc_line); | ||
| 323 | - mmm.put("sjbc", sjbc_line); | ||
| 324 | - mmm.put("sjzlc", sjzlc_line); | ||
| 325 | - mmm.put("kszlc",kszlc_line); | ||
| 326 | - mmm.put("jylc", jylc_line); | ||
| 327 | - mmm.put("zlc", zlc_line); | ||
| 328 | - mmm.put("zlc2", zlc_line2); | ||
| 329 | - mmm.put("jzyl",jzyl_line); | ||
| 330 | - mmm.put("czyl",czyl_line); | ||
| 331 | - mmm.put("jzl", jzl_line); | ||
| 332 | - mmm.put("yh", yh_line); | ||
| 333 | - mmm.put("rylx", ""); | ||
| 334 | - mmm.put("dh",""); | ||
| 335 | - listAll.add(mmm); | ||
| 336 | - jylc_line=0.0; | ||
| 337 | - jzyl_line=0.0; | ||
| 338 | - czyl_line=0.0; | ||
| 339 | - jzl_line=0.0; | ||
| 340 | - yh_line=0.0; | ||
| 341 | - jhbc_line=0; | ||
| 342 | - jhlc_line=0.0; | ||
| 343 | - sjbc_line=0; | ||
| 344 | - sjzlc_line=0.0; | ||
| 345 | - kszlc_line=0.0; | ||
| 346 | - zlc_line=0.0; | ||
| 347 | - zlc_line2=0.0; | ||
| 348 | - } | ||
| 349 | - } else { | ||
| 350 | - if ((list.get(i).get("xlBm").toString()).equals(list.get(i - 1).get("xlBm").toString())) { | ||
| 351 | - jylc_line=Arith.add(jylc_line, jylc); | ||
| 352 | - jzyl_line=Arith.add(jzyl_line, jzyl); | ||
| 353 | - czyl_line=Arith.add(czyl_line, czyl); | ||
| 354 | - jzl_line=Arith.add(jzl_line, jzl); | ||
| 355 | - yh_line=Arith.add(yh_line, yh); | ||
| 356 | - jhbc_line=jhbc_line+jhbc; | ||
| 357 | - jhlc_line=Arith.add(jhlc_line,jhlc); | ||
| 358 | - sjbc_line=sjbc_line+sjbc; | ||
| 359 | - sjzlc_line=Arith.add(sjzlc_line, sjzlc); | ||
| 360 | - kszlc_line=Arith.add(kszlc_line,kszlc); | ||
| 361 | - zlc_line=Arith.add(zlc_line, zlc); | ||
| 362 | - zlc_line2=Arith.add(zlc_line2, zlc2); | ||
| 363 | - Map<String, Object> mmm=new HashMap<>(); | ||
| 364 | - mmm.put("xlName", "小计"); | ||
| 365 | - mmm.put("lp", ""); | ||
| 366 | - mmm.put("jGh", ""); | ||
| 367 | - mmm.put("clZbh", ""); | ||
| 368 | - mmm.put("jName", ""); | ||
| 369 | - mmm.put("jhbc", jhbc_line); | ||
| 370 | - mmm.put("jhlc", jhlc_line); | ||
| 371 | - mmm.put("sjbc", sjbc_line); | ||
| 372 | - mmm.put("sjzlc", sjzlc_line); | ||
| 373 | - mmm.put("kszlc",kszlc_line); | ||
| 374 | - mmm.put("jylc", jylc_line); | ||
| 375 | - mmm.put("zlc", zlc_line); | ||
| 376 | - mmm.put("zlc2", zlc_line2); | ||
| 377 | - mmm.put("jzyl",jzyl_line); | ||
| 378 | - mmm.put("czyl",czyl_line); | ||
| 379 | - mmm.put("jzl", jzl_line); | ||
| 380 | - mmm.put("yh", yh_line); | ||
| 381 | - mmm.put("rylx", ""); | ||
| 382 | - mmm.put("dh",""); | ||
| 383 | - listAll.add(mmm); | ||
| 384 | - } else { | ||
| 385 | - | ||
| 386 | - Map<String, Object> mmm=new HashMap<>(); | ||
| 387 | - mmm.put("xlName", "小计"); | ||
| 388 | - mmm.put("lp", ""); | ||
| 389 | - mmm.put("jGh", ""); | ||
| 390 | - mmm.put("clZbh", ""); | ||
| 391 | - mmm.put("jName", ""); | ||
| 392 | - mmm.put("jhbc", jhbc); | ||
| 393 | - mmm.put("jhlc", jhlc); | ||
| 394 | - mmm.put("sjbc", sjbc); | ||
| 395 | - mmm.put("sjzlc", sjzlc); | ||
| 396 | - mmm.put("kszlc",kszlc); | ||
| 397 | - mmm.put("jylc", jylc_line); | ||
| 398 | - mmm.put("zlc", zlc); | ||
| 399 | - mmm.put("zlc2", zlc2); | ||
| 400 | - mmm.put("jzyl",jzyl); | ||
| 401 | - mmm.put("czyl",czyl); | ||
| 402 | - mmm.put("jzl", jzl); | ||
| 403 | - mmm.put("yh", yh); | ||
| 404 | - mmm.put("rylx", ""); | ||
| 405 | - mmm.put("dh",""); | ||
| 406 | - listAll.add(mmm); | ||
| 407 | - } | 311 | + if(list.size()==1){ |
| 312 | + Map<String, Object> mmm=new HashMap<>(); | ||
| 313 | + mmm.put("xlName", "小计"); | ||
| 314 | + mmm.put("lp", ""); | ||
| 315 | + mmm.put("jGh", ""); | ||
| 316 | + mmm.put("clZbh", ""); | ||
| 317 | + mmm.put("jName", ""); | ||
| 318 | + mmm.put("jhbc", jhbc); | ||
| 319 | + mmm.put("jhlc", jhlc); | ||
| 320 | + mmm.put("sjbc", sjbc); | ||
| 321 | + mmm.put("sjzlc", sjzlc); | ||
| 322 | + mmm.put("kszlc",kszlc); | ||
| 323 | + mmm.put("jylc", jylc_line); | ||
| 324 | + mmm.put("zlc", zlc); | ||
| 325 | + mmm.put("zlc2", zlc2); | ||
| 326 | + mmm.put("jzyl",jzyl); | ||
| 327 | + mmm.put("czyl",czyl); | ||
| 328 | + mmm.put("jzl", jzl); | ||
| 329 | + mmm.put("yh", yh); | ||
| 330 | + mmm.put("rylx", ""); | ||
| 331 | + mmm.put("dh", dh); | ||
| 332 | + listAll.add(mmm); | ||
| 333 | + }else{ | ||
| 334 | + if (i < list.size() - 1) { | ||
| 335 | + if ((list.get(i+1).get("xlBm").toString()).equals(list.get(i).get("xlBm").toString())) { | ||
| 336 | + jylc_line=Arith.add(jylc_line, jylc); | ||
| 337 | + jzyl_line=Arith.add(jzyl_line, jzyl); | ||
| 338 | + czyl_line=Arith.add(czyl_line, czyl); | ||
| 339 | + jzl_line=Arith.add(jzl_line, jzl); | ||
| 340 | + yh_line=Arith.add(yh_line, yh); | ||
| 341 | + dh_line=Arith.add(dh_line, dh); | ||
| 342 | + jhbc_line=jhbc_line+jhbc; | ||
| 343 | + jhlc_line=Arith.add(jhlc_line,jhlc); | ||
| 344 | + sjbc_line=sjbc_line+sjbc; | ||
| 345 | + sjzlc_line=Arith.add(sjzlc_line, sjzlc); | ||
| 346 | + kszlc_line=Arith.add(kszlc_line,kszlc); | ||
| 347 | + zlc_line=Arith.add(zlc_line, zlc); | ||
| 348 | + zlc_line2=Arith.add(zlc_line2, zlc2); | ||
| 349 | + } else { | ||
| 350 | + jylc_line=Arith.add(jylc_line, jylc); | ||
| 351 | + jzyl_line=Arith.add(jzyl_line, jzyl); | ||
| 352 | + czyl_line=Arith.add(czyl_line, czyl); | ||
| 353 | + jzl_line=Arith.add(jzl_line, jzl); | ||
| 354 | + yh_line=Arith.add(yh_line, yh); | ||
| 355 | + dh_line=Arith.add(dh_line, dh); | ||
| 356 | + jhbc_line=jhbc_line+jhbc; | ||
| 357 | + jhlc_line=Arith.add(jhlc_line,jhlc); | ||
| 358 | + sjbc_line=sjbc_line+sjbc; | ||
| 359 | + sjzlc_line=Arith.add(sjzlc_line, sjzlc); | ||
| 360 | + kszlc_line=Arith.add(kszlc_line,kszlc); | ||
| 361 | + zlc_line=Arith.add(zlc_line, zlc); | ||
| 362 | + zlc_line2=Arith.add(zlc_line2, zlc2); | ||
| 363 | + | ||
| 364 | + Map<String, Object> mmm=new HashMap<>(); | ||
| 365 | + mmm.put("xlName", "小计"); | ||
| 366 | + mmm.put("lp", ""); | ||
| 367 | + mmm.put("jGh", ""); | ||
| 368 | + mmm.put("clZbh", ""); | ||
| 369 | + mmm.put("jName", ""); | ||
| 370 | + mmm.put("jhbc", jhbc_line); | ||
| 371 | + mmm.put("jhlc", jhlc_line); | ||
| 372 | + mmm.put("sjbc", sjbc_line); | ||
| 373 | + mmm.put("sjzlc", sjzlc_line); | ||
| 374 | + mmm.put("kszlc",kszlc_line); | ||
| 375 | + mmm.put("jylc", jylc_line); | ||
| 376 | + mmm.put("zlc", zlc_line); | ||
| 377 | + mmm.put("zlc2", zlc_line2); | ||
| 378 | + mmm.put("jzyl",jzyl_line); | ||
| 379 | + mmm.put("czyl",czyl_line); | ||
| 380 | + mmm.put("jzl", jzl_line); | ||
| 381 | + mmm.put("yh", yh_line); | ||
| 382 | + mmm.put("rylx", ""); | ||
| 383 | + mmm.put("dh", dh_line); | ||
| 384 | + listAll.add(mmm); | ||
| 385 | + jylc_line=0.0; | ||
| 386 | + jzyl_line=0.0; | ||
| 387 | + czyl_line=0.0; | ||
| 388 | + jzl_line=0.0; | ||
| 389 | + yh_line=0.0; | ||
| 390 | + dh_line=0.0; | ||
| 391 | + jhbc_line=0; | ||
| 392 | + jhlc_line=0.0; | ||
| 393 | + sjbc_line=0; | ||
| 394 | + sjzlc_line=0.0; | ||
| 395 | + kszlc_line=0.0; | ||
| 396 | + zlc_line=0.0; | ||
| 397 | + zlc_line2=0.0; | ||
| 398 | + } | ||
| 399 | + } else { | ||
| 400 | + if ((list.get(i).get("xlBm").toString()).equals(list.get(i - 1).get("xlBm").toString())) { | ||
| 401 | + jylc_line=Arith.add(jylc_line, jylc); | ||
| 402 | + jzyl_line=Arith.add(jzyl_line, jzyl); | ||
| 403 | + czyl_line=Arith.add(czyl_line, czyl); | ||
| 404 | + jzl_line=Arith.add(jzl_line, jzl); | ||
| 405 | + yh_line=Arith.add(yh_line, yh); | ||
| 406 | + dh_line=Arith.add(dh_line, dh); | ||
| 407 | + jhbc_line=jhbc_line+jhbc; | ||
| 408 | + jhlc_line=Arith.add(jhlc_line,jhlc); | ||
| 409 | + sjbc_line=sjbc_line+sjbc; | ||
| 410 | + sjzlc_line=Arith.add(sjzlc_line, sjzlc); | ||
| 411 | + kszlc_line=Arith.add(kszlc_line,kszlc); | ||
| 412 | + zlc_line=Arith.add(zlc_line, zlc); | ||
| 413 | + zlc_line2=Arith.add(zlc_line2, zlc2); | ||
| 414 | + Map<String, Object> mmm=new HashMap<>(); | ||
| 415 | + mmm.put("xlName", "小计"); | ||
| 416 | + mmm.put("lp", ""); | ||
| 417 | + mmm.put("jGh", ""); | ||
| 418 | + mmm.put("clZbh", ""); | ||
| 419 | + mmm.put("jName", ""); | ||
| 420 | + mmm.put("jhbc", jhbc_line); | ||
| 421 | + mmm.put("jhlc", jhlc_line); | ||
| 422 | + mmm.put("sjbc", sjbc_line); | ||
| 423 | + mmm.put("sjzlc", sjzlc_line); | ||
| 424 | + mmm.put("kszlc",kszlc_line); | ||
| 425 | + mmm.put("jylc", jylc_line); | ||
| 426 | + mmm.put("zlc", zlc_line); | ||
| 427 | + mmm.put("zlc2", zlc_line2); | ||
| 428 | + mmm.put("jzyl",jzyl_line); | ||
| 429 | + mmm.put("czyl",czyl_line); | ||
| 430 | + mmm.put("jzl", jzl_line); | ||
| 431 | + mmm.put("yh", yh_line); | ||
| 432 | + mmm.put("rylx", ""); | ||
| 433 | + mmm.put("dh", dh_line); | ||
| 434 | + listAll.add(mmm); | ||
| 435 | + } else { | ||
| 436 | + Map<String, Object> mmm=new HashMap<>(); | ||
| 437 | + mmm.put("xlName", "小计"); | ||
| 438 | + mmm.put("lp", ""); | ||
| 439 | + mmm.put("jGh", ""); | ||
| 440 | + mmm.put("clZbh", ""); | ||
| 441 | + mmm.put("jName", ""); | ||
| 442 | + mmm.put("jhbc", jhbc); | ||
| 443 | + mmm.put("jhlc", jhlc); | ||
| 444 | + mmm.put("sjbc", sjbc); | ||
| 445 | + mmm.put("sjzlc", sjzlc); | ||
| 446 | + mmm.put("kszlc",kszlc); | ||
| 447 | + mmm.put("jylc", jylc_line); | ||
| 448 | + mmm.put("zlc", zlc); | ||
| 449 | + mmm.put("zlc2", zlc2); | ||
| 450 | + mmm.put("jzyl",jzyl); | ||
| 451 | + mmm.put("czyl",czyl); | ||
| 452 | + mmm.put("jzl", jzl); | ||
| 453 | + mmm.put("yh", yh); | ||
| 454 | + mmm.put("rylx", ""); | ||
| 455 | + mmm.put("dh", dh); | ||
| 456 | + listAll.add(mmm); | ||
| 457 | + } | ||
| 458 | + } | ||
| 408 | } | 459 | } |
| 409 | } | 460 | } |
| 410 | Map<String, Object> mmp=new HashMap<>(); | 461 | Map<String, Object> mmp=new HashMap<>(); |
| @@ -426,7 +477,7 @@ public class JdtestServiceImpl implements JdtestService { | @@ -426,7 +477,7 @@ public class JdtestServiceImpl implements JdtestService { | ||
| 426 | mmp.put("jzl", jzl_z); | 477 | mmp.put("jzl", jzl_z); |
| 427 | mmp.put("yh", yh_z); | 478 | mmp.put("yh", yh_z); |
| 428 | mmp.put("rylx", ""); | 479 | mmp.put("rylx", ""); |
| 429 | - mmp.put("dh",""); | 480 | + mmp.put("dh", dh_z); |
| 430 | listAll.add(mmp); | 481 | listAll.add(mmp); |
| 431 | return listAll; | 482 | return listAll; |
| 432 | } | 483 | } |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -1162,8 +1162,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1162,8 +1162,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1162 | String xls = ""; | 1162 | String xls = ""; |
| 1163 | if (map.get("type").toString().equals("0")) { | 1163 | if (map.get("type").toString().equals("0")) { |
| 1164 | xls = "waybill_minhang.xls"; | 1164 | xls = "waybill_minhang.xls"; |
| 1165 | + } else if (map.get("type").toString().equals("1")){ | ||
| 1166 | + xls = "waybill_minhang_dl.xls"; | ||
| 1165 | } else { | 1167 | } else { |
| 1166 | - xls = "waybill_minhang_dl.xls"; | 1168 | + xls = "waybill_minhang_yd.xls"; |
| 1167 | } | 1169 | } |
| 1168 | 1170 | ||
| 1169 | 1171 | ||
| @@ -4610,10 +4612,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -4610,10 +4612,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 4610 | Double jzl = 0.0; | 4612 | Double jzl = 0.0; |
| 4611 | Double zlc = 0.0; | 4613 | Double zlc = 0.0; |
| 4612 | String rylx=""; | 4614 | String rylx=""; |
| 4615 | + Double ccyl_ = 0.0; | ||
| 4616 | + Double jcyl_ = 0.0; | ||
| 4617 | + Double yh_ = 0.0; | ||
| 4618 | + Double jzl_ = 0.0; | ||
| 4613 | List<Cars> listCars = carsRepository.findCarsByCode(s.getClZbh()); | 4619 | List<Cars> listCars = carsRepository.findCarsByCode(s.getClZbh()); |
| 4614 | if (listCars.size() > 0) { | 4620 | if (listCars.size() > 0) { |
| 4615 | - if (listCars.get(0).getSfdc() != null) { | ||
| 4616 | - if (listCars.get(0).getSfdc()) { | 4621 | + if (listCars.get(0).getNyType() != null) { |
| 4622 | + if ("1".equals(listCars.get(0).getNyType().toString())) { //全电 | ||
| 4617 | List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(), xlbm); | 4623 | List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(), xlbm); |
| 4618 | type = 1; | 4624 | type = 1; |
| 4619 | for (int i = 0; i < listDlb.size(); i++) { | 4625 | for (int i = 0; i < listDlb.size(); i++) { |
| @@ -4633,7 +4639,48 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -4633,7 +4639,48 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 4633 | zlc = Arith.add(zlc, d.getZlc()); | 4639 | zlc = Arith.add(zlc, d.getZlc()); |
| 4634 | } | 4640 | } |
| 4635 | } | 4641 | } |
| 4636 | - | 4642 | + } |
| 4643 | + } else if("2".equals(listCars.get(0).getNyType().toString())){ //油点混合 | ||
| 4644 | + List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(), xlbm); | ||
| 4645 | + List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(), xlbm); | ||
| 4646 | + type = 2; | ||
| 4647 | + for (int i = 0; i < listYlb.size(); i++) { | ||
| 4648 | + Ylb y = listYlb.get(i); | ||
| 4649 | + if (y.getLp() == null) { | ||
| 4650 | + ccyl = Arith.add(ccyl, y.getCzyl()); | ||
| 4651 | + jcyl = Arith.add(jcyl, y.getJzyl()); | ||
| 4652 | + yh = Arith.add(yh, y.getYh()); | ||
| 4653 | + jzl = Arith.add(jzl, y.getJzl()); | ||
| 4654 | + zlc = Arith.add(zlc, y.getZlc()); | ||
| 4655 | + if(dMap.get(y.getRylx())!=null) | ||
| 4656 | + rylx =dMap.get(y.getRylx()).toString(); | ||
| 4657 | + } else { | ||
| 4658 | + if (y.getLp().equals(s.getLpName())) { | ||
| 4659 | + ccyl = Arith.add(ccyl, y.getCzyl()); | ||
| 4660 | + jcyl = Arith.add(jcyl, y.getJzyl()); | ||
| 4661 | + yh = Arith.add(yh, y.getYh()); | ||
| 4662 | + jzl = Arith.add(jzl, y.getJzl()); | ||
| 4663 | + zlc = Arith.add(zlc, y.getZlc()); | ||
| 4664 | + if(dMap.get(y.getRylx())!=null) | ||
| 4665 | + rylx =dMap.get(y.getRylx()).toString(); | ||
| 4666 | + } | ||
| 4667 | + } | ||
| 4668 | + } | ||
| 4669 | + for (int i = 0; i < listDlb.size(); i++) { | ||
| 4670 | + Dlb d = listDlb.get(i); | ||
| 4671 | + if (d.getLp() == null) { | ||
| 4672 | + ccyl_ = Arith.add(ccyl_, d.getCzcd()); | ||
| 4673 | + jcyl_ = Arith.add(jcyl_, d.getJzcd()); | ||
| 4674 | + yh_ = Arith.add(yh_, d.getHd()); | ||
| 4675 | + jzl_ = Arith.add(jzl, d.getCdl()); | ||
| 4676 | + } else { | ||
| 4677 | + if (d.getLp().equals(s.getLpName())) { | ||
| 4678 | + ccyl_ = Arith.add(ccyl_, d.getCzcd()); | ||
| 4679 | + jcyl_ = Arith.add(jcyl_, d.getJzcd()); | ||
| 4680 | + yh_ = Arith.add(yh_, d.getHd()); | ||
| 4681 | + jzl_ = Arith.add(jzl_, d.getCdl()); | ||
| 4682 | + } | ||
| 4683 | + } | ||
| 4637 | } | 4684 | } |
| 4638 | } else { | 4685 | } else { |
| 4639 | List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(), xlbm); | 4686 | List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(), xlbm); |
| @@ -4669,6 +4716,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -4669,6 +4716,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 4669 | map.put("yh", yh); | 4716 | map.put("yh", yh); |
| 4670 | map.put("ccyl", ccyl); | 4717 | map.put("ccyl", ccyl); |
| 4671 | map.put("jcyl", jcyl); | 4718 | map.put("jcyl", jcyl); |
| 4719 | + map.put("jzl_", jzl_); | ||
| 4720 | + map.put("yh_", yh_); | ||
| 4721 | + map.put("ccyl_", ccyl_); | ||
| 4722 | + map.put("jcyl_", jcyl_); | ||
| 4672 | map.put("type", type); | 4723 | map.put("type", type); |
| 4673 | map.put("zlc", zlc); | 4724 | map.put("zlc", zlc); |
| 4674 | map.put("xlName", s.getXlName()); | 4725 | map.put("xlName", s.getXlName()); |
| @@ -5203,20 +5254,22 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -5203,20 +5254,22 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 5203 | fcsjm = String.valueOf(fcsjActural_ - fcsj_); | 5254 | fcsjm = String.valueOf(fcsjActural_ - fcsj_); |
| 5204 | } | 5255 | } |
| 5205 | } | 5256 | } |
| 5206 | - String[] dfsj_s =schedule.getDfsj().split(":"); | ||
| 5207 | - Long dfsj_ = Long.parseLong(dfsj_s[0]) * 60 + Long.parseLong(dfsj_s[1]); | ||
| 5208 | - if ((dfsj_ - fcsjActural_) > 0) { | ||
| 5209 | - if(dfsj_ - fcsjActural_>1200){ | ||
| 5210 | - dfsjm=String.valueOf(1440-(dfsj_ - fcsjActural_)); | ||
| 5211 | - }else{ | ||
| 5212 | - dfsjk = String.valueOf(dfsj_ - fcsjActural_); | ||
| 5213 | - } | ||
| 5214 | - } else { | ||
| 5215 | - if(fcsjActural_ - dfsj_>1200){ | ||
| 5216 | - dfsjk= String.valueOf(1440-(fcsjActural_ - dfsj_)); | ||
| 5217 | - }else{ | ||
| 5218 | - dfsjm = String.valueOf(fcsjActural_ - dfsj_); | ||
| 5219 | - } | 5257 | + if(df.equals("df")){ |
| 5258 | + String[] dfsj_s =schedule.getDfsj().split(":"); | ||
| 5259 | + Long dfsj_ = Long.parseLong(dfsj_s[0]) * 60 + Long.parseLong(dfsj_s[1]); | ||
| 5260 | + if ((dfsj_ - fcsjActural_) > 0) { | ||
| 5261 | + if(dfsj_ - fcsjActural_>1200){ | ||
| 5262 | + dfsjm=String.valueOf(1440-(dfsj_ - fcsjActural_)); | ||
| 5263 | + }else{ | ||
| 5264 | + dfsjk = String.valueOf(dfsj_ - fcsjActural_); | ||
| 5265 | + } | ||
| 5266 | + } else { | ||
| 5267 | + if(fcsjActural_ - dfsj_>1200){ | ||
| 5268 | + dfsjk= String.valueOf(1440-(fcsjActural_ - dfsj_)); | ||
| 5269 | + }else{ | ||
| 5270 | + dfsjm = String.valueOf(fcsjActural_ - dfsj_); | ||
| 5271 | + } | ||
| 5272 | + } | ||
| 5220 | } | 5273 | } |
| 5221 | } | 5274 | } |
| 5222 | if(df.equals("df")){ | 5275 | if(df.equals("df")){ |
src/main/resources/static/pages/forms/statement/jd_daily.html
| @@ -60,11 +60,11 @@ | @@ -60,11 +60,11 @@ | ||
| 60 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 60 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 61 | <thead> | 61 | <thead> |
| 62 | <tr> | 62 | <tr> |
| 63 | - <th colspan="18">调度班次日报</th> | 63 | + <th colspan="19">调度班次日报</th> |
| 64 | </tr> | 64 | </tr> |
| 65 | <tr> | 65 | <tr> |
| 66 | <td><label>线路</label></td> | 66 | <td><label>线路</label></td> |
| 67 | - <td colspan="8"><span id="form_line"> </span></td> | 67 | + <td colspan="9"><span id="form_line"> </span></td> |
| 68 | <td><label >时间</label></td> | 68 | <td><label >时间</label></td> |
| 69 | <td colspan="8"><span id="form_date"> </span></td> | 69 | <td colspan="8"><span id="form_date"> </span></td> |
| 70 | </tr> | 70 | </tr> |
| @@ -118,11 +118,9 @@ | @@ -118,11 +118,9 @@ | ||
| 118 | format : 'YYYY-MM-DD', | 118 | format : 'YYYY-MM-DD', |
| 119 | locale : 'zh-cn' | 119 | locale : 'zh-cn' |
| 120 | }); | 120 | }); |
| 121 | - var fage=false; | 121 | + var fage=true; |
| 122 | var xlList; | 122 | var xlList; |
| 123 | var obj = []; | 123 | var obj = []; |
| 124 | - | ||
| 125 | - | ||
| 126 | $.get('/report/lineList',function(result){ | 124 | $.get('/report/lineList',function(result){ |
| 127 | xlList=result; | 125 | xlList=result; |
| 128 | $.get('/user/companyData', function(result){ | 126 | $.get('/user/companyData', function(result){ |
| @@ -131,13 +129,15 @@ | @@ -131,13 +129,15 @@ | ||
| 131 | for(var i = 0; i < obj.length; i++){ | 129 | for(var i = 0; i < obj.length; i++){ |
| 132 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | 130 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; |
| 133 | } | 131 | } |
| 134 | - | 132 | + |
| 135 | if(obj.length ==0){ | 133 | if(obj.length ==0){ |
| 136 | $("#gsdmDiv_daily").css('display','none'); | 134 | $("#gsdmDiv_daily").css('display','none'); |
| 137 | }else if(obj.length ==1){ | 135 | }else if(obj.length ==1){ |
| 138 | $("#gsdmDiv_daily").css('display','none'); | 136 | $("#gsdmDiv_daily").css('display','none'); |
| 139 | - if(obj[0].children.length == 1 || obj[0].children.length ==0) | 137 | + if(obj[0].children.length == 1 || obj[0].children.length ==0){ |
| 140 | $('#fgsdmDiv_daily').css('display','none'); | 138 | $('#fgsdmDiv_daily').css('display','none'); |
| 139 | + fage=false; | ||
| 140 | + } | ||
| 141 | } | 141 | } |
| 142 | $('#gsdmDaily').html(options); | 142 | $('#gsdmDaily').html(options); |
| 143 | updateCompany(); | 143 | updateCompany(); |
| @@ -146,7 +146,10 @@ | @@ -146,7 +146,10 @@ | ||
| 146 | $("#gsdmDaily").on("change",updateCompany); | 146 | $("#gsdmDaily").on("change",updateCompany); |
| 147 | function updateCompany(){ | 147 | function updateCompany(){ |
| 148 | var company = $('#gsdmDaily').val(); | 148 | var company = $('#gsdmDaily').val(); |
| 149 | - var options = '<option value="">全部分公司</option>'; | 149 | + var options = ''; |
| 150 | + if(fage){ | ||
| 151 | + options='<option value="">全部分公司</option>'; | ||
| 152 | + } | ||
| 150 | for(var i = 0; i < obj.length; i++){ | 153 | for(var i = 0; i < obj.length; i++){ |
| 151 | if(obj[i].companyCode == company){ | 154 | if(obj[i].companyCode == company){ |
| 152 | var children = obj[i].children; | 155 | var children = obj[i].children; |
| @@ -267,7 +270,7 @@ | @@ -267,7 +270,7 @@ | ||
| 267 | <td>{{obj.jzl}}</td> | 270 | <td>{{obj.jzl}}</td> |
| 268 | <td>{{obj.yh}}</td> | 271 | <td>{{obj.yh}}</td> |
| 269 | <td>{{obj.rylx}}</td> | 272 | <td>{{obj.rylx}}</td> |
| 270 | - <td> </td> | 273 | + <td>{{obj.dh}}</td> |
| 271 | </tr> | 274 | </tr> |
| 272 | {{/each}} | 275 | {{/each}} |
| 273 | {{if list.length == 0}} | 276 | {{if list.length == 0}} |
src/main/resources/static/pages/forms/statement/waybill.html
| @@ -450,11 +450,11 @@ | @@ -450,11 +450,11 @@ | ||
| 450 | <td colspan="4">本日耗电 {{yh}}度</td> | 450 | <td colspan="4">本日耗电 {{yh}}度</td> |
| 451 | {{/if}} | 451 | {{/if}} |
| 452 | {{if type==2}} | 452 | {{if type==2}} |
| 453 | - <td colspan="2">出场存电 {{ccyl}}%</td> | ||
| 454 | - <td colspan="2">充电量 {{jzl}}度</td> | ||
| 455 | - <td colspan="2">进场存电 {{jcyl}}%</td> | 453 | + <td colspan="2">出场存电 {{ccyl_}}%<br/>出场存油{{ccyl}}升</td> |
| 454 | + <td colspan="2">充电量 {{jzl_}}度<br/>加注量{{jzl}}升</td> | ||
| 455 | + <td colspan="2">进场存电 {{jcyl_}}%<br/>进场存油 {{jcyl}}升</td> | ||
| 456 | <td colspan="4">加注机油 升</td> | 456 | <td colspan="4">加注机油 升</td> |
| 457 | - <td colspan="4">本日耗电 {{yh}}度</td> | 457 | + <td colspan="4">本日耗电 {{yh_}}度<br/>本日耗油 {{yh}}升</td> |
| 458 | {{/if}} | 458 | {{/if}} |
| 459 | </tr> | 459 | </tr> |
| 460 | <tr> | 460 | <tr> |