Commit 6925786841593e8d59958947faf09600fa3a0502
1 parent
9460dd02
车辆的班次里程与油电耗接口加一个含非营运班次的版本
Showing
1 changed file
with
23 additions
and
2 deletions
src/main/java/com/bsth/server_rs/bigdata/BigdataService.java
| ... | ... | @@ -1790,6 +1790,25 @@ public class BigdataService { |
| 1790 | 1790 | @Path("/scheduleAndMileage/date/{date}") |
| 1791 | 1791 | public List<Map<String, Object>> scheduleAndMileage(@PathParam("date") String date) throws ParseException { |
| 1792 | 1792 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 1793 | + List<Map<String, Object>> scheduleAndMileageByAllLine = this.scheduleAndMileageByAllLine(date); | |
| 1794 | + for(Map<String, Object> m : scheduleAndMileageByAllLine){ | |
| 1795 | + if(m.containsKey("sfyy") && "1".equals(m.get("sfyy").toString())){ | |
| 1796 | + resList.add(m); | |
| 1797 | + } | |
| 1798 | + } | |
| 1799 | + return resList; | |
| 1800 | + } | |
| 1801 | + | |
| 1802 | + /** | |
| 1803 | + * 车辆的班次里程与油电耗(给电科,含非营运线路) | |
| 1804 | + * @param date | |
| 1805 | + * @return | |
| 1806 | + * @throws ParseException | |
| 1807 | + */ | |
| 1808 | + @GET | |
| 1809 | + @Path("/scheduleAndMileageByAllLine/date/{date}") | |
| 1810 | + public List<Map<String, Object>> scheduleAndMileageByAllLine(@PathParam("date") String date) throws ParseException { | |
| 1811 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | |
| 1793 | 1812 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 1794 | 1813 | Date rq = sdf.parse(date); |
| 1795 | 1814 | |
| ... | ... | @@ -2059,8 +2078,10 @@ public class BigdataService { |
| 2059 | 2078 | Map<String, Object> m = xlMap.get(key); |
| 2060 | 2079 | m.put("cars", carsMap.get(key)); |
| 2061 | 2080 | String xl = m.get("xl").toString(); |
| 2062 | - if(!yyLine.contains(xl)){ | |
| 2063 | - continue; | |
| 2081 | + if(yyLine.contains(xl)){ | |
| 2082 | + m.put("sfyy", 1); | |
| 2083 | + } else { | |
| 2084 | + m.put("sfyy", 0); | |
| 2064 | 2085 | } |
| 2065 | 2086 | if(warrantCarMap.containsKey(xl)){ |
| 2066 | 2087 | m.put("warrantCar", warrantCarMap.get(xl)); | ... | ... |