Commit 34b772f829e9d41a15fdbf0272fa269043e23127

Authored by 娄高锋
1 parent 10cb2291

在‘行车路单’与‘班次日报表’中显示电量接口接入的充电量

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()) &&
@@ -305,7 +328,7 @@ public class JdtestServiceImpl implements JdtestService { @@ -305,7 +328,7 @@ public class JdtestServiceImpl implements JdtestService {
305 mmm.put("jzl", jzl); 328 mmm.put("jzl", jzl);
306 mmm.put("yh", yh); 329 mmm.put("yh", yh);
307 mmm.put("rylx", ""); 330 mmm.put("rylx", "");
308 - mmm.put("dh",""); 331 + mmm.put("dh", dh);
309 listAll.add(mmm); 332 listAll.add(mmm);
310 }else{ 333 }else{
311 if (i < list.size() - 1) { 334 if (i < list.size() - 1) {
@@ -315,6 +338,7 @@ public class JdtestServiceImpl implements JdtestService { @@ -315,6 +338,7 @@ public class JdtestServiceImpl implements JdtestService {
315 czyl_line=Arith.add(czyl_line, czyl); 338 czyl_line=Arith.add(czyl_line, czyl);
316 jzl_line=Arith.add(jzl_line, jzl); 339 jzl_line=Arith.add(jzl_line, jzl);
317 yh_line=Arith.add(yh_line, yh); 340 yh_line=Arith.add(yh_line, yh);
  341 + dh_line=Arith.add(dh_line, dh);
318 jhbc_line=jhbc_line+jhbc; 342 jhbc_line=jhbc_line+jhbc;
319 jhlc_line=Arith.add(jhlc_line,jhlc); 343 jhlc_line=Arith.add(jhlc_line,jhlc);
320 sjbc_line=sjbc_line+sjbc; 344 sjbc_line=sjbc_line+sjbc;
@@ -328,6 +352,7 @@ public class JdtestServiceImpl implements JdtestService { @@ -328,6 +352,7 @@ public class JdtestServiceImpl implements JdtestService {
328 czyl_line=Arith.add(czyl_line, czyl); 352 czyl_line=Arith.add(czyl_line, czyl);
329 jzl_line=Arith.add(jzl_line, jzl); 353 jzl_line=Arith.add(jzl_line, jzl);
330 yh_line=Arith.add(yh_line, yh); 354 yh_line=Arith.add(yh_line, yh);
  355 + dh_line=Arith.add(dh_line, dh);
331 jhbc_line=jhbc_line+jhbc; 356 jhbc_line=jhbc_line+jhbc;
332 jhlc_line=Arith.add(jhlc_line,jhlc); 357 jhlc_line=Arith.add(jhlc_line,jhlc);
333 sjbc_line=sjbc_line+sjbc; 358 sjbc_line=sjbc_line+sjbc;
@@ -355,13 +380,14 @@ public class JdtestServiceImpl implements JdtestService { @@ -355,13 +380,14 @@ public class JdtestServiceImpl implements JdtestService {
355 mmm.put("jzl", jzl_line); 380 mmm.put("jzl", jzl_line);
356 mmm.put("yh", yh_line); 381 mmm.put("yh", yh_line);
357 mmm.put("rylx", ""); 382 mmm.put("rylx", "");
358 - mmm.put("dh",""); 383 + mmm.put("dh", dh_line);
359 listAll.add(mmm); 384 listAll.add(mmm);
360 jylc_line=0.0; 385 jylc_line=0.0;
361 jzyl_line=0.0; 386 jzyl_line=0.0;
362 czyl_line=0.0; 387 czyl_line=0.0;
363 jzl_line=0.0; 388 jzl_line=0.0;
364 yh_line=0.0; 389 yh_line=0.0;
  390 + dh_line=0.0;
365 jhbc_line=0; 391 jhbc_line=0;
366 jhlc_line=0.0; 392 jhlc_line=0.0;
367 sjbc_line=0; 393 sjbc_line=0;
@@ -377,6 +403,7 @@ public class JdtestServiceImpl implements JdtestService { @@ -377,6 +403,7 @@ public class JdtestServiceImpl implements JdtestService {
377 czyl_line=Arith.add(czyl_line, czyl); 403 czyl_line=Arith.add(czyl_line, czyl);
378 jzl_line=Arith.add(jzl_line, jzl); 404 jzl_line=Arith.add(jzl_line, jzl);
379 yh_line=Arith.add(yh_line, yh); 405 yh_line=Arith.add(yh_line, yh);
  406 + dh_line=Arith.add(dh_line, dh);
380 jhbc_line=jhbc_line+jhbc; 407 jhbc_line=jhbc_line+jhbc;
381 jhlc_line=Arith.add(jhlc_line,jhlc); 408 jhlc_line=Arith.add(jhlc_line,jhlc);
382 sjbc_line=sjbc_line+sjbc; 409 sjbc_line=sjbc_line+sjbc;
@@ -403,7 +430,7 @@ public class JdtestServiceImpl implements JdtestService { @@ -403,7 +430,7 @@ public class JdtestServiceImpl implements JdtestService {
403 mmm.put("jzl", jzl_line); 430 mmm.put("jzl", jzl_line);
404 mmm.put("yh", yh_line); 431 mmm.put("yh", yh_line);
405 mmm.put("rylx", ""); 432 mmm.put("rylx", "");
406 - mmm.put("dh",""); 433 + mmm.put("dh", dh_line);
407 listAll.add(mmm); 434 listAll.add(mmm);
408 } else { 435 } else {
409 Map<String, Object> mmm=new HashMap<>(); 436 Map<String, Object> mmm=new HashMap<>();
@@ -425,7 +452,7 @@ public class JdtestServiceImpl implements JdtestService { @@ -425,7 +452,7 @@ public class JdtestServiceImpl implements JdtestService {
425 mmm.put("jzl", jzl); 452 mmm.put("jzl", jzl);
426 mmm.put("yh", yh); 453 mmm.put("yh", yh);
427 mmm.put("rylx", ""); 454 mmm.put("rylx", "");
428 - mmm.put("dh",""); 455 + mmm.put("dh", dh);
429 listAll.add(mmm); 456 listAll.add(mmm);
430 } 457 }
431 } 458 }
@@ -450,7 +477,7 @@ public class JdtestServiceImpl implements JdtestService { @@ -450,7 +477,7 @@ public class JdtestServiceImpl implements JdtestService {
450 mmp.put("jzl", jzl_z); 477 mmp.put("jzl", jzl_z);
451 mmp.put("yh", yh_z); 478 mmp.put("yh", yh_z);
452 mmp.put("rylx", ""); 479 mmp.put("rylx", "");
453 - mmp.put("dh",""); 480 + mmp.put("dh", dh_z);
454 listAll.add(mmp); 481 listAll.add(mmp);
455 return listAll; 482 return listAll;
456 } 483 }
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -1162,8 +1162,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1162,8 +1162,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;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&lt;ScheduleRealInf @@ -4610,10 +4612,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;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&lt;ScheduleRealInf @@ -4633,7 +4639,48 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;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&lt;ScheduleRealInf @@ -4669,6 +4716,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;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());
src/main/resources/static/pages/forms/statement/jd_daily.html
@@ -270,7 +270,7 @@ @@ -270,7 +270,7 @@
270 <td>{{obj.jzl}}</td> 270 <td>{{obj.jzl}}</td>
271 <td>{{obj.yh}}</td> 271 <td>{{obj.yh}}</td>
272 <td>{{obj.rylx}}</td> 272 <td>{{obj.rylx}}</td>
273 - <td>&nbsp;</td> 273 + <td>{{obj.dh}}</td>
274 </tr> 274 </tr>
275 {{/each}} 275 {{/each}}
276 {{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">加注机油 &nbsp;升</td> 456 <td colspan="4">加注机油 &nbsp;升</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>