Commit 1cd31d72136a132973ee68e1e4c4d9365e08d337
1 parent
baa7c3c1
子任务烂班统计排除空驶
Showing
2 changed files
with
33 additions
and
30 deletions
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| ... | ... | @@ -867,15 +867,17 @@ public class CulateMileageServiceImpl implements CulateMileageService{ |
| 867 | 867 | if (cts != null && cts.size() > 0) { |
| 868 | 868 | for(ChildTaskPlan c : cts){ |
| 869 | 869 | if(c.getCcId()==null){ |
| 870 | - if(item.equals("其他")){ | |
| 871 | - if(c.isDestroy() && | |
| 872 | - ((c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item)|| | |
| 873 | - (c.getDestroyReason()==null?"": c.getDestroyReason()).equals(""))) | |
| 874 | - sum = Arith.add(sum, c.getMileage()); | |
| 875 | - }else{ | |
| 876 | - if(c.isDestroy() && (c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item)) | |
| 877 | - sum = Arith.add(sum, c.getMileage()); | |
| 878 | - } | |
| 870 | + if(c.getMileageType().equals("service")){ | |
| 871 | + if(item.equals("其他")){ | |
| 872 | + if(c.isDestroy() && | |
| 873 | + ((c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item)|| | |
| 874 | + (c.getDestroyReason()==null?"": c.getDestroyReason()).equals(""))) | |
| 875 | + sum = Arith.add(sum, c.getMileage()); | |
| 876 | + }else{ | |
| 877 | + if(c.isDestroy() && (c.getDestroyReason()==null?"": c.getDestroyReason()).equals(item)) | |
| 878 | + sum = Arith.add(sum, c.getMileage()); | |
| 879 | + } | |
| 880 | + } | |
| 879 | 881 | } |
| 880 | 882 | } |
| 881 | 883 | } | ... | ... |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| ... | ... | @@ -1773,27 +1773,28 @@ public class ReportServiceImpl implements ReportService{ |
| 1773 | 1773 | while (it.hasNext()) { |
| 1774 | 1774 | ChildTaskPlan childTaskPlan = it.next(); |
| 1775 | 1775 | if (childTaskPlan.isDestroy()) { |
| 1776 | - String destroyReason = ""; | |
| 1777 | - if (childTaskPlan.getDestroyReason() == null) { | |
| 1778 | - destroyReason = "其他"; | |
| 1779 | - } else if (childTaskPlan.getDestroyReason().equals("")) { | |
| 1780 | - destroyReason = "其他"; | |
| 1781 | - } else { | |
| 1782 | - destroyReason = childTaskPlan.getDestroyReason(); | |
| 1783 | - } | |
| 1784 | - Map<String, Object> newMap = new HashMap<String, Object>(); | |
| 1785 | - newMap.put("nr", destroyReason); | |
| 1786 | - newMap.put("lp", scheduleRealInfo.getLpName()); | |
| 1787 | - newMap.put("nbbm", scheduleRealInfo.getClZbh()); | |
| 1788 | - newMap.put("jgh", scheduleRealInfo.getjGh()+scheduleRealInfo.getjName()+"/"+scheduleRealInfo.getsGh()+scheduleRealInfo.getsName()); | |
| 1789 | - newMap.put("dz", childTaskPlan.getStartStationName()); | |
| 1790 | - newMap.put("sj", childTaskPlan.getStartDate()); | |
| 1791 | - newMap.put("gzf", " "); | |
| 1792 | - newMap.put("lbbc", 0); | |
| 1793 | - newMap.put("lblc", childTaskPlan.getMileage()); | |
| 1794 | - newMap.put("jyqp", childTaskPlan.getRemarks()); | |
| 1795 | - list.add(newMap); | |
| 1796 | - | |
| 1776 | + if(childTaskPlan.getMileageType().equals("service")){ | |
| 1777 | + String destroyReason = ""; | |
| 1778 | + if (childTaskPlan.getDestroyReason() == null) { | |
| 1779 | + destroyReason = "其他"; | |
| 1780 | + } else if (childTaskPlan.getDestroyReason().equals("")) { | |
| 1781 | + destroyReason = "其他"; | |
| 1782 | + } else { | |
| 1783 | + destroyReason = childTaskPlan.getDestroyReason(); | |
| 1784 | + } | |
| 1785 | + Map<String, Object> newMap = new HashMap<String, Object>(); | |
| 1786 | + newMap.put("nr", destroyReason); | |
| 1787 | + newMap.put("lp", scheduleRealInfo.getLpName()); | |
| 1788 | + newMap.put("nbbm", scheduleRealInfo.getClZbh()); | |
| 1789 | + newMap.put("jgh", scheduleRealInfo.getjGh()+scheduleRealInfo.getjName()+"/"+scheduleRealInfo.getsGh()+scheduleRealInfo.getsName()); | |
| 1790 | + newMap.put("dz", childTaskPlan.getStartStationName()); | |
| 1791 | + newMap.put("sj", childTaskPlan.getStartDate()); | |
| 1792 | + newMap.put("gzf", " "); | |
| 1793 | + newMap.put("lbbc", 0); | |
| 1794 | + newMap.put("lblc", childTaskPlan.getMileage()); | |
| 1795 | + newMap.put("jyqp", childTaskPlan.getRemarks()); | |
| 1796 | + list.add(newMap); | |
| 1797 | + } | |
| 1797 | 1798 | } |
| 1798 | 1799 | } |
| 1799 | 1800 | } | ... | ... |