Commit 91a4cd92f9bb925c39f6b68da0f68041ec4f5aba

Authored by 廖磊
1 parent 51aae339

0112

src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
@@ -87,6 +87,10 @@ public class ScheduleRealInfo { @@ -87,6 +87,10 @@ public class ScheduleRealInfo {
87 private Integer bcs; 87 private Integer bcs;
88 /** 计划里程 */ 88 /** 计划里程 */
89 private Double jhlc; 89 private Double jhlc;
  90 +
  91 + /** 实际里程 */
  92 + @Transient
  93 + private String sjlc;
90 /** 班次历时 */ 94 /** 班次历时 */
91 private Integer bcsj; 95 private Integer bcsj;
92 96
@@ -447,6 +451,14 @@ public class ScheduleRealInfo { @@ -447,6 +451,14 @@ public class ScheduleRealInfo {
447 public void setJhlc(Double jhlc) { 451 public void setJhlc(Double jhlc) {
448 this.jhlc = jhlc; 452 this.jhlc = jhlc;
449 } 453 }
  454 +
  455 + public String getSjlc() {
  456 + return sjlc;
  457 + }
  458 +
  459 + public void setSjlc(String sjlc) {
  460 + this.sjlc = sjlc;
  461 + }
450 462
451 public Integer getBcsj() { 463 public Integer getBcsj() {
452 return bcsj; 464 return bcsj;
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
@@ -82,13 +82,13 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI @@ -82,13 +82,13 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI
82 + " and clZbh like %?5% order by s.fcsj") 82 + " and clZbh like %?5% order by s.fcsj")
83 List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code); 83 List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code);
84 84
85 - @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 and s.scheduleDate = str_to_date(?4,'%Y-%m-%d') and s.xlBm=?5 order by realExecDate,fcsjActual") 85 + @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 and s.scheduleDate = str_to_date(?4,'%Y-%m-%d') and s.xlBm=?5 order by realExecDate,fcsj")
86 List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String line); 86 List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String line);
87 87
88 - @Query(value="select s from ScheduleRealInfo s where s.clZbh = ?1 and s.scheduleDate = str_to_date(?2,'%Y-%m-%d') and xlBm =?3 order by realExecDate,fcsjActual") 88 + @Query(value="select s from ScheduleRealInfo s where s.clZbh = ?1 and s.scheduleDate = str_to_date(?2,'%Y-%m-%d') and xlBm =?3 order by realExecDate,fcsj")
89 List<ScheduleRealInfo> queryListWaybill2(String clZbh,String date,String line); 89 List<ScheduleRealInfo> queryListWaybill2(String clZbh,String date,String line);
90 90
91 - @Query(value="select s from ScheduleRealInfo s where s.jGh = ?1 and s.clZbh = ?2 and s.scheduleDate = str_to_date(?3,'%Y-%m-%d') order by realExecDate,fcsjActual") 91 + @Query(value="select s from ScheduleRealInfo s where s.jGh = ?1 and s.clZbh = ?2 and s.scheduleDate = str_to_date(?3,'%Y-%m-%d') order by realExecDate,fcsj")
92 List<ScheduleRealInfo> queryListWaybill3(String jName,String clZbh,String date); 92 List<ScheduleRealInfo> queryListWaybill3(String jName,String clZbh,String date);
93 93
94 @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between str_to_date(?3,'%Y-%m-%d') and str_to_date(?4,'%Y-%m-%d') order by bcs") 94 @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between str_to_date(?3,'%Y-%m-%d') and str_to_date(?4,'%Y-%m-%d') order by bcs")
@@ -110,7 +110,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI @@ -110,7 +110,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
110 void deleteByLineCodeAndDate(String xlBm, String schDate); 110 void deleteByLineCodeAndDate(String xlBm, String schDate);
111 111
112 //去掉了 xlBm is not null 112 //去掉了 xlBm is not null
113 - @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by s.xlBm") 113 + @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by (s.lpName+1), s.realExecDate,s.fcsj")
114 List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date); 114 List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date);
115 115
116 @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.bcType not in ('in','out') order by s.xlBm") 116 @Query(value="select s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.bcType not in ('in','out') order by s.xlBm")
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -1866,7 +1866,45 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1866,7 +1866,45 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1866 } 1866 }
1867 } 1867 }
1868 }*/ 1868 }*/
1869 - return scheduleRealInfoRepository.scheduleByDateAndLine(line, date); 1869 + List<ScheduleRealInfo> list=new ArrayList<ScheduleRealInfo>();
  1870 + String lpName="lpName";
  1871 + String zdsj="";
  1872 + String zdsjActual="";
  1873 + String zdsj1="";
  1874 + String zdsjActual1="";
  1875 + List<ScheduleRealInfo> listInfo=scheduleRealInfoRepository.scheduleByDateAndLine(line, date);
  1876 + for (int i = 0; i < listInfo.size(); i++) {
  1877 + ScheduleRealInfo t=listInfo.get(i);
  1878 + if(!lpName.equals(t.getLpName())){
  1879 + zdsjActual=t.getZdsjActual();
  1880 + zdsj=t.getZdsj();
  1881 + t.setZdsjActual("");
  1882 + t.setZdsj("");
  1883 + }else{
  1884 + zdsj1=t.getZdsj();
  1885 + zdsjActual1=t.getZdsjActual();
  1886 + t.setZdsjActual(zdsjActual);
  1887 + t.setZdsj(zdsj);
  1888 + zdsj=zdsj1;
  1889 + zdsjActual=zdsjActual1;
  1890 + }
  1891 + /*if(i<listInfo.size()-1){
  1892 + if(s.getLpName().equals(listInfo.get(i+1).getLpName())){
  1893 + zdsj=s.getZdsj();
  1894 + zdsjActual=s.getZdsjActual();
  1895 + }else{
  1896 + zdsj="";
  1897 + zdsjActual="";
  1898 + }
  1899 + }else{
  1900 + zdsj=s.getZdsj();
  1901 + zdsjActual=s.getZdsjActual();
  1902 + }*/
  1903 +
  1904 + lpName=t.getLpName();
  1905 + list.add(t);
  1906 + }
  1907 + return list;
1870 } 1908 }
1871 1909
1872 1910
@@ -2576,6 +2614,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2576,6 +2614,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2576 @Override 2614 @Override
2577 public List<ScheduleRealInfo> queryListWaybillQp(String clZbh, String date, String line) { 2615 public List<ScheduleRealInfo> queryListWaybillQp(String clZbh, String date, String line) {
2578 // TODO Auto-generated method stub 2616 // TODO Auto-generated method stub
  2617 + DecimalFormat format = new DecimalFormat("0.00");
2579 List <ScheduleRealInfo> list=null; 2618 List <ScheduleRealInfo> list=null;
2580 list= scheduleRealInfoRepository.queryListWaybill2(clZbh,date,line); 2619 list= scheduleRealInfoRepository.queryListWaybill2(clZbh,date,line);
2581 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); 2620 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
@@ -2583,6 +2622,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2583,6 +2622,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2583 ScheduleRealInfo s=list.get(i); 2622 ScheduleRealInfo s=list.get(i);
2584 if(!(s.getBcType().equals("in")||s.getBcType().equals("out"))){ 2623 if(!(s.getBcType().equals("in")||s.getBcType().equals("out"))){
2585 String remarks=""; 2624 String remarks="";
  2625 + Double sjlc=0.0;
2586 if(s.getRemarks()!=null){ 2626 if(s.getRemarks()!=null){
2587 remarks +=s.getRemarks(); 2627 remarks +=s.getRemarks();
2588 } 2628 }
@@ -2595,8 +2635,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2595,8 +2635,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2595 remarks += c.getRemarks(); 2635 remarks += c.getRemarks();
2596 } 2636 }
2597 2637
  2638 + if(!c.isDestroy()){
  2639 + sjlc += c.getMileage()==null?0:c.getMileage();
  2640 + }
  2641 +
  2642 + }
  2643 + }else{
  2644 + if(s.getStatus() != -1){
  2645 + sjlc =s.getJhlc();
2598 } 2646 }
2599 } 2647 }
  2648 + s.setSjlc(format.format(sjlc));
2600 s.setRemarks(remarks); 2649 s.setRemarks(remarks);
2601 newList.add(s); 2650 newList.add(s);
2602 } 2651 }
src/main/resources/static/pages/forms/statement/scheduleDaily.html
@@ -109,7 +109,7 @@ @@ -109,7 +109,7 @@
109 <tr> 109 <tr>
110 <td colspan="40">&nbsp;</td> 110 <td colspan="40">&nbsp;</td>
111 </tr> 111 </tr>
112 - <tr> 112 + <!-- <tr>
113 <td colspan="40">合计</td> 113 <td colspan="40">合计</td>
114 </tr> 114 </tr>
115 <tr> 115 <tr>
@@ -156,7 +156,7 @@ @@ -156,7 +156,7 @@
156 </tr> 156 </tr>
157 <tr> 157 <tr>
158 <td colspan="40">&nbsp;</td> 158 <td colspan="40">&nbsp;</td>
159 - </tr> 159 + </tr> -->
160 <tr> 160 <tr>
161 <td colspan="2">班序</td> 161 <td colspan="2">班序</td>
162 <td colspan="2">车号</td> 162 <td colspan="2">车号</td>
src/main/resources/static/pages/forms/statement/waybillQp.html
@@ -245,17 +245,17 @@ @@ -245,17 +245,17 @@
245 </script> 245 </script>
246 <script type="text/html" id="ludan_1"> 246 <script type="text/html" id="ludan_1">
247 <tr> 247 <tr>
248 - <td colspan="15">行车路单</td> 248 + <td colspan="16">行车路单</td>
249 </tr> 249 </tr>
250 <tr> 250 <tr>
251 - <td colspan="15">路别:{{map.xlName}} 车号:{{map.clZbh}} 出场时间:{{map.fcsjActual}} 到达站名:{{map.zdzName}} 日期:{{map.scheduleDate}}</td> 251 + <td colspan="16">路别:{{map.xlName}} 车号:{{map.clZbh}} 出场时间:{{map.fcsjActual}} 到达站名:{{map.zdzName}} 日期:{{map.scheduleDate}}</td>
252 </tr> 252 </tr>
253 <tr> 253 <tr>
254 <td colspan="2">出场存油 &nbsp;升</td> 254 <td colspan="2">出场存油 &nbsp;升</td>
255 <td colspan="3">加注油量 &nbsp;升</td> 255 <td colspan="3">加注油量 &nbsp;升</td>
256 <td colspan="2">进场存油 &nbsp;升</td> 256 <td colspan="2">进场存油 &nbsp;升</td>
257 <td colspan="4">加注机油 &nbsp;升</td> 257 <td colspan="4">加注机油 &nbsp;升</td>
258 - <td colspan="4">本日耗油 &nbsp;升</td> 258 + <td colspan="5">本日耗油 &nbsp;升</td>
259 </tr> 259 </tr>
260 <tr> 260 <tr>
261 <td colspan="2">调度员</td> 261 <td colspan="2">调度员</td>
@@ -266,7 +266,7 @@ @@ -266,7 +266,7 @@
266 <td colspan="2">夜班(职号)</td> 266 <td colspan="2">夜班(职号)</td>
267 <td colspan="2" title={{map.wdp}}>{{map.wdpT}}</td> 267 <td colspan="2" title={{map.wdp}}>{{map.wdpT}}</td>
268 <td colspan="2">其他</td> 268 <td colspan="2">其他</td>
269 - <td colspan="2">&nbsp;</td> 269 + <td colspan="3">&nbsp;</td>
270 </tr> 270 </tr>
271 <tr> 271 <tr>
272 <td rowspan="2">车次</td> 272 <td rowspan="2">车次</td>
@@ -277,6 +277,7 @@ @@ -277,6 +277,7 @@
277 <td colspan="4">时间</td> 277 <td colspan="4">时间</td>
278 <td colspan="2">误点</td> 278 <td colspan="2">误点</td>
279 <td rowspan="2" width="66px">里程(公里)计划</td> 279 <td rowspan="2" width="66px">里程(公里)计划</td>
  280 + <td rowspan="2" width="66px">里程(公里)实际</td>
280 <td rowspan="2">备注</td> 281 <td rowspan="2">备注</td>
281 </tr> 282 </tr>
282 <tr> 283 <tr>
@@ -309,7 +310,8 @@ @@ -309,7 +310,8 @@
309 <td>{{obj.fast}}</td> 310 <td>{{obj.fast}}</td>
310 <td>{{obj.slow}}</td> 311 <td>{{obj.slow}}</td>
311 <td>{{obj.jhlc}}</td> 312 <td>{{obj.jhlc}}</td>
312 - <td title={{obj.remarks}}> 313 + <td>{{obj.sjlc}}</td>
  314 + <td title="{{obj.remarks}}">
313 {{if obj.remarks !=""}} 315 {{if obj.remarks !=""}}
314 <div class="caption"> 316 <div class="caption">
315 <i class="fa fa-search"></i> 317 <i class="fa fa-search"></i>
@@ -336,7 +338,7 @@ @@ -336,7 +338,7 @@
336 <td colspan="2">空驶公里</td> 338 <td colspan="2">空驶公里</td>
337 <td colspan="1">{{map.ksgl}}</td> 339 <td colspan="1">{{map.ksgl}}</td>
338 <td colspan="3">营运公里(实际)</td> 340 <td colspan="3">营运公里(实际)</td>
339 - <td colspan="1">{{map.yyglsj}}</td> 341 + <td colspan="2">{{map.yyglsj}}</td>
340 342
341 </tr> 343 </tr>
342 <tr> 344 <tr>
@@ -349,7 +351,7 @@ @@ -349,7 +351,7 @@
349 <td colspan="2">损失班次</td> 351 <td colspan="2">损失班次</td>
350 <td colspan="1">{{map.ssbc}}</td> 352 <td colspan="1">{{map.ssbc}}</td>
351 <td colspan="3">运送公里</td> 353 <td colspan="3">运送公里</td>
352 - <td colspan="1">{{map.ysgl}}</td> 354 + <td colspan="2">{{map.ysgl}}</td>
353 </tr> 355 </tr>
354 <tr> 356 <tr>
355 357
@@ -361,6 +363,6 @@ @@ -361,6 +363,6 @@
361 <td>{{map.ljbc}}</td> 363 <td>{{map.ljbc}}</td>
362 364
363 <td colspan="3"></td> 365 <td colspan="3"></td>
364 - <td colspan="4"></td> 366 + <td colspan="5"></td>
365 </tr> 367 </tr>
366 </script> 368 </script>