Commit 0511d4e24263a94c77314943916f2b7112664ceb
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
# Conflicts: # src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
Showing
42 changed files
with
2563 additions
and
805 deletions
Too many changes to show.
To preserve performance only 42 of 54 files are displayed.
src/main/java/com/bsth/controller/forms/ExportController.java
| @@ -13,12 +13,15 @@ import org.springframework.web.bind.annotation.RequestMethod; | @@ -13,12 +13,15 @@ import org.springframework.web.bind.annotation.RequestMethod; | ||
| 13 | import org.springframework.web.bind.annotation.RequestParam; | 13 | import org.springframework.web.bind.annotation.RequestParam; |
| 14 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | 15 | ||
| 16 | +import com.bsth.entity.mcy_forms.Allline; | ||
| 16 | import com.bsth.entity.mcy_forms.Changetochange; | 17 | import com.bsth.entity.mcy_forms.Changetochange; |
| 18 | +import com.bsth.entity.mcy_forms.Executionrate; | ||
| 17 | import com.bsth.entity.mcy_forms.Linepasswengerflow; | 19 | import com.bsth.entity.mcy_forms.Linepasswengerflow; |
| 18 | import com.bsth.entity.mcy_forms.Operationservice; | 20 | import com.bsth.entity.mcy_forms.Operationservice; |
| 19 | import com.bsth.entity.mcy_forms.Shifday; | 21 | import com.bsth.entity.mcy_forms.Shifday; |
| 20 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; | 22 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 21 | import com.bsth.entity.mcy_forms.Singledata; | 23 | import com.bsth.entity.mcy_forms.Singledata; |
| 24 | +import com.bsth.entity.mcy_forms.Turnoutrate; | ||
| 22 | import com.bsth.entity.mcy_forms.Vehicleloading; | 25 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 23 | import com.bsth.entity.mcy_forms.Waybillday; | 26 | import com.bsth.entity.mcy_forms.Waybillday; |
| 24 | import com.bsth.service.forms.ExportService; | 27 | import com.bsth.service.forms.ExportService; |
| @@ -28,33 +31,31 @@ import com.bsth.util.ReportUtils; | @@ -28,33 +31,31 @@ import com.bsth.util.ReportUtils; | ||
| 28 | @RestController | 31 | @RestController |
| 29 | @RequestMapping("mcy_export") | 32 | @RequestMapping("mcy_export") |
| 30 | public class ExportController { | 33 | public class ExportController { |
| 31 | - | 34 | + |
| 32 | @Autowired | 35 | @Autowired |
| 33 | FormsService formsService; | 36 | FormsService formsService; |
| 34 | 37 | ||
| 35 | @Autowired | 38 | @Autowired |
| 36 | ExportService exportService; | 39 | ExportService exportService; |
| 37 | - | ||
| 38 | - //行车路单日报表 | ||
| 39 | - @RequestMapping(value = "/waybilldayExport",method = RequestMethod.POST) | ||
| 40 | - public List<Waybillday> waybilldayExport(@RequestParam Map<String, Object> map){ | 40 | + |
| 41 | + // 行车路单日报表 | ||
| 42 | + @RequestMapping(value = "/waybilldayExport", method = RequestMethod.POST) | ||
| 43 | + public List<Waybillday> waybilldayExport(@RequestParam Map<String, Object> map) { | ||
| 41 | List<Waybillday> waybillday = formsService.waybillday(map); | 44 | List<Waybillday> waybillday = formsService.waybillday(map); |
| 42 | exportService.waybillday(map.get("date").toString(), waybillday); | 45 | exportService.waybillday(map.get("date").toString(), waybillday); |
| 43 | return waybillday; | 46 | return waybillday; |
| 44 | } | 47 | } |
| 45 | - | ||
| 46 | - | ||
| 47 | - //线路客流量报表 | ||
| 48 | - @RequestMapping(value = "/linepasswengerflowExport",method = RequestMethod.POST) | ||
| 49 | - public List<Map<String, Object>> linepasswengerflowExport(@RequestParam Map<String, Object> map){ | ||
| 50 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 51 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 48 | + |
| 49 | + // 线路客流量报表 | ||
| 50 | + @RequestMapping(value = "/linepasswengerflowExport", method = RequestMethod.POST) | ||
| 51 | + public List<Map<String, Object>> linepasswengerflowExport(@RequestParam Map<String, Object> map) { | ||
| 52 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 52 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 53 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 53 | ReportUtils ee = new ReportUtils(); | 54 | ReportUtils ee = new ReportUtils(); |
| 54 | List<Linepasswengerflow> linepasswengerflow = formsService.linepasswengerflow(map); | 55 | List<Linepasswengerflow> linepasswengerflow = formsService.linepasswengerflow(map); |
| 55 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 56 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 56 | - int i=1; | ||
| 57 | - for(Linepasswengerflow l : linepasswengerflow){ | 57 | + int i = 1; |
| 58 | + for (Linepasswengerflow l : linepasswengerflow) { | ||
| 58 | Map<String, Object> m = new HashMap<String, Object>(); | 59 | Map<String, Object> m = new HashMap<String, Object>(); |
| 59 | m.put("i", i); | 60 | m.put("i", i); |
| 60 | m.put("stationName", l.getStationName()); | 61 | m.put("stationName", l.getStationName()); |
| @@ -62,78 +63,74 @@ public class ExportController { | @@ -62,78 +63,74 @@ public class ExportController { | ||
| 62 | m.put("2", " "); | 63 | m.put("2", " "); |
| 63 | resList.add(m); | 64 | resList.add(m); |
| 64 | i++; | 65 | i++; |
| 65 | - } | ||
| 66 | - | ||
| 67 | - try { | 66 | + } |
| 67 | + | ||
| 68 | + try { | ||
| 68 | listI.add(resList.iterator()); | 69 | listI.add(resList.iterator()); |
| 69 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 70 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\linepassengerflow.xls", | ||
| 71 | - path+"export\\线路客流量报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | ||
| 72 | - } catch (Exception e) { | ||
| 73 | - e.printStackTrace(); | ||
| 74 | - } | 70 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; |
| 71 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\linepassengerflow.xls", | ||
| 72 | + path + "export\\线路客流量报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | ||
| 73 | + } catch (Exception e) { | ||
| 74 | + e.printStackTrace(); | ||
| 75 | + } | ||
| 75 | return resList; | 76 | return resList; |
| 76 | } | 77 | } |
| 77 | 78 | ||
| 78 | - | ||
| 79 | - | ||
| 80 | - //班次车辆人员日统计 | ||
| 81 | - @RequestMapping(value = "/shifdayExport",method = RequestMethod.POST) | ||
| 82 | - public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map){ | ||
| 83 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 84 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 79 | + // 班次车辆人员日统计 |
| 80 | + @RequestMapping(value = "/shifdayExport", method = RequestMethod.POST) | ||
| 81 | + public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map) { | ||
| 82 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 85 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 83 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 86 | ReportUtils ee = new ReportUtils(); | 84 | ReportUtils ee = new ReportUtils(); |
| 87 | List<Shifday> shifday = formsService.shifday(map); | 85 | List<Shifday> shifday = formsService.shifday(map); |
| 88 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 86 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 89 | - for(Shifday l : shifday){ | 87 | + for (Shifday l : shifday) { |
| 90 | Map<String, Object> m = new HashMap<String, Object>(); | 88 | Map<String, Object> m = new HashMap<String, Object>(); |
| 91 | - m.put("jName",l.getjName()); | 89 | + m.put("jName", l.getjName()); |
| 92 | m.put("sName", l.getsName()); | 90 | m.put("sName", l.getsName()); |
| 93 | m.put("lpName", l.getLpName()); | 91 | m.put("lpName", l.getLpName()); |
| 94 | m.put("carPlate", l.getCarPlate()); | 92 | m.put("carPlate", l.getCarPlate()); |
| 95 | m.put("jhlc", l.getJhlc()); | 93 | m.put("jhlc", l.getJhlc()); |
| 96 | - //m.put("sjjhlc", l.getSjjhlc()); | 94 | + // m.put("sjjhlc", l.getSjjhlc()); |
| 97 | m.put("yygl", l.getYygl()); | 95 | m.put("yygl", l.getYygl()); |
| 98 | m.put("emptMileage", l.getEmptMileage()); | 96 | m.put("emptMileage", l.getEmptMileage()); |
| 99 | m.put("remMileage", l.getRemMileage()); | 97 | m.put("remMileage", l.getRemMileage()); |
| 100 | m.put("addMileage", l.getAddMileage()); | 98 | m.put("addMileage", l.getAddMileage()); |
| 101 | m.put("totalm", l.getTotalm()); | 99 | m.put("totalm", l.getTotalm()); |
| 102 | m.put("jhbc", l.getJhbc()); | 100 | m.put("jhbc", l.getJhbc()); |
| 103 | - //m.put("sjjhbc", l.getSjjhbc()); | 101 | + // m.put("sjjhbc", l.getSjjhbc()); |
| 104 | m.put("cjbc", l.getCjbc()); | 102 | m.put("cjbc", l.getCjbc()); |
| 105 | m.put("ljbc", l.getLjbc()); | 103 | m.put("ljbc", l.getLjbc()); |
| 106 | m.put("sjbc", l.getSjbc()); | 104 | m.put("sjbc", l.getSjbc()); |
| 107 | resList.add(m); | 105 | resList.add(m); |
| 108 | - } | ||
| 109 | - | ||
| 110 | - try { | 106 | + } |
| 107 | + | ||
| 108 | + try { | ||
| 111 | listI.add(resList.iterator()); | 109 | listI.add(resList.iterator()); |
| 112 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 113 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\shifday.xls", | ||
| 114 | - path+"export\\班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | ||
| 115 | - } catch (Exception e) { | ||
| 116 | - e.printStackTrace(); | ||
| 117 | - } | 110 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; |
| 111 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\shifday.xls", | ||
| 112 | + path + "export\\班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | ||
| 113 | + } catch (Exception e) { | ||
| 114 | + e.printStackTrace(); | ||
| 115 | + } | ||
| 118 | return resList; | 116 | return resList; |
| 119 | } | 117 | } |
| 120 | - | ||
| 121 | - //班次车辆人员月统计 | ||
| 122 | - @RequestMapping(value = "/shiftuehiclemanthExport",method = RequestMethod.POST) | ||
| 123 | - public List<Map<String, Object>> shiftuehiclemanthExport(@RequestParam Map<String, Object> map){ | ||
| 124 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 125 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 118 | + |
| 119 | + // 班次车辆人员月统计 | ||
| 120 | + @RequestMapping(value = "/shiftuehiclemanthExport", method = RequestMethod.POST) | ||
| 121 | + public List<Map<String, Object>> shiftuehiclemanthExport(@RequestParam Map<String, Object> map) { | ||
| 122 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 126 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 123 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 127 | ReportUtils ee = new ReportUtils(); | 124 | ReportUtils ee = new ReportUtils(); |
| 128 | List<Shiftuehiclemanth> shiftuehiclemanth = formsService.shiftuehiclemanth(map); | 125 | List<Shiftuehiclemanth> shiftuehiclemanth = formsService.shiftuehiclemanth(map); |
| 129 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 126 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 130 | - int i=1; | ||
| 131 | - for(Shiftuehiclemanth l : shiftuehiclemanth){ | 127 | + int i = 1; |
| 128 | + for (Shiftuehiclemanth l : shiftuehiclemanth) { | ||
| 132 | Map<String, Object> m = new HashMap<String, Object>(); | 129 | Map<String, Object> m = new HashMap<String, Object>(); |
| 133 | m.put("i", i); | 130 | m.put("i", i); |
| 134 | - m.put("jName",l.getjName() ); | 131 | + m.put("jName", l.getjName()); |
| 135 | m.put("jhlc", l.getJhlc()); | 132 | m.put("jhlc", l.getJhlc()); |
| 136 | - m.put("emptMileage",l.getEmptMileage() ); | 133 | + m.put("emptMileage", l.getEmptMileage()); |
| 137 | m.put("remMileage", l.getRemMileage()); | 134 | m.put("remMileage", l.getRemMileage()); |
| 138 | m.put("addMileage", l.getAddMileage()); | 135 | m.put("addMileage", l.getAddMileage()); |
| 139 | m.put("totalm", l.getTotalm()); | 136 | m.put("totalm", l.getTotalm()); |
| @@ -142,39 +139,37 @@ public class ExportController { | @@ -142,39 +139,37 @@ public class ExportController { | ||
| 142 | m.put("sjbc", l.getSjbc()); | 139 | m.put("sjbc", l.getSjbc()); |
| 143 | resList.add(m); | 140 | resList.add(m); |
| 144 | i++; | 141 | i++; |
| 145 | - } | ||
| 146 | - | ||
| 147 | - try { | 142 | + } |
| 143 | + | ||
| 144 | + try { | ||
| 148 | listI.add(resList.iterator()); | 145 | listI.add(resList.iterator()); |
| 149 | - | ||
| 150 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 151 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\shiftuehiclemanth.xls", | ||
| 152 | - path+"export\\班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 153 | - | ||
| 154 | - } catch (Exception e) { | ||
| 155 | - e.printStackTrace(); | ||
| 156 | - } | ||
| 157 | - | 146 | + |
| 147 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; | ||
| 148 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\shiftuehiclemanth.xls", path | ||
| 149 | + + "export\\班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 150 | + | ||
| 151 | + } catch (Exception e) { | ||
| 152 | + e.printStackTrace(); | ||
| 153 | + } | ||
| 154 | + | ||
| 158 | return resList; | 155 | return resList; |
| 159 | } | 156 | } |
| 160 | - | ||
| 161 | 157 | ||
| 162 | - //路单数据报表 | ||
| 163 | - @RequestMapping(value = "/singledataExport",method = RequestMethod.POST) | ||
| 164 | - public List<Map<String, Object>> singledataExport(@RequestParam Map<String, Object> map){ | ||
| 165 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 166 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 158 | + // 路单数据报表 |
| 159 | + @RequestMapping(value = "/singledataExport", method = RequestMethod.POST) | ||
| 160 | + public List<Map<String, Object>> singledataExport(@RequestParam Map<String, Object> map) { | ||
| 161 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 167 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 162 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 168 | ReportUtils ee = new ReportUtils(); | 163 | ReportUtils ee = new ReportUtils(); |
| 169 | List<Singledata> singledata = formsService.singledata(map); | 164 | List<Singledata> singledata = formsService.singledata(map); |
| 170 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 165 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 171 | - int i=1; | ||
| 172 | - for(Singledata l : singledata){ | 166 | + int i = 1; |
| 167 | + for (Singledata l : singledata) { | ||
| 173 | Map<String, Object> m = new HashMap<String, Object>(); | 168 | Map<String, Object> m = new HashMap<String, Object>(); |
| 174 | m.put("i", i); | 169 | m.put("i", i); |
| 175 | - m.put("rQ",l.getrQ()); | 170 | + m.put("rQ", l.getrQ()); |
| 176 | m.put("gS", l.getgS()); | 171 | m.put("gS", l.getgS()); |
| 177 | - m.put("xL",l.getxL() ); | 172 | + m.put("xL", l.getxL()); |
| 178 | m.put("clzbh", l.getClzbh()); | 173 | m.put("clzbh", l.getClzbh()); |
| 179 | m.put("jsy", l.getJsy()); | 174 | m.put("jsy", l.getJsy()); |
| 180 | m.put("jName", l.getjName()); | 175 | m.put("jName", l.getjName()); |
| @@ -184,35 +179,35 @@ public class ExportController { | @@ -184,35 +179,35 @@ public class ExportController { | ||
| 184 | m.put("emptMileage", l.getEmptMileage()); | 179 | m.put("emptMileage", l.getEmptMileage()); |
| 185 | m.put("hyl", l.getHyl()); | 180 | m.put("hyl", l.getHyl()); |
| 186 | m.put("jzl", l.getJzl()); | 181 | m.put("jzl", l.getJzl()); |
| 187 | - m.put("unyyyl",l.getUnyyyl()); | 182 | + m.put("unyyyl", l.getUnyyyl()); |
| 188 | m.put("jhjl", l.getJhjl()); | 183 | m.put("jhjl", l.getJhjl()); |
| 189 | resList.add(m); | 184 | resList.add(m); |
| 190 | i++; | 185 | i++; |
| 191 | - } | ||
| 192 | - | ||
| 193 | - try { | 186 | + } |
| 187 | + | ||
| 188 | + try { | ||
| 194 | listI.add(resList.iterator()); | 189 | listI.add(resList.iterator()); |
| 195 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 196 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\singledata.xls", | ||
| 197 | - path+"export\\路单报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 198 | - } catch (Exception e) { | ||
| 199 | - e.printStackTrace(); | ||
| 200 | - } | ||
| 201 | - | 190 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; |
| 191 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\singledata.xls", | ||
| 192 | + path + "export\\路单报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 193 | + } catch (Exception e) { | ||
| 194 | + e.printStackTrace(); | ||
| 195 | + } | ||
| 196 | + | ||
| 202 | return resList; | 197 | return resList; |
| 203 | } | 198 | } |
| 204 | - | ||
| 205 | - //车辆加注 | ||
| 206 | - @RequestMapping(value = "/vehicleloadingExport",method = RequestMethod.POST) | ||
| 207 | - public List<Map<String, Object>> vehicleloadingExport(@RequestParam Map<String, Object> map){ | ||
| 208 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 209 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 199 | + |
| 200 | + // 车辆加注 | ||
| 201 | + @RequestMapping(value = "/vehicleloadingExport", method = RequestMethod.POST) | ||
| 202 | + public List<Map<String, Object>> vehicleloadingExport(@RequestParam Map<String, Object> map) { | ||
| 203 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 210 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 204 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 211 | ReportUtils ee = new ReportUtils(); | 205 | ReportUtils ee = new ReportUtils(); |
| 212 | - List<Vehicleloading> vehicleloading = formsService.vehicleloading(map.get("line").toString(), map.get("date").toString()); | 206 | + List<Vehicleloading> vehicleloading = formsService.vehicleloading(map.get("line").toString(), |
| 207 | + map.get("date").toString()); | ||
| 213 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 208 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 214 | - int i=1; | ||
| 215 | - for(Vehicleloading l : vehicleloading){ | 209 | + int i = 1; |
| 210 | + for (Vehicleloading l : vehicleloading) { | ||
| 216 | Map<String, Object> m = new HashMap<String, Object>(); | 211 | Map<String, Object> m = new HashMap<String, Object>(); |
| 217 | m.put("i", i); | 212 | m.put("i", i); |
| 218 | m.put("rQ", l.getrQ()); | 213 | m.put("rQ", l.getrQ()); |
| @@ -228,96 +223,199 @@ public class ExportController { | @@ -228,96 +223,199 @@ public class ExportController { | ||
| 228 | m.put("sjbc", l.getSjbc()); | 223 | m.put("sjbc", l.getSjbc()); |
| 229 | resList.add(m); | 224 | resList.add(m); |
| 230 | i++; | 225 | i++; |
| 231 | - } | ||
| 232 | - | ||
| 233 | - try { | 226 | + } |
| 227 | + | ||
| 228 | + try { | ||
| 234 | listI.add(resList.iterator()); | 229 | listI.add(resList.iterator()); |
| 235 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 236 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\vehicleloading.xls", | ||
| 237 | - path+"export\\车辆加注" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | ||
| 238 | - } catch (Exception e) { | ||
| 239 | - e.printStackTrace(); | ||
| 240 | - } | 230 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; |
| 231 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\vehicleloading.xls", | ||
| 232 | + path + "export\\车辆加注" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | ||
| 233 | + } catch (Exception e) { | ||
| 234 | + e.printStackTrace(); | ||
| 235 | + } | ||
| 241 | return resList; | 236 | return resList; |
| 242 | } | 237 | } |
| 243 | - | ||
| 244 | - //运营服务阶段报表 | ||
| 245 | - @RequestMapping(value = "/operationserviceExport",method = RequestMethod.POST) | ||
| 246 | - public List<Map<String, Object>> operationserviceExport(@RequestParam Map<String, Object> map){ | ||
| 247 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 248 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 238 | + |
| 239 | + // 运营服务阶段报表 | ||
| 240 | + @RequestMapping(value = "/operationserviceExport", method = RequestMethod.POST) | ||
| 241 | + public List<Map<String, Object>> operationserviceExport(@RequestParam Map<String, Object> map) { | ||
| 242 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 249 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 243 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 250 | ReportUtils ee = new ReportUtils(); | 244 | ReportUtils ee = new ReportUtils(); |
| 251 | List<Operationservice> operationservice = formsService.operationservice(map); | 245 | List<Operationservice> operationservice = formsService.operationservice(map); |
| 252 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 246 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 253 | - int i=1; | ||
| 254 | - for(Operationservice l : operationservice){ | ||
| 255 | - Map<String, Object> m = new HashMap<String, Object>(); | ||
| 256 | - m.put("i", i); | ||
| 257 | - m.put("xlName", l.getXlName()); | ||
| 258 | - m.put("jzl", l.getJzl()); | ||
| 259 | - m.put("xhl", l.getXhl()); | ||
| 260 | - m.put("xsgl", l.getXsgl()); | ||
| 261 | - m.put("emptMileage", l.getEmptMileage()); | ||
| 262 | - m.put("sjbc", l.getSjbc()); | ||
| 263 | - resList.add(m); | ||
| 264 | - i++; | 247 | + int i = 1; |
| 248 | + for (Operationservice l : operationservice) { | ||
| 249 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 250 | + m.put("i", i); | ||
| 251 | + m.put("xlName", l.getXlName()); | ||
| 252 | + m.put("jzl", l.getJzl()); | ||
| 253 | + m.put("xhl", l.getXhl()); | ||
| 254 | + m.put("xsgl", l.getXsgl()); | ||
| 255 | + m.put("emptMileage", l.getEmptMileage()); | ||
| 256 | + m.put("sjbc", l.getSjbc()); | ||
| 257 | + resList.add(m); | ||
| 258 | + i++; | ||
| 265 | } | 259 | } |
| 266 | - | 260 | + |
| 267 | try { | 261 | try { |
| 268 | listI.add(resList.iterator()); | 262 | listI.add(resList.iterator()); |
| 269 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 270 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\operationservice.xls", | ||
| 271 | - path+"export\\运营服务阶段报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 272 | - } catch (Exception e) { | ||
| 273 | - e.printStackTrace(); | ||
| 274 | - } | 263 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; |
| 264 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\operationservice.xls", path + "export\\运营服务阶段报表" | ||
| 265 | + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 266 | + } catch (Exception e) { | ||
| 267 | + e.printStackTrace(); | ||
| 268 | + } | ||
| 275 | return resList; | 269 | return resList; |
| 276 | } | 270 | } |
| 277 | - | ||
| 278 | 271 | ||
| 279 | - //换人换车情况日统计 | ||
| 280 | - @RequestMapping(value = "/changetochangeExport",method = RequestMethod.POST) | ||
| 281 | - public List<Map<String, Object>> changetochangeExport(@RequestParam Map<String, Object> map){ | ||
| 282 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 283 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 284 | - List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 285 | - ReportUtils ee = new ReportUtils(); | ||
| 286 | - List<Changetochange> changetochange = formsService.changetochange(map); | ||
| 287 | - List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 288 | - for(Changetochange l : changetochange){ | 272 | + // 换人换车情况日统计 |
| 273 | + @RequestMapping(value = "/changetochangeExport", method = RequestMethod.POST) | ||
| 274 | + public List<Map<String, Object>> changetochangeExport(@RequestParam Map<String, Object> map) { | ||
| 275 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 276 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 277 | + ReportUtils ee = new ReportUtils(); | ||
| 278 | + List<Changetochange> changetochange = formsService.changetochange(map); | ||
| 279 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 280 | + for (Changetochange l : changetochange) { | ||
| 289 | Map<String, Object> m = new HashMap<String, Object>(); | 281 | Map<String, Object> m = new HashMap<String, Object>(); |
| 290 | - m.put("rq",l.getRq()); | ||
| 291 | - m.put("gs",l.getGs()); | ||
| 292 | - m.put("fgs",l.getFgs()); | ||
| 293 | - m.put("xl",l.getXl()); | ||
| 294 | - m.put("lp",l.getLp()); | ||
| 295 | - m.put("fssj",l.getFssj()); | ||
| 296 | - m.put("xgsj",l.getXgsj()); | ||
| 297 | - m.put("pcch",l.getPcch()); | ||
| 298 | - m.put("pcry",l.getPcry()); | ||
| 299 | - m.put("jhch",l.getJhch()); | ||
| 300 | - m.put("jhgh",l.getJhgh()); | ||
| 301 | - m.put("sjch",l.getSjch()); | ||
| 302 | - m.put("sjgh",l.getSjgh()); | ||
| 303 | - m.put("yy",l.getYy()); | ||
| 304 | - m.put("xgr",l.getXgr()); | 282 | + m.put("rq", l.getRq()); |
| 283 | + m.put("gs", l.getGs()); | ||
| 284 | + m.put("fgs", l.getFgs()); | ||
| 285 | + m.put("xl", l.getXl()); | ||
| 286 | + m.put("lp", l.getLp()); | ||
| 287 | + m.put("fssj", l.getFssj()); | ||
| 288 | + m.put("xgsj", l.getXgsj()); | ||
| 289 | + m.put("pcch", l.getPcch()); | ||
| 290 | + m.put("pcry", l.getPcry()); | ||
| 291 | + m.put("jhch", l.getJhch()); | ||
| 292 | + m.put("jhgh", l.getJhgh()); | ||
| 293 | + m.put("sjch", l.getSjch()); | ||
| 294 | + m.put("sjgh", l.getSjgh()); | ||
| 295 | + m.put("yy", l.getYy()); | ||
| 296 | + m.put("xgr", l.getXgr()); | ||
| 305 | resList.add(m); | 297 | resList.add(m); |
| 306 | - } | ||
| 307 | - | ||
| 308 | - try { | ||
| 309 | - listI.add(resList.iterator()); | ||
| 310 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 311 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\changetochange.xls", | ||
| 312 | - path+"export\\换人换车情况日统计" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 313 | - } catch (Exception e) { | ||
| 314 | - e.printStackTrace(); | ||
| 315 | - } | ||
| 316 | - return resList; | ||
| 317 | } | 298 | } |
| 318 | - | ||
| 319 | - | ||
| 320 | - | ||
| 321 | - | 299 | + |
| 300 | + try { | ||
| 301 | + listI.add(resList.iterator()); | ||
| 302 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; | ||
| 303 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\changetochange.xls", path + "export\\换人换车情况日统计" | ||
| 304 | + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 305 | + } catch (Exception e) { | ||
| 306 | + e.printStackTrace(); | ||
| 307 | + } | ||
| 308 | + return resList; | ||
| 309 | + } | ||
| 310 | + | ||
| 311 | + // 营运线路出车率统计表 | ||
| 312 | + @RequestMapping(value = "/turnoutrateExport", method = RequestMethod.POST) | ||
| 313 | + public List<Map<String, Object>> turnoutrateExport(@RequestParam Map<String, Object> map) { | ||
| 314 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 315 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 316 | + ReportUtils ee = new ReportUtils(); | ||
| 317 | + List<Turnoutrate> turnoutrate = formsService.turnoutrate(map); | ||
| 318 | + Map<String, Object> map1 = new HashMap<String, Object>(); | ||
| 319 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 320 | + for (Turnoutrate l : turnoutrate) { | ||
| 321 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 322 | + m.put("rq", l.getRq()); | ||
| 323 | + m.put("gs", l.getGs()); | ||
| 324 | + m.put("zhgs", l.getZhgs()); | ||
| 325 | + m.put("xl", l.getXl()); | ||
| 326 | + m.put("cchjh", l.getCchjh()); | ||
| 327 | + m.put("cchsj", l.getCchsj()); | ||
| 328 | + m.put("cchqz", l.getCchqz()); | ||
| 329 | + m.put("chl", l.getChl()); | ||
| 330 | + m.put("bcjh", l.getBcjh()); | ||
| 331 | + m.put("bcsj", l.getBbzxl()); | ||
| 332 | + m.put("bbzxl", l.getBbzxl()); | ||
| 333 | + m.put("sm", l.getSm()); | ||
| 334 | + resList.add(m); | ||
| 335 | + } | ||
| 336 | + | ||
| 337 | + try { | ||
| 338 | + listI.add(resList.iterator()); | ||
| 339 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; | ||
| 340 | + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\turnoutrate.xls", path + "export\\营运线路出车率统计表" | ||
| 341 | + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 342 | + } catch (Exception e) { | ||
| 343 | + e.printStackTrace(); | ||
| 344 | + } | ||
| 345 | + return resList; | ||
| 346 | + } | ||
| 347 | + | ||
| 348 | + //营运线路出车率统计表 | ||
| 349 | + @RequestMapping(value = "/executionrateExport", method = RequestMethod.POST) | ||
| 350 | + public List<Map<String, Object>> executionrateExport(@RequestParam Map<String, Object> map) { | ||
| 351 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 352 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 353 | + ReportUtils ee = new ReportUtils(); | ||
| 354 | + List<Executionrate> executionrate = formsService.executionrate(map); | ||
| 355 | + Map<String, Object> map1 = new HashMap<String, Object>(); | ||
| 356 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 357 | + for (Executionrate l : executionrate) { | ||
| 358 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 359 | + m.put("rq", l.getRq()); | ||
| 360 | + m.put("gs", l.getGs()); | ||
| 361 | + m.put("zhgs", l.getZhgs()); | ||
| 362 | + m.put("xl", l.getXl()); | ||
| 363 | + m.put("cchjh", l.getCchjh()); | ||
| 364 | + m.put("cchsj", l.getCchsj()); | ||
| 365 | + m.put("chl", l.getChl()); | ||
| 366 | + m.put("bcjh", l.getBcjh()); | ||
| 367 | + m.put("bcsj", l.getBbzxl()); | ||
| 368 | + m.put("bbzxl", l.getBbzxl()); | ||
| 369 | + m.put("sm", l.getSm()); | ||
| 370 | + resList.add(m); | ||
| 371 | + } | ||
| 372 | + | ||
| 373 | + try { | ||
| 374 | + listI.add(resList.iterator()); | ||
| 375 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; | ||
| 376 | + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\executionrate.xls", path + "export\\班次执行率统计表" | ||
| 377 | + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 378 | + } catch (Exception e) { | ||
| 379 | + e.printStackTrace(); | ||
| 380 | + } | ||
| 381 | + return resList; | ||
| 382 | + } | ||
| 383 | + | ||
| 322 | 384 | ||
| 385 | + ////营运线路名称统计表 | ||
| 386 | + @RequestMapping(value = "/alllineExport", method = RequestMethod.POST) | ||
| 387 | + public List<Map<String, Object>> alllineExport(@RequestParam Map<String, Object> map) { | ||
| 388 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 389 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 390 | + ReportUtils ee = new ReportUtils(); | ||
| 391 | + List<Allline> allline = formsService.allline(map); | ||
| 392 | + Map<String, Object> map1 = new HashMap<String, Object>(); | ||
| 393 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 394 | + for (Allline l : allline) { | ||
| 395 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 396 | + m.put("rq", l.getRq()); | ||
| 397 | + m.put("gs", l.getGs()); | ||
| 398 | + m.put("zhgs", l.getZhgs()); | ||
| 399 | + m.put("xl", l.getXl()); | ||
| 400 | + m.put("cchjh", l.getCchjh()); | ||
| 401 | + m.put("cchsj", l.getCchsj()); | ||
| 402 | + m.put("chl", l.getChl()); | ||
| 403 | + m.put("bcjh", l.getBcjh()); | ||
| 404 | + m.put("bcsj", l.getBbzxl()); | ||
| 405 | + m.put("bbzxl", l.getBbzxl()); | ||
| 406 | + m.put("sm", l.getSm()); | ||
| 407 | + resList.add(m); | ||
| 408 | + } | ||
| 409 | + | ||
| 410 | + try { | ||
| 411 | + listI.add(resList.iterator()); | ||
| 412 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; | ||
| 413 | + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\allline.xls", path + "export\\营运线路名称统计表" | ||
| 414 | + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 415 | + } catch (Exception e) { | ||
| 416 | + e.printStackTrace(); | ||
| 417 | + } | ||
| 418 | + return resList; | ||
| 419 | + } | ||
| 420 | + | ||
| 323 | } | 421 | } |
src/main/java/com/bsth/controller/forms/MCY_FormsController.java
| @@ -9,12 +9,15 @@ import org.springframework.web.bind.annotation.RequestMethod; | @@ -9,12 +9,15 @@ import org.springframework.web.bind.annotation.RequestMethod; | ||
| 9 | import org.springframework.web.bind.annotation.RequestParam; | 9 | import org.springframework.web.bind.annotation.RequestParam; |
| 10 | import org.springframework.web.bind.annotation.RestController; | 10 | import org.springframework.web.bind.annotation.RestController; |
| 11 | 11 | ||
| 12 | +import com.bsth.entity.mcy_forms.Allline; | ||
| 12 | import com.bsth.entity.mcy_forms.Changetochange; | 13 | import com.bsth.entity.mcy_forms.Changetochange; |
| 14 | +import com.bsth.entity.mcy_forms.Executionrate; | ||
| 13 | import com.bsth.entity.mcy_forms.Linepasswengerflow; | 15 | import com.bsth.entity.mcy_forms.Linepasswengerflow; |
| 14 | import com.bsth.entity.mcy_forms.Operationservice; | 16 | import com.bsth.entity.mcy_forms.Operationservice; |
| 15 | import com.bsth.entity.mcy_forms.Shifday; | 17 | import com.bsth.entity.mcy_forms.Shifday; |
| 16 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; | 18 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 17 | import com.bsth.entity.mcy_forms.Singledata; | 19 | import com.bsth.entity.mcy_forms.Singledata; |
| 20 | +import com.bsth.entity.mcy_forms.Turnoutrate; | ||
| 18 | import com.bsth.entity.mcy_forms.Vehicleloading; | 21 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 19 | import com.bsth.entity.mcy_forms.Waybillday; | 22 | import com.bsth.entity.mcy_forms.Waybillday; |
| 20 | import com.bsth.service.forms.FormsService; | 23 | import com.bsth.service.forms.FormsService; |
| @@ -39,12 +42,6 @@ public class MCY_FormsController { | @@ -39,12 +42,6 @@ public class MCY_FormsController { | ||
| 39 | return formsService.waybillday(map); | 42 | return formsService.waybillday(map); |
| 40 | } | 43 | } |
| 41 | 44 | ||
| 42 | - @RequestMapping(value = "/waybilldayExcel") | ||
| 43 | - public List<Waybillday> dailyInfo(@RequestParam Map<String, Object> map) { | ||
| 44 | - return formsService.waybilldayExcel(map); | ||
| 45 | - } | ||
| 46 | - | ||
| 47 | - | ||
| 48 | //线路客流量报表 | 45 | //线路客流量报表 |
| 49 | @RequestMapping(value = "/linepasswengerflow",method = RequestMethod.POST) | 46 | @RequestMapping(value = "/linepasswengerflow",method = RequestMethod.POST) |
| 50 | public List<Linepasswengerflow> linepasswengerflow(@RequestParam Map<String, Object> map){ | 47 | public List<Linepasswengerflow> linepasswengerflow(@RequestParam Map<String, Object> map){ |
| @@ -88,6 +85,8 @@ public class MCY_FormsController { | @@ -88,6 +85,8 @@ public class MCY_FormsController { | ||
| 88 | public List<Vehicleloading> vehicleloading(@RequestParam String line ,@RequestParam String data){ | 85 | public List<Vehicleloading> vehicleloading(@RequestParam String line ,@RequestParam String data){ |
| 89 | return formsService.vehicleloading(line,data); | 86 | return formsService.vehicleloading(line,data); |
| 90 | } | 87 | } |
| 88 | + | ||
| 89 | + | ||
| 91 | //运营服务阶段报表 | 90 | //运营服务阶段报表 |
| 92 | @RequestMapping(value = "/operationservice",method = RequestMethod.POST) | 91 | @RequestMapping(value = "/operationservice",method = RequestMethod.POST) |
| 93 | public List<Operationservice> operationservice(@RequestParam Map<String, Object> map){ | 92 | public List<Operationservice> operationservice(@RequestParam Map<String, Object> map){ |
| @@ -95,5 +94,25 @@ public class MCY_FormsController { | @@ -95,5 +94,25 @@ public class MCY_FormsController { | ||
| 95 | return formsService.operationservice(map); | 94 | return formsService.operationservice(map); |
| 96 | } | 95 | } |
| 97 | 96 | ||
| 97 | + //营运线路出车率统计表 | ||
| 98 | + @RequestMapping(value = "/turnoutrate",method = RequestMethod.POST) | ||
| 99 | + public List<Turnoutrate> turnoutrate(@RequestParam Map<String, Object> map){ | ||
| 100 | + | ||
| 101 | + return formsService.turnoutrate(map); | ||
| 102 | + } | ||
| 98 | 103 | ||
| 104 | + //班次执行率统计表 | ||
| 105 | + @RequestMapping(value = "/executionrate",method = RequestMethod.POST) | ||
| 106 | + public List<Executionrate> executionrate(@RequestParam Map<String, Object> map){ | ||
| 107 | + | ||
| 108 | + return formsService.executionrate(map); | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + | ||
| 112 | + //营运线路名称统计表 | ||
| 113 | + @RequestMapping(value = "/allline",method = RequestMethod.POST) | ||
| 114 | + public List<Allline> allline(@RequestParam Map<String, Object> map){ | ||
| 115 | + | ||
| 116 | + return formsService.allline(map); | ||
| 117 | + } | ||
| 99 | } | 118 | } |
src/main/java/com/bsth/controller/oil/CwjyController.java
| @@ -5,7 +5,6 @@ import java.util.Date; | @@ -5,7 +5,6 @@ import java.util.Date; | ||
| 5 | import java.util.Map; | 5 | import java.util.Map; |
| 6 | 6 | ||
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | -import org.springframework.web.bind.annotation.PathVariable; | ||
| 9 | import org.springframework.web.bind.annotation.RequestMapping; | 8 | import org.springframework.web.bind.annotation.RequestMapping; |
| 10 | import org.springframework.web.bind.annotation.RequestMethod; | 9 | import org.springframework.web.bind.annotation.RequestMethod; |
| 11 | import org.springframework.web.bind.annotation.RequestParam; | 10 | import org.springframework.web.bind.annotation.RequestParam; |
| @@ -62,5 +61,4 @@ public class CwjyController extends BaseController<Cwjy, Integer>{ | @@ -62,5 +61,4 @@ public class CwjyController extends BaseController<Cwjy, Integer>{ | ||
| 62 | return map; | 61 | return map; |
| 63 | } | 62 | } |
| 64 | 63 | ||
| 65 | - | ||
| 66 | } | 64 | } |
src/main/java/com/bsth/controller/oil/CylController.java
| @@ -22,7 +22,6 @@ public class CylController extends BaseController<Cyl, Integer>{ | @@ -22,7 +22,6 @@ public class CylController extends BaseController<Cyl, Integer>{ | ||
| 22 | @RequestMapping(value = "/save",method = RequestMethod.POST) | 22 | @RequestMapping(value = "/save",method = RequestMethod.POST) |
| 23 | public Map<String, Object> saveYlb(Cyl t){ | 23 | public Map<String, Object> saveYlb(Cyl t){ |
| 24 | // SysUser user = SecurityUtils.getCurrentUser(); | 24 | // SysUser user = SecurityUtils.getCurrentUser(); |
| 25 | - t.setGsdm("77"); | ||
| 26 | t.setUpdatetime(new Date()); | 25 | t.setUpdatetime(new Date()); |
| 27 | /*SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | 26 | /*SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); |
| 28 | try { | 27 | try { |
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| @@ -351,7 +351,15 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -351,7 +351,15 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 351 | @RequestMapping(value="/queryListWaybill") | 351 | @RequestMapping(value="/queryListWaybill") |
| 352 | public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName | 352 | public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName |
| 353 | ,@RequestParam String date){ | 353 | ,@RequestParam String date){ |
| 354 | - return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date); | 354 | + String type="fqp"; |
| 355 | + return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date,type); | ||
| 356 | + } | ||
| 357 | + | ||
| 358 | + @RequestMapping(value="/queryListWaybillQp") | ||
| 359 | + public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName | ||
| 360 | + ,@RequestParam String date){ | ||
| 361 | + String type="qp"; | ||
| 362 | + return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date,type); | ||
| 355 | } | 363 | } |
| 356 | 364 | ||
| 357 | @RequestMapping(value="/statisticsDaily") | 365 | @RequestMapping(value="/statisticsDaily") |
src/main/java/com/bsth/controller/schedule/PeopleCarPlanController.java
| @@ -20,33 +20,33 @@ public class PeopleCarPlanController { | @@ -20,33 +20,33 @@ public class PeopleCarPlanController { | ||
| 20 | private PeopleCarPlanService peopleCarPlanService; | 20 | private PeopleCarPlanService peopleCarPlanService; |
| 21 | 21 | ||
| 22 | @RequestMapping(value = "/queryPeopleCar", method = RequestMethod.GET) | 22 | @RequestMapping(value = "/queryPeopleCar", method = RequestMethod.GET) |
| 23 | - public List<Map<String,Object>> queryPeopleCar(@RequestParam String line, @RequestParam String date, @RequestParam String type){ | ||
| 24 | - return peopleCarPlanService.queryPeopleCar(line, date, type); | 23 | + public List<Map<String,Object>> queryPeopleCar(@RequestParam Map<String, Object> map){ |
| 24 | + return peopleCarPlanService.queryPeopleCar(map); | ||
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | @RequestMapping(value="/workDaily", method = RequestMethod.GET) | 27 | @RequestMapping(value="/workDaily", method = RequestMethod.GET) |
| 28 | - public List<Map<String,Object>> workDaily(@RequestParam String line, @RequestParam String date, @RequestParam String type){ | ||
| 29 | - return peopleCarPlanService.workDaily(line, date, type); | 28 | + public List<Map<String,Object>> workDaily(@RequestParam Map<String, Object> map){ |
| 29 | + return peopleCarPlanService.workDaily(map); | ||
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | @RequestMapping(value="/scheduleAnaly", method = RequestMethod.GET) | 32 | @RequestMapping(value="/scheduleAnaly", method = RequestMethod.GET) |
| 33 | - public Map<String, Object> scheduleAnaly(@RequestParam String page, @RequestParam String line, @RequestParam String startDate, @RequestParam String endDate, @RequestParam String model, @RequestParam String type){ | ||
| 34 | - return peopleCarPlanService.scheduleAnaly(page, line, startDate, endDate, model, type); | 33 | + public Map<String, Object> scheduleAnaly(@RequestParam Map<String, Object> map){ |
| 34 | + return peopleCarPlanService.scheduleAnaly(map); | ||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | @RequestMapping(value="/getModel", method = RequestMethod.GET) | 37 | @RequestMapping(value="/getModel", method = RequestMethod.GET) |
| 38 | - public List<Map<String,Object>> getModel(@RequestParam String line, @RequestParam String startDate, @RequestParam String endDate){ | ||
| 39 | - return peopleCarPlanService.getModel(line, startDate, endDate); | 38 | + public List<Map<String,Object>> getModel(@RequestParam Map<String, Object> map){ |
| 39 | + return peopleCarPlanService.getModel(map); | ||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | @RequestMapping(value="/firstAndLastBus", method = RequestMethod.GET) | 42 | @RequestMapping(value="/firstAndLastBus", method = RequestMethod.GET) |
| 43 | - public List<Map<String,Object>> firstAndLastBus(@RequestParam String line, @RequestParam String date, @RequestParam String type){ | ||
| 44 | - return peopleCarPlanService.firstAndLastBus(line, date, type); | 43 | + public List<Map<String,Object>> firstAndLastBus(@RequestParam Map<String, Object> map){ |
| 44 | + return peopleCarPlanService.firstAndLastBus(map); | ||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | @RequestMapping(value="/commandState", method = RequestMethod.GET) | 47 | @RequestMapping(value="/commandState", method = RequestMethod.GET) |
| 48 | - public List<Map<String,Object>> commandState(@RequestParam String line, @RequestParam String date, @RequestParam String code){ | ||
| 49 | - return peopleCarPlanService.commandState(line, date, code); | 48 | + public List<Map<String,Object>> commandState(@RequestParam Map<String, Object> map){ |
| 49 | + return peopleCarPlanService.commandState(map); | ||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | } | 52 | } |
src/main/java/com/bsth/data/BasicData.java
| @@ -28,6 +28,9 @@ public class BasicData implements CommandLineRunner { | @@ -28,6 +28,9 @@ public class BasicData implements CommandLineRunner { | ||
| 28 | 28 | ||
| 29 | //公司代码和公司名对照(K: 公司编码,V:公司名) | 29 | //公司代码和公司名对照(K: 公司编码,V:公司名) |
| 30 | public static Map<String, String> businessCodeNameMap; | 30 | public static Map<String, String> businessCodeNameMap; |
| 31 | + | ||
| 32 | + //分公司公司代码和分公司公司名对照(K: 公司编码+分公司编码,V:分公司公司名) | ||
| 33 | + public static Map<String, String> businessFgsCodeNameMap; | ||
| 31 | 34 | ||
| 32 | //设备号和车辆自编号 (K: 设备编码 ,V:车辆自编号) | 35 | //设备号和车辆自编号 (K: 设备编码 ,V:车辆自编号) |
| 33 | public static BiMap<String, String> deviceId2NbbmMap; | 36 | public static BiMap<String, String> deviceId2NbbmMap; |
| @@ -177,13 +180,16 @@ public class BasicData implements CommandLineRunner { | @@ -177,13 +180,16 @@ public class BasicData implements CommandLineRunner { | ||
| 177 | */ | 180 | */ |
| 178 | public void loadBusinessInfo(){ | 181 | public void loadBusinessInfo(){ |
| 179 | Map<String, String> businessMap=new HashMap<String,String>(); | 182 | Map<String, String> businessMap=new HashMap<String,String>(); |
| 183 | + Map<String, String> businessFgsMap=new HashMap<String,String>(); | ||
| 180 | Iterator<Business> busIter=businessRepository.findAll().iterator(); | 184 | Iterator<Business> busIter=businessRepository.findAll().iterator(); |
| 181 | Business t; | 185 | Business t; |
| 182 | while(busIter.hasNext()){ | 186 | while(busIter.hasNext()){ |
| 183 | t=busIter.next(); | 187 | t=busIter.next(); |
| 184 | businessMap.put(t.getBusinessCode(), t.getBusinessName()); | 188 | businessMap.put(t.getBusinessCode(), t.getBusinessName()); |
| 189 | + businessFgsMap.put(t.getBusinessCode()+"_"+t.getUpCode(), t.getBusinessName()); | ||
| 185 | } | 190 | } |
| 186 | businessCodeNameMap=businessMap; | 191 | businessCodeNameMap=businessMap; |
| 192 | + businessFgsCodeNameMap=businessFgsMap; | ||
| 187 | } | 193 | } |
| 188 | /** | 194 | /** |
| 189 | * @Title: loadDeviceInfo | 195 | * @Title: loadDeviceInfo |
src/main/java/com/bsth/entity/mcy_forms/Allline.java
0 → 100644
| 1 | +package com.bsth.entity.mcy_forms; | ||
| 2 | + | ||
| 3 | +public class Allline { | ||
| 4 | + | ||
| 5 | + private String rq;//日期 | ||
| 6 | + | ||
| 7 | + private String gs;//公司 | ||
| 8 | + | ||
| 9 | + private String zhgs;//直属公司 | ||
| 10 | + | ||
| 11 | + private String fgs;//分公司 | ||
| 12 | + | ||
| 13 | + private String xl;//线路条数 | ||
| 14 | + | ||
| 15 | + private String xlmc;//线路名称 | ||
| 16 | + | ||
| 17 | + private String gsgs; | ||
| 18 | + private String fgsgs; | ||
| 19 | + | ||
| 20 | + private String size; | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + public String getGsgs() { | ||
| 24 | + return gsgs; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + public void setGsgs(String gsgs) { | ||
| 28 | + this.gsgs = gsgs; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + public String getFgsgs() { | ||
| 32 | + return fgsgs; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + public void setFgsgs(String fgsgs) { | ||
| 36 | + this.fgsgs = fgsgs; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + | ||
| 40 | + public String getSize() { | ||
| 41 | + return size; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public void setSize(String size) { | ||
| 45 | + this.size = size; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + public String getZhgs() { | ||
| 49 | + return zhgs; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public void setZhgs(String zhgs) { | ||
| 53 | + this.zhgs = zhgs; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public String getXlmc() { | ||
| 57 | + return xlmc; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public void setXlmc(String xlmc) { | ||
| 61 | + this.xlmc = xlmc; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + private String cchjh;//出车数计划 | ||
| 65 | + | ||
| 66 | + private String cchsj;//出车数计划 | ||
| 67 | + | ||
| 68 | + private String cchqz;//出车数权证 | ||
| 69 | + | ||
| 70 | + private String chl;//出车率 | ||
| 71 | + | ||
| 72 | + private String bcjh;//班次计划 | ||
| 73 | + | ||
| 74 | + private String bcsj;//班次实际 | ||
| 75 | + | ||
| 76 | + private String bbzxl;//班次执行率 | ||
| 77 | + | ||
| 78 | + private String sm;//说明 | ||
| 79 | + | ||
| 80 | + public String getRq() { | ||
| 81 | + return rq; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public void setRq(String rq) { | ||
| 85 | + this.rq = rq; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public String getGs() { | ||
| 89 | + return gs; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public void setGs(String gs) { | ||
| 93 | + this.gs = gs; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public String getFgs() { | ||
| 97 | + return fgs; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public void setFgs(String fgs) { | ||
| 101 | + this.fgs = fgs; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public String getXl() { | ||
| 105 | + return xl; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public void setXl(String xl) { | ||
| 109 | + this.xl = xl; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + public String getCchjh() { | ||
| 113 | + return cchjh; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public void setCchjh(String cchjh) { | ||
| 117 | + this.cchjh = cchjh; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public String getCchsj() { | ||
| 121 | + return cchsj; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + public void setCchsj(String cchsj) { | ||
| 125 | + this.cchsj = cchsj; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + public String getCchqz() { | ||
| 129 | + return cchqz; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + public void setCchqz(String cchqz) { | ||
| 133 | + this.cchqz = cchqz; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + public String getChl() { | ||
| 137 | + return chl; | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + public void setChl(String chl) { | ||
| 141 | + this.chl = chl; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + public String getBcjh() { | ||
| 145 | + return bcjh; | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + public void setBcjh(String bcjh) { | ||
| 149 | + this.bcjh = bcjh; | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + public String getBcsj() { | ||
| 153 | + return bcsj; | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + public void setBcsj(String bcsj) { | ||
| 157 | + this.bcsj = bcsj; | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + public String getBbzxl() { | ||
| 161 | + return bbzxl; | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + public void setBbzxl(String bbzxl) { | ||
| 165 | + this.bbzxl = bbzxl; | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + public String getSm() { | ||
| 169 | + return sm; | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + public void setSm(String sm) { | ||
| 173 | + this.sm = sm; | ||
| 174 | + } | ||
| 175 | + | ||
| 176 | + | ||
| 177 | + | ||
| 178 | + | ||
| 179 | +} |
src/main/java/com/bsth/entity/mcy_forms/Executionrate.java
0 → 100644
| 1 | +package com.bsth.entity.mcy_forms; | ||
| 2 | + | ||
| 3 | +public class Executionrate { | ||
| 4 | + | ||
| 5 | + private String rq;//日期 | ||
| 6 | + | ||
| 7 | + private String gs;//公司 | ||
| 8 | + | ||
| 9 | + private String zhgs;//直属公司 | ||
| 10 | + | ||
| 11 | + private String fgs;//分公司 | ||
| 12 | + | ||
| 13 | + private String xl;//线路条数 | ||
| 14 | + | ||
| 15 | + private String xlmc;//线路名称 | ||
| 16 | + | ||
| 17 | + private String gsgs; | ||
| 18 | + private String fgsgs; | ||
| 19 | + | ||
| 20 | + private String size; | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + public String getGsgs() { | ||
| 24 | + return gsgs; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + public void setGsgs(String gsgs) { | ||
| 28 | + this.gsgs = gsgs; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + public String getFgsgs() { | ||
| 32 | + return fgsgs; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + public void setFgsgs(String fgsgs) { | ||
| 36 | + this.fgsgs = fgsgs; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + | ||
| 40 | + public String getSize() { | ||
| 41 | + return size; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public void setSize(String size) { | ||
| 45 | + this.size = size; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + public String getZhgs() { | ||
| 49 | + return zhgs; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public void setZhgs(String zhgs) { | ||
| 53 | + this.zhgs = zhgs; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public String getXlmc() { | ||
| 57 | + return xlmc; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public void setXlmc(String xlmc) { | ||
| 61 | + this.xlmc = xlmc; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + private String cchjh;//出车数计划 | ||
| 65 | + | ||
| 66 | + private String cchsj;//出车数计划 | ||
| 67 | + | ||
| 68 | + private String cchqz;//出车数权证 | ||
| 69 | + | ||
| 70 | + private String chl;//出车率 | ||
| 71 | + | ||
| 72 | + private String bcjh;//班次计划 | ||
| 73 | + | ||
| 74 | + private String bcsj;//班次实际 | ||
| 75 | + | ||
| 76 | + private String bbzxl;//班次执行率 | ||
| 77 | + | ||
| 78 | + private String sm;//说明 | ||
| 79 | + | ||
| 80 | + public String getRq() { | ||
| 81 | + return rq; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public void setRq(String rq) { | ||
| 85 | + this.rq = rq; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public String getGs() { | ||
| 89 | + return gs; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public void setGs(String gs) { | ||
| 93 | + this.gs = gs; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public String getFgs() { | ||
| 97 | + return fgs; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public void setFgs(String fgs) { | ||
| 101 | + this.fgs = fgs; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public String getXl() { | ||
| 105 | + return xl; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public void setXl(String xl) { | ||
| 109 | + this.xl = xl; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + public String getCchjh() { | ||
| 113 | + return cchjh; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public void setCchjh(String cchjh) { | ||
| 117 | + this.cchjh = cchjh; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public String getCchsj() { | ||
| 121 | + return cchsj; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + public void setCchsj(String cchsj) { | ||
| 125 | + this.cchsj = cchsj; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + public String getCchqz() { | ||
| 129 | + return cchqz; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + public void setCchqz(String cchqz) { | ||
| 133 | + this.cchqz = cchqz; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + public String getChl() { | ||
| 137 | + return chl; | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + public void setChl(String chl) { | ||
| 141 | + this.chl = chl; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + public String getBcjh() { | ||
| 145 | + return bcjh; | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + public void setBcjh(String bcjh) { | ||
| 149 | + this.bcjh = bcjh; | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + public String getBcsj() { | ||
| 153 | + return bcsj; | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + public void setBcsj(String bcsj) { | ||
| 157 | + this.bcsj = bcsj; | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + public String getBbzxl() { | ||
| 161 | + return bbzxl; | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + public void setBbzxl(String bbzxl) { | ||
| 165 | + this.bbzxl = bbzxl; | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + public String getSm() { | ||
| 169 | + return sm; | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + public void setSm(String sm) { | ||
| 173 | + this.sm = sm; | ||
| 174 | + } | ||
| 175 | + | ||
| 176 | + | ||
| 177 | + | ||
| 178 | +} |
src/main/java/com/bsth/entity/mcy_forms/Turnoutrate.java
0 → 100644
| 1 | +package com.bsth.entity.mcy_forms; | ||
| 2 | + | ||
| 3 | +public class Turnoutrate { | ||
| 4 | +private String rq;//日期 | ||
| 5 | + | ||
| 6 | + private String gs;//公司 | ||
| 7 | + | ||
| 8 | + private String zhgs;//直属公司 | ||
| 9 | + | ||
| 10 | + private String fgs;//分公司 | ||
| 11 | + | ||
| 12 | + private String xl;//线路条数 | ||
| 13 | + | ||
| 14 | + private String xlmc;//线路名称 | ||
| 15 | + | ||
| 16 | + private String gsgs; | ||
| 17 | + private String fgsgs; | ||
| 18 | + | ||
| 19 | + private String size; | ||
| 20 | + | ||
| 21 | + | ||
| 22 | + public String getGsgs() { | ||
| 23 | + return gsgs; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public void setGsgs(String gsgs) { | ||
| 27 | + this.gsgs = gsgs; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + public String getFgsgs() { | ||
| 31 | + return fgsgs; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + public void setFgsgs(String fgsgs) { | ||
| 35 | + this.fgsgs = fgsgs; | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + | ||
| 39 | + public String getSize() { | ||
| 40 | + return size; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + public void setSize(String size) { | ||
| 44 | + this.size = size; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + public String getZhgs() { | ||
| 48 | + return zhgs; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + public void setZhgs(String zhgs) { | ||
| 52 | + this.zhgs = zhgs; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + public String getXlmc() { | ||
| 56 | + return xlmc; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + public void setXlmc(String xlmc) { | ||
| 60 | + this.xlmc = xlmc; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + private String cchjh;//出车数计划 | ||
| 64 | + | ||
| 65 | + private String cchsj;//出车数计划 | ||
| 66 | + | ||
| 67 | + private String cchqz;//出车数权证 | ||
| 68 | + | ||
| 69 | + private String chl;//出车率 | ||
| 70 | + | ||
| 71 | + private String bcjh;//班次计划 | ||
| 72 | + | ||
| 73 | + private String bcsj;//班次实际 | ||
| 74 | + | ||
| 75 | + private String bbzxl;//班次执行率 | ||
| 76 | + | ||
| 77 | + private String sm;//说明 | ||
| 78 | + | ||
| 79 | + public String getRq() { | ||
| 80 | + return rq; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + public void setRq(String rq) { | ||
| 84 | + this.rq = rq; | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + public String getGs() { | ||
| 88 | + return gs; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + public void setGs(String gs) { | ||
| 92 | + this.gs = gs; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + public String getFgs() { | ||
| 96 | + return fgs; | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + public void setFgs(String fgs) { | ||
| 100 | + this.fgs = fgs; | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + public String getXl() { | ||
| 104 | + return xl; | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + public void setXl(String xl) { | ||
| 108 | + this.xl = xl; | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + public String getCchjh() { | ||
| 112 | + return cchjh; | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + public void setCchjh(String cchjh) { | ||
| 116 | + this.cchjh = cchjh; | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + public String getCchsj() { | ||
| 120 | + return cchsj; | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + public void setCchsj(String cchsj) { | ||
| 124 | + this.cchsj = cchsj; | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + public String getCchqz() { | ||
| 128 | + return cchqz; | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + public void setCchqz(String cchqz) { | ||
| 132 | + this.cchqz = cchqz; | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + public String getChl() { | ||
| 136 | + return chl; | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + public void setChl(String chl) { | ||
| 140 | + this.chl = chl; | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + public String getBcjh() { | ||
| 144 | + return bcjh; | ||
| 145 | + } | ||
| 146 | + | ||
| 147 | + public void setBcjh(String bcjh) { | ||
| 148 | + this.bcjh = bcjh; | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + public String getBcsj() { | ||
| 152 | + return bcsj; | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + public void setBcsj(String bcsj) { | ||
| 156 | + this.bcsj = bcsj; | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + public String getBbzxl() { | ||
| 160 | + return bbzxl; | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + public void setBbzxl(String bbzxl) { | ||
| 164 | + this.bbzxl = bbzxl; | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + public String getSm() { | ||
| 168 | + return sm; | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + public void setSm(String sm) { | ||
| 172 | + this.sm = sm; | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + | ||
| 176 | +} |
src/main/java/com/bsth/entity/oil/Cwjy.java
| @@ -6,6 +6,9 @@ import javax.persistence.Entity; | @@ -6,6 +6,9 @@ import javax.persistence.Entity; | ||
| 6 | import javax.persistence.GeneratedValue; | 6 | import javax.persistence.GeneratedValue; |
| 7 | import javax.persistence.Id; | 7 | import javax.persistence.Id; |
| 8 | import javax.persistence.Table; | 8 | import javax.persistence.Table; |
| 9 | +import javax.persistence.Transient; | ||
| 10 | + | ||
| 11 | +import com.bsth.data.BasicData; | ||
| 9 | 12 | ||
| 10 | @Entity | 13 | @Entity |
| 11 | @Table(name = "bsth_c_cwjy") | 14 | @Table(name = "bsth_c_cwjy") |
| @@ -24,6 +27,11 @@ public class Cwjy { | @@ -24,6 +27,11 @@ public class Cwjy { | ||
| 24 | 27 | ||
| 25 | private Date createDate; | 28 | private Date createDate; |
| 26 | 29 | ||
| 30 | + @Transient | ||
| 31 | + private String gsname; | ||
| 32 | + | ||
| 33 | + @Transient | ||
| 34 | + private String fgsname; | ||
| 27 | public Integer getId() { | 35 | public Integer getId() { |
| 28 | return id; | 36 | return id; |
| 29 | } | 37 | } |
| @@ -71,6 +79,22 @@ public class Cwjy { | @@ -71,6 +79,22 @@ public class Cwjy { | ||
| 71 | public void setCreateDate(Date createDate) { | 79 | public void setCreateDate(Date createDate) { |
| 72 | this.createDate = createDate; | 80 | this.createDate = createDate; |
| 73 | } | 81 | } |
| 82 | + | ||
| 83 | + public String getGsname() { | ||
| 84 | + return BasicData.businessCodeNameMap.get(this.gsdm); | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + public void setGsname(String gsname) { | ||
| 88 | + this.gsname = gsname; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + public String getFgsname() { | ||
| 92 | + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm); | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + public void setFgsname(String fgsname) { | ||
| 96 | + this.fgsname = fgsname; | ||
| 97 | + } | ||
| 74 | 98 | ||
| 75 | 99 | ||
| 76 | } | 100 | } |
src/main/java/com/bsth/entity/oil/Cyl.java
| @@ -6,6 +6,9 @@ import javax.persistence.Entity; | @@ -6,6 +6,9 @@ import javax.persistence.Entity; | ||
| 6 | import javax.persistence.GeneratedValue; | 6 | import javax.persistence.GeneratedValue; |
| 7 | import javax.persistence.Id; | 7 | import javax.persistence.Id; |
| 8 | import javax.persistence.Table; | 8 | import javax.persistence.Table; |
| 9 | +import javax.persistence.Transient; | ||
| 10 | + | ||
| 11 | +import com.bsth.data.BasicData; | ||
| 9 | 12 | ||
| 10 | @Entity | 13 | @Entity |
| 11 | @Table(name = "bsth_c_cyl") | 14 | @Table(name = "bsth_c_cyl") |
| @@ -25,6 +28,16 @@ public class Cyl { | @@ -25,6 +28,16 @@ public class Cyl { | ||
| 25 | private Double cxrl; | 28 | private Double cxrl; |
| 26 | //公司代码 | 29 | //公司代码 |
| 27 | private String gsdm; | 30 | private String gsdm; |
| 31 | + | ||
| 32 | + @Transient | ||
| 33 | + private String gsname; | ||
| 34 | + | ||
| 35 | + @Transient | ||
| 36 | + private String fgsname; | ||
| 37 | + | ||
| 38 | + //分公司代码 | ||
| 39 | + private String fgsdm; | ||
| 40 | + | ||
| 28 | public Integer getId() { | 41 | public Integer getId() { |
| 29 | return id; | 42 | return id; |
| 30 | } | 43 | } |
| @@ -72,4 +85,30 @@ public class Cyl { | @@ -72,4 +85,30 @@ public class Cyl { | ||
| 72 | public void setGsdm(String gsdm){ | 85 | public void setGsdm(String gsdm){ |
| 73 | this.gsdm=gsdm; | 86 | this.gsdm=gsdm; |
| 74 | } | 87 | } |
| 88 | + | ||
| 89 | + public String getFgsdm() { | ||
| 90 | + return fgsdm; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + public void setFgsdm(String fgsdm) { | ||
| 94 | + this.fgsdm = fgsdm; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + public String getGsname() { | ||
| 98 | + return BasicData.businessCodeNameMap.get(this.gsdm); | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + public void setGsname(String gsname) { | ||
| 102 | + this.gsname = gsname; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + public String getFgsname() { | ||
| 106 | + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm); | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + public void setFgsname(String fgsname) { | ||
| 110 | + this.fgsname = fgsname; | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + | ||
| 75 | } | 114 | } |
src/main/java/com/bsth/entity/oil/Ylxxb.java
| @@ -10,6 +10,8 @@ import javax.persistence.Transient; | @@ -10,6 +10,8 @@ import javax.persistence.Transient; | ||
| 10 | 10 | ||
| 11 | import org.springframework.format.annotation.DateTimeFormat; | 11 | import org.springframework.format.annotation.DateTimeFormat; |
| 12 | 12 | ||
| 13 | +import com.bsth.data.BasicData; | ||
| 14 | + | ||
| 13 | @Entity | 15 | @Entity |
| 14 | @Table(name = "bsth_c_ylxxb") | 16 | @Table(name = "bsth_c_ylxxb") |
| 15 | public class Ylxxb { | 17 | public class Ylxxb { |
| @@ -25,6 +27,7 @@ public class Ylxxb { | @@ -25,6 +27,7 @@ public class Ylxxb { | ||
| 25 | private String stationid; | 27 | private String stationid; |
| 26 | private Date createtime; | 28 | private Date createtime; |
| 27 | private String gsdm; | 29 | private String gsdm; |
| 30 | + private String fgsdm; | ||
| 28 | private String yp; | 31 | private String yp; |
| 29 | private String jyggh; | 32 | private String jyggh; |
| 30 | private Double yj; | 33 | private Double yj; |
| @@ -37,6 +40,10 @@ public class Ylxxb { | @@ -37,6 +40,10 @@ public class Ylxxb { | ||
| 37 | private String ldgh; | 40 | private String ldgh; |
| 38 | //0为接口数据,1为手工输入 | 41 | //0为接口数据,1为手工输入 |
| 39 | private int jylx=0; | 42 | private int jylx=0; |
| 43 | + @Transient | ||
| 44 | + private String gsname; | ||
| 45 | + @Transient | ||
| 46 | + private String fgsname; | ||
| 40 | 47 | ||
| 41 | 48 | ||
| 42 | public Integer getId() { | 49 | public Integer getId() { |
| @@ -93,6 +100,14 @@ public class Ylxxb { | @@ -93,6 +100,14 @@ public class Ylxxb { | ||
| 93 | public void setGsdm(String gsdm) { | 100 | public void setGsdm(String gsdm) { |
| 94 | this.gsdm = gsdm; | 101 | this.gsdm = gsdm; |
| 95 | } | 102 | } |
| 103 | + | ||
| 104 | + | ||
| 105 | + public String getFgsdm() { | ||
| 106 | + return fgsdm; | ||
| 107 | + } | ||
| 108 | + public void setFgsdm(String fgsdm) { | ||
| 109 | + this.fgsdm = fgsdm; | ||
| 110 | + } | ||
| 96 | public String getYp() { | 111 | public String getYp() { |
| 97 | return yp; | 112 | return yp; |
| 98 | } | 113 | } |
| @@ -154,6 +169,20 @@ public class Ylxxb { | @@ -154,6 +169,20 @@ public class Ylxxb { | ||
| 154 | this.jylx = jylx; | 169 | this.jylx = jylx; |
| 155 | } | 170 | } |
| 156 | 171 | ||
| 172 | + public String getGsname() { | ||
| 173 | + return BasicData.businessCodeNameMap.get(this.gsdm); | ||
| 174 | + } | ||
| 175 | + | ||
| 176 | + public void setGsname(String gsname) { | ||
| 177 | + this.gsname = gsname; | ||
| 178 | + } | ||
| 157 | 179 | ||
| 180 | + public String getFgsname() { | ||
| 181 | + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm); | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + public void setFgsname(String fgsname) { | ||
| 185 | + this.fgsname = fgsname; | ||
| 186 | + } | ||
| 158 | 187 | ||
| 159 | } | 188 | } |
src/main/java/com/bsth/entity/search/PredicatesBuilder.java
| @@ -8,7 +8,9 @@ import javax.persistence.criteria.Predicate; | @@ -8,7 +8,9 @@ import javax.persistence.criteria.Predicate; | ||
| 8 | import java.text.NumberFormat; | 8 | import java.text.NumberFormat; |
| 9 | import java.text.ParseException; | 9 | import java.text.ParseException; |
| 10 | import java.text.SimpleDateFormat; | 10 | import java.text.SimpleDateFormat; |
| 11 | +import java.util.ArrayList; | ||
| 11 | import java.util.Date; | 12 | import java.util.Date; |
| 13 | +import java.util.List; | ||
| 12 | 14 | ||
| 13 | /** | 15 | /** |
| 14 | * | 16 | * |
| @@ -58,6 +60,15 @@ public class PredicatesBuilder { | @@ -58,6 +60,15 @@ public class PredicatesBuilder { | ||
| 58 | return cb.notEqual(expression, object); | 60 | return cb.notEqual(expression, object); |
| 59 | } | 61 | } |
| 60 | 62 | ||
| 63 | + public static Predicate in(CriteriaBuilder cb,Path<?> expression, Object object){ | ||
| 64 | + String[] obj=object.toString().split(","); | ||
| 65 | + List<String> list=new ArrayList<String>(); | ||
| 66 | + for(int i=0;i<obj.length;i++){ | ||
| 67 | + list.add(obj[i]); | ||
| 68 | + } | ||
| 69 | + return cb.in(expression).value(list); | ||
| 70 | + } | ||
| 71 | + | ||
| 61 | public static Predicate gt(CriteriaBuilder cb,Path<Number> expression, Object object){ | 72 | public static Predicate gt(CriteriaBuilder cb,Path<Number> expression, Object object){ |
| 62 | try { | 73 | try { |
| 63 | return cb.gt(expression, nf.parse(object.toString())); | 74 | return cb.gt(expression, nf.parse(object.toString())); |
src/main/java/com/bsth/entity/search/SearchOperator.java
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| @@ -82,7 +82,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -82,7 +82,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 82 | @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 bcType='normal' order by bcs") | 82 | @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 bcType='normal' order by bcs") |
| 83 | List<ScheduleRealInfo> queryListWaybill2(String jName,String clZbh,String lpName,String date); | 83 | List<ScheduleRealInfo> queryListWaybill2(String jName,String clZbh,String lpName,String date); |
| 84 | 84 | ||
| 85 | - @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') and bcType='normal' order by bcs") | 85 | + @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 bcs") |
| 86 | List<ScheduleRealInfo> queryListWaybill3(String jName,String clZbh,String date); | 86 | List<ScheduleRealInfo> queryListWaybill3(String jName,String clZbh,String date); |
| 87 | 87 | ||
| 88 | @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") | 88 | @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") |
src/main/java/com/bsth/service/forms/FormsService.java
| @@ -3,12 +3,15 @@ package com.bsth.service.forms; | @@ -3,12 +3,15 @@ package com.bsth.service.forms; | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import java.util.Map; | 4 | import java.util.Map; |
| 5 | 5 | ||
| 6 | +import com.bsth.entity.mcy_forms.Allline; | ||
| 6 | import com.bsth.entity.mcy_forms.Changetochange; | 7 | import com.bsth.entity.mcy_forms.Changetochange; |
| 8 | +import com.bsth.entity.mcy_forms.Executionrate; | ||
| 7 | import com.bsth.entity.mcy_forms.Linepasswengerflow; | 9 | import com.bsth.entity.mcy_forms.Linepasswengerflow; |
| 8 | import com.bsth.entity.mcy_forms.Operationservice; | 10 | import com.bsth.entity.mcy_forms.Operationservice; |
| 9 | import com.bsth.entity.mcy_forms.Shifday; | 11 | import com.bsth.entity.mcy_forms.Shifday; |
| 10 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; | 12 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 11 | import com.bsth.entity.mcy_forms.Singledata; | 13 | import com.bsth.entity.mcy_forms.Singledata; |
| 14 | +import com.bsth.entity.mcy_forms.Turnoutrate; | ||
| 12 | import com.bsth.entity.mcy_forms.Vehicleloading; | 15 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 13 | import com.bsth.entity.mcy_forms.Waybillday; | 16 | import com.bsth.entity.mcy_forms.Waybillday; |
| 14 | 17 | ||
| @@ -17,8 +20,6 @@ public interface FormsService { | @@ -17,8 +20,6 @@ public interface FormsService { | ||
| 17 | 20 | ||
| 18 | public List<Waybillday> waybillday(Map<String, Object> map); | 21 | public List<Waybillday> waybillday(Map<String, Object> map); |
| 19 | 22 | ||
| 20 | - List<Waybillday> waybilldayExcel(Map<String, Object> map); | ||
| 21 | - | ||
| 22 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map); | 23 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map); |
| 23 | 24 | ||
| 24 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map); | 25 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map); |
| @@ -32,4 +33,10 @@ public interface FormsService { | @@ -32,4 +33,10 @@ public interface FormsService { | ||
| 32 | public List<Vehicleloading> vehicleloading(String line,String data); | 33 | public List<Vehicleloading> vehicleloading(String line,String data); |
| 33 | 34 | ||
| 34 | public List<Operationservice> operationservice(Map<String, Object> map); | 35 | public List<Operationservice> operationservice(Map<String, Object> map); |
| 36 | + | ||
| 37 | + public List<Turnoutrate> turnoutrate(Map<String, Object> map); | ||
| 38 | + | ||
| 39 | + public List<Executionrate> executionrate(Map<String, Object> map); | ||
| 40 | + | ||
| 41 | + public List<Allline> allline(Map<String, Object> map); | ||
| 35 | } | 42 | } |
src/main/java/com/bsth/service/forms/impl/ExportServiceImpl.java
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| 1 | package com.bsth.service.forms.impl; | 1 | package com.bsth.service.forms.impl; |
| 2 | 2 | ||
| 3 | +import java.math.BigDecimal; | ||
| 4 | +import java.math.MathContext; | ||
| 5 | +import java.math.RoundingMode; | ||
| 3 | import java.sql.ResultSet; | 6 | import java.sql.ResultSet; |
| 4 | import java.sql.SQLException; | 7 | import java.sql.SQLException; |
| 5 | -import java.text.DecimalFormat; | 8 | +import java.text.NumberFormat; |
| 6 | import java.text.ParseException; | 9 | import java.text.ParseException; |
| 7 | import java.text.SimpleDateFormat; | 10 | import java.text.SimpleDateFormat; |
| 8 | import java.util.ArrayList; | 11 | import java.util.ArrayList; |
| 9 | import java.util.Date; | 12 | import java.util.Date; |
| 10 | import java.util.HashMap; | 13 | import java.util.HashMap; |
| 11 | -import java.util.Iterator; | ||
| 12 | import java.util.List; | 14 | import java.util.List; |
| 13 | import java.util.Map; | 15 | import java.util.Map; |
| 14 | 16 | ||
| @@ -22,379 +24,522 @@ import com.bsth.entity.mcy_forms.Operationservice; | @@ -22,379 +24,522 @@ import com.bsth.entity.mcy_forms.Operationservice; | ||
| 22 | import com.bsth.entity.mcy_forms.Shifday; | 24 | import com.bsth.entity.mcy_forms.Shifday; |
| 23 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; | 25 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 24 | import com.bsth.entity.mcy_forms.Singledata; | 26 | import com.bsth.entity.mcy_forms.Singledata; |
| 27 | +import com.bsth.entity.mcy_forms.Turnoutrate; | ||
| 25 | import com.bsth.entity.mcy_forms.Vehicleloading; | 28 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 26 | import com.bsth.entity.mcy_forms.Waybillday; | 29 | import com.bsth.entity.mcy_forms.Waybillday; |
| 30 | +import com.bsth.entity.mcy_forms.Allline; | ||
| 27 | import com.bsth.entity.mcy_forms.Changetochange; | 31 | import com.bsth.entity.mcy_forms.Changetochange; |
| 32 | +import com.bsth.entity.mcy_forms.Executionrate; | ||
| 28 | import com.bsth.service.forms.FormsService; | 33 | import com.bsth.service.forms.FormsService; |
| 29 | import com.bsth.service.realcontrol.ScheduleRealInfoService; | 34 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 30 | import com.bsth.util.ReportRelatedUtils; | 35 | import com.bsth.util.ReportRelatedUtils; |
| 31 | import com.bsth.util.ReportUtils; | 36 | import com.bsth.util.ReportUtils; |
| 32 | 37 | ||
| 33 | @Service | 38 | @Service |
| 34 | -public class FormsServiceImpl implements FormsService{ | ||
| 35 | - | 39 | +public class FormsServiceImpl implements FormsService { |
| 40 | + | ||
| 36 | @Autowired | 41 | @Autowired |
| 37 | JdbcTemplate jdbcTemplate; | 42 | JdbcTemplate jdbcTemplate; |
| 38 | - | 43 | + |
| 39 | @Autowired | 44 | @Autowired |
| 40 | ScheduleRealInfoService scheduleRealInfoService; | 45 | ScheduleRealInfoService scheduleRealInfoService; |
| 41 | - | ||
| 42 | - //行车路单日报表 | 46 | + |
| 47 | + // 行车路单日报表 | ||
| 43 | @Override | 48 | @Override |
| 44 | public List<Waybillday> waybillday(Map<String, Object> map) { | 49 | public List<Waybillday> waybillday(Map<String, Object> map) { |
| 45 | - List list1=new ArrayList<>();// | ||
| 46 | - String sql = "select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,y.YH,c.personnel_name from bsth_c_ylb y" + | ||
| 47 | - " LEFT JOIN bsth_c_personnel c ON c.job_code=y.JSY " + | ||
| 48 | - " where to_days(y.RQ)=to_days('"+map.get("date").toString()+"') " + | ||
| 49 | - " and y.XLBM="+map.get("line").toString()+ | ||
| 50 | - " GROUP BY y.NBBM"; | ||
| 51 | - | 50 | + List list1 = new ArrayList<>();// |
| 51 | + String sql ="select x.schedule_date,x.j_gh,x.cl_zbh,z.JZL,z.YH,z.personnel_name " | ||
| 52 | + + "from bsth_c_s_sp_info_real x INNER join " | ||
| 53 | + + "( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,c.personnel_name from" | ||
| 54 | + + " bsth_c_ylb y LEFT JOIN bsth_c_personnel c ON c.job_code=y.JSY " | ||
| 55 | + + "where to_days(y.RQ)=to_days('"+map.get("date").toString() + "') and y.XLBM= '"+ map.get("line").toString()+"' GROUP BY y.NBBM) " | ||
| 56 | + + "z on x.cl_zbh=z.nbbm where to_days( x.schedule_date)=to_days('"+map.get("date").toString()+"') " | ||
| 57 | + + "and x.xl_bm='"+map.get("line").toString()+"' GROUP BY x.cl_zbh,j_gh"; | ||
| 52 | List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { | 58 | List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { |
| 53 | @Override | 59 | @Override |
| 54 | public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { | 60 | public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 55 | Waybillday wbd = new Waybillday(); | 61 | Waybillday wbd = new Waybillday(); |
| 56 | - wbd.setCarPlate(arg0.getString("NBBM")); | 62 | + wbd.setCarPlate(arg0.getString("cl_zbh")); |
| 57 | wbd.setJzl(arg0.getString("JZL")); | 63 | wbd.setJzl(arg0.getString("JZL")); |
| 58 | wbd.setYh(arg0.getString("YH")); | 64 | wbd.setYh(arg0.getString("YH")); |
| 59 | wbd.setjName(arg0.getString("personnel_name")); | 65 | wbd.setjName(arg0.getString("personnel_name")); |
| 60 | - //wbd.setZlc(arg0.getInt("zlc")); | ||
| 61 | - //System.out.println(arg0.getObject("yl")); | ||
| 62 | - //wbd.setYl(arg0.getString("yl")); | ||
| 63 | - //wbd.setNbbm(arg0.getString("nbbm")); | ||
| 64 | - Map<String, Object> maps=new HashMap<>(); | ||
| 65 | - maps=scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("nbbm"), arg0.getString("RQ")); | 66 | + // wbd.setZlc(arg0.getInt("zlc")); |
| 67 | + // System.out.println(arg0.getObject("yl")); | ||
| 68 | + // wbd.setYl(arg0.getString("yl")); | ||
| 69 | + // wbd.setNbbm(arg0.getString("nbbm")); | ||
| 70 | + Map<String, Object> maps = new HashMap<>(); | ||
| 71 | + maps = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | ||
| 72 | + arg0.getString("schedule_date")); | ||
| 66 | wbd.setJzl1(maps.get("ksgl").toString()); | 73 | wbd.setJzl1(maps.get("ksgl").toString()); |
| 67 | wbd.setZlc(maps.get("realMileage").toString()); | 74 | wbd.setZlc(maps.get("realMileage").toString()); |
| 68 | -// {realMileage=211.20, cjbc=2, ljbc=0, remMileage=38.40, ksgl=0.00, | ||
| 69 | -// jhlc=211.20, sjbc=9, jhbc=11, addMileage=0.00, yygl=211.20 | ||
| 70 | - | 75 | + |
| 71 | return wbd; | 76 | return wbd; |
| 72 | - | 77 | + |
| 73 | } | 78 | } |
| 74 | }); | 79 | }); |
| 75 | return list; | 80 | return list; |
| 76 | } | 81 | } |
| 77 | - | ||
| 78 | - | ||
| 79 | - | ||
| 80 | - //线路客流量报表 | 82 | + |
| 83 | + // 线路客流量报表 | ||
| 81 | @Override | 84 | @Override |
| 82 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) { | 85 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) { |
| 83 | - String sql = " SELECT s.station_name,l.name,l.create_date from bsth_c_stationroute s " + | ||
| 84 | - " LEFT JOIN bsth_c_line l on s.line_code=l.line_code " + | ||
| 85 | - " where to_days(l.create_date)=to_days('"+map.get("date").toString()+"') " + | ||
| 86 | - " and l.line_code="+map.get("line").toString()+ | ||
| 87 | - " GROUP BY s.station_name "; | ||
| 88 | - | 86 | + String sql = " SELECT s.station_name,l.name,l.create_date from bsth_c_stationroute s " |
| 87 | + + " LEFT JOIN bsth_c_line l on s.line_code=l.line_code " | ||
| 88 | + + " where to_days(l.create_date)=to_days('"+map.get("date").toString() + "') " | ||
| 89 | + + " and l.line_code=" + map.get("line").toString() | ||
| 90 | + + " GROUP BY s.station_name "; | ||
| 91 | + | ||
| 89 | List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { | 92 | List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { |
| 90 | 93 | ||
| 91 | @Override | 94 | @Override |
| 92 | public Linepasswengerflow mapRow(ResultSet arg0, int arg1) throws SQLException { | 95 | public Linepasswengerflow mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 93 | Linepasswengerflow lin = new Linepasswengerflow(); | 96 | Linepasswengerflow lin = new Linepasswengerflow(); |
| 94 | - lin.setStationName(arg0.getString("station_name")); | ||
| 95 | - | 97 | + lin.setStationName(arg0.getString("station_name")); |
| 98 | + | ||
| 96 | return lin; | 99 | return lin; |
| 97 | } | 100 | } |
| 98 | }); | 101 | }); |
| 99 | return list; | 102 | return list; |
| 100 | } | 103 | } |
| 101 | 104 | ||
| 105 | + // 班次车辆人员月统计 | ||
| 106 | + String startDate; | ||
| 107 | + String endDate; | ||
| 102 | 108 | ||
| 103 | - //导出 | ||
| 104 | @Override | 109 | @Override |
| 105 | - public List<Waybillday> waybilldayExcel(Map<String,Object> map) { | ||
| 106 | - ReportUtils ee = new ReportUtils(); | ||
| 107 | - ReportRelatedUtils rru = new ReportRelatedUtils(); | ||
| 108 | - List<Iterator<?>> list = new ArrayList<Iterator<?>>(); | ||
| 109 | - List<Waybillday> Waybilldays = waybillday(map); | ||
| 110 | - List<Map<String,Object>> listMap = new ArrayList<Map<String,Object>>(); | ||
| 111 | - | ||
| 112 | - DecimalFormat format = new DecimalFormat("0.00"); | ||
| 113 | - String jName=null; | ||
| 114 | - Map<String,Object> map1 = new HashMap<>(); | ||
| 115 | - for(Waybillday Waybillday : Waybilldays){ | ||
| 116 | - map1.put("carPlate", Waybillday.getCarPlate()); | ||
| 117 | - map1.put("jzl1", Waybillday.getJzl1()); | ||
| 118 | - map1.put("jzl", Waybillday.getJzl()); | ||
| 119 | - map1.put("yh", Waybillday.getYh()); | ||
| 120 | - map1.put("jName", Waybillday.getjName()); | ||
| 121 | - jName=Waybillday.getjName(); | ||
| 122 | - map1.put("zlc", Waybillday.getZlc()); | ||
| 123 | - } | ||
| 124 | -// | ||
| 125 | -// //计算里程和班次数,并放入Map里 | ||
| 126 | -// map1 = new HashMap<String, Object>(); | ||
| 127 | -// map1.put("jhlc", format.format(jhlc)); | ||
| 128 | -// map1.put("remMileage", format.format(remMileage)); | ||
| 129 | -// map1.put("addMileage", format.format(addMileage)); | ||
| 130 | -// map1.put("yygl", format.format(yygl)); | ||
| 131 | -// map1.put("ksgl", format.format(ksgl)); | ||
| 132 | -// map1.put("realMileage", format.format(yygl+ksgl)); | ||
| 133 | -// map1.put("jhbc", jhbc); | ||
| 134 | -// map1.put("cjbc", cjbc); | ||
| 135 | -// map1.put("ljbc", ljbc); | ||
| 136 | -// map1.put("sjbc", jhbc-cjbc+ljbc); | ||
| 137 | - | ||
| 138 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 139 | - | ||
| 140 | - list.add(listMap.iterator()); | ||
| 141 | - ee.excelReplace(list, new Object[] { Waybilldays.get(0),map1 }, path+"mould\\waybill_minhang.xls", | ||
| 142 | - path+"export\\" + jName + ".xls"); | ||
| 143 | - return Waybilldays; | ||
| 144 | - } | 110 | + public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { |
| 111 | + List list1 = new ArrayList<>();// | ||
| 112 | + String sql = "select r.j_name,r.schedule_date_str,r.update_date,r.cl_zbh " + " from bsth_c_s_sp_info_real r " | ||
| 113 | + + " LEFT JOIN bsth_c_s_ttinfo_detail d on r.lp_name=d.lp " | ||
| 114 | + + " LEFT JOIN bsth_c_line_information l on l.line=r.lp_name " | ||
| 115 | + + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " | ||
| 116 | + + " and to_days('" + map.get("endDate").toString() + "') " + " and r.xl_bm='" | ||
| 117 | + + map.get("line").toString() + "' " + " GROUP BY r.j_name" + " ORDER BY r.j_name"; | ||
| 118 | + startDate = map.get("startDate").toString(); | ||
| 119 | + endDate = map.get("endDate").toString(); | ||
| 120 | + List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { | ||
| 145 | 121 | ||
| 122 | + @Override | ||
| 123 | + public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 124 | + Shiftuehiclemanth shif = new Shiftuehiclemanth(); | ||
| 125 | + shif.setjName(arg0.getString("j_name")); | ||
| 146 | 126 | ||
| 147 | - //班次车辆人员月统计 | ||
| 148 | - String startDate; | ||
| 149 | - String endDate; | 127 | + Map<String, Object> maps = new HashMap<>(); |
| 128 | + | ||
| 129 | + maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, | ||
| 130 | + endDate); | ||
| 131 | + shif.setJhlc(maps.get("jhlc").toString()); | ||
| 132 | + shif.setEmptMileage(maps.get("ksgl").toString()); | ||
| 133 | + shif.setRemMileage(maps.get("remMileage").toString()); | ||
| 134 | + shif.setAddMileage(maps.get("addMileage").toString()); | ||
| 135 | + shif.setTotalm(maps.get("realMileage").toString()); | ||
| 136 | + shif.setCjbc(maps.get("cjbc").toString()); | ||
| 137 | + shif.setLjbc(maps.get("ljbc").toString()); | ||
| 138 | + shif.setSjbc(maps.get("sjbc").toString()); | ||
| 139 | + | ||
| 140 | + return shif; | ||
| 141 | + | ||
| 142 | + } | ||
| 143 | + }); | ||
| 144 | + | ||
| 145 | + return list; | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + // 班次车辆人员日统计 | ||
| 150 | @Override | 149 | @Override |
| 151 | - public List<Shiftuehiclemanth> shiftuehiclemanth( Map<String, Object> map) { | ||
| 152 | - List list1=new ArrayList<>();// | ||
| 153 | - String sql = "select r.j_name,r.schedule_date_str,r.update_date,r.cl_zbh " + | ||
| 154 | - " from bsth_c_s_sp_info_real r " + | ||
| 155 | - " LEFT JOIN bsth_c_s_ttinfo_detail d on r.lp_name=d.lp " + | ||
| 156 | - " LEFT JOIN bsth_c_line_information l on l.line=r.lp_name " + | ||
| 157 | - " where to_days(r.schedule_date_str) BETWEEN to_days('"+map.get("startDate").toString()+"') " + | ||
| 158 | - " and to_days('"+map.get("endDate").toString()+"') " + | ||
| 159 | - " and r.xl_bm='"+map.get("line").toString() +"' " + | ||
| 160 | - " GROUP BY r.j_name" + | ||
| 161 | - " ORDER BY r.j_name"; | ||
| 162 | - startDate=map.get("startDate").toString(); | ||
| 163 | - endDate=map.get("endDate").toString(); | ||
| 164 | - List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { | ||
| 165 | - | ||
| 166 | - @Override | ||
| 167 | - public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 168 | - Shiftuehiclemanth shif = new Shiftuehiclemanth(); | ||
| 169 | - shif.setjName(arg0.getString("j_name")); | ||
| 170 | - | ||
| 171 | - Map<String, Object> maps=new HashMap<>(); | ||
| 172 | - | ||
| 173 | - maps=scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate , endDate ); | ||
| 174 | - shif.setJhlc(maps.get("jhlc").toString()); | ||
| 175 | - shif.setEmptMileage(maps.get("ksgl").toString()); | ||
| 176 | - shif.setRemMileage(maps.get("remMileage").toString()); | ||
| 177 | - shif.setAddMileage(maps.get("addMileage").toString()); | ||
| 178 | - shif.setTotalm(maps.get("realMileage").toString()); | ||
| 179 | - shif.setCjbc(maps.get("cjbc").toString()); | ||
| 180 | - shif.setLjbc(maps.get("ljbc").toString()); | ||
| 181 | - shif.setSjbc(maps.get("sjbc").toString()); | ||
| 182 | - | ||
| 183 | - return shif; | ||
| 184 | - | ||
| 185 | - } | ||
| 186 | - }); | ||
| 187 | - | ||
| 188 | - return list; | 150 | + public List<Shifday> shifday(Map<String, Object> map) { |
| 151 | + String sql = " select r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.schedule_date,r.cl_zbh,r.j_gh " | ||
| 152 | + + " FROM bsth_c_s_sp_info_real r " + " where to_days(r.schedule_date)=to_days('" | ||
| 153 | + + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() + " GROUP BY r.j_name "; | ||
| 154 | + | ||
| 155 | + List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { | ||
| 156 | + | ||
| 157 | + @Override | ||
| 158 | + public Shifday mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 159 | + Shifday shifday = new Shifday(); | ||
| 160 | + shifday.setjName(arg0.getString("j_name").toString()); | ||
| 161 | + shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString()); | ||
| 162 | + shifday.setLpName(arg0.getString("r.lp_name").toString()); | ||
| 163 | + shifday.setCarPlate(arg0.getString("cl_zbh").toString()); | ||
| 164 | + | ||
| 165 | + Map<String, Object> map = new HashMap<>(); | ||
| 166 | + map = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | ||
| 167 | + arg0.getString("schedule_date")); | ||
| 168 | + shifday.setJhlc(map.get("jhlc").toString());// 计划里程 | ||
| 169 | + // shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程 | ||
| 170 | + shifday.setYygl(map.get("yygl").toString());// 营运里程 | ||
| 171 | + shifday.setEmptMileage(map.get("ksgl").toString());// 空驶里程 | ||
| 172 | + shifday.setRemMileage(map.get("remMileage").toString());// 抽减里程 | ||
| 173 | + shifday.setAddMileage(map.get("addMileage").toString());// 增加里程 | ||
| 174 | + shifday.setTotalm(map.get("realMileage").toString());// 总里程 | ||
| 175 | + shifday.setJhbc(map.get("jhbc").toString());// 计划班次 | ||
| 176 | + // shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次 | ||
| 177 | + shifday.setCjbc(map.get("cjbc").toString());// 抽减班次 | ||
| 178 | + shifday.setLjbc(map.get("ljbc").toString());// 增加班次 | ||
| 179 | + shifday.setSjbc(map.get("sjbc").toString());// 实际班次 | ||
| 180 | + return shifday; | ||
| 181 | + } | ||
| 182 | + }); | ||
| 183 | + return list; | ||
| 189 | } | 184 | } |
| 190 | 185 | ||
| 186 | + // 换人换车情况日统计 | ||
| 187 | + String rq; | ||
| 191 | 188 | ||
| 192 | - //班次车辆人员日统计 | ||
| 193 | @Override | 189 | @Override |
| 194 | - public List<Shifday> shifday(Map<String, Object> map) { | ||
| 195 | - String sql = " select r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.schedule_date,r.cl_zbh,r.j_gh " + | ||
| 196 | - " FROM bsth_c_s_sp_info_real r " + | ||
| 197 | - " where to_days(r.schedule_date)=to_days('"+map.get("date").toString()+"') and r.xl_bm="+map.get("line").toString()+ | ||
| 198 | - " GROUP BY r.j_name "; | ||
| 199 | - | ||
| 200 | - List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { | ||
| 201 | - | ||
| 202 | - @Override | ||
| 203 | - public Shifday mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 204 | - Shifday shifday = new Shifday(); | ||
| 205 | - shifday.setjName(arg0.getString("j_name").toString()); | ||
| 206 | - shifday.setsName(arg0.getString("s_name")==null?"":arg0.getString("s_name").toString()); | ||
| 207 | - shifday.setLpName(arg0.getString("r.lp_name").toString()); | ||
| 208 | - shifday.setCarPlate(arg0.getString("cl_zbh").toString()); | ||
| 209 | - | ||
| 210 | - Map<String, Object> map=new HashMap<>(); | ||
| 211 | - map=scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), arg0.getString("schedule_date")); | ||
| 212 | - shifday.setJhlc(map.get("jhlc").toString());//计划里程 | ||
| 213 | - //shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程 | ||
| 214 | - shifday.setYygl(map.get("yygl").toString());//营运里程 | ||
| 215 | - shifday.setEmptMileage(map.get("ksgl").toString());//空驶里程 | ||
| 216 | - shifday.setRemMileage(map.get("remMileage").toString());//抽减里程 | ||
| 217 | - shifday.setAddMileage(map.get("addMileage").toString());//增加里程 | ||
| 218 | - shifday.setTotalm(map.get("realMileage").toString());//总里程 | ||
| 219 | - shifday.setJhbc(map.get("jhbc").toString());//计划班次 | ||
| 220 | - //shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次 | ||
| 221 | - shifday.setCjbc(map.get("cjbc").toString());//抽减班次 | ||
| 222 | - shifday.setLjbc(map.get("ljbc").toString());//增加班次 | ||
| 223 | - shifday.setSjbc(map.get("sjbc").toString());//实际班次 | ||
| 224 | - return shifday; | 190 | + public List<Changetochange> changetochange(Map<String, Object> map) { |
| 191 | + | ||
| 192 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 193 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | ||
| 194 | + Date d = null; | ||
| 195 | + Date d1 = null; | ||
| 196 | + try { | ||
| 197 | + d = sdf.parse(map.get("startDate").toString()); | ||
| 198 | + d1 = sdf.parse(map.get("endDate").toString()); | ||
| 199 | + } catch (ParseException e) { | ||
| 200 | + | ||
| 201 | + e.printStackTrace(); | ||
| 225 | } | 202 | } |
| 226 | - }); | ||
| 227 | - return list; | ||
| 228 | - } | 203 | + String rq2 = sdf1.format(d); |
| 204 | + String rq3 = sdf1.format(d1); | ||
| 205 | + | ||
| 206 | + rq = rq2 + "-" + rq3; | ||
| 207 | + | ||
| 208 | + String sql = " select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 "; | ||
| 209 | + if (!map.get("startDate").toString().equals(" ") && !map.get("endDate").toString().equals(" ")) { | ||
| 210 | + sql += "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | ||
| 211 | + + map.get("endDate").toString() + "'"; | ||
| 212 | + } | ||
| 213 | + if (!map.get("line").equals("")) { | ||
| 214 | + sql += "and line_code='" + map.get("line") + "'"; | ||
| 215 | + } | ||
| 216 | + if (map.get("sel").equals("2")) { | ||
| 217 | + sql += " and c.pcch!=c.pcry"; | ||
| 218 | + } else if (map.get("sel").equals("1")) { | ||
| 219 | + sql += " and c.jhgh!=c.sjgh"; | ||
| 220 | + } | ||
| 221 | + | ||
| 222 | + List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() { | ||
| 229 | 223 | ||
| 230 | - //换人换车情况日统计 | ||
| 231 | - String rq; | ||
| 232 | @Override | 224 | @Override |
| 233 | - public List<Changetochange> changetochange(Map<String, Object> map) { | ||
| 234 | - | ||
| 235 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd") ; | ||
| 236 | - SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日") ; | ||
| 237 | - Date d = null ; | ||
| 238 | - Date d1 = null ; | ||
| 239 | - try { | ||
| 240 | - d = sdf.parse(map.get("startDate").toString()); | ||
| 241 | - d1 = sdf.parse(map.get("endDate").toString()); | ||
| 242 | - } catch (ParseException e) { | ||
| 243 | - | ||
| 244 | - e.printStackTrace(); | ||
| 245 | - } | ||
| 246 | - String rq2=sdf1.format(d); | ||
| 247 | - String rq3=sdf1.format(d1); | ||
| 248 | - | ||
| 249 | - rq=rq2+"-"+ rq3; | ||
| 250 | - | ||
| 251 | - String sql=" select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 "; | ||
| 252 | - if(!map.get("startDate").toString().equals(" ")&&!map.get("endDate").toString().equals(" ")){ | ||
| 253 | - sql+= "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '"+map.get("startDate").toString()+"' and '"+map.get("endDate").toString()+"'"; | ||
| 254 | - } | ||
| 255 | - if(!map.get("line").equals("")){ | ||
| 256 | - sql+="and line_code='"+map.get("line")+"'"; | ||
| 257 | - } | ||
| 258 | - if(map.get("sel").equals("2")){ | ||
| 259 | - sql+=" and c.pcch!=c.pcry"; | ||
| 260 | - }else if(map.get("sel").equals("1")){ | ||
| 261 | - sql+=" and c.jhgh!=c.sjgh"; | ||
| 262 | - } | ||
| 263 | - | ||
| 264 | - | ||
| 265 | - List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() { | ||
| 266 | - | ||
| 267 | - @Override | ||
| 268 | - public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 269 | - Changetochange chan= new Changetochange(); | ||
| 270 | - | ||
| 271 | - chan.setRq(rq); | ||
| 272 | - chan.setGs(arg0.getString("gs").toString()); | ||
| 273 | - chan.setFgs(arg0.getString("fgs").toString()); | ||
| 274 | - chan.setXl(arg0.getString("xl").toString()); | ||
| 275 | - chan.setLp(arg0.getString("lp").toString()); | ||
| 276 | - chan.setFssj(arg0.getString("fssj").toString()); | ||
| 277 | - chan.setXgsj(arg0.getString("xgsj").toString()); | ||
| 278 | - chan.setPcch(arg0.getString("pcch").toString()); | ||
| 279 | - chan.setPcry(arg0.getString("pcry").toString()); | ||
| 280 | - chan.setJhch(arg0.getString("jhch").toString()); | ||
| 281 | - chan.setJhgh(arg0.getString("jhgh").toString()); | ||
| 282 | - chan.setSjch(arg0.getString("sjch").toString()); | ||
| 283 | - chan.setSjgh(arg0.getString("sjgh").toString()); | ||
| 284 | - chan.setYy(arg0.getString("yy").toString()); | ||
| 285 | - chan.setXgr(arg0.getString("xgr").toString()); | ||
| 286 | - return chan; | ||
| 287 | - } | ||
| 288 | - }); | ||
| 289 | - return list; | ||
| 290 | - } | 225 | + public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 226 | + Changetochange chan = new Changetochange(); | ||
| 291 | 227 | ||
| 228 | + chan.setRq(rq); | ||
| 229 | + chan.setGs(arg0.getString("gs").toString()); | ||
| 230 | + chan.setFgs(arg0.getString("fgs").toString()); | ||
| 231 | + chan.setXl(arg0.getString("xl").toString()); | ||
| 232 | + chan.setLp(arg0.getString("lp").toString()); | ||
| 233 | + chan.setFssj(arg0.getString("fssj").toString()); | ||
| 234 | + chan.setXgsj(arg0.getString("xgsj").toString()); | ||
| 235 | + chan.setPcch(arg0.getString("pcch").toString()); | ||
| 236 | + chan.setPcry(arg0.getString("pcry").toString()); | ||
| 237 | + chan.setJhch(arg0.getString("jhch").toString()); | ||
| 238 | + chan.setJhgh(arg0.getString("jhgh").toString()); | ||
| 239 | + chan.setSjch(arg0.getString("sjch").toString()); | ||
| 240 | + chan.setSjgh(arg0.getString("sjgh").toString()); | ||
| 241 | + chan.setYy(arg0.getString("yy").toString()); | ||
| 242 | + chan.setXgr(arg0.getString("xgr").toString()); | ||
| 243 | + return chan; | ||
| 244 | + } | ||
| 245 | + }); | ||
| 246 | + return list; | ||
| 247 | + } | ||
| 292 | 248 | ||
| 293 | - //路单数据 | 249 | + // 路单数据 |
| 294 | @Override | 250 | @Override |
| 295 | public List<Singledata> singledata(Map<String, Object> map) { | 251 | public List<Singledata> singledata(Map<String, Object> map) { |
| 296 | - | ||
| 297 | - String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + | ||
| 298 | - " FROM bsth_c_ylb y" + | ||
| 299 | - " where y.RQ BETWEEN '"+map.get("startDate").toString() +"'" + | ||
| 300 | - " and '"+map.get("endDate").toString()+"'"+ | ||
| 301 | - " and y.XLBM='"+map.get("line").toString()+"'"+ | ||
| 302 | - " GROUP BY y.NBBM "; | ||
| 303 | - | ||
| 304 | - List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | ||
| 305 | - SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | ||
| 306 | - @Override | ||
| 307 | - public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 308 | - Singledata sin = new Singledata(); | ||
| 309 | - sin.setrQ(sdf.format(arg0.getDate("rq"))); | ||
| 310 | - sin.setgS(arg0.getString("SSGSDM").toString()); | ||
| 311 | - sin.setxL(arg0.getString("XLBM").toString()); | ||
| 312 | - sin.setClzbh(arg0.getString("NBBM").toString()); | ||
| 313 | - sin.setJsy(arg0.getString("JSY").toString()); | ||
| 314 | - sin.setHyl(arg0.getString("YH").toString()); | ||
| 315 | - sin.setJzl(arg0.getString("JZL").toString()); | ||
| 316 | - // sin.setJzl(arg0.getString(""));//非营业性用油 | ||
| 317 | - sin.setJhjl(arg0.getString("JZL")); | ||
| 318 | - Map<String, Object> maps=new HashMap<>(); | ||
| 319 | - maps=scheduleRealInfoService.findKMBC2(sin.getJsy(),sin.getClzbh(),sin.getrQ()); | ||
| 320 | - sin.setjName(maps.get("j_name")==null?"":maps.get("j_name").toString()); | ||
| 321 | - sin.setSgh(maps.get("s_gh")==null?"":maps.get("s_gh").toString()); | ||
| 322 | - sin.setsName(maps.get("s_name")==null?"":maps.get("s_name").toString()); | ||
| 323 | - sin.setJhlc(maps.get("yygl")==null?"":maps.get("yygl").toString()); | ||
| 324 | - sin.setEmptMileage(maps.get("ksgl")==null?"":maps.get("ksgl").toString()); | ||
| 325 | - sin.setJhjl(maps.get("jhlc")==null?"":maps.get("jhlc").toString()); | ||
| 326 | - | ||
| 327 | - return sin; | ||
| 328 | - } | ||
| 329 | - }); | ||
| 330 | - return list; | ||
| 331 | -} | ||
| 332 | 252 | ||
| 253 | + String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y" | ||
| 254 | + + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "'" + " and '" | ||
| 255 | + + map.get("endDate").toString() + "'" + " and y.XLBM='" + map.get("line").toString() + "'" | ||
| 256 | + + " GROUP BY y.NBBM "; | ||
| 333 | 257 | ||
| 334 | - //运营服务阶段报表 | 258 | + List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 259 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 260 | + | ||
| 261 | + @Override | ||
| 262 | + public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 263 | + Singledata sin = new Singledata(); | ||
| 264 | + sin.setrQ(sdf.format(arg0.getDate("rq"))); | ||
| 265 | + sin.setgS(arg0.getString("SSGSDM").toString()); | ||
| 266 | + sin.setxL(arg0.getString("XLBM").toString()); | ||
| 267 | + sin.setClzbh(arg0.getString("NBBM").toString()); | ||
| 268 | + sin.setJsy(arg0.getString("JSY").toString()); | ||
| 269 | + sin.setHyl(arg0.getString("YH").toString()); | ||
| 270 | + sin.setJzl(arg0.getString("JZL").toString()); | ||
| 271 | + // sin.setJzl(arg0.getString(""));//非营业性用油 | ||
| 272 | + sin.setJhjl(arg0.getString("JZL")); | ||
| 273 | + Map<String, Object> maps = new HashMap<>(); | ||
| 274 | + maps = scheduleRealInfoService.findKMBC2(sin.getJsy(), sin.getClzbh(), sin.getrQ()); | ||
| 275 | + sin.setjName(maps.get("j_name") == null ? "" : maps.get("j_name").toString()); | ||
| 276 | + sin.setSgh(maps.get("s_gh") == null ? "" : maps.get("s_gh").toString()); | ||
| 277 | + sin.setsName(maps.get("s_name") == null ? "" : maps.get("s_name").toString()); | ||
| 278 | + sin.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | ||
| 279 | + sin.setEmptMileage(maps.get("ksgl") == null ? "" : maps.get("ksgl").toString()); | ||
| 280 | + sin.setJhjl(maps.get("jhlc") == null ? "" : maps.get("jhlc").toString()); | ||
| 281 | + | ||
| 282 | + return sin; | ||
| 283 | + } | ||
| 284 | + }); | ||
| 285 | + return list; | ||
| 286 | + } | ||
| 287 | + | ||
| 288 | + // 运营服务阶段报表 | ||
| 335 | @Override | 289 | @Override |
| 336 | public List<Operationservice> operationservice(Map<String, Object> map) { | 290 | public List<Operationservice> operationservice(Map<String, Object> map) { |
| 337 | - | ||
| 338 | - String sql = " SELECT y.RQ,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + | ||
| 339 | - " FROM bsth_c_ylb y" + | ||
| 340 | - " where y.RQ BETWEEN '"+map.get("startDate").toString() +"'" + | ||
| 341 | - " and '"+map.get("endDate").toString()+"'"+ | ||
| 342 | - " and y.XLBM='"+map.get("line").toString()+"'"+ | ||
| 343 | - " GROUP BY y.NBBM "; | ||
| 344 | - | ||
| 345 | - List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { | ||
| 346 | - SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | ||
| 347 | - @Override | ||
| 348 | - public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 349 | - Singledata sin = new Singledata(); | ||
| 350 | - Operationservice op = new Operationservice(); | ||
| 351 | - op.setXlName(arg0.getString("XLBM").toString()); | ||
| 352 | - op.setJzl(arg0.getString("JZL").toString()); | ||
| 353 | - op.setXhl(arg0.getString("YH").toString()); | ||
| 354 | - Map<String, Object> maps=new HashMap<>(); | ||
| 355 | - maps=scheduleRealInfoService.findKMBC2(sin.getJsy(),sin.getClzbh(),sin.getrQ()); | ||
| 356 | - op.setXsgl(maps.get("yygl").toString()==null?"":maps.get("yygl").toString()); | ||
| 357 | - op.setEmptMileage(maps.get("ksgl").toString()==null?"":maps.get("ksgl").toString()); | ||
| 358 | - op.setSjbc(maps.get("sjbc").toString()==null?"":maps.get("sjbc").toString()); | ||
| 359 | - return op; | ||
| 360 | - } | ||
| 361 | - }); | ||
| 362 | - return list; | 291 | + |
| 292 | + String sql = " SELECT y.RQ,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y" + " where y.RQ BETWEEN '" | ||
| 293 | + + map.get("startDate").toString() + "'" + " and '" + map.get("endDate").toString() + "'" | ||
| 294 | + + " and y.XLBM='" + map.get("line").toString() + "'" + " GROUP BY y.NBBM "; | ||
| 295 | + | ||
| 296 | + List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { | ||
| 297 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 298 | + | ||
| 299 | + @Override | ||
| 300 | + public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 301 | + Singledata sin = new Singledata(); | ||
| 302 | + Operationservice op = new Operationservice(); | ||
| 303 | + op.setXlName(arg0.getString("XLBM").toString()); | ||
| 304 | + op.setJzl(arg0.getString("JZL").toString()); | ||
| 305 | + op.setXhl(arg0.getString("YH").toString()); | ||
| 306 | + Map<String, Object> maps = new HashMap<>(); | ||
| 307 | + maps = scheduleRealInfoService.findKMBC2(sin.getJsy(), sin.getClzbh(), sin.getrQ()); | ||
| 308 | + op.setXsgl(maps.get("yygl").toString() == null ? "" : maps.get("yygl").toString()); | ||
| 309 | + op.setEmptMileage(maps.get("ksgl").toString() == null ? "" : maps.get("ksgl").toString()); | ||
| 310 | + op.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString()); | ||
| 311 | + return op; | ||
| 312 | + } | ||
| 313 | + }); | ||
| 314 | + return list; | ||
| 363 | } | 315 | } |
| 364 | 316 | ||
| 317 | + // 车辆加注 | ||
| 318 | + @Override | ||
| 319 | + public List<Vehicleloading> vehicleloading(String line, String data) { | ||
| 320 | + | ||
| 321 | + String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y " | ||
| 322 | + + " where to_days(y.RQ)=to_days('" + data + "')" + " and y.XLBM='" + line + "' " | ||
| 323 | + + " GROUP BY y.NBBM "; | ||
| 324 | + | ||
| 325 | + List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() { | ||
| 326 | + @Override | ||
| 327 | + public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 328 | + Vehicleloading ve = new Vehicleloading(); | ||
| 329 | + ve.setrQ(arg0.getString("RQ").toString()); | ||
| 330 | + ve.setgS(arg0.getString("SSDM").toString()); | ||
| 331 | + ve.setxL(arg0.getString("XLBM").toString()); | ||
| 332 | + ve.setClzbh(arg0.getString("NBBM").toString()); | ||
| 333 | + ve.setHyl(arg0.getString("YH").toString()); | ||
| 334 | + ve.setJzl(arg0.getString("JZL").toString()); | ||
| 335 | + // ve.setLs(arg0.getString("").toString());//尿素 | ||
| 336 | + Map<String, Object> maps = new HashMap<>(); | ||
| 337 | + maps = scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("NBBM"), | ||
| 338 | + arg0.getString("RQ")); | ||
| 339 | + ve.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | ||
| 340 | + ve.setJhbc(maps.get("jhbc").toString() == null ? "" : maps.get("jhbc").toString());// 计划班次 | ||
| 341 | + ve.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());// 实际班次 | ||
| 342 | + return ve; | ||
| 343 | + } | ||
| 344 | + }); | ||
| 345 | + return list; | ||
| 346 | + } | ||
| 347 | + | ||
| 348 | + // 营运线路出车率统计表 | ||
| 349 | + @Override | ||
| 350 | + public List<Turnoutrate> turnoutrate(Map<String, Object> map) { | ||
| 351 | + | ||
| 352 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 353 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | ||
| 354 | + Date d = null; | ||
| 355 | + Date d1 = null; | ||
| 356 | + try { | ||
| 357 | + d = sdf.parse(map.get("startDate").toString()); | ||
| 358 | + d1 = sdf.parse(map.get("endDate").toString()); | ||
| 359 | + } catch (ParseException e) { | ||
| 360 | + | ||
| 361 | + e.printStackTrace(); | ||
| 362 | + } | ||
| 363 | + String rq2 = sdf1.format(d); | ||
| 364 | + String rq3 = sdf1.format(d1); | ||
| 365 | + | ||
| 366 | + rq = rq2 + "-" + rq3; | ||
| 367 | + | ||
| 368 | + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,b.warrant_car from " | ||
| 369 | + + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | ||
| 370 | + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | ||
| 371 | + + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | ||
| 372 | + + map.get("line").toString() + "' AND gs_bm is not null" | ||
| 373 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | ||
| 374 | + + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl,t.warrant_car " | ||
| 375 | + + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | ||
| 376 | + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | ||
| 377 | + + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | ||
| 378 | + + "' AND gs_bm is not null " | ||
| 379 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | ||
| 380 | + + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | ||
| 381 | + List<Turnoutrate> list = jdbcTemplate.query(sql, new RowMapper<Turnoutrate>() { | ||
| 382 | + | ||
| 383 | + @Override | ||
| 384 | + public Turnoutrate mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 385 | + Turnoutrate tu = new Turnoutrate(); | ||
| 386 | + NumberFormat numberFormat = NumberFormat.getInstance(); | ||
| 387 | + numberFormat.setMaximumFractionDigits(2); | ||
| 388 | + String result1 = numberFormat.format((float) Integer.parseInt(arg0.getString("scl")) | ||
| 389 | + / (float) Integer.parseInt(arg0.getString("jcl")) * 100); | ||
| 390 | + String result2 = numberFormat.format((float) Integer.parseInt(arg0.getString("sbc")) | ||
| 391 | + / (float) Integer.parseInt(arg0.getString("jbc")) * 100); | ||
| 392 | + tu.setRq(rq); | ||
| 393 | + tu.setGs(arg0.getString("gs_name").toString()); | ||
| 394 | + tu.setZhgs(arg0.getString("fgs_name").toString()); | ||
| 395 | + tu.setXl(arg0.getString("xlgs")); | ||
| 396 | + tu.setXlmc(arg0.getString("sxl")); | ||
| 397 | + tu.setCchjh(arg0.getString("jcl").toString()); | ||
| 398 | + tu.setCchsj(arg0.getString("scl").toString()); | ||
| 399 | + tu.setCchqz(arg0.getString("sxl").toString()); | ||
| 400 | + tu.setChl(result1 + "%");// 出车率 | ||
| 401 | + tu.setBcjh(arg0.getString("jbc").toString()); | ||
| 402 | + tu.setBcsj(arg0.getString("sbc").toString()); | ||
| 403 | + tu.setBbzxl(result2 + "%");// 班次执行率 | ||
| 404 | + // tu.setSm(arg0.getString("gs_name").toString()); | ||
| 405 | + tu.setGsgs(arg0.getString("gslsbm").toString()); | ||
| 406 | + tu.setFgsgs(arg0.getString("fgsbm").toString()); | ||
| 407 | + return tu; | ||
| 408 | + } | ||
| 409 | + | ||
| 410 | + }); | ||
| 411 | + | ||
| 412 | + return list; | ||
| 413 | + } | ||
| 365 | 414 | ||
| 366 | - //车辆加注 | ||
| 367 | @Override | 415 | @Override |
| 368 | - public List<Vehicleloading> vehicleloading(String line,String data) { | ||
| 369 | - | ||
| 370 | - String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + | ||
| 371 | - " FROM bsth_c_ylb y " + | ||
| 372 | - " where to_days(y.RQ)=to_days('"+data +"')" + | ||
| 373 | - " and y.XLBM='"+line+"' "+ | ||
| 374 | - " GROUP BY y.NBBM "; | ||
| 375 | - | ||
| 376 | - List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() { | ||
| 377 | - @Override | ||
| 378 | - public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 379 | - Vehicleloading ve = new Vehicleloading(); | ||
| 380 | - ve.setrQ(arg0.getString("RQ").toString()); | ||
| 381 | - ve.setgS(arg0.getString("SSGSDM").toString()); | ||
| 382 | - ve.setxL(arg0.getString("XLBM").toString()); | ||
| 383 | - ve.setClzbh(arg0.getString("NBBM").toString()); | ||
| 384 | - ve.setHyl(arg0.getString("YH").toString()); | ||
| 385 | - ve.setJzl(arg0.getString("JZL").toString()); | ||
| 386 | - //ve.setLs(arg0.getString("").toString());//尿素 | ||
| 387 | - Map<String, Object> maps=new HashMap<>(); | ||
| 388 | - maps=scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("NBBM"), arg0.getString("RQ")); | ||
| 389 | - ve.setJhlc(maps.get("yygl")==null?"":maps.get("yygl").toString()); | ||
| 390 | - ve.setJhbc(maps.get("jhbc").toString()==null?"":maps.get("jhbc").toString());//计划班次 | ||
| 391 | - ve.setSjbc(maps.get("sjbc").toString()==null?"":maps.get("sjbc").toString());//实际班次 | ||
| 392 | - return ve; | 416 | + public List<Executionrate> executionrate(Map<String, Object> map) { |
| 417 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 418 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | ||
| 419 | + Date d = null; | ||
| 420 | + Date d1 = null; | ||
| 421 | + try { | ||
| 422 | + d = sdf.parse(map.get("startDate").toString()); | ||
| 423 | + d1 = sdf.parse(map.get("endDate").toString()); | ||
| 424 | + } catch (ParseException e) { | ||
| 425 | + | ||
| 426 | + e.printStackTrace(); | ||
| 393 | } | 427 | } |
| 394 | - }); | ||
| 395 | - return list; | 428 | + String rq2 = sdf1.format(d); |
| 429 | + String rq3 = sdf1.format(d1); | ||
| 430 | + | ||
| 431 | + rq = rq2 + "-" + rq3; | ||
| 432 | + | ||
| 433 | + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm from " | ||
| 434 | + + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | ||
| 435 | + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | ||
| 436 | + + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | ||
| 437 | + + map.get("line").toString() + "' AND gs_bm is not null" | ||
| 438 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | ||
| 439 | + + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | ||
| 440 | + + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | ||
| 441 | + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | ||
| 442 | + + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | ||
| 443 | + + "' AND gs_bm is not null " | ||
| 444 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | ||
| 445 | + + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | ||
| 446 | + List<Executionrate> list = jdbcTemplate.query(sql, new RowMapper<Executionrate>() { | ||
| 447 | + | ||
| 448 | + @Override | ||
| 449 | + public Executionrate mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 450 | + Executionrate tu = new Executionrate(); | ||
| 451 | + NumberFormat numberFormat = NumberFormat.getInstance(); | ||
| 452 | + numberFormat.setMaximumFractionDigits(2); | ||
| 453 | + String result1 = numberFormat.format((float) Integer.parseInt(arg0.getString("scl")) | ||
| 454 | + / (float) Integer.parseInt(arg0.getString("jcl")) * 100); | ||
| 455 | + String result2 = numberFormat.format((float) Integer.parseInt(arg0.getString("sbc")) | ||
| 456 | + / (float) Integer.parseInt(arg0.getString("jbc")) * 100); | ||
| 457 | + tu.setRq(rq); | ||
| 458 | + tu.setGs(arg0.getString("gs_name").toString()); | ||
| 459 | + tu.setZhgs(arg0.getString("fgs_name").toString()); | ||
| 460 | + tu.setXl(arg0.getString("xlgs")); | ||
| 461 | + tu.setXlmc(arg0.getString("sxl")); | ||
| 462 | + tu.setCchjh(arg0.getString("jcl").toString()); | ||
| 463 | + tu.setCchsj(arg0.getString("scl").toString()); | ||
| 464 | + tu.setCchqz(arg0.getString("sxl").toString()); | ||
| 465 | + tu.setChl(result1 + "%");// 出车率 | ||
| 466 | + tu.setBcjh(arg0.getString("jbc").toString()); | ||
| 467 | + tu.setBcsj(arg0.getString("sbc").toString()); | ||
| 468 | + tu.setBbzxl(result2 + "%");// 班次执行率 | ||
| 469 | + tu.setSm(arg0.getString("xl_name").toString()); | ||
| 470 | + tu.setGsgs(arg0.getString("gslsbm").toString()); | ||
| 471 | + tu.setFgsgs(arg0.getString("fgsbm").toString()); | ||
| 472 | + return tu; | ||
| 473 | + } | ||
| 474 | + | ||
| 475 | + }); | ||
| 476 | + | ||
| 477 | + return list; | ||
| 396 | } | 478 | } |
| 397 | 479 | ||
| 480 | + // 营运线路名称统计表 | ||
| 481 | + @Override | ||
| 482 | + public List<Allline> allline(Map<String, Object> map) { | ||
| 483 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 484 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | ||
| 485 | + Date d = null; | ||
| 486 | + Date d1 = null; | ||
| 487 | + try { | ||
| 488 | + d = sdf.parse(map.get("startDate").toString()); | ||
| 489 | + d1 = sdf.parse(map.get("endDate").toString()); | ||
| 490 | + } catch (ParseException e) { | ||
| 398 | 491 | ||
| 492 | + e.printStackTrace(); | ||
| 493 | + } | ||
| 494 | + String rq2 = sdf1.format(d); | ||
| 495 | + String rq3 = sdf1.format(d1); | ||
| 399 | 496 | ||
| 497 | + rq = rq2 + "-" + rq3; | ||
| 498 | + | ||
| 499 | + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm from " | ||
| 500 | + + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | ||
| 501 | + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | ||
| 502 | + + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | ||
| 503 | + + map.get("line").toString() + "' AND gs_bm is not null" | ||
| 504 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | ||
| 505 | + + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | ||
| 506 | + + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | ||
| 507 | + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | ||
| 508 | + + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | ||
| 509 | + + "' AND gs_bm is not null " | ||
| 510 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | ||
| 511 | + + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | ||
| 512 | + List<Allline> list = jdbcTemplate.query(sql, new RowMapper<Allline>() { | ||
| 513 | + | ||
| 514 | + @Override | ||
| 515 | + public Allline mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 516 | + Allline tu = new Allline(); | ||
| 517 | + NumberFormat numberFormat = NumberFormat.getInstance(); | ||
| 518 | + numberFormat.setMaximumFractionDigits(2); | ||
| 519 | + String result1 = numberFormat.format((float) Integer.parseInt(arg0.getString("scl")) | ||
| 520 | + / (float) Integer.parseInt(arg0.getString("jcl")) * 100); | ||
| 521 | + String result2 = numberFormat.format((float) Integer.parseInt(arg0.getString("sbc")) | ||
| 522 | + / (float) Integer.parseInt(arg0.getString("jbc")) * 100); | ||
| 523 | + tu.setRq(rq); | ||
| 524 | + tu.setGs(arg0.getString("gs_name").toString()); | ||
| 525 | + tu.setZhgs(arg0.getString("fgs_name").toString()); | ||
| 526 | + tu.setXl(arg0.getString("xl_name")); | ||
| 527 | + tu.setXlmc(arg0.getString("sxl")); | ||
| 528 | + tu.setCchjh(arg0.getString("jcl").toString()); | ||
| 529 | + tu.setCchsj(arg0.getString("scl").toString()); | ||
| 530 | + tu.setCchqz(arg0.getString("sxl").toString()); | ||
| 531 | + tu.setChl(result1 + "%");// 出车率 | ||
| 532 | + tu.setBcjh(arg0.getString("jbc").toString()); | ||
| 533 | + tu.setBcsj(arg0.getString("sbc").toString()); | ||
| 534 | + tu.setBbzxl(result2 + "%");// 班次执行率 | ||
| 535 | + // tu.setSm(arg0.getString("xl_name").toString()); | ||
| 536 | + tu.setGsgs(arg0.getString("gslsbm").toString()); | ||
| 537 | + tu.setFgsgs(arg0.getString("fgsbm").toString()); | ||
| 538 | + return tu; | ||
| 539 | + } | ||
| 540 | + | ||
| 541 | + }); | ||
| 542 | + | ||
| 543 | + return list; | ||
| 544 | + } | ||
| 400 | } | 545 | } |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| @@ -18,7 +18,6 @@ import org.springframework.jdbc.core.RowMapper; | @@ -18,7 +18,6 @@ import org.springframework.jdbc.core.RowMapper; | ||
| 18 | import org.springframework.stereotype.Service; | 18 | import org.springframework.stereotype.Service; |
| 19 | 19 | ||
| 20 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 20 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 21 | -import com.bsth.entity.schedule.TTInfoDetail; | ||
| 22 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | 21 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 23 | import com.bsth.service.BusIntervalService; | 22 | import com.bsth.service.BusIntervalService; |
| 24 | import com.bsth.service.schedule.PeopleCarPlanService; | 23 | import com.bsth.service.schedule.PeopleCarPlanService; |
| @@ -39,8 +38,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -39,8 +38,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 39 | private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 38 | private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 40 | private DecimalFormat df = new DecimalFormat("##0.00"); | 39 | private DecimalFormat df = new DecimalFormat("##0.00"); |
| 41 | 40 | ||
| 42 | - public List<ScheduleRealInfo> getSchedule(String line, String startDate, String endDate, String model, String times){ | ||
| 43 | - List<TTInfoDetail> ttList = new ArrayList<TTInfoDetail>(); | 41 | + public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String startDate, String endDate, String model, String times){ |
| 42 | + List<Long> ttList = new ArrayList<Long>(); | ||
| 44 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 43 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 45 | List<ScheduleRealInfo> resList = new ArrayList<ScheduleRealInfo>(); | 44 | List<ScheduleRealInfo> resList = new ArrayList<ScheduleRealInfo>(); |
| 46 | 45 | ||
| @@ -54,6 +53,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -54,6 +53,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 54 | String[] split = times.split("-"); | 53 | String[] split = times.split("-"); |
| 55 | sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; | 54 | sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; |
| 56 | } | 55 | } |
| 56 | + if(company.length() != 0){ | ||
| 57 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 58 | + } | ||
| 57 | sql += " and bc_type = 'normal'"; | 59 | sql += " and bc_type = 'normal'"; |
| 58 | 60 | ||
| 59 | list =jdbcTemplate.query(sql, | 61 | list =jdbcTemplate.query(sql, |
| @@ -85,23 +87,20 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -85,23 +87,20 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 85 | schedule.setClZbh(rs.getString("cl_zbh")); | 87 | schedule.setClZbh(rs.getString("cl_zbh")); |
| 86 | schedule.setjGh(rs.getString("j_gh")); | 88 | schedule.setjGh(rs.getString("j_gh")); |
| 87 | schedule.setjName(rs.getString("j_name")); | 89 | schedule.setjName(rs.getString("j_name")); |
| 90 | + schedule.setSpId(rs.getLong("sp_id")); | ||
| 88 | return schedule; | 91 | return schedule; |
| 89 | } | 92 | } |
| 90 | }); | 93 | }); |
| 91 | 94 | ||
| 92 | if(model.length() != 0){ | 95 | if(model.length() != 0){ |
| 93 | - sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'"; | 96 | +// sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'"; |
| 97 | + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type = 'normal'"; | ||
| 94 | 98 | ||
| 95 | ttList =jdbcTemplate.query(sql, | 99 | ttList =jdbcTemplate.query(sql, |
| 96 | - new RowMapper<TTInfoDetail>(){ | 100 | + new RowMapper<Long>(){ |
| 97 | @Override | 101 | @Override |
| 98 | - public TTInfoDetail mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 99 | - TTInfoDetail ttInfo = new TTInfoDetail(); | ||
| 100 | - ttInfo.setBcType(rs.getString("bc_type")); | ||
| 101 | - ttInfo.setBcs(rs.getInt("bcs")); | ||
| 102 | - ttInfo.setFcsj(rs.getString("fcsj")); | ||
| 103 | - ttInfo.setBcsj(rs.getInt("bcsj")); | ||
| 104 | - return ttInfo; | 102 | + public Long mapRow(ResultSet rs, int rowNum) throws SQLException { |
| 103 | + return rs.getLong("id"); | ||
| 105 | } | 104 | } |
| 106 | }); | 105 | }); |
| 107 | } | 106 | } |
| @@ -133,11 +132,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -133,11 +132,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 133 | } | 132 | } |
| 134 | DO:{ | 133 | DO:{ |
| 135 | if(model.length() != 0){ | 134 | if(model.length() != 0){ |
| 136 | - for(TTInfoDetail tt : ttList){ | ||
| 137 | - if(tt.getBcs() == schedule.getBcs() && tt.getFcsj().equals(schedule.getFcsj()) | ||
| 138 | - && tt.getBcsj() == schedule.getBcsj()){ | ||
| 139 | - resList.add(schedule); | ||
| 140 | - break DO; | 135 | + for(Long tt : ttList){ |
| 136 | + if(tt == schedule.getSpId()){ | ||
| 137 | + resList.add(schedule); | ||
| 138 | + break DO; | ||
| 141 | } | 139 | } |
| 142 | } | 140 | } |
| 143 | } else { | 141 | } else { |
| @@ -210,7 +208,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -210,7 +208,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 210 | public List<Map<String, Object>> interval(Map<String, Object> map) { | 208 | public List<Map<String, Object>> interval(Map<String, Object> map) { |
| 211 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 209 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 212 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 210 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 213 | - | 211 | + |
| 212 | + String company = map.get("company").toString(); | ||
| 213 | + String subCompany = map.get("subCompany").toString(); | ||
| 214 | String line = map.get("line").toString(); | 214 | String line = map.get("line").toString(); |
| 215 | String startDate = map.get("startDate").toString(); | 215 | String startDate = map.get("startDate").toString(); |
| 216 | String endDate = map.get("endDate").toString(); | 216 | String endDate = map.get("endDate").toString(); |
| @@ -228,7 +228,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -228,7 +228,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 228 | times = "06:00-07:00"; | 228 | times = "06:00-07:00"; |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | - List<ScheduleRealInfo> list = this.getSchedule(line, startDate, endDate, model, times); | 231 | + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, startDate, endDate, model, times); |
| 232 | 232 | ||
| 233 | String[] date1 = startDate.split("-"); | 233 | String[] date1 = startDate.split("-"); |
| 234 | String[] date2 = endDate.split("-"); | 234 | String[] date2 = endDate.split("-"); |
| @@ -254,7 +254,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -254,7 +254,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 254 | long sjInterval = 0; | 254 | long sjInterval = 0; |
| 255 | int jhNum = 0; | 255 | int jhNum = 0; |
| 256 | int sjNum = 0; | 256 | int sjNum = 0; |
| 257 | - String company = "", subCompany = ""; | 257 | + String companyName = "", subCompanyName = ""; |
| 258 | Map<String, Object> tempMap = new HashMap<String, Object>(); | 258 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 259 | Map<String, List<ScheduleRealInfo>> temp = new HashMap<String, List<ScheduleRealInfo>>(); | 259 | Map<String, List<ScheduleRealInfo>> temp = new HashMap<String, List<ScheduleRealInfo>>(); |
| 260 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 260 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| @@ -269,10 +269,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -269,10 +269,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 269 | jhNum++; | 269 | jhNum++; |
| 270 | ScheduleRealInfo schedule1 = tempList.get(i - 1); | 270 | ScheduleRealInfo schedule1 = tempList.get(i - 1); |
| 271 | ScheduleRealInfo schedule2 = tempList.get(i); | 271 | ScheduleRealInfo schedule2 = tempList.get(i); |
| 272 | - if(schedule1.getGsName() != null && company.length() == 0) | ||
| 273 | - company = schedule1.getGsName(); | ||
| 274 | - if(schedule1.getFgsName() != null && subCompany.length() == 0) | ||
| 275 | - subCompany = schedule1.getFgsName(); | 272 | + |
| 273 | + if(schedule1.getGsName() != null && companyName.length() == 0) | ||
| 274 | + companyName = schedule1.getGsName(); | ||
| 275 | + if(schedule1.getFgsName() != null && subCompanyName.length() == 0) | ||
| 276 | + subCompanyName = schedule1.getFgsName(); | ||
| 277 | + | ||
| 276 | jhInterval += schedule2.getFcsjT(); | 278 | jhInterval += schedule2.getFcsjT(); |
| 277 | jhInterval -= schedule1.getFcsjT(); | 279 | jhInterval -= schedule1.getFcsjT(); |
| 278 | if(schedule1.getFcsjActual()!=null && schedule2.getFcsjActual()!=null){ | 280 | if(schedule1.getFcsjActual()!=null && schedule2.getFcsjActual()!=null){ |
| @@ -290,8 +292,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -290,8 +292,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 290 | tempMap.put("line", keys[0]); | 292 | tempMap.put("line", keys[0]); |
| 291 | tempMap.put("qdz", keys[1]); | 293 | tempMap.put("qdz", keys[1]); |
| 292 | tempMap.put("times", times); | 294 | tempMap.put("times", times); |
| 293 | - tempMap.put("company", company); | ||
| 294 | - tempMap.put("subCompany", subCompany); | 295 | + tempMap.put("company", companyName); |
| 296 | + tempMap.put("subCompany", subCompanyName); | ||
| 295 | if(jhNum != 0) | 297 | if(jhNum != 0) |
| 296 | tempMap.put("jhInterval", jhInterval/jhNum); | 298 | tempMap.put("jhInterval", jhInterval/jhNum); |
| 297 | else | 299 | else |
| @@ -333,6 +335,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -333,6 +335,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 333 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 335 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 334 | Map<String, Object> modelMap = new HashMap<String, Object>(); | 336 | Map<String, Object> modelMap = new HashMap<String, Object>(); |
| 335 | 337 | ||
| 338 | + String company = map.get("company").toString(); | ||
| 339 | + String subCompany = map.get("subCompany").toString(); | ||
| 336 | String line = map.get("line").toString(); | 340 | String line = map.get("line").toString(); |
| 337 | String startDate = map.get("startDate").toString(); | 341 | String startDate = map.get("startDate").toString(); |
| 338 | String endDate = map.get("endDate").toString(); | 342 | String endDate = map.get("endDate").toString(); |
| @@ -351,7 +355,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -351,7 +355,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 351 | times = "06:00-07:00"; | 355 | times = "06:00-07:00"; |
| 352 | } | 356 | } |
| 353 | 357 | ||
| 354 | - List<ScheduleRealInfo> list = this.getSchedule(line, startDate, endDate, model, times); | 358 | + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, startDate, endDate, model, times); |
| 355 | 359 | ||
| 356 | String[] date1 = startDate.split("-"); | 360 | String[] date1 = startDate.split("-"); |
| 357 | String[] date2 = endDate.split("-"); | 361 | String[] date2 = endDate.split("-"); |
| @@ -389,12 +393,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -389,12 +393,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 389 | double yssd = 0; | 393 | double yssd = 0; |
| 390 | int yyNum = 0; | 394 | int yyNum = 0; |
| 391 | int ysNum = 0; | 395 | int ysNum = 0; |
| 392 | - String company = "", subCompany = ""; | 396 | + String companyName = "", subCompanyName = ""; |
| 393 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 397 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 394 | - if(schedule.getGsName() != null && company.length() == 0) | ||
| 395 | - company = schedule.getGsName(); | ||
| 396 | - if(schedule.getFgsName() != null && subCompany.length() == 0) | ||
| 397 | - subCompany = schedule.getFgsName(); | 398 | + if(schedule.getGsName() != null && companyName.length() == 0) |
| 399 | + companyName = schedule.getGsName(); | ||
| 400 | + if(schedule.getFgsName() != null && subCompanyName.length() == 0) | ||
| 401 | + subCompanyName = schedule.getFgsName(); | ||
| 398 | if(!tempMap.containsKey("xlDir")) | 402 | if(!tempMap.containsKey("xlDir")) |
| 399 | tempMap.put("xlDir", schedule.getXlDir()); | 403 | tempMap.put("xlDir", schedule.getXlDir()); |
| 400 | if(!tempMap.containsKey("qdz_zdz") && schedule.getXlDir().equals("0")) | 404 | if(!tempMap.containsKey("qdz_zdz") && schedule.getXlDir().equals("0")) |
| @@ -424,8 +428,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -424,8 +428,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 424 | tempMap.put("line", keys[0]); | 428 | tempMap.put("line", keys[0]); |
| 425 | tempMap.put("lp", keys[1]); | 429 | tempMap.put("lp", keys[1]); |
| 426 | tempMap.put("zdz", keys[2]); | 430 | tempMap.put("zdz", keys[2]); |
| 427 | - tempMap.put("company", company); | ||
| 428 | - tempMap.put("subCompany", subCompany); | 431 | + tempMap.put("company", companyName); |
| 432 | + tempMap.put("subCompany", subCompanyName); | ||
| 429 | 433 | ||
| 430 | tempMap.put("yysj", (yysj/60) + "小时" + (yysj%60) + "分钟"); | 434 | tempMap.put("yysj", (yysj/60) + "小时" + (yysj%60) + "分钟"); |
| 431 | yysjSum += yysj; | 435 | yysjSum += yysj; |
| @@ -465,7 +469,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -465,7 +469,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 465 | List<Integer> keyList = new ArrayList<Integer>(); | 469 | List<Integer> keyList = new ArrayList<Integer>(); |
| 466 | Map<Integer, List<Map<String, Object>>> temp = new HashMap<Integer, List<Map<String,Object>>>(); | 470 | Map<Integer, List<Map<String, Object>>> temp = new HashMap<Integer, List<Map<String,Object>>>(); |
| 467 | for(Map<String, Object> m : keyMap2.get(key)){ | 471 | for(Map<String, Object> m : keyMap2.get(key)){ |
| 468 | - Integer num = Integer.valueOf(m.get("lp").toString())*10+Integer.valueOf(m.get("xlDir").toString()); | 472 | + String lp = m.get("lp").toString(); |
| 473 | + String str = ""; | ||
| 474 | + for(int i = 0; i < lp.length(); i++){ | ||
| 475 | + str += (int)lp.charAt(i); | ||
| 476 | + } | ||
| 477 | + Integer num = Integer.valueOf(str)*10+Integer.valueOf(m.get("xlDir").toString()); | ||
| 469 | if(!temp.containsKey(num)){ | 478 | if(!temp.containsKey(num)){ |
| 470 | temp.put(num, new ArrayList<Map<String, Object>>()); | 479 | temp.put(num, new ArrayList<Map<String, Object>>()); |
| 471 | keyList.add(num); | 480 | keyList.add(num); |
| @@ -494,6 +503,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -494,6 +503,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 494 | Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); | 503 | Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); |
| 495 | Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); | 504 | Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); |
| 496 | 505 | ||
| 506 | + String company = map.get("company").toString(); | ||
| 507 | + String subCompany = map.get("subCompany").toString(); | ||
| 497 | String line = map.get("line").toString(); | 508 | String line = map.get("line").toString(); |
| 498 | String startDate = map.get("startDate").toString(); | 509 | String startDate = map.get("startDate").toString(); |
| 499 | String endDate = map.get("endDate").toString(); | 510 | String endDate = map.get("endDate").toString(); |
| @@ -512,7 +523,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -512,7 +523,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 512 | times = "06:00-07:00"; | 523 | times = "06:00-07:00"; |
| 513 | } | 524 | } |
| 514 | 525 | ||
| 515 | - list = getSchedule(line, startDate, endDate, model, times); | 526 | + list = getSchedule(company, subCompany, line, startDate, endDate, model, times); |
| 516 | 527 | ||
| 517 | String[] date1 = startDate.split("-"); | 528 | String[] date1 = startDate.split("-"); |
| 518 | String[] date2 = endDate.split("-"); | 529 | String[] date2 = endDate.split("-"); |
| @@ -559,12 +570,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -559,12 +570,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 559 | long sjtz = 0l; | 570 | long sjtz = 0l; |
| 560 | long tzsjMax = 0l; | 571 | long tzsjMax = 0l; |
| 561 | long tzsjMin = 0l; | 572 | long tzsjMin = 0l; |
| 562 | - String company = "", subCompany = ""; | 573 | + String companyName = "", subCompanyName = ""; |
| 563 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 574 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 564 | - if(schedule.getGsName() != null && company.length() == 0) | ||
| 565 | - company = schedule.getGsName(); | ||
| 566 | - if(schedule.getFgsName() != null && subCompany.length() == 0) | ||
| 567 | - subCompany = schedule.getFgsName(); | 575 | + if(schedule.getGsName() != null && companyName.length() == 0) |
| 576 | + companyName = schedule.getGsName(); | ||
| 577 | + if(schedule.getFgsName() != null && subCompanyName.length() == 0) | ||
| 578 | + subCompanyName = schedule.getFgsName(); | ||
| 568 | long tzsj = 0l; | 579 | long tzsj = 0l; |
| 569 | long yssj = 0l; | 580 | long yssj = 0l; |
| 570 | jhbc++; | 581 | jhbc++; |
| @@ -618,8 +629,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -618,8 +629,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 618 | tempMap.put("jhfc", keys[3]); | 629 | tempMap.put("jhfc", keys[3]); |
| 619 | tempMap.put("station", keys[4]); | 630 | tempMap.put("station", keys[4]); |
| 620 | tempMap.put("times", times); | 631 | tempMap.put("times", times); |
| 621 | - tempMap.put("company", company); | ||
| 622 | - tempMap.put("subCompany", subCompany); | 632 | + tempMap.put("company", companyName); |
| 633 | + tempMap.put("subCompany", subCompanyName); | ||
| 623 | if(startDate.equals(endDate)) | 634 | if(startDate.equals(endDate)) |
| 624 | tempMap.put("dates", startDate); | 635 | tempMap.put("dates", startDate); |
| 625 | else | 636 | else |
| @@ -692,10 +703,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -692,10 +703,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 692 | int wdfc2 = 0; | 703 | int wdfc2 = 0; |
| 693 | int ys = 0; | 704 | int ys = 0; |
| 694 | int tz = 0; | 705 | int tz = 0; |
| 695 | - String company = ""; | 706 | + String companyName = "", subCompanyName = ""; |
| 696 | for(Map<String, Object> m : keyMap0.get(key)){ | 707 | for(Map<String, Object> m : keyMap0.get(key)){ |
| 697 | - if(m.containsKey("company") && company.length() == 0) | ||
| 698 | - company = m.get("company").toString(); | 708 | + if(m.containsKey("company") && companyName.length() == 0) |
| 709 | + companyName = m.get("company").toString(); | ||
| 710 | + if(m.containsKey("subCompany") && subCompanyName.length() == 0) | ||
| 711 | + subCompanyName = m.get("subCompany").toString(); | ||
| 699 | jhbc += Integer.valueOf(m.get("jhbc").toString()); | 712 | jhbc += Integer.valueOf(m.get("jhbc").toString()); |
| 700 | sjbc += Integer.valueOf(m.get("sjbc").toString()); | 713 | sjbc += Integer.valueOf(m.get("sjbc").toString()); |
| 701 | wddf1 += Integer.valueOf(m.get("wddf1").toString().substring(0, m.get("wddf1").toString().length() - 1)); | 714 | wddf1 += Integer.valueOf(m.get("wddf1").toString().substring(0, m.get("wddf1").toString().length() - 1)); |
| @@ -709,7 +722,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -709,7 +722,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 709 | tempMap.put("dates", startDate); | 722 | tempMap.put("dates", startDate); |
| 710 | else | 723 | else |
| 711 | tempMap.put("dates", startDate + "--" + endDate); | 724 | tempMap.put("dates", startDate + "--" + endDate); |
| 712 | - tempMap.put("company", company); | 725 | + tempMap.put("company", companyName); |
| 726 | + tempMap.put("subCompany", subCompanyName); | ||
| 713 | String[] keys = key.split("/"); | 727 | String[] keys = key.split("/"); |
| 714 | tempMap.put("line", keys[0]); | 728 | tempMap.put("line", keys[0]); |
| 715 | tempMap.put("lp", keys[1]); | 729 | tempMap.put("lp", keys[1]); |
| @@ -733,11 +747,23 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -733,11 +747,23 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 733 | 747 | ||
| 734 | for(String key : keyMap1.keySet()){ | 748 | for(String key : keyMap1.keySet()){ |
| 735 | Collections.sort(keyMap1.get(key), new Comparator<Map<String, Object>>() { | 749 | Collections.sort(keyMap1.get(key), new Comparator<Map<String, Object>>() { |
| 736 | - | 750 | + |
| 737 | public int compare(Map<String, Object> o1, Map<String, Object> o2) { | 751 | public int compare(Map<String, Object> o1, Map<String, Object> o2) { |
| 752 | + Integer a; | ||
| 753 | + Integer b; | ||
| 754 | + String lp1 = o1.get("lp").toString(); | ||
| 755 | + String lp2 = o2.get("lp").toString(); | ||
| 756 | + String str1 = ""; | ||
| 757 | + String str2 = ""; | ||
| 758 | + for(int i = 0; i < lp1.length(); i++){ | ||
| 759 | + str1 += (int)lp1.charAt(i); | ||
| 760 | + } | ||
| 761 | + for(int i = 0; i < lp2.length(); i++){ | ||
| 762 | + str2 += (int)lp2.charAt(i); | ||
| 763 | + } | ||
| 738 | 764 | ||
| 739 | - Integer a = Integer.valueOf(o1.get("lp").toString()); | ||
| 740 | - Integer b = Integer.valueOf(o2.get("lp").toString()); | 765 | + a = Integer.valueOf(str1); |
| 766 | + b = Integer.valueOf(str2); | ||
| 741 | 767 | ||
| 742 | // 升序 | 768 | // 升序 |
| 743 | return a.compareTo(b); | 769 | return a.compareTo(b); |
| @@ -757,6 +783,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -757,6 +783,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 757 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 783 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 758 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 784 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 759 | 785 | ||
| 786 | + String company = map.get("company").toString(); | ||
| 787 | + String subCompany = map.get("subCompany").toString(); | ||
| 760 | String line = map.get("line").toString(); | 788 | String line = map.get("line").toString(); |
| 761 | String startDate = map.get("startDate").toString(); | 789 | String startDate = map.get("startDate").toString(); |
| 762 | String endDate = map.get("endDate").toString(); | 790 | String endDate = map.get("endDate").toString(); |
| @@ -774,7 +802,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -774,7 +802,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 774 | times = "06:00-07:00"; | 802 | times = "06:00-07:00"; |
| 775 | } | 803 | } |
| 776 | 804 | ||
| 777 | - list = getSchedule(line, startDate, endDate, model, times); | 805 | + list = getSchedule(company, subCompany, line, startDate, endDate, model, times); |
| 778 | 806 | ||
| 779 | String[] date1 = startDate.split("-"); | 807 | String[] date1 = startDate.split("-"); |
| 780 | String[] date2 = endDate.split("-"); | 808 | String[] date2 = endDate.split("-"); |
| @@ -807,12 +835,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -807,12 +835,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 807 | qcbc = 0, qclc = 0, kxbc = 0, kxlc = 0, | 835 | qcbc = 0, qclc = 0, kxbc = 0, kxlc = 0, |
| 808 | qhbc = 0, qhlc = 0, wybc = 0, wylc = 0; | 836 | qhbc = 0, qhlc = 0, wybc = 0, wylc = 0; |
| 809 | int qtbc = 0, qtlc = 0; | 837 | int qtbc = 0, qtlc = 0; |
| 810 | - String company = "", subCompany = ""; | 838 | + String companyName = "", subCompanyName = ""; |
| 811 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 839 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 812 | - if(schedule.getGsName() != null && company.length() == 0) | ||
| 813 | - company = schedule.getGsName(); | ||
| 814 | - if(schedule.getFgsName() != null && subCompany.length() == 0) | ||
| 815 | - subCompany = schedule.getFgsName(); | 840 | + if(schedule.getGsName() != null && companyName.length() == 0) |
| 841 | + companyName = schedule.getGsName(); | ||
| 842 | + if(schedule.getFgsName() != null && subCompanyName.length() == 0) | ||
| 843 | + subCompanyName = schedule.getFgsName(); | ||
| 816 | jhbc++; | 844 | jhbc++; |
| 817 | if(schedule.getJhlc() != null) | 845 | if(schedule.getJhlc() != null) |
| 818 | jhlc += schedule.getJhlc(); | 846 | jhlc += schedule.getJhlc(); |
| @@ -861,8 +889,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -861,8 +889,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 861 | tempMap.put("date", startDate); | 889 | tempMap.put("date", startDate); |
| 862 | else | 890 | else |
| 863 | tempMap.put("date", startDate + "--" + endDate); | 891 | tempMap.put("date", startDate + "--" + endDate); |
| 864 | - tempMap.put("company", company); | ||
| 865 | - tempMap.put("subCompany", subCompany); | 892 | + tempMap.put("company", companyName); |
| 893 | + tempMap.put("subCompany", subCompanyName); | ||
| 866 | tempMap.put("times", times); | 894 | tempMap.put("times", times); |
| 867 | tempMap.put("line", key); | 895 | tempMap.put("line", key); |
| 868 | tempMap.put("jhbc", jhbc); | 896 | tempMap.put("jhbc", jhbc); |
| @@ -919,6 +947,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -919,6 +947,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 919 | Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); | 947 | Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); |
| 920 | Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); | 948 | Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); |
| 921 | 949 | ||
| 950 | + String company = map.get("company").toString(); | ||
| 951 | + String subCompany = map.get("subCompany").toString(); | ||
| 922 | String line = map.get("line").toString(); | 952 | String line = map.get("line").toString(); |
| 923 | String startDate = map.get("startDate").toString(); | 953 | String startDate = map.get("startDate").toString(); |
| 924 | String endDate = map.get("endDate").toString(); | 954 | String endDate = map.get("endDate").toString(); |
| @@ -941,6 +971,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -941,6 +971,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 941 | String[] split = times.split("-"); | 971 | String[] split = times.split("-"); |
| 942 | sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; | 972 | sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; |
| 943 | } | 973 | } |
| 974 | + if(company.length() != 0){ | ||
| 975 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 976 | + } | ||
| 944 | sql += " and bc_type = 'normal'"; | 977 | sql += " and bc_type = 'normal'"; |
| 945 | 978 | ||
| 946 | list =jdbcTemplate.query(sql, | 979 | list =jdbcTemplate.query(sql, |
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
| 1 | package com.bsth.service.oil.impl; | 1 | package com.bsth.service.oil.impl; |
| 2 | 2 | ||
| 3 | +import java.sql.ResultSet; | ||
| 4 | +import java.sql.SQLException; | ||
| 3 | import java.text.ParseException; | 5 | import java.text.ParseException; |
| 4 | import java.text.SimpleDateFormat; | 6 | import java.text.SimpleDateFormat; |
| 5 | import java.util.ArrayList; | 7 | import java.util.ArrayList; |
| 8 | +import java.util.Arrays; | ||
| 6 | import java.util.HashMap; | 9 | import java.util.HashMap; |
| 7 | import java.util.List; | 10 | import java.util.List; |
| 8 | import java.util.Map; | 11 | import java.util.Map; |
| 9 | 12 | ||
| 10 | import org.springframework.beans.factory.annotation.Autowired; | 13 | import org.springframework.beans.factory.annotation.Autowired; |
| 14 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 15 | +import org.springframework.jdbc.core.RowMapper; | ||
| 11 | import org.springframework.stereotype.Service; | 16 | import org.springframework.stereotype.Service; |
| 12 | 17 | ||
| 13 | import com.bsth.common.ResponseCode; | 18 | import com.bsth.common.ResponseCode; |
| @@ -28,17 +33,103 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw | @@ -28,17 +33,103 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw | ||
| 28 | @Autowired | 33 | @Autowired |
| 29 | YlxxbRepository ylxxbRepository; | 34 | YlxxbRepository ylxxbRepository; |
| 30 | 35 | ||
| 36 | + @Autowired | ||
| 37 | + JdbcTemplate jdbcTemplate; | ||
| 38 | + | ||
| 31 | @SuppressWarnings("unchecked") | 39 | @SuppressWarnings("unchecked") |
| 32 | public PageObject<Ylxxb> Pagequery(Map<String, Object> map) { | 40 | public PageObject<Ylxxb> Pagequery(Map<String, Object> map) { |
| 33 | - // TODO Auto-generated method stub | 41 | + int page=Integer.parseInt(map.get("page").toString()); |
| 34 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | 42 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); |
| 35 | - List<Ylxxb> yList=new ArrayList<Ylxxb>(); | 43 | + |
| 36 | String rq=map.get("rq").toString(); | 44 | String rq=map.get("rq").toString(); |
| 37 | String nbbm=""; | 45 | String nbbm=""; |
| 38 | - if(map.get("nbbm")!=null){ | ||
| 39 | - nbbm=map.get("nbbm").toString(); | 46 | + if(map.get("nbbh")!=null){ |
| 47 | + nbbm=map.get("nbbh").toString(); | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + Object gsdmIn=map.get("gsdm_in"); | ||
| 51 | + Object fgsdmIn=map.get("fgsdm_in"); | ||
| 52 | + String addSql=""; | ||
| 53 | + String gsdmLike=""; | ||
| 54 | + String fgsdmLike=""; | ||
| 55 | + | ||
| 56 | + //选择了公司 | ||
| 57 | + if(gsdmIn==null){ | ||
| 58 | + gsdmLike=map.get("gsdm_like").toString(); | ||
| 59 | + addSql += " and a.gsdm = '"+gsdmLike+ "' "; | ||
| 60 | + | ||
| 61 | + //选择了分公司 | ||
| 62 | + if(fgsdmIn==null){ | ||
| 63 | + fgsdmLike=map.get("fgsdm_like").toString();; | ||
| 64 | + addSql += " and a.fgsdm = '"+fgsdmLike+ "' "; | ||
| 65 | + }else{ | ||
| 66 | + String fgsdmIns[]= fgsdmIn.toString().split(","); | ||
| 67 | + addSql +=" and a.fgsdm in ("; | ||
| 68 | + for(int i=0;i<fgsdmIns.length;i++){ | ||
| 69 | + addSql +="'"+fgsdmIns[i]+"'"; | ||
| 70 | + if(i<fgsdmIns.length-1){ | ||
| 71 | + addSql +=","; | ||
| 72 | + } | ||
| 73 | + } | ||
| 74 | + addSql +=")"; | ||
| 75 | + } | ||
| 76 | + }else{ | ||
| 77 | + //没有选择公司 (分公司也没有选择) | ||
| 78 | + String gsdmIns[]=gsdmIn.toString().split(","); | ||
| 79 | + addSql += " and a.gsdm in ("; | ||
| 80 | + for(int i=0;i<gsdmIns.length;i++){ | ||
| 81 | + addSql +="'" +gsdmIns[i]+"'"; | ||
| 82 | + if(i<gsdmIns.length-1){ | ||
| 83 | + addSql+=","; | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + addSql +=")"; | ||
| 87 | + String fgsdmIns[]= fgsdmIn.toString().split(","); | ||
| 88 | + addSql +=" and a.fgsdm in ("; | ||
| 89 | + for(int i=0;i<fgsdmIns.length;i++){ | ||
| 90 | + addSql +="'"+fgsdmIns[i]+"'"; | ||
| 91 | + if(i<fgsdmIns.length-1){ | ||
| 92 | + addSql +=","; | ||
| 93 | + } | ||
| 94 | + } | ||
| 95 | + addSql +=")"; | ||
| 96 | + | ||
| 97 | + | ||
| 40 | } | 98 | } |
| 41 | - List<Object[]> list=repository.obtainCwjycl(rq,nbbm); | 99 | + String countSql="SELECT ifnull(count(*),0) as countTs FROM bsth_c_cwjy a "+ |
| 100 | + " left join ( select * from bsth_c_ylxxb b where to_days(b.yyrq)=to_days('"+rq+"') and jylx=1) b " + | ||
| 101 | + " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy " | ||
| 102 | + + "from bsth_c_ylb where to_days(rq)= to_days('"+rq+"' ) group by nbbm "+ | ||
| 103 | + " ) c on a.nbbm=c.nbbm where a.nbbm like '%"+nbbm+"%' " +addSql ; | ||
| 104 | + int listsize=jdbcTemplate.queryForObject(countSql, Integer.class); | ||
| 105 | + // TODO Auto-generated method stub | ||
| 106 | + String sql="SELECT a.gsdm as gsdm,a.fgsdm as fgsdm,a.nbbm as nbbm,b.jsy as jsy,b.jzl as jzl ,b.stationid as stationid," | ||
| 107 | + + "b.nylx as nylx,b.yj as yj,b.bz as bz,c.jsy as ldgh FROM bsth_c_cwjy a "+ | ||
| 108 | + " left join ( select * from bsth_c_ylxxb b where to_days(b.yyrq)=to_days('"+rq+"') and jylx=1) b " + | ||
| 109 | + " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy " | ||
| 110 | + + "from bsth_c_ylb where to_days(rq)= to_days('"+rq+"' ) group by nbbm "+ | ||
| 111 | + " ) c on a.nbbm=c.nbbm where a.nbbm like '%"+nbbm+"%' " +addSql+ " limit "+page*10+","+10; | ||
| 112 | + | ||
| 113 | + | ||
| 114 | + List<Ylxxb> yList= jdbcTemplate.query(sql, | ||
| 115 | + new RowMapper<Ylxxb>(){ | ||
| 116 | + @Override | ||
| 117 | + public Ylxxb mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 118 | + Ylxxb t=new Ylxxb(); | ||
| 119 | + t.setGsdm(rs.getString("gsdm")); | ||
| 120 | + t.setFgsdm(rs.getString("fgsdm")); | ||
| 121 | + t.setNbbm(rs.getString("nbbm")); | ||
| 122 | + t.setJsy(rs.getString("jsy")); | ||
| 123 | + t.setJzl(rs.getDouble("jzl")); | ||
| 124 | + t.setStationid(rs.getString("stationid")); | ||
| 125 | + t.setNylx(rs.getInt("nylx")); | ||
| 126 | + t.setYj(rs.getDouble("yj")); | ||
| 127 | + t.setBz(rs.getString("bz")); | ||
| 128 | + t.setLdgh(rs.getString("ldgh")); | ||
| 129 | + return t; | ||
| 130 | + } | ||
| 131 | + }); | ||
| 132 | + /*List<Object[]> list=repository.obtainCwjycl(rq,nbbm); | ||
| 42 | for (int i = 0; i < list.size(); i++) { | 133 | for (int i = 0; i < list.size(); i++) { |
| 43 | Ylxxb y=new Ylxxb(); | 134 | Ylxxb y=new Ylxxb(); |
| 44 | y.setGsdm(list.get(i)[0]==null?"":list.get(i)[0].toString()); | 135 | y.setGsdm(list.get(i)[0]==null?"":list.get(i)[0].toString()); |
| @@ -57,8 +148,8 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw | @@ -57,8 +148,8 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw | ||
| 57 | e.printStackTrace(); | 148 | e.printStackTrace(); |
| 58 | } | 149 | } |
| 59 | yList.add(y); | 150 | yList.add(y); |
| 60 | - } | ||
| 61 | - PageHelper pageHelper = new PageHelper(yList.size(), map); | 151 | + }*/ |
| 152 | + PageHelper pageHelper = new PageHelper(listsize, map); | ||
| 62 | pageHelper.getMap(); | 153 | pageHelper.getMap(); |
| 63 | PageObject<Ylxxb> pageObject=pageHelper.getPageObject(); | 154 | PageObject<Ylxxb> pageObject=pageHelper.getPageObject(); |
| 64 | pageObject.setDataList(yList); | 155 | pageObject.setDataList(yList); |
src/main/java/com/bsth/service/oil/impl/YlxxbServiceImpl.java
| @@ -34,6 +34,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl<Ylxxb,Integer> implements | @@ -34,6 +34,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl<Ylxxb,Integer> implements | ||
| 34 | 34 | ||
| 35 | @Override | 35 | @Override |
| 36 | public PageObject<Ylxxb> Pagequery(Map<String, Object> map) { | 36 | public PageObject<Ylxxb> Pagequery(Map<String, Object> map) { |
| 37 | + | ||
| 37 | String rq=map.get("yyrq").toString(); | 38 | String rq=map.get("yyrq").toString(); |
| 38 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | 39 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); |
| 39 | try { | 40 | try { |
| @@ -51,6 +52,15 @@ public class YlxxbServiceImpl extends BaseServiceImpl<Ylxxb,Integer> implements | @@ -51,6 +52,15 @@ public class YlxxbServiceImpl extends BaseServiceImpl<Ylxxb,Integer> implements | ||
| 51 | // TODO Auto-generated catch block | 52 | // TODO Auto-generated catch block |
| 52 | e.printStackTrace(); | 53 | e.printStackTrace(); |
| 53 | } | 54 | } |
| 55 | + /*if(map.get("gsdm_in")!=null){ | ||
| 56 | + map.put("ssgsdm_in", map.get("gsdm_in")); | ||
| 57 | + map.remove("gsdm_in"); | ||
| 58 | + | ||
| 59 | + }else{ | ||
| 60 | + map.put("ssgsdm_like", map.get("gsdm_like")); | ||
| 61 | + map.remove("gsdm_like"); | ||
| 62 | + }*/ | ||
| 63 | + | ||
| 54 | //根具条件查询指定日期Ylb的数据 | 64 | //根具条件查询指定日期Ylb的数据 |
| 55 | List<Ylb> ylbIterator=(List<Ylb>) ylbRepository.findAll(new CustomerSpecs<Ylb>(map)); | 65 | List<Ylb> ylbIterator=(List<Ylb>) ylbRepository.findAll(new CustomerSpecs<Ylb>(map)); |
| 56 | List<Ylxxb> list=new ArrayList<Ylxxb>(); | 66 | List<Ylxxb> list=new ArrayList<Ylxxb>(); |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| @@ -97,7 +97,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | @@ -97,7 +97,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | ||
| 97 | 97 | ||
| 98 | List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code); | 98 | List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code); |
| 99 | 99 | ||
| 100 | - List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date); | 100 | + List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String type); |
| 101 | 101 | ||
| 102 | Map<String, Object> removeChildTask(Long taskId); | 102 | Map<String, Object> removeChildTask(Long taskId); |
| 103 | 103 |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -1208,8 +1208,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1208,8 +1208,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1208 | 1208 | ||
| 1209 | @Override | 1209 | @Override |
| 1210 | public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh, | 1210 | public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh, |
| 1211 | - String lpName,String date) { | ||
| 1212 | - return scheduleRealInfoRepository.queryListWaybill2(jName,clZbh,lpName,date); | 1211 | + String lpName,String date,String type) { |
| 1212 | + if(type.equals("qp")){ | ||
| 1213 | + return scheduleRealInfoRepository.queryListWaybill2(jName,clZbh,lpName,date); | ||
| 1214 | + }else{ | ||
| 1215 | + return scheduleRealInfoRepository.queryListWaybill(jName,clZbh,lpName,date); | ||
| 1216 | + } | ||
| 1213 | } | 1217 | } |
| 1214 | 1218 | ||
| 1215 | @Override | 1219 | @Override |
src/main/java/com/bsth/service/schedule/PeopleCarPlanService.java
| @@ -5,15 +5,15 @@ import java.util.Map; | @@ -5,15 +5,15 @@ import java.util.Map; | ||
| 5 | 5 | ||
| 6 | public interface PeopleCarPlanService { | 6 | public interface PeopleCarPlanService { |
| 7 | 7 | ||
| 8 | - List<Map<String, Object>> queryPeopleCar(String line, String date, String type); | 8 | + List<Map<String, Object>> queryPeopleCar(Map<String, Object> map); |
| 9 | 9 | ||
| 10 | - List<Map<String, Object>> workDaily(String line, String date, String type); | 10 | + List<Map<String, Object>> workDaily(Map<String, Object> map); |
| 11 | 11 | ||
| 12 | - Map<String, Object> scheduleAnaly(String page, String line, String startDate, String endDate, String model, String type); | 12 | + Map<String, Object> scheduleAnaly(Map<String, Object> map); |
| 13 | 13 | ||
| 14 | - List<Map<String, Object>> getModel(String line, String startDate, String endDate); | 14 | + List<Map<String, Object>> getModel(Map<String, Object> map); |
| 15 | 15 | ||
| 16 | - List<Map<String, Object>> firstAndLastBus(String line, String date, String type); | 16 | + List<Map<String, Object>> firstAndLastBus(Map<String, Object> map); |
| 17 | 17 | ||
| 18 | - List<Map<String, Object>> commandState(String line, String date, String code); | 18 | + List<Map<String, Object>> commandState(Map<String, Object> map); |
| 19 | } | 19 | } |
src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
| 1 | package com.bsth.service.schedule; | 1 | package com.bsth.service.schedule; |
| 2 | 2 | ||
| 3 | -import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 4 | -import com.bsth.entity.schedule.SchedulePlanInfo; | ||
| 5 | -import com.bsth.entity.schedule.TTInfoDetail; | ||
| 6 | -import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | ||
| 7 | -import com.bsth.util.ReportUtils; | ||
| 8 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | -import org.springframework.jdbc.core.JdbcTemplate; | ||
| 10 | -import org.springframework.jdbc.core.RowMapper; | ||
| 11 | -import org.springframework.stereotype.Service; | ||
| 12 | - | ||
| 13 | import java.math.BigDecimal; | 3 | import java.math.BigDecimal; |
| 14 | import java.sql.ResultSet; | 4 | import java.sql.ResultSet; |
| 15 | import java.sql.SQLException; | 5 | import java.sql.SQLException; |
| 16 | import java.text.DecimalFormat; | 6 | import java.text.DecimalFormat; |
| 17 | import java.text.ParseException; | 7 | import java.text.ParseException; |
| 18 | import java.text.SimpleDateFormat; | 8 | import java.text.SimpleDateFormat; |
| 19 | -import java.util.*; | 9 | +import java.util.ArrayList; |
| 10 | +import java.util.Collections; | ||
| 11 | +import java.util.Date; | ||
| 12 | +import java.util.HashMap; | ||
| 13 | +import java.util.HashSet; | ||
| 14 | +import java.util.Iterator; | ||
| 15 | +import java.util.List; | ||
| 16 | +import java.util.Map; | ||
| 17 | +import java.util.Set; | ||
| 18 | + | ||
| 19 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 20 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 21 | +import org.springframework.jdbc.core.RowMapper; | ||
| 22 | +import org.springframework.stereotype.Service; | ||
| 23 | + | ||
| 24 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 25 | +import com.bsth.entity.schedule.SchedulePlanInfo; | ||
| 26 | +import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | ||
| 27 | +import com.bsth.util.ReportUtils; | ||
| 20 | 28 | ||
| 21 | @Service | 29 | @Service |
| 22 | public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | 30 | public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| @@ -27,14 +35,74 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -27,14 +35,74 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 27 | @Autowired | 35 | @Autowired |
| 28 | private JdbcTemplate jdbcTemplate; | 36 | private JdbcTemplate jdbcTemplate; |
| 29 | 37 | ||
| 38 | + public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String date){ | ||
| 39 | + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | ||
| 40 | + | ||
| 41 | + try { | ||
| 42 | + String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; | ||
| 43 | + | ||
| 44 | + if(line.length() != 0) | ||
| 45 | + sql += " and xl_bm = '"+line+"'"; | ||
| 46 | + if(company.length() != 0) | ||
| 47 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 48 | + | ||
| 49 | + list =jdbcTemplate.query(sql, | ||
| 50 | + new RowMapper<ScheduleRealInfo>(){ | ||
| 51 | + @Override | ||
| 52 | + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 53 | + ScheduleRealInfo schedule = new ScheduleRealInfo(); | ||
| 54 | + schedule.setScheduleDateStr(rs.getString("schedule_date_Str")); | ||
| 55 | + schedule.setRealExecDate(rs.getString("real_exec_date")); | ||
| 56 | + schedule.setXlName(rs.getString("xl_name")); | ||
| 57 | + schedule.setLpName(rs.getString("lp_name")); | ||
| 58 | + schedule.setBcType(rs.getString("bc_type")); | ||
| 59 | + schedule.setBcs(rs.getInt("bcs")); | ||
| 60 | + schedule.setBcsj(rs.getInt("bcsj")); | ||
| 61 | + schedule.setJhlc(rs.getDouble("jhlc")); | ||
| 62 | + schedule.setDfsj(rs.getString("dfsj")); | ||
| 63 | + schedule.setFcsj(rs.getString("fcsj")); | ||
| 64 | + schedule.setFcsjActual(rs.getString("fcsj_actual")); | ||
| 65 | + schedule.setZdsj(rs.getString("zdsj")); | ||
| 66 | + schedule.setZdsjActual(rs.getString("zdsj_actual")); | ||
| 67 | + schedule.setQdzName(rs.getString("qdz_name")); | ||
| 68 | + schedule.setZdzName(rs.getString("zdz_name")); | ||
| 69 | + schedule.setXlDir(rs.getString("xl_dir")); | ||
| 70 | + schedule.setStatus(rs.getInt("status")); | ||
| 71 | + schedule.setRemarks(rs.getString("remarks")); | ||
| 72 | + schedule.setGsName(rs.getString("gs_name")); | ||
| 73 | + schedule.setFgsName(rs.getString("fgs_name")); | ||
| 74 | + schedule.setClZbh(rs.getString("cl_zbh")); | ||
| 75 | + schedule.setjGh(rs.getString("j_gh")); | ||
| 76 | + schedule.setjName(rs.getString("j_name")); | ||
| 77 | + schedule.setsGh(rs.getString("s_gh")); | ||
| 78 | + schedule.setsName(rs.getString("s_name")); | ||
| 79 | + schedule.setSpId(rs.getLong("sp_id")); | ||
| 80 | + return schedule; | ||
| 81 | + } | ||
| 82 | + }); | ||
| 83 | + | ||
| 84 | + } catch (Exception e) { | ||
| 85 | + // TODO: handle exception | ||
| 86 | + e.printStackTrace(); | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + return list; | ||
| 90 | + } | ||
| 91 | + | ||
| 30 | @Override | 92 | @Override |
| 31 | - public List<Map<String, Object>> queryPeopleCar(String line, String date, String type) { | 93 | + public List<Map<String, Object>> queryPeopleCar(Map<String, Object> map) { |
| 32 | Map<String, List<SchedulePlanInfo>> keyMap = new HashMap<String, List<SchedulePlanInfo>>(); | 94 | Map<String, List<SchedulePlanInfo>> keyMap = new HashMap<String, List<SchedulePlanInfo>>(); |
| 33 | Map<String, List<Map<String, Object>>> temp = new HashMap<String, List<Map<String, Object>>>(); | 95 | Map<String, List<Map<String, Object>>> temp = new HashMap<String, List<Map<String, Object>>>(); |
| 34 | List<SchedulePlanInfo> list = new ArrayList<SchedulePlanInfo>(); | 96 | List<SchedulePlanInfo> list = new ArrayList<SchedulePlanInfo>(); |
| 35 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 97 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 36 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); | 98 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); |
| 37 | 99 | ||
| 100 | + String company = map.get("company").toString(); | ||
| 101 | + String subCompany = map.get("subCompany").toString(); | ||
| 102 | + String line = map.get("line").toString(); | ||
| 103 | + String date = map.get("date").toString(); | ||
| 104 | + String type = map.get("type").toString(); | ||
| 105 | + | ||
| 38 | if(date.length() == 0){ | 106 | if(date.length() == 0){ |
| 39 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | 107 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| 40 | } | 108 | } |
| @@ -45,6 +113,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -45,6 +113,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 45 | if(line.length() != 0){ | 113 | if(line.length() != 0){ |
| 46 | sql += " and xl_bm = '"+line+"'"; | 114 | sql += " and xl_bm = '"+line+"'"; |
| 47 | } | 115 | } |
| 116 | + if(company.length() != 0){ | ||
| 117 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 118 | + } | ||
| 48 | 119 | ||
| 49 | list =jdbcTemplate.query(sql, | 120 | list =jdbcTemplate.query(sql, |
| 50 | new RowMapper<SchedulePlanInfo>(){ | 121 | new RowMapper<SchedulePlanInfo>(){ |
| @@ -59,6 +130,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -59,6 +130,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 59 | schedule.setjName(rs.getString("j_name")); | 130 | schedule.setjName(rs.getString("j_name")); |
| 60 | schedule.setsName(rs.getString("s_name")); | 131 | schedule.setsName(rs.getString("s_name")); |
| 61 | schedule.setJhlc(rs.getDouble("jhlc")); | 132 | schedule.setJhlc(rs.getDouble("jhlc")); |
| 133 | + schedule.setGsName(rs.getString("gs_name")); | ||
| 134 | + schedule.setFgsName(rs.getString("fgs_name")); | ||
| 62 | return schedule; | 135 | return schedule; |
| 63 | } | 136 | } |
| 64 | }); | 137 | }); |
| @@ -80,7 +153,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -80,7 +153,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 80 | for(String key : keyMap.keySet()){ | 153 | for(String key : keyMap.keySet()){ |
| 81 | Map<String, Object> tempMap = new HashMap<String, Object>(); | 154 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 82 | BigDecimal jhlc = new BigDecimal(0); | 155 | BigDecimal jhlc = new BigDecimal(0); |
| 156 | + String companyName = "", subCompanyName = ""; | ||
| 83 | for(SchedulePlanInfo schedule : keyMap.get(key)){ | 157 | for(SchedulePlanInfo schedule : keyMap.get(key)){ |
| 158 | + if(schedule.getGsName() != null && companyName.length() == 0) | ||
| 159 | + companyName = schedule.getGsName(); | ||
| 160 | + if(schedule.getFgsName() != null && subCompanyName.length() == 0) | ||
| 161 | + subCompanyName = schedule.getFgsName(); | ||
| 84 | if(schedule.getJhlc() != null) | 162 | if(schedule.getJhlc() != null) |
| 85 | jhlc = jhlc.add(new BigDecimal(schedule.getJhlc())); | 163 | jhlc = jhlc.add(new BigDecimal(schedule.getJhlc())); |
| 86 | } | 164 | } |
| @@ -91,6 +169,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -91,6 +169,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 91 | tempMap.put("clzbh", split[2]); | 169 | tempMap.put("clzbh", split[2]); |
| 92 | tempMap.put("jName", split[3]); | 170 | tempMap.put("jName", split[3]); |
| 93 | tempMap.put("sName", split[4]); | 171 | tempMap.put("sName", split[4]); |
| 172 | + tempMap.put("company", companyName); | ||
| 173 | + tempMap.put("subCompany", subCompanyName); | ||
| 94 | if(split[4].equals("null")) | 174 | if(split[4].equals("null")) |
| 95 | tempMap.put("sName", "/"); | 175 | tempMap.put("sName", "/"); |
| 96 | tempMap.put("jhlc", jhlc.setScale(2, BigDecimal.ROUND_UP)); | 176 | tempMap.put("jhlc", jhlc.setScale(2, BigDecimal.ROUND_UP)); |
| @@ -107,7 +187,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -107,7 +187,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 107 | Map<Integer, List<Map<String, Object>>> tempList = new HashMap<Integer, List<Map<String,Object>>>(); | 187 | Map<Integer, List<Map<String, Object>>> tempList = new HashMap<Integer, List<Map<String,Object>>>(); |
| 108 | List<Integer> keyList = new ArrayList<Integer>(); | 188 | List<Integer> keyList = new ArrayList<Integer>(); |
| 109 | for(Map<String, Object> m : temp.get(key)){ | 189 | for(Map<String, Object> m : temp.get(key)){ |
| 110 | - int i = Integer.valueOf(m.get("lp").toString()); | 190 | + String lp = m.get("lp").toString(); |
| 191 | + String str = ""; | ||
| 192 | + for(int i = 0; i < lp.length(); i++){ | ||
| 193 | + str += (int)lp.charAt(i); | ||
| 194 | + } | ||
| 195 | + int i = Integer.valueOf(str); | ||
| 111 | if(!tempList.containsKey(i)) | 196 | if(!tempList.containsKey(i)) |
| 112 | tempList.put(i, new ArrayList<Map<String, Object>>()); | 197 | tempList.put(i, new ArrayList<Map<String, Object>>()); |
| 113 | tempList.get(i).add(m); | 198 | tempList.get(i).add(m); |
| @@ -125,12 +210,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -125,12 +210,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 125 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | 210 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 126 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 211 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| 127 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 212 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 128 | - Map<String,Object> map = new HashMap<String, Object>(); | 213 | + Map<String,Object> m = new HashMap<String, Object>(); |
| 129 | ReportUtils ee = new ReportUtils(); | 214 | ReportUtils ee = new ReportUtils(); |
| 130 | try { | 215 | try { |
| 131 | listI.add(resList.iterator()); | 216 | listI.add(resList.iterator()); |
| 132 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | 217 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; |
| 133 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\peoCarPlan.xls", | 218 | + ee.excelReplace(listI, new Object[] { m }, path+"mould\\peoCarPlan.xls", |
| 134 | path+"export\\计划车辆班次人员" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | 219 | path+"export\\计划车辆班次人员" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); |
| 135 | } catch (Exception e) { | 220 | } catch (Exception e) { |
| 136 | // TODO: handle exception | 221 | // TODO: handle exception |
| @@ -142,17 +227,22 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -142,17 +227,22 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 142 | } | 227 | } |
| 143 | 228 | ||
| 144 | @Override | 229 | @Override |
| 145 | - public List<Map<String, Object>> workDaily(String line, String date, String type) { | 230 | + public List<Map<String, Object>> workDaily(Map<String, Object> map) { |
| 146 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 231 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 147 | DecimalFormat df = new DecimalFormat("###0.##"); | 232 | DecimalFormat df = new DecimalFormat("###0.##"); |
| 233 | + | ||
| 234 | + String company = map.get("company").toString(); | ||
| 235 | + String subCompany = map.get("subCompany").toString(); | ||
| 236 | + String line = map.get("line").toString(); | ||
| 237 | + String date = map.get("date").toString(); | ||
| 238 | + String type = map.get("type").toString(); | ||
| 239 | + | ||
| 148 | if(date.length() == 0){ | 240 | if(date.length() == 0){ |
| 149 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | 241 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| 150 | } | 242 | } |
| 151 | - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | ||
| 152 | - if(line.length() != 0) | ||
| 153 | - list = scheduleRealInfoRepository.scheduleDaily(line, date); | ||
| 154 | - else | ||
| 155 | - list = scheduleRealInfoRepository.findByDate(date); | 243 | + |
| 244 | + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date); | ||
| 245 | + | ||
| 156 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 246 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 157 | for(ScheduleRealInfo schedule : list){ | 247 | for(ScheduleRealInfo schedule : list){ |
| 158 | String key = schedule.getXlName(); | 248 | String key = schedule.getXlName(); |
| @@ -169,10 +259,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -169,10 +259,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 169 | Long wgfEnd = 0l; | 259 | Long wgfEnd = 0l; |
| 170 | try { | 260 | try { |
| 171 | //早晚高峰时段 | 261 | //早晚高峰时段 |
| 172 | - zgfBegin = sdf.parse(date + "07:30").getTime(); | ||
| 173 | - zgfEnd = sdf.parse(date + "09:30").getTime(); | ||
| 174 | - wgfBegin = sdf.parse(date + "16:30").getTime(); | ||
| 175 | - wgfEnd = sdf.parse(date + "18:30").getTime(); | 262 | + zgfBegin = sdf.parse(date + "06:30").getTime(); |
| 263 | + zgfEnd = sdf.parse(date + "08:30").getTime(); | ||
| 264 | + wgfBegin = sdf.parse(date + "16:00").getTime(); | ||
| 265 | + wgfEnd = sdf.parse(date + "18:00").getTime(); | ||
| 176 | } catch (ParseException e) { | 266 | } catch (ParseException e) { |
| 177 | // TODO Auto-generated catch block | 267 | // TODO Auto-generated catch block |
| 178 | e.printStackTrace(); | 268 | e.printStackTrace(); |
| @@ -180,26 +270,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -180,26 +270,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 180 | for(String key : keyMap.keySet()){ | 270 | for(String key : keyMap.keySet()){ |
| 181 | Map<String, Object> tempMap = new HashMap<String, Object>(); | 271 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 182 | Map<String, List <ScheduleRealInfo>> listMap = new HashMap<String, List <ScheduleRealInfo>>(); | 272 | Map<String, List <ScheduleRealInfo>> listMap = new HashMap<String, List <ScheduleRealInfo>>(); |
| 183 | - int jhbc = 0; | ||
| 184 | - int dftz = 0; | ||
| 185 | - int jhcc = 0; | ||
| 186 | - int sjcc = 0; | ||
| 187 | - int upfk = 0; | ||
| 188 | - int updk = 0; | ||
| 189 | - int dnfk = 0; | ||
| 190 | - int dndk = 0; | ||
| 191 | - int upfm = 0; | ||
| 192 | - int updm = 0; | ||
| 193 | - int dnfm = 0; | ||
| 194 | - int dndm = 0; | ||
| 195 | - int jhsb = 0; | ||
| 196 | - int sjsb = 0; | ||
| 197 | - int jhmb = 0; | ||
| 198 | - int sjmb = 0; | ||
| 199 | - int jhzgf = 0; | ||
| 200 | - int sjzgf = 0; | ||
| 201 | - int jhwgf = 0; | ||
| 202 | - int sjwgf = 0; | 273 | + int jhbc = 0, dftz = 0, jhcc = 0, sjcc = 0; |
| 274 | + int upfk = 0, updk = 0, dnfk = 0, dndk = 0; | ||
| 275 | + int upfm = 0, updm = 0, dnfm = 0, dndm = 0; | ||
| 276 | + int jhsb = 0, sjsb = 0, jhmb = 0, sjmb = 0; | ||
| 277 | + int jhzgf = 0, sjzgf = 0, jhwgf = 0, sjwgf = 0; | ||
| 203 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 278 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 204 | schedule.setFcsjAll(schedule.getFcsj()); | 279 | schedule.setFcsjAll(schedule.getFcsj()); |
| 205 | 280 | ||
| @@ -324,12 +399,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -324,12 +399,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 324 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | 399 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 325 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 400 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| 326 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 401 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 327 | - Map<String,Object> map = new HashMap<String, Object>(); | 402 | + Map<String,Object> m = new HashMap<String, Object>(); |
| 328 | ReportUtils ee = new ReportUtils(); | 403 | ReportUtils ee = new ReportUtils(); |
| 329 | try { | 404 | try { |
| 330 | listI.add(resList.iterator()); | 405 | listI.add(resList.iterator()); |
| 331 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | 406 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; |
| 332 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\workDaily.xls", | 407 | + ee.excelReplace(listI, new Object[] { m }, path+"mould\\workDaily.xls", |
| 333 | path+"export\\营运服务日报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | 408 | path+"export\\营运服务日报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); |
| 334 | } catch (Exception e) { | 409 | } catch (Exception e) { |
| 335 | // TODO: handle exception | 410 | // TODO: handle exception |
| @@ -341,15 +416,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -341,15 +416,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 341 | } | 416 | } |
| 342 | 417 | ||
| 343 | @Override | 418 | @Override |
| 344 | - public Map<String, Object> scheduleAnaly(String page, String line, String startDate, String endDate, String model, String type) { | 419 | + public Map<String, Object> scheduleAnaly(Map<String, Object> map) { |
| 345 | DecimalFormat df = new DecimalFormat("00"); | 420 | DecimalFormat df = new DecimalFormat("00"); |
| 346 | - List<TTInfoDetail> ttList = new ArrayList<TTInfoDetail>(); | 421 | +// List<TTInfoDetail> ttList = new ArrayList<TTInfoDetail>(); |
| 422 | + List<Long> ttList = new ArrayList<Long>(); | ||
| 347 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 423 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 348 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 424 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 349 | List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); | 425 | List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); |
| 350 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 426 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 351 | Map<String, Object> modelMap = new HashMap<String, Object>(); | 427 | Map<String, Object> modelMap = new HashMap<String, Object>(); |
| 352 | 428 | ||
| 429 | + String company = map.get("company").toString(); | ||
| 430 | + String subCompany = map.get("subCompany").toString(); | ||
| 431 | + String page = map.get("page").toString(); | ||
| 432 | + String line = map.get("line").toString(); | ||
| 433 | + String startDate = map.get("startDate").toString(); | ||
| 434 | + String endDate = map.get("endDate").toString(); | ||
| 435 | + String model = map.get("model").toString(); | ||
| 436 | + String type = map.get("type").toString(); | ||
| 437 | + | ||
| 353 | if(startDate.length() == 0){ | 438 | if(startDate.length() == 0){ |
| 354 | startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | 439 | startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| 355 | } | 440 | } |
| @@ -362,6 +447,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -362,6 +447,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 362 | if(line.length() != 0){ | 447 | if(line.length() != 0){ |
| 363 | sql += " and xl_bm = '"+line+"'"; | 448 | sql += " and xl_bm = '"+line+"'"; |
| 364 | } | 449 | } |
| 450 | + if(company.length() != 0){ | ||
| 451 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 452 | + } | ||
| 365 | sql += " and bc_type = 'normal'"; | 453 | sql += " and bc_type = 'normal'"; |
| 366 | 454 | ||
| 367 | list =jdbcTemplate.query(sql, | 455 | list =jdbcTemplate.query(sql, |
| @@ -380,27 +468,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -380,27 +468,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 380 | schedule.setZdsjActual(rs.getString("zdsj_actual")); | 468 | schedule.setZdsjActual(rs.getString("zdsj_actual")); |
| 381 | schedule.setBcsj(rs.getInt("bcsj")); | 469 | schedule.setBcsj(rs.getInt("bcsj")); |
| 382 | schedule.setQdzName(rs.getString("qdz_name")); | 470 | schedule.setQdzName(rs.getString("qdz_name")); |
| 471 | + schedule.setSpId(rs.getLong("sp_id")); | ||
| 383 | return schedule; | 472 | return schedule; |
| 384 | } | 473 | } |
| 385 | }); | 474 | }); |
| 386 | 475 | ||
| 387 | if(model.length() != 0){ | 476 | if(model.length() != 0){ |
| 388 | - sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'"; | ||
| 389 | - } | 477 | +// sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'"; |
| 478 | + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type = 'normal'"; | ||
| 390 | 479 | ||
| 391 | - ttList =jdbcTemplate.query(sql, | ||
| 392 | - new RowMapper<TTInfoDetail>(){ | ||
| 393 | - @Override | ||
| 394 | - public TTInfoDetail mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 395 | - TTInfoDetail ttInfo = new TTInfoDetail(); | ||
| 396 | - ttInfo.setBcType(rs.getString("bc_type")); | ||
| 397 | - ttInfo.setBcs(rs.getInt("bcs")); | ||
| 398 | - ttInfo.setFcno(rs.getInt("fcno")); | ||
| 399 | - ttInfo.setFcsj(rs.getString("fcsj")); | ||
| 400 | - ttInfo.setBcsj(rs.getInt("bcsj")); | ||
| 401 | - return ttInfo; | ||
| 402 | - } | ||
| 403 | - }); | 480 | + ttList = jdbcTemplate.query(sql, |
| 481 | + new RowMapper<Long>(){ | ||
| 482 | + @Override | ||
| 483 | + public Long mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 484 | + return rs.getLong("id"); | ||
| 485 | + } | ||
| 486 | + }); | ||
| 487 | + | ||
| 488 | + } | ||
| 404 | 489 | ||
| 405 | } catch (Exception e) { | 490 | } catch (Exception e) { |
| 406 | // TODO Auto-generated catch block | 491 | // TODO Auto-generated catch block |
| @@ -411,9 +496,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -411,9 +496,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 411 | for(ScheduleRealInfo schedule : list){ | 496 | for(ScheduleRealInfo schedule : list){ |
| 412 | DO:{ | 497 | DO:{ |
| 413 | if(model.length() != 0){ | 498 | if(model.length() != 0){ |
| 414 | - for(TTInfoDetail tt : ttList){ | ||
| 415 | - if(tt.getBcs() == schedule.getBcs() && tt.getFcno() == schedule.getFcno() | ||
| 416 | - && tt.getFcsj().equals(schedule.getFcsj()) && tt.getBcsj() == schedule.getBcsj()){ | 499 | + for(Long tt : ttList){ |
| 500 | + if(tt == schedule.getSpId()){ | ||
| 417 | String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj(); | 501 | String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj(); |
| 418 | if(!keyMap.containsKey(key)) | 502 | if(!keyMap.containsKey(key)) |
| 419 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); | 503 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); |
| @@ -524,16 +608,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -524,16 +608,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 524 | } | 608 | } |
| 525 | Collections.sort(keyList); | 609 | Collections.sort(keyList); |
| 526 | for(Integer Int : keyList){ | 610 | for(Integer Int : keyList){ |
| 527 | - Map<String, Object> map = tempMap.get(Int); | ||
| 528 | - String str = map.get("line").toString(); | 611 | + Map<String, Object> m = tempMap.get(Int); |
| 612 | + String str = m.get("line").toString(); | ||
| 529 | if(!listMap2.containsKey(str)) | 613 | if(!listMap2.containsKey(str)) |
| 530 | listMap2.put(str, new ArrayList<Map<String, Object>>()); | 614 | listMap2.put(str, new ArrayList<Map<String, Object>>()); |
| 531 | - listMap2.get(str).add(map); | 615 | + listMap2.get(str).add(m); |
| 532 | } | 616 | } |
| 533 | } | 617 | } |
| 534 | for(String str : listMap2.keySet()){ | 618 | for(String str : listMap2.keySet()){ |
| 535 | - for(Map<String, Object> map : listMap2.get(str)){ | ||
| 536 | - resList.add(map); | 619 | + for(Map<String, Object> m : listMap2.get(str)){ |
| 620 | + resList.add(m); | ||
| 537 | } | 621 | } |
| 538 | } | 622 | } |
| 539 | 623 | ||
| @@ -551,12 +635,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -551,12 +635,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 551 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | 635 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 552 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 636 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| 553 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 637 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 554 | - Map<String,Object> map = new HashMap<String, Object>(); | 638 | + Map<String,Object> m = new HashMap<String, Object>(); |
| 555 | ReportUtils ee = new ReportUtils(); | 639 | ReportUtils ee = new ReportUtils(); |
| 556 | try { | 640 | try { |
| 557 | listI.add(resList.iterator()); | 641 | listI.add(resList.iterator()); |
| 558 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | 642 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; |
| 559 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\scheduleAnaly.xls", | 643 | + ee.excelReplace(listI, new Object[] { m }, path+"mould\\scheduleAnaly.xls", |
| 560 | path+"export\\时刻表分析" + sdfSimple.format(sdfMonth.parse(startDate)) + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls"); | 644 | path+"export\\时刻表分析" + sdfSimple.format(sdfMonth.parse(startDate)) + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls"); |
| 561 | } catch (Exception e) { | 645 | } catch (Exception e) { |
| 562 | // TODO: handle exception | 646 | // TODO: handle exception |
| @@ -568,12 +652,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -568,12 +652,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 568 | } | 652 | } |
| 569 | 653 | ||
| 570 | @Override | 654 | @Override |
| 571 | - public List<Map<String, Object>> getModel(String line, String startDate, String endDate) { | 655 | + public List<Map<String, Object>> getModel(Map<String, Object> map) { |
| 572 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 656 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 573 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); | 657 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); |
| 574 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 658 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 575 | SimpleDateFormat sdfEE = new SimpleDateFormat("EEEE"); | 659 | SimpleDateFormat sdfEE = new SimpleDateFormat("EEEE"); |
| 576 | 660 | ||
| 661 | + String line = map.get("line").toString(); | ||
| 662 | + String startDate = map.get("startDate").toString(); | ||
| 663 | + String endDate = map.get("endDate").toString(); | ||
| 664 | + | ||
| 577 | if(startDate.length() == 0){ | 665 | if(startDate.length() == 0){ |
| 578 | startDate = sdf.format(new Date()); | 666 | startDate = sdf.format(new Date()); |
| 579 | } | 667 | } |
| @@ -640,13 +728,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -640,13 +728,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 640 | ruleDays1.add(6); | 728 | ruleDays1.add(6); |
| 641 | specialDays1.add(sdf.format(tempDate)); | 729 | specialDays1.add(sdf.format(tempDate)); |
| 642 | } | 730 | } |
| 643 | - for(Map<String, Object> map : list){ | ||
| 644 | - String[] ruleDays = map.get("ruleDays").toString().split(","); | ||
| 645 | - String[] specialDays = map.get("specialDays").toString().split(","); | 731 | + for(Map<String, Object> m : list){ |
| 732 | + String[] ruleDays = m.get("ruleDays").toString().split(","); | ||
| 733 | + String[] specialDays = m.get("specialDays").toString().split(","); | ||
| 646 | boolean flag = false; | 734 | boolean flag = false; |
| 647 | DO:{ | 735 | DO:{ |
| 648 | try { | 736 | try { |
| 649 | - long qyrq = sdf.parse(map.get("qyrq").toString()).getTime(); | 737 | + long qyrq = sdf.parse(m.get("qyrq").toString()).getTime(); |
| 650 | if(qyrq > date2.getTime()) | 738 | if(qyrq > date2.getTime()) |
| 651 | break; | 739 | break; |
| 652 | } catch (ParseException e) { | 740 | } catch (ParseException e) { |
| @@ -671,24 +759,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -671,24 +759,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 671 | } | 759 | } |
| 672 | } | 760 | } |
| 673 | if(flag) | 761 | if(flag) |
| 674 | - resList.add(map); | 762 | + resList.add(m); |
| 675 | } | 763 | } |
| 676 | 764 | ||
| 677 | return resList; | 765 | return resList; |
| 678 | } | 766 | } |
| 679 | 767 | ||
| 680 | @Override | 768 | @Override |
| 681 | - public List<Map<String, Object>> firstAndLastBus(String line, String date, String type) { | ||
| 682 | - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 769 | + public List<Map<String, Object>> firstAndLastBus(Map<String, Object> map) { |
| 683 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 770 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 684 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | 771 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 685 | 772 | ||
| 773 | + String company = map.get("company").toString(); | ||
| 774 | + String subCompany = map.get("subCompany").toString(); | ||
| 775 | + String line = map.get("line").toString(); | ||
| 776 | + String date = map.get("date").toString(); | ||
| 777 | + String type = map.get("type").toString(); | ||
| 778 | + | ||
| 686 | if(date.length() == 0) | 779 | if(date.length() == 0) |
| 687 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | 780 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| 688 | - if(line.length() != 0) | ||
| 689 | - list = scheduleRealInfoRepository.scheduleDaily(line, date); | ||
| 690 | - else | ||
| 691 | - list = scheduleRealInfoRepository.findByDate(date); | 781 | + |
| 782 | + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date); | ||
| 692 | 783 | ||
| 693 | for(ScheduleRealInfo schedule : list){ | 784 | for(ScheduleRealInfo schedule : list){ |
| 694 | if(!schedule.getBcType().equals("normal")) | 785 | if(!schedule.getBcType().equals("normal")) |
| @@ -704,12 +795,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -704,12 +795,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 704 | List<Long> longList0 = new ArrayList<Long>(); | 795 | List<Long> longList0 = new ArrayList<Long>(); |
| 705 | Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>(); | 796 | Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>(); |
| 706 | List<Long> longList1 = new ArrayList<Long>(); | 797 | List<Long> longList1 = new ArrayList<Long>(); |
| 707 | - String company = "", subCompany = ""; | 798 | + String companyName = "", subCompanyName = ""; |
| 708 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 799 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 709 | - if(schedule.getGsName() != null && company.length() == 0) | ||
| 710 | - company = schedule.getGsName(); | ||
| 711 | - if(schedule.getFgsName() != null && subCompany.length() == 0) | ||
| 712 | - subCompany = schedule.getFgsName(); | 800 | + if(schedule.getGsName() != null && companyName.length() == 0) |
| 801 | + companyName = schedule.getGsName(); | ||
| 802 | + if(schedule.getFgsName() != null && subCompanyName.length() == 0) | ||
| 803 | + subCompanyName = schedule.getFgsName(); | ||
| 713 | String[] split = schedule.getFcsj().split(":"); | 804 | String[] split = schedule.getFcsj().split(":"); |
| 714 | long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | 805 | long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); |
| 715 | schedule.setFcsjT(min); | 806 | schedule.setFcsjT(min); |
| @@ -728,8 +819,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -728,8 +819,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 728 | ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); | 819 | ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); |
| 729 | ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1)); | 820 | ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1)); |
| 730 | tempMap.put("date", date); | 821 | tempMap.put("date", date); |
| 731 | - tempMap.put("company", company); | ||
| 732 | - tempMap.put("subCompany", subCompany); | 822 | + tempMap.put("company", companyName); |
| 823 | + tempMap.put("subCompany", subCompanyName); | ||
| 733 | tempMap.put("line", key); | 824 | tempMap.put("line", key); |
| 734 | tempMap.put("qdzFirst0", shouban0.getQdzName()); | 825 | tempMap.put("qdzFirst0", shouban0.getQdzName()); |
| 735 | tempMap.put("jhfcFirst0", shouban0.getFcsj()); | 826 | tempMap.put("jhfcFirst0", shouban0.getFcsj()); |
| @@ -798,12 +889,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -798,12 +889,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 798 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | 889 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 799 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 890 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| 800 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 891 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 801 | - Map<String,Object> map = new HashMap<String, Object>(); | 892 | + Map<String,Object> m = new HashMap<String, Object>(); |
| 802 | ReportUtils ee = new ReportUtils(); | 893 | ReportUtils ee = new ReportUtils(); |
| 803 | try { | 894 | try { |
| 804 | listI.add(resList.iterator()); | 895 | listI.add(resList.iterator()); |
| 805 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | 896 | String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; |
| 806 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\firstAndLastBus.xls", | 897 | + ee.excelReplace(listI, new Object[] { m }, path+"mould\\firstAndLastBus.xls", |
| 807 | path+"export\\线路首末班" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | 898 | path+"export\\线路首末班" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); |
| 808 | } catch (Exception e) { | 899 | } catch (Exception e) { |
| 809 | // TODO: handle exception | 900 | // TODO: handle exception |
| @@ -815,18 +906,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -815,18 +906,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 815 | } | 906 | } |
| 816 | 907 | ||
| 817 | @Override | 908 | @Override |
| 818 | - public List<Map<String, Object>> commandState(String line, String date, String code) { | 909 | + public List<Map<String, Object>> commandState(Map<String, Object> map) { |
| 819 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 910 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 820 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); | 911 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); |
| 821 | Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>(); | 912 | Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>(); |
| 822 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss"); | 913 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss"); |
| 914 | + | ||
| 915 | + String company = map.get("company").toString(); | ||
| 916 | + String subCompany = map.get("subCompany").toString(); | ||
| 917 | + String line = map.get("line").toString(); | ||
| 918 | + String date = map.get("date").toString(); | ||
| 919 | + String code = map.get("code").toString(); | ||
| 823 | 920 | ||
| 824 | if(date.length() == 0) | 921 | if(date.length() == 0) |
| 825 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | 922 | date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| 826 | 923 | ||
| 827 | try { | 924 | try { |
| 828 | 925 | ||
| 829 | - String sql = "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time " + | 926 | + String sql = |
| 927 | + "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time, r.gs_name, r.fgs_name " + | ||
| 830 | "FROM bsth_c_s_sp_info_real as r left join bsth_v_directive_60 as d on r.id = d.sch and d.is_dispatch = 1 where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; | 928 | "FROM bsth_c_s_sp_info_real as r left join bsth_v_directive_60 as d on r.id = d.sch and d.is_dispatch = 1 where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; |
| 831 | if(line.length() != 0){ | 929 | if(line.length() != 0){ |
| 832 | sql += " and xl_bm = '"+line+"'"; | 930 | sql += " and xl_bm = '"+line+"'"; |
| @@ -834,8 +932,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -834,8 +932,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 834 | if(code.length() != 0){ | 932 | if(code.length() != 0){ |
| 835 | sql += " and cl_zbh = '"+code+"'"; | 933 | sql += " and cl_zbh = '"+code+"'"; |
| 836 | } | 934 | } |
| 935 | + if(company.length() != 0){ | ||
| 936 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 937 | + } | ||
| 837 | sql += " union " + | 938 | sql += " union " + |
| 838 | - "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time " + | 939 | + "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time, r.gs_name, r.fgs_name " + |
| 839 | "FROM bsth_c_s_sp_info_real as r right join bsth_v_directive_60 as d on r.id = d.sch where d.is_dispatch = 1 and DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; | 940 | "FROM bsth_c_s_sp_info_real as r right join bsth_v_directive_60 as d on r.id = d.sch where d.is_dispatch = 1 and DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; |
| 840 | if(line.length() != 0){ | 941 | if(line.length() != 0){ |
| 841 | sql += " and xl_bm = '"+line+"'"; | 942 | sql += " and xl_bm = '"+line+"'"; |
| @@ -843,6 +944,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -843,6 +944,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 843 | if(code.length() != 0){ | 944 | if(code.length() != 0){ |
| 844 | sql += " and cl_zbh = '"+code+"'"; | 945 | sql += " and cl_zbh = '"+code+"'"; |
| 845 | } | 946 | } |
| 947 | + if(company.length() != 0){ | ||
| 948 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | ||
| 949 | + } | ||
| 846 | sql += " order by fcsj"; | 950 | sql += " order by fcsj"; |
| 847 | 951 | ||
| 848 | list = jdbcTemplate.query(sql, | 952 | list = jdbcTemplate.query(sql, |
| @@ -862,6 +966,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -862,6 +966,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 862 | map.put("reply47", rs.getString("reply47")); | 966 | map.put("reply47", rs.getString("reply47")); |
| 863 | map.put("reply46time", rs.getString("reply46time")); | 967 | map.put("reply46time", rs.getString("reply46time")); |
| 864 | map.put("reply47time", rs.getString("reply47time")); | 968 | map.put("reply47time", rs.getString("reply47time")); |
| 969 | + map.put("company", rs.getObject("gs_name")); | ||
| 970 | + map.put("subCompany", rs.getObject("fgs_name")); | ||
| 865 | return map; | 971 | return map; |
| 866 | } | 972 | } |
| 867 | }); | 973 | }); |
| @@ -871,38 +977,45 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | @@ -871,38 +977,45 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { | ||
| 871 | e.printStackTrace(); | 977 | e.printStackTrace(); |
| 872 | } | 978 | } |
| 873 | 979 | ||
| 874 | - for(Map<String, Object> map : list){ | ||
| 875 | - String key = map.get("line") + "/" + map.get("clZbh") + "/" + map.get("jGh") + "/" + map.get("jName"); | 980 | + for(Map<String, Object> m : list){ |
| 981 | + String key = m.get("line") + "/" + m.get("clZbh") + "/" + m.get("jGh") + "/" + m.get("jName"); | ||
| 876 | if(!keyMap.containsKey(key)) | 982 | if(!keyMap.containsKey(key)) |
| 877 | keyMap.put(key, new ArrayList<Map<String, Object>>()); | 983 | keyMap.put(key, new ArrayList<Map<String, Object>>()); |
| 878 | - keyMap.get(key).add(map); | 984 | + keyMap.get(key).add(m); |
| 879 | } | 985 | } |
| 880 | for(String key : keyMap.keySet()){ | 986 | for(String key : keyMap.keySet()){ |
| 881 | Map<String, Object> tempMap = new HashMap<String, Object>(); | 987 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 882 | Set<String> tempSet = new HashSet<String>(); | 988 | Set<String> tempSet = new HashSet<String>(); |
| 883 | int sjf = 0; | 989 | int sjf = 0; |
| 884 | int wqr = 0; | 990 | int wqr = 0; |
| 885 | - for(Map<String, Object> map : keyMap.get(key)){ | ||
| 886 | - tempSet.add(map.get("id").toString()); | ||
| 887 | - if(map.get("timestamp") != null){ | 991 | + String companyName = "", subCompanyName = ""; |
| 992 | + for(Map<String, Object> m : keyMap.get(key)){ | ||
| 993 | + if(m.containsKey("company") && m.get("company").toString().length()!=0 && companyName.length()==0) | ||
| 994 | + companyName = m.get("company").toString(); | ||
| 995 | + if(m.containsKey("subCompany") && m.get("subCompany").toString().length()!=0 && subCompanyName.length()==0) | ||
| 996 | + subCompanyName = m.get("subCompany").toString(); | ||
| 997 | + tempSet.add(m.get("id").toString()); | ||
| 998 | + if(m.get("timestamp") != null){ | ||
| 888 | sjf++; | 999 | sjf++; |
| 889 | - if(map.get("reply47").toString().equals("-1")) | 1000 | + if(m.get("reply47").toString().equals("-1")) |
| 890 | wqr++; | 1001 | wqr++; |
| 891 | - map.put("time", sdf.format(new Date(Long.valueOf(map.get("timestamp").toString())))); | 1002 | + m.put("time", sdf.format(new Date(Long.valueOf(m.get("timestamp").toString())))); |
| 892 | } else | 1003 | } else |
| 893 | - map.put("time", "/"); | 1004 | + m.put("time", "/"); |
| 894 | 1005 | ||
| 895 | - if(map.get("reply46time") != null) | ||
| 896 | - map.put("time46", sdf.format(new Date(Long.valueOf(map.get("reply46time").toString())))); | 1006 | + if(m.get("reply46time") != null) |
| 1007 | + m.put("time46", sdf.format(new Date(Long.valueOf(m.get("reply46time").toString())))); | ||
| 897 | else | 1008 | else |
| 898 | - map.put("time46", "/"); | 1009 | + m.put("time46", "/"); |
| 899 | 1010 | ||
| 900 | - if(map.get("reply47time") != null) | ||
| 901 | - map.put("time47", sdf.format(new Date(Long.valueOf(map.get("reply47time").toString())))); | 1011 | + if(m.get("reply47time") != null) |
| 1012 | + m.put("time47", sdf.format(new Date(Long.valueOf(m.get("reply47time").toString())))); | ||
| 902 | else | 1013 | else |
| 903 | - map.put("time47", "/"); | 1014 | + m.put("time47", "/"); |
| 904 | 1015 | ||
| 905 | } | 1016 | } |
| 1017 | + tempMap.put("company", companyName); | ||
| 1018 | + tempMap.put("subCompany", subCompanyName); | ||
| 906 | String[] split = key.split("/"); | 1019 | String[] split = key.split("/"); |
| 907 | tempMap.put("date", date); | 1020 | tempMap.put("date", date); |
| 908 | tempMap.put("line", split[0]); | 1021 | tempMap.put("line", split[0]); |
src/main/resources/static/pages/excep/offlineList.html
| @@ -223,6 +223,7 @@ $(function(){ | @@ -223,6 +223,7 @@ $(function(){ | ||
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | function showPagination(data){ | 225 | function showPagination(data){ |
| 226 | + console.log(data); | ||
| 226 | //分页 | 227 | //分页 |
| 227 | $('#pagination').jqPaginator({ | 228 | $('#pagination').jqPaginator({ |
| 228 | totalPages: data.totalPage, | 229 | totalPages: data.totalPage, |
| @@ -299,11 +300,4 @@ $(function(){ | @@ -299,11 +300,4 @@ $(function(){ | ||
| 299 | } | 300 | } |
| 300 | }); | 301 | }); |
| 301 | }); | 302 | }); |
| 302 | -//改变状态 | ||
| 303 | -function changeEnabled(id,enabled){ | ||
| 304 | - debugger | ||
| 305 | - $get('/user/changeEnabled',{id:id,enabled:enabled},function(result){ | ||
| 306 | - jsDoQuery(null, true); | ||
| 307 | - }) | ||
| 308 | -} | ||
| 309 | </script> | 303 | </script> |
| 310 | \ No newline at end of file | 304 | \ No newline at end of file |
src/main/resources/static/pages/forms/mould/allline.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/executionrate.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/turnoutrate.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/allline.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; | ||
| 14 | + text-align: center;} | ||
| 15 | + | ||
| 16 | + .table > tbody + tbody { | ||
| 17 | + border-top: 1px solid; } | ||
| 18 | + .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{ text-align: center; } | ||
| 19 | +.table-checkable tr > th:first-child, .table-checkable tr > td:first-child { | ||
| 20 | + text-align: center; | ||
| 21 | + max-width: initial; | ||
| 22 | + min-width: 40px; | ||
| 23 | + padding-left: 0; | ||
| 24 | + padding-right: 0; | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +</style> | ||
| 28 | + | ||
| 29 | +<div class="page-head"> | ||
| 30 | + <div class="page-title"> | ||
| 31 | + <h1>营运线路名称统计表</h1> | ||
| 32 | + </div> | ||
| 33 | +</div> | ||
| 34 | + | ||
| 35 | +<div class="row"> | ||
| 36 | + <div class="col-md-12"> | ||
| 37 | + <div class="portlet light porttlet-fit bordered"> | ||
| 38 | + <div class="portlet-title"> | ||
| 39 | + <form class="form-inline" action="" method="post"> | ||
| 40 | + <div style="display: inline-block;"> | ||
| 41 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 42 | + <select class="form-control" name="line" id="line" style="width: 120px;"></select> | ||
| 43 | + </div> | ||
| 44 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 45 | + <span class="item-label" style="width: 80px;">开始时间: </span> | ||
| 46 | + <input class="form-control" type="text" id="startDate" style="width: 120px;"/> | ||
| 47 | + </div> | ||
| 48 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 49 | + <span class="item-label" style="width: 80px;">结束时间: </span> | ||
| 50 | + <input class="form-control" type="text" id="endDate" style="width: 120px;"/> | ||
| 51 | + </div> | ||
| 52 | + <div class="form-group"> | ||
| 53 | + <input class="btn btn-default" type="button" id="query" value="筛选"/> | ||
| 54 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 55 | + </div> | ||
| 56 | + </form> | ||
| 57 | + </div> | ||
| 58 | + <div class="portlet-body"> | ||
| 59 | + <div class="table-container" style="margin-top: 20px;overflow:auto;min-width: 1000px"> | ||
| 60 | + <table class="table table-bordered table-hover table-checkable" id="forms1"> | ||
| 61 | + <thead> | ||
| 62 | + <tr> | ||
| 63 | + <th colspan="15">营运线路名称统计表</th> | ||
| 64 | + </tr> | ||
| 65 | + <tr> | ||
| 66 | + <td rowspan="2" style=" padding-top: 20px;">日期</td> | ||
| 67 | + <td rowspan="2" style=" padding-top: 20px;">公司</td> | ||
| 68 | + <td rowspan="2" style=" padding-top: 20px;">直属公司</td> | ||
| 69 | + <td rowspan="2" style=" padding-top: 20px;">线路名称</td> | ||
| 70 | + <td colspan="2">出车数</td> | ||
| 71 | + <td rowspan="2" >出车率</td> | ||
| 72 | + <td colspan="2" >班次数</td> | ||
| 73 | + <td rowspan="2" style=" padding-top: 20px;">班次执行率</td> | ||
| 74 | + <td rowspan="2" style=" padding-top: 20px;">说明</td> | ||
| 75 | + </tr> | ||
| 76 | + <tr> | ||
| 77 | + <td>计划</td> | ||
| 78 | + <td>实际</td> | ||
| 79 | + <td>计划</td> | ||
| 80 | + <td>实际</td> | ||
| 81 | + </tr> | ||
| 82 | + </thead> | ||
| 83 | + <tbody id="tbody"> | ||
| 84 | + | ||
| 85 | + </tbody> | ||
| 86 | + <tr> | ||
| 87 | + <td colspan="1">分类汇总</td> | ||
| 88 | + <td><span id="total_gs"> </span></td> | ||
| 89 | + <td><span id="total_zhgs"> </span></td> | ||
| 90 | + <td><span id="total_xlts"> </span></td> | ||
| 91 | + <td><span id="total_jh"> </span></td> | ||
| 92 | + <td><span id="total_sj"> </span></td> | ||
| 93 | + <td><span id="total_ccl"> </span></td> | ||
| 94 | + <td><span id="total_bcjh"> </span></td> | ||
| 95 | + <td><span id="total_bcsj"> </span></td> | ||
| 96 | + <td><span id="total_bczxl"> </span></td> | ||
| 97 | + <td><span id="total_sm"> </span></td> | ||
| 98 | + </tr> | ||
| 99 | + </table> | ||
| 100 | + </div> | ||
| 101 | + </div> | ||
| 102 | + </div> | ||
| 103 | + </div> | ||
| 104 | +</div> | ||
| 105 | + | ||
| 106 | +<script> | ||
| 107 | + $(function(){ | ||
| 108 | + // 关闭左侧栏 | ||
| 109 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 110 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 111 | + | ||
| 112 | + $("#startDate,#endDate").datetimepicker({ | ||
| 113 | + format : 'YYYY-MM-DD', | ||
| 114 | + locale : 'zh-cn' | ||
| 115 | + }); | ||
| 116 | + | ||
| 117 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 118 | + var data=[]; | ||
| 119 | + | ||
| 120 | + for(var code in result){ | ||
| 121 | + data.push({id: code, text: result[code]}); | ||
| 122 | + } | ||
| 123 | + initPinYinSelect2('#line',data,''); | ||
| 124 | + | ||
| 125 | + }) | ||
| 126 | + | ||
| 127 | + var line; | ||
| 128 | + var startDate; | ||
| 129 | + var endDate; | ||
| 130 | + $("#query").on("click",function(){ | ||
| 131 | + | ||
| 132 | + line = $("#line").val(); | ||
| 133 | + startDate1=$("#startDate").val(); | ||
| 134 | + endDate1=$("#endDate").val(); | ||
| 135 | + | ||
| 136 | + if(startDate1!=''&&endDate1!=''){ | ||
| 137 | + $post('/mcy_forms/allline',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ | ||
| 138 | + // 把数据填充到模版中 | ||
| 139 | + var tbodyHtml = template('allline',{list:result}); | ||
| 140 | + // 把渲染好的模版html文本追加到表格中 | ||
| 141 | + $('#tbody').html(tbodyHtml); | ||
| 142 | + line = $("#line").val(); | ||
| 143 | + startDate = $("#startDate").val(); | ||
| 144 | + endDate = $("#endDate").val(); | ||
| 145 | + $("#sDate").text(startDate); | ||
| 146 | + $("#eDate").text(endDate); | ||
| 147 | + | ||
| 148 | + var total_jh = 0; | ||
| 149 | + var total_sj = 0,total_ccl = 0,total_bcjh = 0; | ||
| 150 | + var total_bcjh = 0,total_bcsj = 0,total_bczxl = 0; | ||
| 151 | + var total_gs=0; | ||
| 152 | + var total_zhgs=0; | ||
| 153 | + $.each(result, function(i, obj) { | ||
| 154 | + total_gs +=Number(obj.gsgs); | ||
| 155 | + total_zhgs +=Number(obj.fgsgs); | ||
| 156 | + total_jh = Number(obj.cchjh)+Number(total_jh); | ||
| 157 | + total_sj = Number(obj.cchsj)+Number(total_sj); | ||
| 158 | + | ||
| 159 | + total_ccl =(Number(total_sj)/Number(total_jh))*100; | ||
| 160 | + total_bcjh = Number(obj.bcjh)+Number(total_bcjh); | ||
| 161 | + total_bcsj = Number(obj.bcsj)+Number(total_bcsj); | ||
| 162 | + total_bczxl = (Number(total_bcsj)/Number(total_bcjh))*100; | ||
| 163 | + | ||
| 164 | + }); | ||
| 165 | + $("#total_gs").text(total_gs); | ||
| 166 | + $("#total_zhgs").text(total_zhgs); | ||
| 167 | + $("#total_jh").text(total_jh); | ||
| 168 | + $("#total_sj").text(total_sj); | ||
| 169 | + $("#total_ccl").text(total_ccl.toFixed(2)+'%'); | ||
| 170 | + $("#total_bcjh").text(total_bcjh); | ||
| 171 | + $("#total_bcsj").text(total_bcsj); | ||
| 172 | + $("#total_bczxl").text(total_bczxl.toFixed(2)+'%'); | ||
| 173 | + | ||
| 174 | + var temp = {}; | ||
| 175 | + var today_account = 0; | ||
| 176 | + | ||
| 177 | + temp["line"] = $("#line").text(); | ||
| 178 | + $.each(result, function(i, obj) { | ||
| 179 | + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){ | ||
| 180 | + today_account++; | ||
| 181 | + } | ||
| 182 | + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | ||
| 183 | + }); | ||
| 184 | + | ||
| 185 | + }) | ||
| 186 | + | ||
| 187 | + }else{ | ||
| 188 | + alert("请选择时间范围!"); | ||
| 189 | + } | ||
| 190 | + }); | ||
| 191 | + | ||
| 192 | + $("#export").on("click",function(){ | ||
| 193 | + $post('/mcy_export/alllineExport',{line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){ | ||
| 194 | + window.open("/downloadFile/download?fileName=营运线路名称统计表"+moment(startDate).format("YYYYMMDD")); | ||
| 195 | + }); | ||
| 196 | + }); | ||
| 197 | + }); | ||
| 198 | +</script> | ||
| 199 | +<script type="text/html" id="allline"> | ||
| 200 | + {{each list as obj i}} | ||
| 201 | + <tr> | ||
| 202 | + <td>{{obj.rq}}</td> | ||
| 203 | + <td>{{obj.gs}}</td> | ||
| 204 | + <td>{{obj.zhgs}}</td> | ||
| 205 | + <td>{{obj.xl}}</td> | ||
| 206 | + <td>{{obj.cchjh}}</td> | ||
| 207 | + <td>{{obj.cchsj}}</td> | ||
| 208 | + <td>{{obj.chl}}</td> | ||
| 209 | + <td>{{obj.bcjh}}</td> | ||
| 210 | + <td>{{obj.bcsj}}</td> | ||
| 211 | + <td>{{obj.bbzxl}}</td> | ||
| 212 | + <td>{{obj.xl}}</td> | ||
| 213 | + </tr> | ||
| 214 | + {{/each}} | ||
| 215 | + {{if list.length == 0}} | ||
| 216 | + <tr> | ||
| 217 | + <td colspan="12"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 218 | + </tr> | ||
| 219 | + {{/if}} | ||
| 220 | +</script> |
src/main/resources/static/pages/forms/statement/busInterval.html
| @@ -29,16 +29,16 @@ | @@ -29,16 +29,16 @@ | ||
| 29 | <div class="portlet light porttlet-fit bordered"> | 29 | <div class="portlet light porttlet-fit bordered"> |
| 30 | <div class="portlet-title"> | 30 | <div class="portlet-title"> |
| 31 | <form id="history" class="form-inline" action=""> | 31 | <form id="history" class="form-inline" action=""> |
| 32 | - <div style="display: inline-block;"> | ||
| 33 | - <span class="item-label" style="width: 80px; margin-left: 33px">公司: </span> | 32 | + <div style="display: inline-block; margin-left: 33px;" id="company1"> |
| 33 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 34 | <select class="form-control" name="company" id="company" style="width: 180px;"></select> | 34 | <select class="form-control" name="company" id="company" style="width: 180px;"></select> |
| 35 | </div> | 35 | </div> |
| 36 | - <div style="display: inline-block;"> | ||
| 37 | - <span class="item-label" style="width: 80px; margin-left: 24px">分公司: </span> | 36 | + <div style="display: inline-block; margin-left: 24px;" id="subCompany1"> |
| 37 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 38 | <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select> | 38 | <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select> |
| 39 | </div> | 39 | </div> |
| 40 | - <div style="display: inline-block;"> | ||
| 41 | - <span class="item-label" style="width: 80px; margin-left: 24px">线路: </span> | 40 | + <div style="display: inline-block; margin-left: 24px;"> |
| 41 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 42 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 42 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 43 | </div> | 43 | </div> |
| 44 | <div style="display: inline-block; margin-left: 10px"> | 44 | <div style="display: inline-block; margin-left: 10px"> |
| @@ -128,13 +128,13 @@ | @@ -128,13 +128,13 @@ | ||
| 128 | var year = d.getFullYear(); | 128 | var year = d.getFullYear(); |
| 129 | var month = d.getMonth() + 1; | 129 | var month = d.getMonth() + 1; |
| 130 | var day = d.getDate(); | 130 | var day = d.getDate(); |
| 131 | - if(month > 9){ | ||
| 132 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 133 | - $("#endDate").val(year + "-" + month + "-" + day); | ||
| 134 | - } else { | ||
| 135 | - $("#startDate").val(year + "-0" + month + "-" + day); | ||
| 136 | - $("#endDate").val(year + "-0" + month + "-" + day); | ||
| 137 | - } | 131 | + if(month < 10) |
| 132 | + month = "0" + month; | ||
| 133 | + if(day < 10) | ||
| 134 | + day = "0" + day; | ||
| 135 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 136 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 137 | + | ||
| 138 | $("#times1").val("06:00"); | 138 | $("#times1").val("06:00"); |
| 139 | $("#times2").val("07:00"); | 139 | $("#times2").val("07:00"); |
| 140 | 140 | ||
| @@ -145,6 +145,11 @@ | @@ -145,6 +145,11 @@ | ||
| 145 | for(var i = 0; i < obj.length; i++){ | 145 | for(var i = 0; i < obj.length; i++){ |
| 146 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | 146 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; |
| 147 | } | 147 | } |
| 148 | + if(obj.length == 1){ | ||
| 149 | + $('#company1').hide(); | ||
| 150 | + if(obj[0].children.length == 1) | ||
| 151 | + $('#subCompany1').hide(); | ||
| 152 | + } | ||
| 148 | $('#company').html(options); | 153 | $('#company').html(options); |
| 149 | updateCompany(); | 154 | updateCompany(); |
| 150 | }); | 155 | }); |
| @@ -222,6 +227,8 @@ | @@ -222,6 +227,8 @@ | ||
| 222 | var endDate = $("#endDate").val(); | 227 | var endDate = $("#endDate").val(); |
| 223 | var model = $("#model").val(); | 228 | var model = $("#model").val(); |
| 224 | var times = $("#times1").val() + "-" + $("#times2").val(); | 229 | var times = $("#times1").val() + "-" + $("#times2").val(); |
| 230 | + var company = $("#company").val(); | ||
| 231 | + var subCompany = $("#subCompany").val(); | ||
| 225 | function jsDoQuery(pagination){ | 232 | function jsDoQuery(pagination){ |
| 226 | var params = {}; | 233 | var params = {}; |
| 227 | // line = $("#line").val(); | 234 | // line = $("#line").val(); |
| @@ -229,11 +236,15 @@ | @@ -229,11 +236,15 @@ | ||
| 229 | endDate = $("#endDate").val(); | 236 | endDate = $("#endDate").val(); |
| 230 | model = $("#model").val(); | 237 | model = $("#model").val(); |
| 231 | times = $("#times1").val() + "-" + $("#times2").val(); | 238 | times = $("#times1").val() + "-" + $("#times2").val(); |
| 239 | + company = $("#company").val(); | ||
| 240 | + subCompany = $("#subCompany").val(); | ||
| 232 | params['line'] = line; | 241 | params['line'] = line; |
| 233 | params['startDate'] = startDate; | 242 | params['startDate'] = startDate; |
| 234 | params['endDate'] = endDate; | 243 | params['endDate'] = endDate; |
| 235 | params['model'] = model; | 244 | params['model'] = model; |
| 236 | params['times'] = times; | 245 | params['times'] = times; |
| 246 | + params['company'] = company; | ||
| 247 | + params['subCompany'] = subCompany; | ||
| 237 | params['type'] = "query"; | 248 | params['type'] = "query"; |
| 238 | $(".hidden").removeClass("hidden"); | 249 | $(".hidden").removeClass("hidden"); |
| 239 | $get('/busInterval/interval', params, function(result){ | 250 | $get('/busInterval/interval', params, function(result){ |
src/main/resources/static/pages/forms/statement/changetochange.html
src/main/resources/static/pages/forms/statement/commandState.html
| @@ -27,19 +27,28 @@ | @@ -27,19 +27,28 @@ | ||
| 27 | <div class="portlet light porttlet-fit bordered"> | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | <div class="portlet-title"> | 28 | <div class="portlet-title"> |
| 29 | <form id="history" class="form-inline" action=""> | 29 | <form id="history" class="form-inline" action=""> |
| 30 | - <div style="display: inline-block;"> | 30 | + <div style="display: inline-block; margin-left: 15px;" id="company1"> |
| 31 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 32 | + <select class="form-control" name="company" id="company" style="width: 180px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block; margin-left: 22px;" id="subCompany1"> | ||
| 35 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 36 | + <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select> | ||
| 37 | + </div> | ||
| 38 | + <div style="display: inline-block; margin-left: 15px;"> | ||
| 31 | <span class="item-label" style="width: 80px;">线路: </span> | 39 | <span class="item-label" style="width: 80px;">线路: </span> |
| 32 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 40 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 33 | </div> | 41 | </div> |
| 42 | + <div style="margin-top: 10px" /> | ||
| 34 | <div style="display: inline-block;margin-left: 15px;"> | 43 | <div style="display: inline-block;margin-left: 15px;"> |
| 35 | <span class="item-label" style="width: 80px;">时间: </span> | 44 | <span class="item-label" style="width: 80px;">时间: </span> |
| 36 | <input class="form-control" type="text" id="date" style="width: 180px;"/> | 45 | <input class="form-control" type="text" id="date" style="width: 180px;"/> |
| 37 | </div> | 46 | </div> |
| 38 | - <div style="display: inline-block;margin-left: 15px"> | ||
| 39 | - <span class="item-label" style="width: 140px;">内部编码: </span> | 47 | + <div style="display: inline-block;margin-left: 8px"> |
| 48 | + <span class="item-label" style="width: 140px;">内部编码: </span> | ||
| 40 | <select class="form-control" name="code" id="code" style="width: 180px;"></select> | 49 | <select class="form-control" name="code" id="code" style="width: 180px;"></select> |
| 41 | </div> | 50 | </div> |
| 42 | - <div class="form-group"> | 51 | + <div class="form-group" style="margin-left: 9px"> |
| 43 | <input class="btn btn-default" type="button" id="query" value="筛选"/> | 52 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| 44 | <!-- <input class="btn btn-default" type="button" id="export" value="导出"/> --> | 53 | <!-- <input class="btn btn-default" type="button" id="export" value="导出"/> --> |
| 45 | </div> | 54 | </div> |
| @@ -51,6 +60,8 @@ | @@ -51,6 +60,8 @@ | ||
| 51 | <thead> | 60 | <thead> |
| 52 | <tr class="hidden"> | 61 | <tr class="hidden"> |
| 53 | <th>日期</th> | 62 | <th>日期</th> |
| 63 | + <th>公司</th> | ||
| 64 | + <th>分公司</th> | ||
| 54 | <th>线路</th> | 65 | <th>线路</th> |
| 55 | <th>车辆</th> | 66 | <th>车辆</th> |
| 56 | <th>人员</th> | 67 | <th>人员</th> |
| @@ -64,7 +75,7 @@ | @@ -64,7 +75,7 @@ | ||
| 64 | </tbody> | 75 | </tbody> |
| 65 | </table> | 76 | </table> |
| 66 | <div id="works_hidden" class="hidden"> | 77 | <div id="works_hidden" class="hidden"> |
| 67 | - <span class="item-label" style="width: 80px;">明细: </span> | 78 | + <span class="item-label" style="width: 80px;margin-left: 20px;">明细: </span> |
| 68 | <span class="item-label" style="width: 80px;margin-left: 60px;">日期 </span> | 79 | <span class="item-label" style="width: 80px;margin-left: 60px;">日期 </span> |
| 69 | <span class="item-label" style="width: 80px;" id="date1"></span> | 80 | <span class="item-label" style="width: 80px;" id="date1"></span> |
| 70 | <span class="item-label" style="width: 80px;margin-left: 60px;">线路 </span> | 81 | <span class="item-label" style="width: 80px;margin-left: 60px;">线路 </span> |
| @@ -116,22 +127,54 @@ | @@ -116,22 +127,54 @@ | ||
| 116 | var year = d.getFullYear(); | 127 | var year = d.getFullYear(); |
| 117 | var month = d.getMonth() + 1; | 128 | var month = d.getMonth() + 1; |
| 118 | var day = d.getDate(); | 129 | var day = d.getDate(); |
| 119 | - if(month > 9){ | ||
| 120 | - $("#date").val(year + "-" + month + "-" + day); | ||
| 121 | - } else { | ||
| 122 | - $("#date").val(year + "-0" + month + "-" + day); | ||
| 123 | - } | 130 | + if(month < 10) |
| 131 | + month = "0" + month; | ||
| 132 | + if(day < 10) | ||
| 133 | + day = "0" + day; | ||
| 134 | + $("#date").val(year + "-" + month + "-" + day); | ||
| 124 | 135 | ||
| 125 | $.get('/basic/lineCode2Name',function(result){ | 136 | $.get('/basic/lineCode2Name',function(result){ |
| 126 | var data=[]; | 137 | var data=[]; |
| 127 | 138 | ||
| 139 | + data.push({id: "", text: "全部线路"}); | ||
| 128 | for(var code in result){ | 140 | for(var code in result){ |
| 129 | data.push({id: code, text: result[code]}); | 141 | data.push({id: code, text: result[code]}); |
| 130 | } | 142 | } |
| 143 | + | ||
| 131 | console.log(data); | 144 | console.log(data); |
| 132 | initPinYinSelect2('#line',data,''); | 145 | initPinYinSelect2('#line',data,''); |
| 133 | }) | 146 | }) |
| 134 | 147 | ||
| 148 | + var obj = []; | ||
| 149 | + $.get('/user/companyData', function(result){ | ||
| 150 | + obj = result; | ||
| 151 | + var options = ''; | ||
| 152 | + for(var i = 0; i < obj.length; i++){ | ||
| 153 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 154 | + } | ||
| 155 | + if(obj.length == 1){ | ||
| 156 | + $('#company1').hide(); | ||
| 157 | + if(obj[0].children.length == 1) | ||
| 158 | + $('#subCompany1').hide(); | ||
| 159 | + } | ||
| 160 | + $('#company').html(options); | ||
| 161 | + updateCompany(); | ||
| 162 | + }); | ||
| 163 | + $("#company").on("change",updateCompany); | ||
| 164 | + function updateCompany(){ | ||
| 165 | + var company = $('#company').val(); | ||
| 166 | + var options = ''; | ||
| 167 | + for(var i = 0; i < obj.length; i++){ | ||
| 168 | + if(obj[i].companyCode == company){ | ||
| 169 | + var children = obj[i].children; | ||
| 170 | + for(var j = 0; j < children.length; j++){ | ||
| 171 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 172 | + } | ||
| 173 | + } | ||
| 174 | + } | ||
| 175 | + $('#subCompany').html(options); | ||
| 176 | + } | ||
| 177 | + | ||
| 135 | $('#code').select2({ | 178 | $('#code').select2({ |
| 136 | ajax: { | 179 | ajax: { |
| 137 | url: '/realSchedule/sreachVehic', | 180 | url: '/realSchedule/sreachVehic', |
| @@ -176,9 +219,14 @@ | @@ -176,9 +219,14 @@ | ||
| 176 | 219 | ||
| 177 | function jsDoQuery(pagination){ | 220 | function jsDoQuery(pagination){ |
| 178 | var params = {}; | 221 | var params = {}; |
| 179 | - params['line'] = $("#line").val(); | 222 | + var line = $("#line").val(); |
| 223 | + if(line = " ") | ||
| 224 | + line = ""; | ||
| 225 | + params['line'] = line; | ||
| 180 | params['date'] = $("#date").val(); | 226 | params['date'] = $("#date").val(); |
| 181 | params['code'] = $("#code").val(); | 227 | params['code'] = $("#code").val(); |
| 228 | + params['company'] = $("#company").val(); | ||
| 229 | + params['subCompany'] = $("#subCompany").val(); | ||
| 182 | $("#forms .hidden").removeClass("hidden"); | 230 | $("#forms .hidden").removeClass("hidden"); |
| 183 | $get('/pcpc/commandState', params, function(result){ | 231 | $get('/pcpc/commandState', params, function(result){ |
| 184 | // 把数据填充到模版中 | 232 | // 把数据填充到模版中 |
| @@ -221,6 +269,8 @@ | @@ -221,6 +269,8 @@ | ||
| 221 | {{each list as obj i}} | 269 | {{each list as obj i}} |
| 222 | <tr> | 270 | <tr> |
| 223 | <td>{{obj.date}}</td> | 271 | <td>{{obj.date}}</td> |
| 272 | + <td>{{obj.company}}</td> | ||
| 273 | + <td>{{obj.subCompany}}</td> | ||
| 224 | <td>{{obj.line}}</td> | 274 | <td>{{obj.line}}</td> |
| 225 | <td>{{obj.clZbh}}</td> | 275 | <td>{{obj.clZbh}}</td> |
| 226 | <td><a id="jsy">{{obj.jsy}}</a></td> | 276 | <td><a id="jsy">{{obj.jsy}}</a></td> |
| @@ -231,7 +281,7 @@ | @@ -231,7 +281,7 @@ | ||
| 231 | {{/each}} | 281 | {{/each}} |
| 232 | {{if list.length == 0}} | 282 | {{if list.length == 0}} |
| 233 | <tr> | 283 | <tr> |
| 234 | - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | 284 | + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td> |
| 235 | </tr> | 285 | </tr> |
| 236 | {{/if}} | 286 | {{/if}} |
| 237 | </script> | 287 | </script> |
src/main/resources/static/pages/forms/statement/correctStatis.html
| @@ -101,7 +101,6 @@ | @@ -101,7 +101,6 @@ | ||
| 101 | <script> | 101 | <script> |
| 102 | $(function(){ | 102 | $(function(){ |
| 103 | 103 | ||
| 104 | - | ||
| 105 | // 关闭左侧栏 | 104 | // 关闭左侧栏 |
| 106 | if (!$('body').hasClass('page-sidebar-closed')) | 105 | if (!$('body').hasClass('page-sidebar-closed')) |
| 107 | $('.menu-toggler.sidebar-toggler').click(); | 106 | $('.menu-toggler.sidebar-toggler').click(); |
| @@ -127,13 +126,13 @@ | @@ -127,13 +126,13 @@ | ||
| 127 | var year = d.getFullYear(); | 126 | var year = d.getFullYear(); |
| 128 | var month = d.getMonth() + 1; | 127 | var month = d.getMonth() + 1; |
| 129 | var day = d.getDate(); | 128 | var day = d.getDate(); |
| 130 | - if(month > 9){ | ||
| 131 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 132 | - $("#endDate").val(year + "-" + month + "-" + day); | ||
| 133 | - } else { | ||
| 134 | - $("#startDate").val(year + "-0" + month + "-" + day); | ||
| 135 | - $("#endDate").val(year + "-0" + month + "-" + day); | ||
| 136 | - } | 129 | + if(month < 10) |
| 130 | + month = "0" + month; | ||
| 131 | + if(day < 10) | ||
| 132 | + day = "0" + day; | ||
| 133 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 134 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 135 | + | ||
| 137 | $("#times1").val("06:00"); | 136 | $("#times1").val("06:00"); |
| 138 | $("#times2").val("07:00"); | 137 | $("#times2").val("07:00"); |
| 139 | 138 | ||
| @@ -166,7 +165,6 @@ | @@ -166,7 +165,6 @@ | ||
| 166 | $('#company').html(options); | 165 | $('#company').html(options); |
| 167 | updateCompany(); | 166 | updateCompany(); |
| 168 | }); | 167 | }); |
| 169 | - | ||
| 170 | $("#company").on("change",updateCompany); | 168 | $("#company").on("change",updateCompany); |
| 171 | function updateCompany(){ | 169 | function updateCompany(){ |
| 172 | var company = $('#company').val(); | 170 | var company = $('#company').val(); |
| @@ -185,8 +183,8 @@ | @@ -185,8 +183,8 @@ | ||
| 185 | 183 | ||
| 186 | $("#query").on("click",jsDoQuery); | 184 | $("#query").on("click",jsDoQuery); |
| 187 | 185 | ||
| 188 | - var company; | ||
| 189 | - var subCompany; | 186 | + var company = $("#company").val(); |
| 187 | + var subCompany = $("#subCompany").val(); | ||
| 190 | var lines; | 188 | var lines; |
| 191 | var line = $("#line").val(); | 189 | var line = $("#line").val(); |
| 192 | var startDate = $("#startDate").val(); | 190 | var startDate = $("#startDate").val(); |
| @@ -198,10 +196,14 @@ | @@ -198,10 +196,14 @@ | ||
| 198 | startDate = $("#startDate").val(); | 196 | startDate = $("#startDate").val(); |
| 199 | endDate = $("#endDate").val(); | 197 | endDate = $("#endDate").val(); |
| 200 | times = $("#times1").val() + "-" + $("#times2").val(); | 198 | times = $("#times1").val() + "-" + $("#times2").val(); |
| 199 | + company = $("#company").val(); | ||
| 200 | + subCompany = $("#subCompany").val(); | ||
| 201 | params['line'] = line; | 201 | params['line'] = line; |
| 202 | params['startDate'] = startDate; | 202 | params['startDate'] = startDate; |
| 203 | params['endDate'] = endDate; | 203 | params['endDate'] = endDate; |
| 204 | params['times'] = times; | 204 | params['times'] = times; |
| 205 | + params['company'] = company; | ||
| 206 | + params['subCompany'] = subCompany; | ||
| 205 | params['type'] = "query"; | 207 | params['type'] = "query"; |
| 206 | // $(".hidden").removeClass("hidden"); | 208 | // $(".hidden").removeClass("hidden"); |
| 207 | $get('/busInterval/correctStatis', params, function(result){ | 209 | $get('/busInterval/correctStatis', params, function(result){ |
src/main/resources/static/pages/forms/statement/executionrate.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; | ||
| 14 | + text-align: center;} | ||
| 15 | + | ||
| 16 | + .table > tbody + tbody { | ||
| 17 | + border-top: 1px solid; } | ||
| 18 | + .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{ text-align: center; } | ||
| 19 | +.table-checkable tr > th:first-child, .table-checkable tr > td:first-child { | ||
| 20 | + text-align: center; | ||
| 21 | + max-width: initial; | ||
| 22 | + min-width: 40px; | ||
| 23 | + padding-left: 0; | ||
| 24 | + padding-right: 0; | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +</style> | ||
| 28 | + | ||
| 29 | +<div class="page-head"> | ||
| 30 | + <div class="page-title"> | ||
| 31 | + <h1>班次执行率统计表</h1> | ||
| 32 | + </div> | ||
| 33 | +</div> | ||
| 34 | + | ||
| 35 | +<div class="row"> | ||
| 36 | + <div class="col-md-12"> | ||
| 37 | + <div class="portlet light porttlet-fit bordered"> | ||
| 38 | + <div class="portlet-title"> | ||
| 39 | + <form class="form-inline" action="" method="post"> | ||
| 40 | + <div style="display: inline-block;"> | ||
| 41 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 42 | + <select class="form-control" name="line" id="line" style="width: 120px;"></select> | ||
| 43 | + </div> | ||
| 44 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 45 | + <span class="item-label" style="width: 80px;">开始时间: </span> | ||
| 46 | + <input class="form-control" type="text" id="startDate" style="width: 120px;"/> | ||
| 47 | + </div> | ||
| 48 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 49 | + <span class="item-label" style="width: 80px;">结束时间: </span> | ||
| 50 | + <input class="form-control" type="text" id="endDate" style="width: 120px;"/> | ||
| 51 | + </div> | ||
| 52 | + <div class="form-group"> | ||
| 53 | + <input class="btn btn-default" type="button" id="query" value="筛选"/> | ||
| 54 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 55 | + </div> | ||
| 56 | + </form> | ||
| 57 | + </div> | ||
| 58 | + <div class="portlet-body"> | ||
| 59 | + <div class="table-container" style="margin-top: 20px;overflow:auto;min-width: 1000px"> | ||
| 60 | + <table class="table table-bordered table-hover table-checkable" id="forms1"> | ||
| 61 | + <thead> | ||
| 62 | + <tr> | ||
| 63 | + <th colspan="11">班次执行率统计表</th> | ||
| 64 | + </tr> | ||
| 65 | + <tr> | ||
| 66 | + <td rowspan="2" style=" padding-top: 20px;">日期</td> | ||
| 67 | + <td rowspan="2" style=" padding-top: 20px;">公司</td> | ||
| 68 | + <td rowspan="2" style=" padding-top: 20px;">直属公司</td> | ||
| 69 | + <td rowspan="2" style=" padding-top: 20px;">线路条数</td> | ||
| 70 | + <td colspan="2">出车数</td> | ||
| 71 | + <td rowspan="2" >出车率</td> | ||
| 72 | + <td colspan="2" >班次数</td> | ||
| 73 | + <td rowspan="2" style=" padding-top: 20px;">班次执行率</td> | ||
| 74 | + <td rowspan="2" style=" padding-top: 20px;">说明</td> | ||
| 75 | + </tr> | ||
| 76 | + <tr> | ||
| 77 | + <td>计划</td> | ||
| 78 | + <td>实际</td> | ||
| 79 | + <td>计划</td> | ||
| 80 | + <td>实际</td> | ||
| 81 | + </tr> | ||
| 82 | + </thead> | ||
| 83 | + <tbody id="tbody"> | ||
| 84 | + | ||
| 85 | + </tbody> | ||
| 86 | + <tr> | ||
| 87 | + <td colspan="1">分类汇总</td> | ||
| 88 | + <td><span id="total_gs"> </span></td> | ||
| 89 | + <td><span id="total_zhgs"> </span></td> | ||
| 90 | + <td><span id="total_xlts"> </span></td> | ||
| 91 | + <td><span id="total_jh"> </span></td> | ||
| 92 | + <td><span id="total_sj"> </span></td> | ||
| 93 | + <td><span id="total_ccl"> </span></td> | ||
| 94 | + <td><span id="total_bcjh"> </span></td> | ||
| 95 | + <td><span id="total_bcsj"> </span></td> | ||
| 96 | + <td><span id="total_bczxl"> </span></td> | ||
| 97 | + <td><span id="total_sm"> </span></td> | ||
| 98 | + </tr> | ||
| 99 | + </table> | ||
| 100 | + </div> | ||
| 101 | + </div> | ||
| 102 | + </div> | ||
| 103 | + </div> | ||
| 104 | +</div> | ||
| 105 | + | ||
| 106 | +<script> | ||
| 107 | + $(function(){ | ||
| 108 | + // 关闭左侧栏 | ||
| 109 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 110 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 111 | + | ||
| 112 | + $("#startDate,#endDate").datetimepicker({ | ||
| 113 | + format : 'YYYY-MM-DD', | ||
| 114 | + locale : 'zh-cn' | ||
| 115 | + }); | ||
| 116 | + | ||
| 117 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 118 | + var data=[]; | ||
| 119 | + | ||
| 120 | + for(var code in result){ | ||
| 121 | + data.push({id: code, text: result[code]}); | ||
| 122 | + } | ||
| 123 | + initPinYinSelect2('#line',data,''); | ||
| 124 | + | ||
| 125 | + }) | ||
| 126 | + | ||
| 127 | + var line; | ||
| 128 | + var startDate; | ||
| 129 | + var endDate; | ||
| 130 | + $("#query").on("click",function(){ | ||
| 131 | + | ||
| 132 | + line = $("#line").val(); | ||
| 133 | + startDate1=$("#startDate").val(); | ||
| 134 | + endDate1=$("#endDate").val(); | ||
| 135 | + | ||
| 136 | + if(startDate1!=''&&endDate1!=''){ | ||
| 137 | + $post('/mcy_forms/executionrate',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ | ||
| 138 | + // 把数据填充到模版中 | ||
| 139 | + var tbodyHtml = template('executionrate',{list:result}); | ||
| 140 | + // 把渲染好的模版html文本追加到表格中 | ||
| 141 | + $('#tbody').html(tbodyHtml); | ||
| 142 | + line = $("#line").val(); | ||
| 143 | + startDate = $("#startDate").val(); | ||
| 144 | + endDate = $("#endDate").val(); | ||
| 145 | + $("#sDate").text(startDate); | ||
| 146 | + $("#eDate").text(endDate); | ||
| 147 | + | ||
| 148 | + var total_xlts = 0,total_jh = 0; | ||
| 149 | + var total_sj = 0,total_ccl = 0,total_bcjh = 0; | ||
| 150 | + var total_bcjh = 0,total_bcsj = 0,total_bczxl = 0; | ||
| 151 | + var total_gs=0; | ||
| 152 | + var total_zhgs=0; | ||
| 153 | + $.each(result, function(i, obj) { | ||
| 154 | + total_gs +=Number(obj.gsgs); | ||
| 155 | + total_zhgs +=Number(obj.fgsgs); | ||
| 156 | + total_xlts += Number(obj.xl); | ||
| 157 | + total_jh = Number(obj.cchjh)+Number(total_jh); | ||
| 158 | + total_sj = Number(obj.cchsj)+Number(total_sj); | ||
| 159 | + | ||
| 160 | + total_ccl =(Number(total_sj)/Number(total_jh))*100; | ||
| 161 | + total_bcjh = Number(obj.bcjh)+Number(total_bcjh); | ||
| 162 | + total_bcsj = Number(obj.bcsj)+Number(total_bcsj); | ||
| 163 | + total_bczxl = (Number(total_bcsj)/Number(total_bcjh))*100; | ||
| 164 | + | ||
| 165 | + }); | ||
| 166 | + $("#total_gs").text(total_gs); | ||
| 167 | + $("#total_zhgs").text(total_zhgs); | ||
| 168 | + $("#total_xlts").text(total_xlts); | ||
| 169 | + $("#total_jh").text(total_jh); | ||
| 170 | + $("#total_sj").text(total_sj); | ||
| 171 | + $("#total_ccl").text(total_ccl.toFixed(2)+'%'); | ||
| 172 | + $("#total_bcjh").text(total_bcjh); | ||
| 173 | + $("#total_bcsj").text(total_bcsj); | ||
| 174 | + $("#total_bczxl").text(total_bczxl.toFixed(2)+'%'); | ||
| 175 | + | ||
| 176 | + var temp = {}; | ||
| 177 | + var today_account = 0; | ||
| 178 | + | ||
| 179 | + temp["line"] = $("#line").text(); | ||
| 180 | + $.each(result, function(i, obj) { | ||
| 181 | + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){ | ||
| 182 | + today_account++; | ||
| 183 | + } | ||
| 184 | + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | ||
| 185 | + }); | ||
| 186 | + | ||
| 187 | + }) | ||
| 188 | + | ||
| 189 | + }else{ | ||
| 190 | + alert("请选择时间范围!"); | ||
| 191 | + } | ||
| 192 | + }); | ||
| 193 | + | ||
| 194 | + $("#export").on("click",function(){ | ||
| 195 | + $post('/mcy_export/executionrateExport',{line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){ | ||
| 196 | + window.open("/downloadFile/download?fileName=班次执行率统计表"+moment(startDate).format("YYYYMMDD")); | ||
| 197 | + }); | ||
| 198 | + }); | ||
| 199 | + }); | ||
| 200 | +</script> | ||
| 201 | +<script type="text/html" id="executionrate"> | ||
| 202 | + {{each list as obj i}} | ||
| 203 | + <tr> | ||
| 204 | + <td>{{obj.rq}}</td> | ||
| 205 | + <td>{{obj.gs}}</td> | ||
| 206 | + <td>{{obj.zhgs}}</td> | ||
| 207 | + <td>{{obj.xl}}</td> | ||
| 208 | + <td>{{obj.cchjh}}</td> | ||
| 209 | + <td>{{obj.cchsj}}</td> | ||
| 210 | + <td>{{obj.chl}}</td> | ||
| 211 | + <td>{{obj.bcjh}}</td> | ||
| 212 | + <td>{{obj.bcsj}}</td> | ||
| 213 | + <td>{{obj.bbzxl}}</td> | ||
| 214 | + <td>{{obj.sm}}</td> | ||
| 215 | + </tr> | ||
| 216 | + {{/each}} | ||
| 217 | + {{if list.length == 0}} | ||
| 218 | + <tr> | ||
| 219 | + <td colspan="11"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 220 | + </tr> | ||
| 221 | + {{/if}} | ||
| 222 | +</script> |
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
| @@ -27,19 +27,19 @@ | @@ -27,19 +27,19 @@ | ||
| 27 | <div class="portlet light porttlet-fit bordered"> | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | <div class="portlet-title"> | 28 | <div class="portlet-title"> |
| 29 | <form id="history" class="form-inline" action=""> | 29 | <form id="history" class="form-inline" action=""> |
| 30 | - <div style="display: inline-block;margin-left: 10px;"> | 30 | + <div style="display: inline-block;margin-left: 10px;" id="company1"> |
| 31 | <span class="item-label" style="width: 80px;">公司: </span> | 31 | <span class="item-label" style="width: 80px;">公司: </span> |
| 32 | <select class="form-control" name="company" id="company" style="width: 160px;"></select> | 32 | <select class="form-control" name="company" id="company" style="width: 160px;"></select> |
| 33 | </div> | 33 | </div> |
| 34 | - <div style="display: inline-block;margin-left: 15px;"> | 34 | + <div style="display: inline-block;margin-left: 10px;" id="subCompany1"> |
| 35 | <span class="item-label" style="width: 80px;">分公司: </span> | 35 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 36 | <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> | 36 | <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> |
| 37 | </div> | 37 | </div> |
| 38 | - <div style="display: inline-block;margin-left: 15px;"> | 38 | + <div style="display: inline-block;margin-left: 10px;"> |
| 39 | <span class="item-label" style="width: 80px;">线路: </span> | 39 | <span class="item-label" style="width: 80px;">线路: </span> |
| 40 | <select class="form-control" name="line" id="line" style="width: 160px;"></select> | 40 | <select class="form-control" name="line" id="line" style="width: 160px;"></select> |
| 41 | </div> | 41 | </div> |
| 42 | - <div style="display: inline-block;margin-left: 15px;"> | 42 | + <div style="display: inline-block;margin-left: 10px;"> |
| 43 | <span class="item-label" style="width: 80px;">时间: </span> | 43 | <span class="item-label" style="width: 80px;">时间: </span> |
| 44 | <input class="form-control" type="text" id="date" style="width: 160px;"/> | 44 | <input class="form-control" type="text" id="date" style="width: 160px;"/> |
| 45 | </div> | 45 | </div> |
| @@ -111,15 +111,16 @@ | @@ -111,15 +111,16 @@ | ||
| 111 | var year = d.getFullYear(); | 111 | var year = d.getFullYear(); |
| 112 | var month = d.getMonth() + 1; | 112 | var month = d.getMonth() + 1; |
| 113 | var day = d.getDate(); | 113 | var day = d.getDate(); |
| 114 | - if(month > 9){ | ||
| 115 | - $("#date").val(year + "-" + month + "-" + day); | ||
| 116 | - } else { | ||
| 117 | - $("#date").val(year + "-0" + month + "-" + day); | ||
| 118 | - } | 114 | + if(month < 10) |
| 115 | + month = "0" + month; | ||
| 116 | + if(day < 10) | ||
| 117 | + day = "0" + day; | ||
| 118 | + $("#date").val(year + "-" + month + "-" + day); | ||
| 119 | 119 | ||
| 120 | $.get('/basic/lineCode2Name',function(result){ | 120 | $.get('/basic/lineCode2Name',function(result){ |
| 121 | var data=[]; | 121 | var data=[]; |
| 122 | 122 | ||
| 123 | + data.push({id: " ", text: "全部线路"}); | ||
| 123 | for(var code in result){ | 124 | for(var code in result){ |
| 124 | data.push({id: code, text: result[code]}); | 125 | data.push({id: code, text: result[code]}); |
| 125 | } | 126 | } |
| @@ -134,6 +135,11 @@ | @@ -134,6 +135,11 @@ | ||
| 134 | for(var i = 0; i < obj.length; i++){ | 135 | for(var i = 0; i < obj.length; i++){ |
| 135 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | 136 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; |
| 136 | } | 137 | } |
| 138 | + if(obj.length == 1){ | ||
| 139 | + $('#company1').hide(); | ||
| 140 | + if(obj[0].children.length == 1) | ||
| 141 | + $('#subCompany1').hide(); | ||
| 142 | + } | ||
| 137 | $('#company').html(options); | 143 | $('#company').html(options); |
| 138 | updateCompany(); | 144 | updateCompany(); |
| 139 | }); | 145 | }); |
| @@ -155,12 +161,21 @@ | @@ -155,12 +161,21 @@ | ||
| 155 | 161 | ||
| 156 | $("#query").on("click",jsDoQuery); | 162 | $("#query").on("click",jsDoQuery); |
| 157 | 163 | ||
| 164 | + var company = $("#company").val(); | ||
| 165 | + var subCompany = $("#subCompany").val(); | ||
| 158 | var line = $("#line").val(); | 166 | var line = $("#line").val(); |
| 159 | var date = $("#date").val(); | 167 | var date = $("#date").val(); |
| 160 | function jsDoQuery(pagination){ | 168 | function jsDoQuery(pagination){ |
| 161 | var params = {}; | 169 | var params = {}; |
| 170 | + company = $("#company").val(); | ||
| 171 | + subCompany = $("#subCompany").val(); | ||
| 162 | line = $("#line").val(); | 172 | line = $("#line").val(); |
| 163 | date = $("#date").val(); | 173 | date = $("#date").val(); |
| 174 | + if(line == " ") | ||
| 175 | + line = ""; | ||
| 176 | + params['company'] = company; | ||
| 177 | + params['subCompany'] = subCompany; | ||
| 178 | + params['line'] = line; | ||
| 164 | params['line'] = line; | 179 | params['line'] = line; |
| 165 | params['date'] = date; | 180 | params['date'] = date; |
| 166 | params['type'] = "query"; | 181 | params['type'] = "query"; |
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
| @@ -45,16 +45,16 @@ | @@ -45,16 +45,16 @@ | ||
| 45 | <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="10" checked="true"/>其他 | 45 | <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="10" checked="true"/>其他 |
| 46 | </div> | 46 | </div> |
| 47 | <div style="margin-top: 5px"></div> | 47 | <div style="margin-top: 5px"></div> |
| 48 | - <div style="display: inline-block;"> | ||
| 49 | - <span class="item-label" style="width: 80px; margin-left: 33px">公司: </span> | 48 | + <div style="display: inline-block; margin-left: 33px;" id="company1"> |
| 49 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 50 | <select class="form-control" name="company" id="company" style="width: 140px;"></select> | 50 | <select class="form-control" name="company" id="company" style="width: 140px;"></select> |
| 51 | </div> | 51 | </div> |
| 52 | - <div style="display: inline-block;"> | ||
| 53 | - <span class="item-label" style="width: 80px; margin-left: 24px">分公司: </span> | 52 | + <div style="display: inline-block; margin-left: 24px;" id="subCompany1"> |
| 53 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 54 | <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> | 54 | <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> |
| 55 | </div> | 55 | </div> |
| 56 | - <div style="display: inline-block;"> | ||
| 57 | - <span class="item-label" style="width: 80px; margin-left: 24px">线路: </span> | 56 | + <div style="display: inline-block; margin-left: 24px;"> |
| 57 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 58 | <select class="form-control" name="line" id="line" style="width: 140px;"></select> | 58 | <select class="form-control" name="line" id="line" style="width: 140px;"></select> |
| 59 | </div> | 59 | </div> |
| 60 | <div style="display: inline-block; margin-left: 10px"> | 60 | <div style="display: inline-block; margin-left: 10px"> |
| @@ -134,13 +134,13 @@ | @@ -134,13 +134,13 @@ | ||
| 134 | var year = d.getFullYear(); | 134 | var year = d.getFullYear(); |
| 135 | var month = d.getMonth() + 1; | 135 | var month = d.getMonth() + 1; |
| 136 | var day = d.getDate(); | 136 | var day = d.getDate(); |
| 137 | - if(month > 9){ | ||
| 138 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 139 | - $("#endDate").val(year + "-" + month + "-" + day); | ||
| 140 | - } else { | ||
| 141 | - $("#startDate").val(year + "-0" + month + "-" + day); | ||
| 142 | - $("#endDate").val(year + "-0" + month + "-" + day); | ||
| 143 | - } | 137 | + if(month < 10) |
| 138 | + month = "0" + month; | ||
| 139 | + if(day < 10) | ||
| 140 | + day = "0" + day; | ||
| 141 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 142 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 143 | + | ||
| 144 | $("#times1").val("06:00"); | 144 | $("#times1").val("06:00"); |
| 145 | $("#times2").val("07:00"); | 145 | $("#times2").val("07:00"); |
| 146 | 146 | ||
| @@ -165,6 +165,11 @@ | @@ -165,6 +165,11 @@ | ||
| 165 | for(var i = 0; i < obj.length; i++){ | 165 | for(var i = 0; i < obj.length; i++){ |
| 166 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | 166 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; |
| 167 | } | 167 | } |
| 168 | + if(obj.length == 1){ | ||
| 169 | + $('#company1').hide(); | ||
| 170 | + if(obj[0].children.length == 1) | ||
| 171 | + $('#subCompany1').hide(); | ||
| 172 | + } | ||
| 168 | $('#company').html(options); | 173 | $('#company').html(options); |
| 169 | updateCompany(); | 174 | updateCompany(); |
| 170 | }); | 175 | }); |
| @@ -217,6 +222,8 @@ | @@ -217,6 +222,8 @@ | ||
| 217 | var endDate = $("#endDate").val(); | 222 | var endDate = $("#endDate").val(); |
| 218 | var model = $("#model").val(); | 223 | var model = $("#model").val(); |
| 219 | var times = $("#times1").val() + "-" + $("#times2").val(); | 224 | var times = $("#times1").val() + "-" + $("#times2").val(); |
| 225 | + var company = $("#company").val(); | ||
| 226 | + var subCompany = $("#subCompany").val(); | ||
| 220 | function jsDoQuery(pagination){ | 227 | function jsDoQuery(pagination){ |
| 221 | var reason = $("input[name='reason']"); | 228 | var reason = $("input[name='reason']"); |
| 222 | var params = {}; | 229 | var params = {}; |
| @@ -225,11 +232,15 @@ | @@ -225,11 +232,15 @@ | ||
| 225 | endDate = $("#endDate").val(); | 232 | endDate = $("#endDate").val(); |
| 226 | model = $("#model").val(); | 233 | model = $("#model").val(); |
| 227 | times = $("#times1").val() + "-" + $("#times2").val(); | 234 | times = $("#times1").val() + "-" + $("#times2").val(); |
| 235 | + company = $("#company").val(); | ||
| 236 | + subCompany = $("#subCompany").val(); | ||
| 228 | params['line'] = line; | 237 | params['line'] = line; |
| 229 | params['startDate'] = startDate; | 238 | params['startDate'] = startDate; |
| 230 | params['endDate'] = endDate; | 239 | params['endDate'] = endDate; |
| 231 | params['model'] = model; | 240 | params['model'] = model; |
| 232 | params['times'] = times; | 241 | params['times'] = times; |
| 242 | + params['company'] = company; | ||
| 243 | + params['subCompany'] = subCompany; | ||
| 233 | params['type'] = "query"; | 244 | params['type'] = "query"; |
| 234 | // $(".hidden").removeClass("hidden"); | 245 | // $(".hidden").removeClass("hidden"); |
| 235 | $get('/busInterval/lbStatuAnaly', params, function(result){ | 246 | $get('/busInterval/lbStatuAnaly', params, function(result){ |
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
| @@ -33,16 +33,20 @@ | @@ -33,16 +33,20 @@ | ||
| 33 | <div class="portlet light porttlet-fit bordered"> | 33 | <div class="portlet light porttlet-fit bordered"> |
| 34 | <div class="portlet-title"> | 34 | <div class="portlet-title"> |
| 35 | <form id="history" class="form-inline" action=""> | 35 | <form id="history" class="form-inline" action=""> |
| 36 | - <div style="display: inline-block;"> | ||
| 37 | - <span class="item-label" style="width: 80px; margin-left: 33px">公司: </span> | 36 | + <div style="display: inline-block; margin-left: 33px;" id="company1"> |
| 37 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 38 | <select class="form-control" name="company" id="company" style="width: 140px;"></select> | 38 | <select class="form-control" name="company" id="company" style="width: 140px;"></select> |
| 39 | </div> | 39 | </div> |
| 40 | - <div style="display: inline-block;"> | ||
| 41 | - <span class="item-label" style="width: 80px; margin-left: 38px">线路: </span> | 40 | + <div style="display: inline-block; margin-left: 24px;" id="subCompany1"> |
| 41 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 42 | + <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> | ||
| 43 | + </div> | ||
| 44 | + <div style="display: inline-block; margin-left: 24px;"> | ||
| 45 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 42 | <select class="form-control" name="line" id="line" style="width: 140px;"></select> | 46 | <select class="form-control" name="line" id="line" style="width: 140px;"></select> |
| 43 | </div> | 47 | </div> |
| 44 | - <div style="display: inline-block;"> | ||
| 45 | - <span class="item-label" style="width: 80px; margin-left: 24px">方向: </span> | 48 | + <div style="display: inline-block; margin-left: 15px;"> |
| 49 | + <span class="item-label" style="width: 80px;">方向: </span> | ||
| 46 | <select class="form-control" name="upDown" id="upDown" style="width: 140px;"> | 50 | <select class="form-control" name="upDown" id="upDown" style="width: 140px;"> |
| 47 | <option value="">请先选择线路</option> | 51 | <option value="">请先选择线路</option> |
| 48 | </select> | 52 | </select> |
| @@ -188,13 +192,13 @@ | @@ -188,13 +192,13 @@ | ||
| 188 | var year = d.getFullYear(); | 192 | var year = d.getFullYear(); |
| 189 | var month = d.getMonth() + 1; | 193 | var month = d.getMonth() + 1; |
| 190 | var day = d.getDate(); | 194 | var day = d.getDate(); |
| 191 | - if(month > 9){ | ||
| 192 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 193 | - $("#endDate").val(year + "-" + month + "-" + day); | ||
| 194 | - } else { | ||
| 195 | - $("#startDate").val(year + "-0" + month + "-" + day); | ||
| 196 | - $("#endDate").val(year + "-0" + month + "-" + day); | ||
| 197 | - } | 195 | + if(month < 10) |
| 196 | + month = "0" + month; | ||
| 197 | + if(day < 10) | ||
| 198 | + day = "0" + day; | ||
| 199 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 200 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 201 | + | ||
| 198 | $("#times1").val("06:00"); | 202 | $("#times1").val("06:00"); |
| 199 | $("#times2").val("07:00"); | 203 | $("#times2").val("07:00"); |
| 200 | 204 | ||
| @@ -205,9 +209,28 @@ | @@ -205,9 +209,28 @@ | ||
| 205 | for(var i = 0; i < obj.length; i++){ | 209 | for(var i = 0; i < obj.length; i++){ |
| 206 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | 210 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; |
| 207 | } | 211 | } |
| 212 | + if(obj.length == 1){ | ||
| 213 | + $('#company1').hide(); | ||
| 214 | + if(obj[0].children.length == 1) | ||
| 215 | + $('#subCompany1').hide(); | ||
| 216 | + } | ||
| 208 | $('#company').html(options); | 217 | $('#company').html(options); |
| 209 | updateCompany(); | 218 | updateCompany(); |
| 210 | }); | 219 | }); |
| 220 | + $("#company").on("change",updateCompany); | ||
| 221 | + function updateCompany(){ | ||
| 222 | + var company = $('#company').val(); | ||
| 223 | + var options = ''; | ||
| 224 | + for(var i = 0; i < obj.length; i++){ | ||
| 225 | + if(obj[i].companyCode == company){ | ||
| 226 | + var children = obj[i].children; | ||
| 227 | + for(var j = 0; j < children.length; j++){ | ||
| 228 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 229 | + } | ||
| 230 | + } | ||
| 231 | + } | ||
| 232 | + $('#subCompany').html(options); | ||
| 233 | + } | ||
| 211 | 234 | ||
| 212 | $.get('/basic/lineCode2Name',function(result){ | 235 | $.get('/basic/lineCode2Name',function(result){ |
| 213 | var data=[]; | 236 | var data=[]; |
| @@ -244,6 +267,8 @@ | @@ -244,6 +267,8 @@ | ||
| 244 | var model = $("#model").val(); | 267 | var model = $("#model").val(); |
| 245 | var times = $("#times1").val() + "-" + $("#times2").val(); | 268 | var times = $("#times1").val() + "-" + $("#times2").val(); |
| 246 | var upDown = $("#upDown").val(); | 269 | var upDown = $("#upDown").val(); |
| 270 | + var company = $("#company").val(); | ||
| 271 | + var subCompany = $("#subCompany").val(); | ||
| 247 | function jsDoQuery(pagination){ | 272 | function jsDoQuery(pagination){ |
| 248 | var params = {}; | 273 | var params = {}; |
| 249 | // line = $("#line").val(); | 274 | // line = $("#line").val(); |
| @@ -252,12 +277,16 @@ | @@ -252,12 +277,16 @@ | ||
| 252 | model = $("#model").val(); | 277 | model = $("#model").val(); |
| 253 | times = $("#times1").val() + "-" + $("#times2").val(); | 278 | times = $("#times1").val() + "-" + $("#times2").val(); |
| 254 | upDown = $("#upDown").val(); | 279 | upDown = $("#upDown").val(); |
| 280 | + company = $("#company").val(); | ||
| 281 | + subCompany = $("#subCompany").val(); | ||
| 255 | params['line'] = line; | 282 | params['line'] = line; |
| 256 | params['startDate'] = startDate; | 283 | params['startDate'] = startDate; |
| 257 | params['endDate'] = endDate; | 284 | params['endDate'] = endDate; |
| 258 | params['model'] = model; | 285 | params['model'] = model; |
| 259 | params['times'] = times; | 286 | params['times'] = times; |
| 260 | params['upDown'] = upDown; | 287 | params['upDown'] = upDown; |
| 288 | + params['company'] = company; | ||
| 289 | + params['subCompany'] = subCompany; | ||
| 261 | params['type'] = "query"; | 290 | params['type'] = "query"; |
| 262 | $("#forms .hidden").removeClass("hidden"); | 291 | $("#forms .hidden").removeClass("hidden"); |
| 263 | $get('/busInterval/lineTimeAnaliy', params, function(result){ | 292 | $get('/busInterval/lineTimeAnaliy', params, function(result){ |
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
| @@ -27,19 +27,19 @@ | @@ -27,19 +27,19 @@ | ||
| 27 | <div class="portlet light porttlet-fit bordered"> | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | <div class="portlet-title"> | 28 | <div class="portlet-title"> |
| 29 | <form id="history" class="form-inline" action=""> | 29 | <form id="history" class="form-inline" action=""> |
| 30 | - <div style="display: inline-block;"> | 30 | + <div style="display: inline-block; margin-left: 10px;" id="company1"> |
| 31 | <span class="item-label" style="width: 80px;">公司: </span> | 31 | <span class="item-label" style="width: 80px;">公司: </span> |
| 32 | <select class="form-control" name="company" id="company" style="width: 160px;"></select> | 32 | <select class="form-control" name="company" id="company" style="width: 160px;"></select> |
| 33 | </div> | 33 | </div> |
| 34 | - <div style="display: inline-block;"> | 34 | + <div style="display: inline-block; margin-left: 10px;" id="subCompany1"> |
| 35 | <span class="item-label" style="width: 80px;">分公司: </span> | 35 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 36 | <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> | 36 | <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> |
| 37 | </div> | 37 | </div> |
| 38 | - <div style="display: inline-block;"> | 38 | + <div style="display: inline-block; margin-left: 10px;"> |
| 39 | <span class="item-label" style="width: 80px;">线路: </span> | 39 | <span class="item-label" style="width: 80px;">线路: </span> |
| 40 | <select class="form-control" name="line" id="line" style="width: 160px;"></select> | 40 | <select class="form-control" name="line" id="line" style="width: 160px;"></select> |
| 41 | </div> | 41 | </div> |
| 42 | - <div style="display: inline-block;margin-left: 15px;"> | 42 | + <div style="display: inline-block; margin-left: 10px;"> |
| 43 | <span class="item-label" style="width: 80px;">时间: </span> | 43 | <span class="item-label" style="width: 80px;">时间: </span> |
| 44 | <input class="form-control" type="text" id="date" style="width: 160px;"/> | 44 | <input class="form-control" type="text" id="date" style="width: 160px;"/> |
| 45 | </div> | 45 | </div> |
| @@ -55,6 +55,8 @@ | @@ -55,6 +55,8 @@ | ||
| 55 | <thead> | 55 | <thead> |
| 56 | <tr class="hidden"> | 56 | <tr class="hidden"> |
| 57 | <th>日期</th> | 57 | <th>日期</th> |
| 58 | + <th>公司</th> | ||
| 59 | + <th>分公司</th> | ||
| 58 | <th>线路</th> | 60 | <th>线路</th> |
| 59 | <th>路牌</th> | 61 | <th>路牌</th> |
| 60 | <th>车辆</th> | 62 | <th>车辆</th> |
| @@ -92,11 +94,11 @@ | @@ -92,11 +94,11 @@ | ||
| 92 | var year = d.getFullYear(); | 94 | var year = d.getFullYear(); |
| 93 | var month = d.getMonth() + 1; | 95 | var month = d.getMonth() + 1; |
| 94 | var day = d.getDate(); | 96 | var day = d.getDate(); |
| 95 | - if(month > 9){ | ||
| 96 | - $("#date").val(year + "-" + month + "-" + day); | ||
| 97 | - } else { | ||
| 98 | - $("#date").val(year + "-0" + month + "-" + day); | ||
| 99 | - } | 97 | + if(month < 10) |
| 98 | + month = "0" + month; | ||
| 99 | + if(day < 10) | ||
| 100 | + day = "0" + day; | ||
| 101 | + $("#date").val(year + "-" + month + "-" + day); | ||
| 100 | 102 | ||
| 101 | $.get('/basic/lineCode2Name',function(result){ | 103 | $.get('/basic/lineCode2Name',function(result){ |
| 102 | var data=[]; | 104 | var data=[]; |
| @@ -116,6 +118,11 @@ | @@ -116,6 +118,11 @@ | ||
| 116 | for(var i = 0; i < obj.length; i++){ | 118 | for(var i = 0; i < obj.length; i++){ |
| 117 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | 119 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; |
| 118 | } | 120 | } |
| 121 | + if(obj.length == 1){ | ||
| 122 | + $('#company1').hide(); | ||
| 123 | + if(obj[0].children.length == 1) | ||
| 124 | + $('#subCompany1').hide(); | ||
| 125 | + } | ||
| 119 | $('#company').html(options); | 126 | $('#company').html(options); |
| 120 | updateCompany(); | 127 | updateCompany(); |
| 121 | }); | 128 | }); |
| @@ -139,12 +146,18 @@ | @@ -139,12 +146,18 @@ | ||
| 139 | 146 | ||
| 140 | var line = $("#line").val(); | 147 | var line = $("#line").val(); |
| 141 | var date = $("#date").val(); | 148 | var date = $("#date").val(); |
| 149 | + var company = $("#company").val(); | ||
| 150 | + var subCompany = $("#subCompany").val(); | ||
| 142 | function jsDoQuery(pagination){ | 151 | function jsDoQuery(pagination){ |
| 143 | var params = {}; | 152 | var params = {}; |
| 153 | + company = $("#company").val(); | ||
| 154 | + subCompany = $("#subCompany").val(); | ||
| 144 | line = $("#line").val(); | 155 | line = $("#line").val(); |
| 145 | date = $("#date").val(); | 156 | date = $("#date").val(); |
| 146 | if(line == " ") | 157 | if(line == " ") |
| 147 | line = ""; | 158 | line = ""; |
| 159 | + params['company'] = company; | ||
| 160 | + params['subCompany'] = subCompany; | ||
| 148 | params['line'] = line; | 161 | params['line'] = line; |
| 149 | params['date'] = date; | 162 | params['date'] = date; |
| 150 | params['type'] = "query"; | 163 | params['type'] = "query"; |
| @@ -172,6 +185,8 @@ | @@ -172,6 +185,8 @@ | ||
| 172 | {{each list as obj i}} | 185 | {{each list as obj i}} |
| 173 | <tr> | 186 | <tr> |
| 174 | <td>{{obj.date}}</td> | 187 | <td>{{obj.date}}</td> |
| 188 | + <td>{{obj.company}}</td> | ||
| 189 | + <td>{{obj.subCompany}}</td> | ||
| 175 | <td>{{obj.line}}</td> | 190 | <td>{{obj.line}}</td> |
| 176 | <td>{{obj.lp}}</td> | 191 | <td>{{obj.lp}}</td> |
| 177 | <td>{{obj.clzbh}}</td> | 192 | <td>{{obj.clzbh}}</td> |
| @@ -182,7 +197,7 @@ | @@ -182,7 +197,7 @@ | ||
| 182 | {{/each}} | 197 | {{/each}} |
| 183 | {{if list.length == 0}} | 198 | {{if list.length == 0}} |
| 184 | <tr> | 199 | <tr> |
| 185 | - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | 200 | + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td> |
| 186 | </tr> | 201 | </tr> |
| 187 | {{/if}} | 202 | {{/if}} |
| 188 | </script> | 203 | </script> |
| 189 | \ No newline at end of file | 204 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
| @@ -27,28 +27,28 @@ | @@ -27,28 +27,28 @@ | ||
| 27 | <div class="portlet light porttlet-fit bordered"> | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | <div class="portlet-title"> | 28 | <div class="portlet-title"> |
| 29 | <form id="history" class="form-inline" action=""> | 29 | <form id="history" class="form-inline" action=""> |
| 30 | -<!-- <div style="display: inline-block;margin-left: 38px;"> --> | ||
| 31 | -<!-- <span class="item-label" style="width: 80px;">公司: </span> --> | ||
| 32 | -<!-- <select class="form-control" name="company" id="company" style="width: 160px;"></select> --> | ||
| 33 | -<!-- </div> --> | ||
| 34 | -<!-- <div style="display: inline-block;margin-left: 29px;"> --> | ||
| 35 | -<!-- <span class="item-label" style="width: 80px;">分公司: </span> --> | ||
| 36 | -<!-- <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> --> | ||
| 37 | -<!-- </div> --> | ||
| 38 | - <div style="display: inline-block;margin-left: 43px;"> | 30 | + <div style="display: inline-block;margin-left: 38px;" id="company1"> |
| 31 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 32 | + <select class="form-control" name="company" id="company" style="width: 160px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block;margin-left: 24px;" id="subCompany1"> | ||
| 35 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 36 | + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> | ||
| 37 | + </div> | ||
| 38 | + <div style="display: inline-block;margin-left: 38px;"> | ||
| 39 | <span class="item-label" style="width: 80px;">线路: </span> | 39 | <span class="item-label" style="width: 80px;">线路: </span> |
| 40 | <select class="form-control" name="line" id="line" style="width: 160px;"></select> | 40 | <select class="form-control" name="line" id="line" style="width: 160px;"></select> |
| 41 | </div> | 41 | </div> |
| 42 | -<!-- <div style="margin-top: 10px"></div> --> | 42 | + <div style="margin-top: 10px"></div> |
| 43 | <div style="display: inline-block;margin-left: 10px;"> | 43 | <div style="display: inline-block;margin-left: 10px;"> |
| 44 | <span class="item-label" style="width: 80px;">开始时间: </span> | 44 | <span class="item-label" style="width: 80px;">开始时间: </span> |
| 45 | <input class="form-control" type="text" id="startDate" style="width: 160px;"/> | 45 | <input class="form-control" type="text" id="startDate" style="width: 160px;"/> |
| 46 | </div> | 46 | </div> |
| 47 | - <div style="display: inline-block;margin-left: 15px;"> | 47 | + <div style="display: inline-block;margin-left: 10px;"> |
| 48 | <span class="item-label" style="width: 80px;">结束时间: </span> | 48 | <span class="item-label" style="width: 80px;">结束时间: </span> |
| 49 | <input class="form-control" type="text" id="endDate" style="width: 160px;"/> | 49 | <input class="form-control" type="text" id="endDate" style="width: 160px;"/> |
| 50 | </div> | 50 | </div> |
| 51 | - <div style="display: inline-block;margin-left: 15px;"> | 51 | + <div style="display: inline-block;margin-left: 10px;"> |
| 52 | <span class="item-label" style="width: 80px;">模板类型: </span> | 52 | <span class="item-label" style="width: 80px;">模板类型: </span> |
| 53 | <select class="form-control" name="model" id="model" style="width: 160px;"> | 53 | <select class="form-control" name="model" id="model" style="width: 160px;"> |
| 54 | <option value="">请选择...</option> | 54 | <option value="">请选择...</option> |
| @@ -114,13 +114,12 @@ | @@ -114,13 +114,12 @@ | ||
| 114 | var year = d.getFullYear(); | 114 | var year = d.getFullYear(); |
| 115 | var month = d.getMonth() + 1; | 115 | var month = d.getMonth() + 1; |
| 116 | var day = d.getDate(); | 116 | var day = d.getDate(); |
| 117 | - if(month > 9){ | ||
| 118 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 119 | - $("#endDate").val(year + "-" + month + "-" + day); | ||
| 120 | - } else { | ||
| 121 | - $("#startDate").val(year + "-0" + month + "-" + day); | ||
| 122 | - $("#endDate").val(year + "-0" + month + "-" + day); | ||
| 123 | - } | 117 | + if(month < 10) |
| 118 | + month = "0" + month; | ||
| 119 | + if(day < 10) | ||
| 120 | + day = "0" + day; | ||
| 121 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 122 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 124 | 123 | ||
| 125 | $.get('/basic/lineCode2Name',function(result){ | 124 | $.get('/basic/lineCode2Name',function(result){ |
| 126 | var data=[]; | 125 | var data=[]; |
| @@ -143,6 +142,11 @@ | @@ -143,6 +142,11 @@ | ||
| 143 | for(var i = 0; i < obj.length; i++){ | 142 | for(var i = 0; i < obj.length; i++){ |
| 144 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | 143 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; |
| 145 | } | 144 | } |
| 145 | + if(obj.length == 1){ | ||
| 146 | + $('#company1').hide(); | ||
| 147 | + if(obj[0].children.length == 1) | ||
| 148 | + $('#subCompany1').hide(); | ||
| 149 | + } | ||
| 146 | $('#company').html(options); | 150 | $('#company').html(options); |
| 147 | updateCompany(); | 151 | updateCompany(); |
| 148 | }); | 152 | }); |
| @@ -171,17 +175,23 @@ | @@ -171,17 +175,23 @@ | ||
| 171 | var startDate = $("#startDate").val(); | 175 | var startDate = $("#startDate").val(); |
| 172 | var endDate = $("#endDate").val(); | 176 | var endDate = $("#endDate").val(); |
| 173 | var model = $("#model").val(); | 177 | var model = $("#model").val(); |
| 178 | + var company = $("#company").val(); | ||
| 179 | + var subCompany = $("#subCompany").val(); | ||
| 174 | function jsDoQuery(pagination){ | 180 | function jsDoQuery(pagination){ |
| 175 | var params = {}; | 181 | var params = {}; |
| 176 | // line = $("#line").val(); | 182 | // line = $("#line").val(); |
| 177 | startDate = $("#startDate").val(); | 183 | startDate = $("#startDate").val(); |
| 178 | endDate = $("#endDate").val(); | 184 | endDate = $("#endDate").val(); |
| 179 | model = $("#model").val(); | 185 | model = $("#model").val(); |
| 186 | + company = $("#company").val(); | ||
| 187 | + subCompany = $("#subCompany").val(); | ||
| 180 | params['page'] = page; | 188 | params['page'] = page; |
| 181 | params['line'] = line; | 189 | params['line'] = line; |
| 182 | params['startDate'] = startDate; | 190 | params['startDate'] = startDate; |
| 183 | params['endDate'] = endDate; | 191 | params['endDate'] = endDate; |
| 184 | params['model'] = model; | 192 | params['model'] = model; |
| 193 | + params['company'] = company; | ||
| 194 | + params['subCompany'] = subCompany; | ||
| 185 | params['type'] = "query"; | 195 | params['type'] = "query"; |
| 186 | $(".hidden").removeClass("hidden"); | 196 | $(".hidden").removeClass("hidden"); |
| 187 | $get('/pcpc/scheduleAnaly', params, function(result){ | 197 | $get('/pcpc/scheduleAnaly', params, function(result){ |
| @@ -194,8 +204,12 @@ | @@ -194,8 +204,12 @@ | ||
| 194 | //重新分页 | 204 | //重新分页 |
| 195 | initPagination = true; | 205 | initPagination = true; |
| 196 | showPagination(result); | 206 | showPagination(result); |
| 207 | + | ||
| 208 | + $('#pagination').show(); | ||
| 209 | + } else if(result.dataList.length == 0){ | ||
| 210 | + $('#pagination').hide(); | ||
| 197 | } | 211 | } |
| 198 | - }); | 212 | + }); |
| 199 | } | 213 | } |
| 200 | 214 | ||
| 201 | $("#export").on("click",function(){ | 215 | $("#export").on("click",function(){ |
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
| @@ -136,13 +136,13 @@ | @@ -136,13 +136,13 @@ | ||
| 136 | var year = d.getFullYear(); | 136 | var year = d.getFullYear(); |
| 137 | var month = d.getMonth() + 1; | 137 | var month = d.getMonth() + 1; |
| 138 | var day = d.getDate(); | 138 | var day = d.getDate(); |
| 139 | - if(month > 9){ | ||
| 140 | - $("#startDate").val(year + "-" + month + "-" + day); | ||
| 141 | - $("#endDate").val(year + "-" + month + "-" + day); | ||
| 142 | - } else { | ||
| 143 | - $("#startDate").val(year + "-0" + month + "-" + day); | ||
| 144 | - $("#endDate").val(year + "-0" + month + "-" + day); | ||
| 145 | - } | 139 | + if(month < 10) |
| 140 | + month = "0" + month; | ||
| 141 | + if(day < 10) | ||
| 142 | + day = "0" + day; | ||
| 143 | + $("#startDate").val(year + "-" + month + "-" + day); | ||
| 144 | + $("#endDate").val(year + "-" + month + "-" + day); | ||
| 145 | + | ||
| 146 | $("#times1").val("06:00"); | 146 | $("#times1").val("06:00"); |
| 147 | $("#times2").val("07:00"); | 147 | $("#times2").val("07:00"); |
| 148 | 148 | ||
| @@ -211,6 +211,8 @@ | @@ -211,6 +211,8 @@ | ||
| 211 | var model = $("#model").val(); | 211 | var model = $("#model").val(); |
| 212 | var times = $("#times1").val() + "-" + $("#times2").val(); | 212 | var times = $("#times1").val() + "-" + $("#times2").val(); |
| 213 | var upDown = $("#upDown").val(); | 213 | var upDown = $("#upDown").val(); |
| 214 | + var company = $("#company").val(); | ||
| 215 | + var subCompany = $("#subCompany").val(); | ||
| 214 | function jsDoQuery(pagination){ | 216 | function jsDoQuery(pagination){ |
| 215 | var params = {}; | 217 | var params = {}; |
| 216 | // line = $("#line").val(); | 218 | // line = $("#line").val(); |
| @@ -219,12 +221,16 @@ | @@ -219,12 +221,16 @@ | ||
| 219 | model = $("#model").val(); | 221 | model = $("#model").val(); |
| 220 | times = $("#times1").val() + "-" + $("#times2").val(); | 222 | times = $("#times1").val() + "-" + $("#times2").val(); |
| 221 | upDown = $("#upDown").val(); | 223 | upDown = $("#upDown").val(); |
| 224 | + company = $("#company").val(); | ||
| 225 | + subCompany = $("#subCompany").val(); | ||
| 222 | params['line'] = line; | 226 | params['line'] = line; |
| 223 | params['startDate'] = startDate; | 227 | params['startDate'] = startDate; |
| 224 | params['endDate'] = endDate; | 228 | params['endDate'] = endDate; |
| 225 | params['model'] = model; | 229 | params['model'] = model; |
| 226 | params['times'] = times; | 230 | params['times'] = times; |
| 227 | params['upDown'] = upDown; | 231 | params['upDown'] = upDown; |
| 232 | + params['company'] = company; | ||
| 233 | + params['subCompany'] = subCompany; | ||
| 228 | params['type'] = "query"; | 234 | params['type'] = "query"; |
| 229 | $(".hidden").removeClass("hidden"); | 235 | $(".hidden").removeClass("hidden"); |
| 230 | $get('/busInterval/timeAndSpeed', params, function(result){ | 236 | $get('/busInterval/timeAndSpeed', params, function(result){ |