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