Commit 0e2c7ee5fe2e19f7cd0d639d8972c16e3dd9e3d3

Authored by 娄高锋
1 parent 40e5d8a0

青浦-纯电车日报表,添加营运班次一列。

src/main/java/com/bsth/service/impl/RefuelServiceImpl.java
@@ -9,14 +9,11 @@ import com.bsth.repository.RefuelRepository; @@ -9,14 +9,11 @@ import com.bsth.repository.RefuelRepository;
9 import com.bsth.security.util.SecurityUtils; 9 import com.bsth.security.util.SecurityUtils;
10 import com.bsth.service.RefuelService; 10 import com.bsth.service.RefuelService;
11 import com.bsth.service.report.CulateMileageService; 11 import com.bsth.service.report.CulateMileageService;
12 -import com.bsth.util.Arith;  
13 import com.bsth.util.ReportUtils; 12 import com.bsth.util.ReportUtils;
14 13
15 import java.io.File; 14 import java.io.File;
16 import java.io.FileInputStream; 15 import java.io.FileInputStream;
17 import java.math.BigDecimal; 16 import java.math.BigDecimal;
18 -import java.sql.ResultSet;  
19 -import java.sql.SQLException;  
20 import java.text.DecimalFormat; 17 import java.text.DecimalFormat;
21 import java.text.ParseException; 18 import java.text.ParseException;
22 import java.text.SimpleDateFormat; 19 import java.text.SimpleDateFormat;
@@ -35,7 +32,6 @@ import org.apache.poi.hssf.usermodel.HSSFSheet; @@ -35,7 +32,6 @@ import org.apache.poi.hssf.usermodel.HSSFSheet;
35 import org.apache.poi.hssf.usermodel.HSSFWorkbook; 32 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
36 import org.apache.poi.poifs.filesystem.POIFSFileSystem; 33 import org.apache.poi.poifs.filesystem.POIFSFileSystem;
37 import org.springframework.beans.factory.annotation.Autowired; 34 import org.springframework.beans.factory.annotation.Autowired;
38 -import org.springframework.jdbc.core.RowMapper;  
39 import org.springframework.stereotype.Service; 35 import org.springframework.stereotype.Service;
40 36
41 /** 37 /**
@@ -630,7 +626,6 @@ public class RefuelServiceImpl extends BaseServiceImpl<Refuel, Long> implements @@ -630,7 +626,6 @@ public class RefuelServiceImpl extends BaseServiceImpl<Refuel, Long> implements
630 List<ScheduleRealInfo> scheList = new ArrayList<ScheduleRealInfo>(); 626 List<ScheduleRealInfo> scheList = new ArrayList<ScheduleRealInfo>();
631 if(xlbm.length() > 0){ 627 if(xlbm.length() > 0){
632 String[] split = xlbm.split(","); 628 String[] split = xlbm.split(",");
633 - System.out.println(split);  
634 for(String s : split){ 629 for(String s : split){
635 scheList.addAll(repository.scheduleByDateAndLine(date, car, s)); 630 scheList.addAll(repository.scheduleByDateAndLine(date, car, s));
636 } 631 }
@@ -663,7 +658,7 @@ public class RefuelServiceImpl extends BaseServiceImpl&lt;Refuel, Long&gt; implements @@ -663,7 +658,7 @@ public class RefuelServiceImpl extends BaseServiceImpl&lt;Refuel, Long&gt; implements
663 String[] split = key.split("/"); 658 String[] split = key.split("/");
664 659
665 String realMileage = "", ksMileage = "", ssMileage = "", 660 String realMileage = "", ksMileage = "", ssMileage = "",
666 - bc = "", jhbc = "", sjbc = "", cr = ""; 661 + bc = "", jhbc = "", sjbc = "", ljbc = "", cr = "";
667 String remarks = ""; 662 String remarks = "";
668 663
669 Double sjgl = culateMileageService.culateSjgl(list2); 664 Double sjgl = culateMileageService.culateSjgl(list2);
@@ -676,7 +671,14 @@ public class RefuelServiceImpl extends BaseServiceImpl&lt;Refuel, Long&gt; implements @@ -676,7 +671,14 @@ public class RefuelServiceImpl extends BaseServiceImpl&lt;Refuel, Long&gt; implements
676 // ssMileage = "" + culateMileageService.culateLbgl(list2); //损失里程?少驶里程? 671 // ssMileage = "" + culateMileageService.culateLbgl(list2); //损失里程?少驶里程?
677 jhbc = "" + culateMileageService.culateJhbc(list2, ""); 672 jhbc = "" + culateMileageService.culateJhbc(list2, "");
678 sjbc = "" + culateMileageService.culateSjbc(list2, ""); 673 sjbc = "" + culateMileageService.culateSjbc(list2, "");
679 - bc = "" + list2.size(); 674 + ljbc = "" + culateMileageService.culateLjbc(list2, "");
  675 + int bcInt = 0;
  676 + for(ScheduleRealInfo s : list2){
  677 + if(!s.isCcService() && s.getStatus() != -1){
  678 + bcInt++;
  679 + }
  680 + }
  681 + bc = "" + bcInt;
680 cr = "1"; 682 cr = "1";
681 683
682 realMileage_z = new BigDecimal(realMileage_z).add(new BigDecimal(realMileage)).toString(); 684 realMileage_z = new BigDecimal(realMileage_z).add(new BigDecimal(realMileage)).toString();
@@ -729,6 +731,7 @@ public class RefuelServiceImpl extends BaseServiceImpl&lt;Refuel, Long&gt; implements @@ -729,6 +731,7 @@ public class RefuelServiceImpl extends BaseServiceImpl&lt;Refuel, Long&gt; implements
729 m.put("bc", bc); 731 m.put("bc", bc);
730 m.put("jhbc", jhbc); 732 m.put("jhbc", jhbc);
731 m.put("sjbc", sjbc); 733 m.put("sjbc", sjbc);
  734 + m.put("yybc", Integer.valueOf(sjbc)+Integer.valueOf(ljbc));
732 m.put("cr", cr); 735 m.put("cr", cr);
733 m.put("remark", remarks); 736 m.put("remark", remarks);
734 737
src/main/resources/static/pages/forms/statement/refuelDc.html
@@ -63,6 +63,7 @@ @@ -63,6 +63,7 @@
63 <td>空驶公里</td> 63 <td>空驶公里</td>
64 <td>损失公里</td> 64 <td>损失公里</td>
65 <td>班次</td> 65 <td>班次</td>
  66 + <td>营运班次</td>
66 <td>车日</td> 67 <td>车日</td>
67 <td>备注</td> 68 <td>备注</td>
68 </tr> 69 </tr>
@@ -231,6 +232,7 @@ @@ -231,6 +232,7 @@
231 <td>{{obj.ksMileage}}</td> 232 <td>{{obj.ksMileage}}</td>
232 <td>{{obj.ssMileage}}</td> 233 <td>{{obj.ssMileage}}</td>
233 <td>{{obj.bc}}</td> 234 <td>{{obj.bc}}</td>
  235 + <td>{{obj.yybc}}</td>
234 <td>{{obj.cr}}</td> 236 <td>{{obj.cr}}</td>
235 <td title="{{obj.remark}}"> 237 <td title="{{obj.remark}}">
236 {{if obj.remark !=""}} 238 {{if obj.remark !=""}}
@@ -245,7 +247,7 @@ @@ -245,7 +247,7 @@
245 {{/each}} 247 {{/each}}
246 {{if list.length == 0}} 248 {{if list.length == 0}}
247 <tr> 249 <tr>
248 - <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> 250 + <td colspan="17"><h6 class="muted">没有找到相关数据</h6></td>
249 </tr> 251 </tr>
250 {{/if}} 252 {{/if}}
251 </script> 253 </script>
252 \ No newline at end of file 254 \ No newline at end of file