Commit e4b53f8ac3f8aa19eadc189cf51c6eb4b4a7449c

Authored by 廖磊
1 parent 450f5ba9

嘉定:油量平衡表,班次日报,行车路单中加入路牌加油里程

src/main/java/com/bsth/controller/jdtest/JdTestController.java
... ... @@ -40,7 +40,7 @@ public class JdTestController extends BaseController<Ylb, Integer>{
40 40 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
41 41 sdfSimple = new SimpleDateFormat("yyyyMMdd");
42 42 Map<String, Object> dMap=new HashMap<>();
43   - dMap.put("dGroup", "oilType");
  43 + dMap.put("dGroup_eq", "oilType");
44 44 Iterator<Dictionary> it= dictionaryService.list(dMap).iterator();
45 45 while (it.hasNext()) {
46 46 Dictionary d=it.next();
... ...
src/main/java/com/bsth/controller/oil/YlbController.java
... ... @@ -262,7 +262,7 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
262 262 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
263 263 sdfSimple = new SimpleDateFormat("yyyyMMdd");
264 264 Map<String, Object> dMap=new HashMap<>();
265   - dMap.put("dGroup", "oilType");
  265 + dMap.put("dGroup_eq", "oilType");
266 266 Iterator<Dictionary> it= dictionaryService.list(dMap).iterator();
267 267 while (it.hasNext()) {
268 268 Dictionary d=it.next();
... ... @@ -288,6 +288,8 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
288 288 m.put("nbbm", y.getNbbm());
289 289 m.put("jsy", y.getJsy());
290 290 m.put("name", y.getName());
  291 + m.put("lp", y.getLp()==null?"":y.getLp());
  292 + m.put("jylc", y.getJylc_());
291 293 m.put("jzl", y.getJzl()<=0?"0":y.getJzl());
292 294 m.put("czlc", "0");
293 295 m.put("jzlc", "0");
... ...
src/main/java/com/bsth/entity/oil/Ylb.java
... ... @@ -12,6 +12,7 @@ import javax.persistence.Transient;
12 12 import org.springframework.format.annotation.DateTimeFormat;
13 13  
14 14 import com.bsth.data.BasicData;
  15 +import com.bsth.util.Arith;
15 16  
16 17 @Entity
17 18 @Table(name = "bsth_c_ylb")
... ... @@ -53,21 +54,25 @@ public class Ylb {
53 54 private Date edittime;
54 55 private Date updatetime;
55 56 private Date createtime;
  57 + private Double jylc;
  58 +
56 59  
57 60 private int nylx;
58 61 //进场顺序(根据最先出场和最后进场来关联车辆的存油量)
59 62 private int jcsx;
60 63  
61 64 private String lp;
  65 +
  66 + @Transient
  67 + private Double zlc_; //排班里程+路牌加油里程
  68 + @Transient
  69 + private Double jylc_;
62 70 @Transient
63 71 private String bglyh;
64   -
65 72 @Transient
66 73 private String xlname;
67   -
68 74 @Transient
69 75 private String gsname;
70   -
71 76 @Transient
72 77 private String fgsname;
73 78  
... ... @@ -289,11 +294,12 @@ public class Ylb {
289 294 }
290 295  
291 296 public String getBglyh() {
292   - if(this.getZlc()==0){
  297 + double zlcs=Arith.add(this.jylc==null?0.0:this.jylc, this.zlc);
  298 + if(zlcs<=0){
293 299 return "0";
294 300 }else{
295 301 DecimalFormat df = new DecimalFormat("0.00");
296   - return df.format(this.getYh()/this.getZlc()*100);
  302 + return df.format(this.getYh()/zlcs*100);
297 303 }
298 304 }
299 305  
... ... @@ -358,6 +364,36 @@ public class Ylb {
358 364 public void setJname(String jname) {
359 365 this.jname = jname;
360 366 }
  367 +
  368 + public Double getJylc() {
  369 +// if(jylc==null){
  370 +// jylc=0.0;
  371 +// }
  372 + return jylc;
  373 + }
  374 +
  375 + public void setJylc(Double jylc) {
  376 + this.jylc = jylc;
  377 + }
  378 +
  379 + public Double getZlc_() {
  380 + zlc_=Arith.add(this.jylc==null?0.0:this.jylc, this.zlc);
  381 + return zlc_;
  382 + }
  383 +
  384 + public void setZlc_(Double zlc_) {
  385 + this.zlc_ = zlc_;
  386 + }
  387 +
  388 + public Double getJylc_() {
  389 + jylc_=this.jylc==null?0.0:this.jylc;
  390 + return jylc_;
  391 + }
  392 +
  393 + public void setJylc_(Double jylc_) {
  394 + this.jylc_ = jylc_;
  395 + }
  396 +
361 397  
362 398  
363 399 }
... ...
src/main/java/com/bsth/repository/oil/YlbRepository.java
... ... @@ -25,6 +25,9 @@ public interface YlbRepository extends BaseRepository&lt;Ylb, Integer&gt;{
25 25 + " xlbm like %?4% and nbbm like %?5% ",nativeQuery=true)
26 26 List<Ylb> obtainYlbefore(String rq,String gsbm,String fgsbm,String xlbm,String nbbm);
27 27  
  28 + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and xlbm =?2 and jsy=?3 and nbbm=?4 and lp=?5 ",nativeQuery=true)
  29 + List<Ylb> selectYlbByLp(String rq,String xlbm,String jsy,String nbbm,String lp);
  30 +
28 31  
29 32 /**
30 33 * 获取当天日期前的最大的日期中最大进出顺序的数据
... ... @@ -186,9 +189,10 @@ public interface YlbRepository extends BaseRepository&lt;Ylb, Integer&gt;{
186 189 " shyy = ?6," +
187 190 " ns = ?7," +
188 191 " rylx = ?8," +
189   - " yhlx = ?9"+
  192 + " yhlx = ?9,"+
  193 + " jylc =?10"+
190 194 " WHERE id = ?1", nativeQuery=true)
191   - public void ylbUpdate(Integer id,double czyl,double jzyl,double yh, double sh,String shyy,double ns,String rylx,int yhlx);
  195 + public void ylbUpdate(Integer id,double czyl,double jzyl,double yh, double sh,String shyy,double ns,String rylx,int yhlx,double jylc);
192 196  
193 197  
194 198 }
... ...
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
... ... @@ -2558,7 +2558,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2558 2558 @Override
2559 2559 public Map<String, Object> exportWaybillMore(Map<String, Object> map) {
2560 2560 Map<String, Object> dMap=new HashMap<>();
2561   - dMap.put("dGroup", "oilType");
  2561 + dMap.put("dGroup_eq", "oilType");
2562 2562 Iterator<Dictionary> it= dictionaryService.list(dMap).iterator();
2563 2563 while (it.hasNext()) {
2564 2564 Dictionary d=it.next();
... ... @@ -2589,6 +2589,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2589 2589 // file.mkdirs(); //创建
2590 2590  
2591 2591 Map<String, List<Ylb>> ylbMap = new HashMap<String, List<Ylb>>();
  2592 + Map<String, Double> ylbMapJylc = new HashMap<String, Double>();
  2593 +
2592 2594 Map<String, List<Dlb>> dlbMap = new HashMap<String, List<Dlb>>();
2593 2595 Map<String, List<Cars>> carMap = new HashMap<String, List<Cars>>();
2594 2596 List<ScheduleRealInfo> lists_line=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date);
... ... @@ -2607,6 +2609,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2607 2609 }
2608 2610  
2609 2611 for(Ylb ylb : queryYlbByRqXlbm){
  2612 + //获取线路所以 加油里程
  2613 + ylbMapJylc.put(ylb.getXlbm()+"-"+ylb.getJsy()+"-"+ylb.getNbbm()+"-"+(ylb.getLp()==null?"":ylb.getLp()), ylb.getJylc_());
  2614 +
2610 2615 String key = ylb.getJsy() + ylb.getNbbm();
2611 2616 if(!ylbMap.containsKey(key))
2612 2617 ylbMap.put(key, new ArrayList<Ylb>());
... ... @@ -2671,11 +2676,11 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2671 2676 String nbbm = s.getClZbh();
2672 2677  
2673 2678 int type = 0;
2674   - Double ccyl = 0.0;
2675   - Double jcyl = 0.0;
2676   - Double yh = 0.0;
2677   - Double jzl = 0.0;
2678   - Double zlc = 0.0;
  2679 + double ccyl = 0.0;
  2680 + double jcyl = 0.0;
  2681 + double yh = 0.0;
  2682 + double jzl = 0.0;
  2683 + double zlc = 0.0;
2679 2684 String rylx="";
2680 2685 // List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(),xlbm);
2681 2686 // List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(),xlbm);
... ... @@ -2737,6 +2742,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2737 2742 }
2738 2743 }
2739 2744 }
  2745 + double jylc=ylbMapJylc.get(line+"-"+jGh+"-"+nbbm+"-"+lpName)==null?0.0:ylbMapJylc.get(line+"-"+jGh+"-"+nbbm+"-"+lpName);
  2746 + Map.put("jylc", jylc);
2740 2747 Map.put("rylx", "加注类别:"+rylx);
2741 2748 Map.put("jzl", jzl);
2742 2749 Map.put("yh", yh);
... ... @@ -2813,7 +2820,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2813 2820 Map.put("yygl", yygl);
2814 2821 double ksgl=Arith.add(culateService.culateKsgl(scheduleRealInfos),culateService.culateJccgl(lists));
2815 2822 Map.put("ksgl",ksgl);
2816   - Map.put("realMileage", Arith.add(yygl ,ksgl));
  2823 + Map.put("realMileage", Arith.add(yygl ,ksgl)); //排班计算里程
  2824 + Map.put("realMileage2", Arith.add(jylc,Arith.add(yygl ,ksgl)));//排班计算里程+加油里程
2817 2825 Map.put("jhbc", culateService.culateJhbc(scheduleRealInfos,""));
2818 2826 Map.put("cjbc", culateService.culateLbbc(scheduleRealInfos));
2819 2827 Map.put("ljbc", culateService.culateLjbc(lists, ""));
... ...
src/main/java/com/bsth/service/jdtest/impl/JdtestServiceImpl.java
... ... @@ -147,7 +147,7 @@ public class JdtestServiceImpl implements JdtestService {
147 147 }
148 148 });
149 149 Map<String, Object> dMap=new HashMap<>();
150   - dMap.put("dGroup", "oilType");
  150 + dMap.put("dGroup_eq", "oilType");
151 151 Iterator<Dictionary> it= dictionaryService.list(dMap).iterator();
152 152 while (it.hasNext()) {
153 153 Dictionary d=it.next();
... ... @@ -175,6 +175,7 @@ public class JdtestServiceImpl implements JdtestService {
175 175 }else{
176 176 lists=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(xlbm, map.get("date").toString());
177 177 }
  178 + double jylc_z=0.0;
178 179 double jzyl_z=0.0;
179 180 double czyl_z=0.0;
180 181 double jzl_z=0.0;
... ... @@ -187,6 +188,7 @@ public class JdtestServiceImpl implements JdtestService {
187 188 double zlc_z=0.0;
188 189 double zlc_z2=0.0;
189 190  
  191 + double jylc_line=0.0;
190 192 double jzyl_line=0.0;
191 193 double czyl_line=0.0;
192 194 double jzl_line=0.0;
... ... @@ -202,6 +204,7 @@ public class JdtestServiceImpl implements JdtestService {
202 204 sList =new ArrayList<ScheduleRealInfo>();
203 205 jList =new ArrayList<ScheduleRealInfo>();
204 206 Map<String, Object> m=list.get(i);
  207 + double jylc=0.0;
205 208 double jzyl=0.0;
206 209 double czyl=0.0;
207 210 double jzl=0.0;
... ... @@ -213,6 +216,7 @@ public class JdtestServiceImpl implements JdtestService {
213 216 czyl=t.getCzyl();
214 217 jzl=t.getJzl();
215 218 yh=t.getYh();
  219 + jylc=t.getJylc_();
216 220 if(t.getRylx()!=null){
217 221 if(dMap.get(t.getRylx())==null){
218 222 rylx="";
... ... @@ -221,6 +225,8 @@ public class JdtestServiceImpl implements JdtestService {
221 225 }
222 226 }
223 227 }
  228 + m.put("jylc",jylc);
  229 + jylc_z=Arith.add(jylc, jylc_z);
224 230 m.put("jzyl",jzyl);
225 231 jzyl_z=Arith.add(jzyl, jzyl_z);
226 232 m.put("czyl", czyl);
... ... @@ -265,7 +271,7 @@ public class JdtestServiceImpl implements JdtestService {
265 271 double jccgl=culateMileageService.culateJccgl(sList);
266 272 double kszlc=Arith.add(ksgl, jccgl);
267 273 kszlc_z=Arith.add(kszlc, kszlc_z);
268   - double zlc=Arith.add(sjzlc, kszlc);
  274 + double zlc=Arith.add(jylc, Arith.add(sjzlc, kszlc));
269 275 double zlc2=Math.round(Math.round(zlc));
270 276 zlc_z=Arith.add(zlc, zlc_z);
271 277 zlc_z2=Arith.add(zlc2,zlc_z2);
... ... @@ -280,6 +286,7 @@ public class JdtestServiceImpl implements JdtestService {
280 286 //线路小计
281 287 if (i < list.size() - 1) {
282 288 if ((list.get(i+1).get("xlBm").toString()).equals(list.get(i).get("xlBm").toString())) {
  289 + jylc_line=Arith.add(jylc_line, jylc);
283 290 jzyl_line=Arith.add(jzyl_line, jzyl);
284 291 czyl_line=Arith.add(czyl_line, czyl);
285 292 jzl_line=Arith.add(jzl_line, jzl);
... ... @@ -292,6 +299,7 @@ public class JdtestServiceImpl implements JdtestService {
292 299 zlc_line=Arith.add(zlc_line, zlc);
293 300 zlc_line2=Arith.add(zlc_line2, zlc2);
294 301 } else {
  302 + jylc_line=Arith.add(jylc_line, jylc);
295 303 jzyl_line=Arith.add(jzyl_line, jzyl);
296 304 czyl_line=Arith.add(czyl_line, czyl);
297 305 jzl_line=Arith.add(jzl_line, jzl);
... ... @@ -315,6 +323,7 @@ public class JdtestServiceImpl implements JdtestService {
315 323 mmm.put("sjbc", sjbc_line);
316 324 mmm.put("sjzlc", sjzlc_line);
317 325 mmm.put("kszlc",kszlc_line);
  326 + mmm.put("jylc", jylc_line);
318 327 mmm.put("zlc", zlc_line);
319 328 mmm.put("zlc2", zlc_line2);
320 329 mmm.put("jzyl",jzyl_line);
... ... @@ -324,6 +333,7 @@ public class JdtestServiceImpl implements JdtestService {
324 333 mmm.put("rylx", "");
325 334 mmm.put("dh","");
326 335 listAll.add(mmm);
  336 + jylc_line=0.0;
327 337 jzyl_line=0.0;
328 338 czyl_line=0.0;
329 339 jzl_line=0.0;
... ... @@ -338,6 +348,7 @@ public class JdtestServiceImpl implements JdtestService {
338 348 }
339 349 } else {
340 350 if ((list.get(i).get("xlBm").toString()).equals(list.get(i - 1).get("xlBm").toString())) {
  351 + jylc_line=Arith.add(jylc_line, jylc);
341 352 jzyl_line=Arith.add(jzyl_line, jzyl);
342 353 czyl_line=Arith.add(czyl_line, czyl);
343 354 jzl_line=Arith.add(jzl_line, jzl);
... ... @@ -360,6 +371,7 @@ public class JdtestServiceImpl implements JdtestService {
360 371 mmm.put("sjbc", sjbc_line);
361 372 mmm.put("sjzlc", sjzlc_line);
362 373 mmm.put("kszlc",kszlc_line);
  374 + mmm.put("jylc", jylc_line);
363 375 mmm.put("zlc", zlc_line);
364 376 mmm.put("zlc2", zlc_line2);
365 377 mmm.put("jzyl",jzyl_line);
... ... @@ -382,6 +394,7 @@ public class JdtestServiceImpl implements JdtestService {
382 394 mmm.put("sjbc", sjbc);
383 395 mmm.put("sjzlc", sjzlc);
384 396 mmm.put("kszlc",kszlc);
  397 + mmm.put("jylc", jylc_line);
385 398 mmm.put("zlc", zlc);
386 399 mmm.put("zlc2", zlc2);
387 400 mmm.put("jzyl",jzyl);
... ... @@ -405,6 +418,7 @@ public class JdtestServiceImpl implements JdtestService {
405 418 mmp.put("sjbc", sjbc_z);
406 419 mmp.put("sjzlc", sjzlc_z);
407 420 mmp.put("kszlc",kszlc_z);
  421 + mmp.put("jylc", jylc_z);
408 422 mmp.put("zlc", zlc_z);
409 423 mmp.put("zlc2", zlc_z2);
410 424 mmp.put("jzyl",jzyl_z);
... ...
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
... ... @@ -38,7 +38,9 @@ import com.bsth.entity.oil.Dlb;
38 38 import com.bsth.entity.oil.Nylog;
39 39 import com.bsth.entity.oil.Ylb;
40 40 import com.bsth.entity.oil.Ylxxb;
  41 +import com.bsth.entity.schedule.GuideboardInfo;
41 42 import com.bsth.entity.search.CustomerSpecs;
  43 +import com.bsth.entity.sys.Dictionary;
42 44 import com.bsth.entity.sys.SysUser;
43 45 import com.bsth.repository.CarsRepository;
44 46 import com.bsth.repository.LineRepository;
... ... @@ -47,6 +49,7 @@ import com.bsth.repository.oil.DlbRepository;
47 49 import com.bsth.repository.oil.NylogRepository;
48 50 import com.bsth.repository.oil.YlbRepository;
49 51 import com.bsth.repository.oil.YlxxbRepository;
  52 +import com.bsth.repository.schedule.GuideboardInfoRepository;
50 53 import com.bsth.security.util.SecurityUtils;
51 54 import com.bsth.service.impl.BaseServiceImpl;
52 55 import com.bsth.service.oil.DlbService;
... ... @@ -67,26 +70,20 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
67 70 NylogRepository nylogRepository;
68 71 @Autowired
69 72 YlxxbRepository ylxxbRepository;
70   -
71 73 @Autowired
72 74 DlbService dlbService;
73   -
74 75 @Autowired
75 76 DlbRepository dlbRepository;
76   -
77 77 @Autowired
78 78 CylRepository cylRepository;
79   -
80 79 @Autowired
81 80 CarsRepository carsRepository;
82   -
83   -
84 81 @Autowired
85 82 LineRepository lineRepository;
86   -
87 83 @Autowired
88 84 ScheduleRealInfoService scheduleRealInfoService;
89   -
  85 + @Autowired
  86 + GuideboardInfoRepository guideboardInfoRepository;
90 87 @Autowired
91 88 JdbcTemplate jdbcTemplate;
92 89  
... ... @@ -103,6 +100,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
103 100 public String obtainDsq() throws Exception{
104 101 String result = "failure";
105 102 try {
  103 +
106 104 List<Ylb> addList = new ArrayList<Ylb>();
107 105 String type = "";
108 106 List<Cars> carsList=carsRepository.findCars();
... ... @@ -134,7 +132,12 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
134 132 List<Cyl> clyList=cylRepository.obtainCyl("","");
135 133 //从排班表中计算出行驶的总里程
136 134 List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList("", rq, "", "", "", "");
137   -
  135 + Iterator<GuideboardInfo> it=guideboardInfoRepository.findAll().iterator();
  136 + Map<String, Double> ginfoMap=new HashMap<>();
  137 + while (it.hasNext()) {
  138 + GuideboardInfo ginfo=it.next();
  139 + ginfoMap.put(ginfo.getXl().getLineCode()+"-"+ginfo.getLpName(), ginfo.getJygl()==null?0.0: ginfo.getJygl());
  140 + }
138 141 for(int x=0;x<listpb.size();x++){
139 142 boolean sfdc=true;
140 143 Map<String, Object> map=listpb.get(x);
... ... @@ -207,6 +210,10 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
207 210 if(type.equals("update")){
208 211 repository.save(t);
209 212 }else{
  213 + if(t.getJylc()==null){
  214 + t.setJylc(ginfoMap.get(t.getXlbm()+"-"+t.getLp()));
  215 + }
  216 + t.setJylc(0.0);
210 217 addList.add(t);
211 218 }
212 219  
... ... @@ -585,6 +592,12 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
585 592 public Map<String, Object> obtain(Map<String, Object> map2) throws Exception{
586 593 Map<String, Object> newMap = new HashMap<String, Object>();
587 594 try {
  595 + Iterator<GuideboardInfo> it=guideboardInfoRepository.findAll().iterator();
  596 + Map<String, Double> ginfoMap=new HashMap<>();
  597 + while (it.hasNext()) {
  598 + GuideboardInfo ginfo=it.next();
  599 + ginfoMap.put(ginfo.getXl().getLineCode()+"-"+ginfo.getLpName(), ginfo.getJygl());
  600 + }
588 601 Date date=new Date();
589 602 List<Cars> carsList = carsRepository.findCars();
590 603 Map<String, Boolean> carsMap = new HashMap<String, Boolean>();
... ... @@ -842,8 +855,14 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
842 855 if(!(t.getSsgsdm().equals("") || t.getFgsdm().equals(""))){
843 856 if(type.equals("add")){
844 857 t.setCreatetime(date);
  858 + if(t.getJylc()==null){
  859 + t.setJylc(ginfoMap.get(t.getXlbm()+"-"+t.getLp()));
  860 + }
845 861 addList.add(t);
846 862 }else{
  863 + if(t.getJylc()==null){
  864 + t.setJylc(ginfoMap.get(t.getXlbm()+"-"+t.getLp()));
  865 + }
847 866 t.setUpdatetime(date);
848 867 updateList.add(t);
849 868 }
... ... @@ -1693,7 +1712,6 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1693 1712 JSONArray jsonArray=JSONArray.parseArray(json);
1694 1713 JSONObject jsonObject;
1695 1714 // 获取车辆存油信息
1696   - List<Cyl> cylList = cylRepository.obtainCyl("","");
1697 1715 for (int i = 0; i < jsonArray.size(); i++) {
1698 1716 // Ylb t=new Ylb();
1699 1717 jsonObject=jsonArray.getJSONObject(i);
... ... @@ -1703,6 +1721,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1703 1721 double sh =jsonObject.getDoubleValue("sh");
1704 1722 String shyy =jsonObject.getString("shyy");
1705 1723 double ns = jsonObject.getDoubleValue("ns");
  1724 + double jylc=jsonObject.getDoubleValue("jylc");
1706 1725 String rylx =jsonObject.getString("rylx");
1707 1726 int yhlx =jsonObject.getIntValue("yhlx");
1708 1727 Integer id =jsonObject.getInteger("id");
... ... @@ -1712,7 +1731,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1712 1731 if(yh<0){
1713 1732 yh=0.0;
1714 1733 }
1715   - repository.ylbUpdate(id, czyl, jzyl, yh, sh, shyy, ns, rylx,yhlx);
  1734 + repository.ylbUpdate(id, czyl, jzyl, yh, sh, shyy, ns, rylx,yhlx,jylc);
1716 1735 }
1717 1736 // List<Map<String, Object>> list=(List<Map<String, Object>>) map.get("ylbList");
1718 1737 SysUser user = SecurityUtils.getCurrentUser();
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -990,12 +990,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
990 990 }
991 991 }
992 992 }
  993 + List<Ylb> listYlb=ylbRepository.selectYlbByLp(date, line, jGh, clZbh, lpName);
  994 + Double jylc=0.0;
  995 + for (int i = 0; i < listYlb.size(); i++) {
  996 + Ylb y=listYlb.get(i);
  997 + jylc=y.getJylc_();
  998 + }
993 999 DecimalFormat format = new DecimalFormat("0.00");
994 1000 // int cjbc = scheduleRealInfoRepository.findCjbc(jName, clZbh, lpName);
995 1001 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName);
996 1002 //计算里程和班次数,并放入Map里
997 1003 Map<String, Object> map = this.MapById(scheduleRealInfos.get(0).getId());
998   -
  1004 + map.put("jylc", jylc);
999 1005 map.put("jhlc", Arith.add(culateMieageService.culateJhgl(scheduleRealInfos), culateMieageService.culateJhJccgl(scheduleRealInfos)));
1000 1006 map.put("remMileage", culateMieageService.culateLbgl(scheduleRealInfos));
1001 1007 map.put("addMileage", culateMieageService.culateLjgl(lists));
... ... @@ -1003,7 +1009,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1003 1009 map.put("yygl", yygl);
1004 1010 double ksgl = Arith.add(culateMieageService.culateKsgl(scheduleRealInfos), culateMieageService.culateJccgl(lists));
1005 1011 map.put("ksgl", ksgl);
1006   - map.put("realMileage", Arith.add(yygl, ksgl));
  1012 + map.put("realMileage", Arith.add(yygl, ksgl));//排班表计算里程
  1013 + map.put("realMileage2", Arith.add(jylc, Arith.add(yygl, ksgl)));//排班表计算里程+加油里程
1007 1014 map.put("jhbc", culateMieageService.culateJhbc(scheduleRealInfos, ""));
1008 1015 map.put("cjbc", culateMieageService.culateLbbc(scheduleRealInfos));
1009 1016 map.put("ljbc", culateMieageService.culateLjbc(lists, ""));
... ... @@ -1950,6 +1957,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1950 1957 }
1951 1958 }
1952 1959 }
  1960 + List<Ylb> listYlb=ylbRepository.selectYlbByLp(date, line, jGh, clZbh, lpName);
  1961 + Double jylc=0.0;
  1962 + for (int i = 0; i < listYlb.size(); i++) {
  1963 + Ylb y=listYlb.get(i);
  1964 + jylc=y.getJylc_();
  1965 + }
  1966 + map.put("jylc", jylc);
1953 1967 map.put("jhbc", culateService.culateJhbc(list, ""));//计划班次
1954 1968 map.put("jhlc", Arith.add(culateService.culateJhgl(list),
1955 1969 culateService.culateJhJccgl(list))); //计划总里程
... ... @@ -1963,7 +1977,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1963 1977 double jccgl = culateService.culateJccgl(lists);//空驶班次公里
1964 1978 map.put("ksgl", ksgl);//空驶公里
1965 1979 double sjgl = culateService.culateSjgl(lists);//实际营运公里
1966   - map.put("realMileage", Arith.add(Arith.add(ksgl, jccgl), Arith.add(sjgl, ljgl)));//总公里
  1980 + double zlc=Arith.add(Arith.add(ksgl, jccgl), Arith.add(sjgl, ljgl));
  1981 + map.put("realMileage",zlc );//排班总公里
  1982 + map.put("realMileage2",Arith.add(zlc, jylc) );//排班总公里+加油里程
1967 1983 map.put("zkslc", Arith.add(ksgl, jccgl));
1968 1984 map.put("jcclc", jccgl);
1969 1985 map.put("yygl", Arith.add(sjgl, ljgl)); //总营运公里
... ... @@ -4576,7 +4592,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4576 4592 public Map<String, Object> MapById(Long id) {
4577 4593 // TODO Auto-generated method stub
4578 4594 Map<String, Object> dMap=new HashMap<>();
4579   - dMap.put("dGroup", "oilType");
  4595 + dMap.put("dGroup_eq", "oilType");
4580 4596 Iterator<Dictionary> it= dictionaryService.list(dMap).iterator();
4581 4597 while (it.hasNext()) {
4582 4598 Dictionary d=it.next();
... ... @@ -4587,7 +4603,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4587 4603 ScheduleRealInfo s = scheduleRealInfoRepository.scheduleById(id);
4588 4604 String xlbm = s.getXlBm();
4589 4605 String fcrq = s.getScheduleDateStr();
4590   -
4591 4606 int type = 2;
4592 4607 Double ccyl = 0.0;
4593 4608 Double jcyl = 0.0;
... ...
src/main/resources/static/pages/forms/mould/jd_daily.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/list.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/waybill_minhang.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/jd_daily.html
... ... @@ -79,6 +79,7 @@
79 79 <td><label >实际班次</label></td>
80 80 <td><label >实际营运里程</label></td>
81 81 <td><label >空驶里程</label></td>
  82 + <td><label >加油里程</label></td>
82 83 <td><label >总里程</label></td>
83 84 <td><label >总里程(四舍五入)</label></td>
84 85 <td><label >出场存油</label></td>
... ... @@ -258,6 +259,7 @@
258 259 <td>{{obj.sjbc}}</td>
259 260 <td>{{obj.sjzlc}}</td>
260 261 <td>{{obj.kszlc}}</td>
  262 + <td>{{obj.jylc}}</td>
261 263 <td>{{obj.zlc}}</td>
262 264 <td>{{obj.zlc2}}</td>
263 265 <td>{{obj.czyl}}</td>
... ...
src/main/resources/static/pages/forms/statement/waybill.html
... ... @@ -526,7 +526,7 @@
526 526 {{obj.jhlc}}
527 527 {{/if}}
528 528 </td>
529   - <td >
  529 + <td>
530 530 {{obj.remarks}}
531 531 </td>
532 532 </tr>
... ... @@ -561,10 +561,10 @@
561 561 <tr>
562 562 <td colspan="2">空驶公里</td>
563 563 <td>{{zkslc}}</td>
  564 + <td colspan="2">加油里程</td>
  565 + <td>{{jylc}}</td>
564 566 <td colspan="2">总公里</td>
565   - <td>{{realMileage}}</td>
566   - <td colspan="2"></td>
567   - <td></td>
  567 + <td>{{realMileage2}}</td>
568 568 <td colspan="3"></td>
569 569 <td colspan="2"></td>
570 570 </tr>
... ...
src/main/resources/static/pages/oil/list_ph.html
... ... @@ -182,21 +182,23 @@
182 182 <input type="checkbox" id="selectAll" class="group-checkable" >
183 183 </td>
184 184 <td width="40px">序号</td>
185   - <td width="8%">日期</td>
186   - <td width="5%">公司</td>
187   - <td width="8%">线路</td>
188   - <td width="5%">自编号</td>
189   - <td width="7%">驾驶员</td>
190   - <td width="4%">加油量</td>
191   - <td width="5%">出场存油</td>
192   - <td width="5%">进场存油</td>
193   - <td width="5%">油耗</td>
194   - <td width="8%">燃油类型</td>
195   - <td width="4%">尿素</td>
196   - <td width="8%">耗损原因</td>
197   - <td width="5%">耗损油量</td>
198   - <td width="5%">当日总里程</td>
199   - <td width="5%">数据类型</td>
  185 + <td >日期</td>
  186 + <td >公司</td>
  187 + <td >线路</td>
  188 + <td >路牌</td>
  189 + <td >自编号</td>
  190 + <td >驾驶员</td>
  191 + <td >加油量</td>
  192 + <td >出场存油</td>
  193 + <td >进场存油</td>
  194 + <td >油耗</td>
  195 + <td >燃油类型</td>
  196 + <td >尿素</td>
  197 + <td >耗损原因</td>
  198 + <td >耗损油量</td>
  199 + <td >加油里程</td>
  200 + <td >当日总里程</td>
  201 + <td >数据类型</td>
200 202 <td >百公里油耗</td>
201 203 </tr>
202 204 </thead>
... ... @@ -236,13 +238,13 @@
236 238 <input type="checkbox" name="id" class="group-checkable icheck" data-id="{{obj.id}}">
237 239 </td>
238 240 <td width="40px">{{i+1}}</td>
239   - <td width="8%">
  241 + <td >
240 242 {{obj.rq}}
241 243 </td>
242   - <td width="5%">
  244 + <td >
243 245 {{obj.fgsname}}
244 246 </td>
245   - <td width="8%">
  247 + <td >
246 248 {{if obj.linename=='' || obj.linename==null}}
247 249 {{obj.xlname}}
248 250 {{else}}
... ... @@ -250,11 +252,14 @@
250 252 {{/if}}
251 253  
252 254 </td>
253   - <td width="5%">
  255 + <td>
  256 + {{obj.lp}}
  257 + </td>
  258 + <td>
254 259 <lable data-id="{{obj.id}}" class="in_carpark_nbbm">{{obj.nbbm}}</lable>
255 260  
256 261 </td>
257   - <td width="7%">
  262 + <td >
258 263 {{if obj.jsy=='' || obj.jsy==null }}
259 264 <input data-id="{{obj.id}}" style=" width:100%" type="text" class="in_carpark_jsy" ></input>
260 265 <button class="btn btn-sm blue btn-jsyUpdate" style=" width:100%" data-id="{{obj.id}}">填写工号</button>
... ... @@ -267,28 +272,28 @@
267 272 {{/if}}
268 273  
269 274 </td>
270   - <td width="4%">
  275 + <td>
271 276 <lable data-id="{{obj.id}}" class="in_carpark_jzl"> {{obj.jzl}}</lable>
272 277 </td>
273   - <td width="5%">
  278 + <td >
274 279  
275 280 <input data-id="{{obj.id}}" id="{{(i+1)}}_1" href="javascript:;" class="in_carpark_czyl yl_sxzy"
276 281 type="text" value=" {{obj.czyl}}" style=" width:100%"
277 282 onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
278 283 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')">
279 284 </td>
280   - <td width="5%">
  285 + <td >
281 286 <input data-id="{{obj.id}}" id="{{(i+1)}}_2" href="javascript:;" class="in_carpark_jzyl yl_sxzy"
282 287 type="text" value=" {{obj.jzyl}}" style=" width:100%"
283 288 onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
284 289 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')">
285 290 </td>
286   - <td width="5%">
  291 + <td>
287 292  
288 293 <input data-id="{{obj.id}}" id="{{(i+1)}}_3" href="javascript:;" class="in_carpark_yh yl_sxzy"
289 294 type="text" value="{{obj.yh}}" style=" width:100%"  readOnly="true" />
290 295 </td>
291   - <td width="8%">
  296 + <td >
292 297 <select data-id="{{obj.id}}" class="in_carpark_rylx" style=" width:100%" >
293 298 <option value='0' {{if obj.rylx==0}} selected = 'selected' {{/if}}>0号柴油</option>
294 299 <option value='1' {{if obj.rylx==1}} selected = 'selected' {{/if}}>负10号柴油</option>
... ... @@ -296,13 +301,13 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
296 301 <option value='3' {{if obj.rylx==3}} selected = 'selected' {{/if}}>B5-负10号柴油</option>
297 302 </select>
298 303 </td>
299   - <td width="4%">
  304 + <td >
300 305 <input data-id="{{obj.id}}" href="javascript:;"
301 306 class="in_carpark_ns yl_sxzy" id="{{(i+1)}}_4" type="text" value=" {{obj.ns}}" style=" width:100%"
302 307 onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
303 308 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')">
304 309 </td>
305   - <td width="8%">
  310 + <td >
306 311 <select data-id="{{obj.id}}" class="in_carpark_shyy" style=" width:100%" >
307 312 <option value='0' {{if obj.shyy==0}} selected = 'selected' {{/if}}>请选择</option>
308 313 <option value='1' {{if obj.shyy==1}} selected = 'selected' {{/if}}>票务用油</option>
... ... @@ -315,22 +320,30 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
315 320 <option value='8' {{if obj.shyy==8}} selected = 'selected' {{/if}}>车间(小修)</option>
316 321 </select>
317 322 </td>
318   - <td width="5%">
  323 + <td>
319 324 <input data-id="{{obj.id}}" id="{{(i+1)}}_5" href="javascript:;" class="in_carpark_shyl yl_sxzy"
320 325 value={{obj.sh}} style=" width:100%" type="text"
321 326 onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
322 327 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" />
323 328  
324 329 </td>
325   - <td width="5%">
326   - {{obj.zlc}}
  330 + <td>
  331 + <input data-id="{{obj.id}}" id="{{(i+1)}}_6" href="javascript:;" class="in_carpark_jylc yl_jylc"
  332 + value={{obj.jylc_}} style=" width:100%" type="text"
  333 +onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
  334 + onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" />
  335 +
  336 + </td>
  337 + <td >
  338 + {{obj.zlc_}}
327 339 </td>
328   - <td width="5%">
  340 + <td >
329 341 <select data-id="{{obj.id}}" class="in_carpark_yhlx">
330 342 <option value='0' {{if obj.yhlx==0}} selected = 'selected' {{/if}}>手录</option>
331 343 <option value='1' {{if obj.yhlx==1}} selected = 'selected' {{/if}}>拆分</option>
332 344 </select>
333 345 </td>
  346 +
334 347 <td >
335 348 {{obj.bglyh}}
336 349 </td>
... ... @@ -394,11 +407,12 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
394 407  
395 408 //保存
396 409 $(".saveButton").on('click',function(){
397   -
398 410 var params_=getParamsList();
  411 + var i = layer.load(2);
399 412 $get('/ylb/checkDate',params_,function(status){
400 413 if(status=='3'){
401   - layer.msg('只能操作三天内数据.');
  414 + layer.msg('只能操作三天内数据.');
  415 + layer.close(i);
402 416 }else{
403 417 var ylArray = [];
404 418 $('input.icheck').each(function(){
... ... @@ -429,6 +443,10 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
429 443 ns=0;
430 444 }
431 445  
  446 + var jylc=$('.in_carpark_jylc[data-id='+id+']', '#ll_oil_list').val();
  447 + if(jylc==""||jylc==null){
  448 + jylc=0;
  449 + }
432 450 var rylx= $('.in_carpark_rylx[data-id='+id+']', '#ll_oil_list').val();
433 451 var yhlx = $('.in_carpark_yhlx[data-id='+id+']', '#ll_oil_list').val();
434 452  
... ... @@ -442,12 +460,13 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
442 460 map['rylx']=rylx;
443 461 map['yhlx']=yhlx;
444 462 map['nbbm']=nbbm;
  463 + map['jylc']=jylc;
445 464 map['rq']=$("#rq").val();
446 465 ylArray.push(map);
447 466 })
448 467 var params = {};
449 468 params['ylbList']=JSON.stringify(ylArray);
450   - var i = layer.load(2);
  469 +
451 470 $post('/ylb/saveYlbList', params, function () {
452 471 layer.close(i);
453 472 var params1 =getParamsList();
... ...