Commit 1faaae3763c72bda4d37853ee72291b5b6afcea8
1 parent
5bf9656a
mcy
Showing
16 changed files
with
2312 additions
and
844 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
| ... | ... | @@ -13,12 +13,15 @@ import org.springframework.web.bind.annotation.RequestMethod; |
| 13 | 13 | import org.springframework.web.bind.annotation.RequestParam; |
| 14 | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | 15 | |
| 16 | +import com.bsth.entity.mcy_forms.Allline; | |
| 16 | 17 | import com.bsth.entity.mcy_forms.Changetochange; |
| 18 | +import com.bsth.entity.mcy_forms.Executionrate; | |
| 17 | 19 | import com.bsth.entity.mcy_forms.Linepasswengerflow; |
| 18 | 20 | import com.bsth.entity.mcy_forms.Operationservice; |
| 19 | 21 | import com.bsth.entity.mcy_forms.Shifday; |
| 20 | 22 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 21 | 23 | import com.bsth.entity.mcy_forms.Singledata; |
| 24 | +import com.bsth.entity.mcy_forms.Turnoutrate; | |
| 22 | 25 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 23 | 26 | import com.bsth.entity.mcy_forms.Waybillday; |
| 24 | 27 | import com.bsth.service.forms.ExportService; |
| ... | ... | @@ -28,33 +31,31 @@ import com.bsth.util.ReportUtils; |
| 28 | 31 | @RestController |
| 29 | 32 | @RequestMapping("mcy_export") |
| 30 | 33 | public class ExportController { |
| 31 | - | |
| 34 | + | |
| 32 | 35 | @Autowired |
| 33 | 36 | FormsService formsService; |
| 34 | 37 | |
| 35 | 38 | @Autowired |
| 36 | 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 | 44 | List<Waybillday> waybillday = formsService.waybillday(map); |
| 42 | 45 | exportService.waybillday(map.get("date").toString(), waybillday); |
| 43 | 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 | 53 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 53 | 54 | ReportUtils ee = new ReportUtils(); |
| 54 | 55 | List<Linepasswengerflow> linepasswengerflow = formsService.linepasswengerflow(map); |
| 55 | 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 | 59 | Map<String, Object> m = new HashMap<String, Object>(); |
| 59 | 60 | m.put("i", i); |
| 60 | 61 | m.put("stationName", l.getStationName()); |
| ... | ... | @@ -62,78 +63,74 @@ public class ExportController { |
| 62 | 63 | m.put("2", " "); |
| 63 | 64 | resList.add(m); |
| 64 | 65 | i++; |
| 65 | - } | |
| 66 | - | |
| 67 | - try { | |
| 66 | + } | |
| 67 | + | |
| 68 | + try { | |
| 68 | 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 | 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 | 83 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 86 | 84 | ReportUtils ee = new ReportUtils(); |
| 87 | 85 | List<Shifday> shifday = formsService.shifday(map); |
| 88 | 86 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 89 | - for(Shifday l : shifday){ | |
| 87 | + for (Shifday l : shifday) { | |
| 90 | 88 | Map<String, Object> m = new HashMap<String, Object>(); |
| 91 | - m.put("jName",l.getjName()); | |
| 89 | + m.put("jName", l.getjName()); | |
| 92 | 90 | m.put("sName", l.getsName()); |
| 93 | 91 | m.put("lpName", l.getLpName()); |
| 94 | 92 | m.put("carPlate", l.getCarPlate()); |
| 95 | 93 | m.put("jhlc", l.getJhlc()); |
| 96 | - //m.put("sjjhlc", l.getSjjhlc()); | |
| 94 | + // m.put("sjjhlc", l.getSjjhlc()); | |
| 97 | 95 | m.put("yygl", l.getYygl()); |
| 98 | 96 | m.put("emptMileage", l.getEmptMileage()); |
| 99 | 97 | m.put("remMileage", l.getRemMileage()); |
| 100 | 98 | m.put("addMileage", l.getAddMileage()); |
| 101 | 99 | m.put("totalm", l.getTotalm()); |
| 102 | 100 | m.put("jhbc", l.getJhbc()); |
| 103 | - //m.put("sjjhbc", l.getSjjhbc()); | |
| 101 | + // m.put("sjjhbc", l.getSjjhbc()); | |
| 104 | 102 | m.put("cjbc", l.getCjbc()); |
| 105 | 103 | m.put("ljbc", l.getLjbc()); |
| 106 | 104 | m.put("sjbc", l.getSjbc()); |
| 107 | 105 | resList.add(m); |
| 108 | - } | |
| 109 | - | |
| 110 | - try { | |
| 106 | + } | |
| 107 | + | |
| 108 | + try { | |
| 111 | 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 | 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 | 123 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 127 | 124 | ReportUtils ee = new ReportUtils(); |
| 128 | 125 | List<Shiftuehiclemanth> shiftuehiclemanth = formsService.shiftuehiclemanth(map); |
| 129 | 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 | 129 | Map<String, Object> m = new HashMap<String, Object>(); |
| 133 | 130 | m.put("i", i); |
| 134 | - m.put("jName",l.getjName() ); | |
| 131 | + m.put("jName", l.getjName()); | |
| 135 | 132 | m.put("jhlc", l.getJhlc()); |
| 136 | - m.put("emptMileage",l.getEmptMileage() ); | |
| 133 | + m.put("emptMileage", l.getEmptMileage()); | |
| 137 | 134 | m.put("remMileage", l.getRemMileage()); |
| 138 | 135 | m.put("addMileage", l.getAddMileage()); |
| 139 | 136 | m.put("totalm", l.getTotalm()); |
| ... | ... | @@ -142,39 +139,37 @@ public class ExportController { |
| 142 | 139 | m.put("sjbc", l.getSjbc()); |
| 143 | 140 | resList.add(m); |
| 144 | 141 | i++; |
| 145 | - } | |
| 146 | - | |
| 147 | - try { | |
| 142 | + } | |
| 143 | + | |
| 144 | + try { | |
| 148 | 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 | 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 | 162 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 168 | 163 | ReportUtils ee = new ReportUtils(); |
| 169 | 164 | List<Singledata> singledata = formsService.singledata(map); |
| 170 | 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 | 168 | Map<String, Object> m = new HashMap<String, Object>(); |
| 174 | 169 | m.put("i", i); |
| 175 | - m.put("rQ",l.getrQ()); | |
| 170 | + m.put("rQ", l.getrQ()); | |
| 176 | 171 | m.put("gS", l.getgS()); |
| 177 | - m.put("xL",l.getxL() ); | |
| 172 | + m.put("xL", l.getxL()); | |
| 178 | 173 | m.put("clzbh", l.getClzbh()); |
| 179 | 174 | m.put("jsy", l.getJsy()); |
| 180 | 175 | m.put("jName", l.getjName()); |
| ... | ... | @@ -184,35 +179,35 @@ public class ExportController { |
| 184 | 179 | m.put("emptMileage", l.getEmptMileage()); |
| 185 | 180 | m.put("hyl", l.getHyl()); |
| 186 | 181 | m.put("jzl", l.getJzl()); |
| 187 | - m.put("unyyyl",l.getUnyyyl()); | |
| 182 | + m.put("unyyyl", l.getUnyyyl()); | |
| 188 | 183 | m.put("jhjl", l.getJhjl()); |
| 189 | 184 | resList.add(m); |
| 190 | 185 | i++; |
| 191 | - } | |
| 192 | - | |
| 193 | - try { | |
| 186 | + } | |
| 187 | + | |
| 188 | + try { | |
| 194 | 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 | 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 | 204 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 211 | 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 | 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 | 211 | Map<String, Object> m = new HashMap<String, Object>(); |
| 217 | 212 | m.put("i", i); |
| 218 | 213 | m.put("rQ", l.getrQ()); |
| ... | ... | @@ -228,96 +223,198 @@ public class ExportController { |
| 228 | 223 | m.put("sjbc", l.getSjbc()); |
| 229 | 224 | resList.add(m); |
| 230 | 225 | i++; |
| 231 | - } | |
| 232 | - | |
| 233 | - try { | |
| 226 | + } | |
| 227 | + | |
| 228 | + try { | |
| 234 | 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 | 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 | 243 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 250 | 244 | ReportUtils ee = new ReportUtils(); |
| 251 | 245 | List<Operationservice> operationservice = formsService.operationservice(map); |
| 252 | 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 | 261 | try { |
| 268 | 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 | 269 | return resList; |
| 276 | 270 | } |
| 277 | - | |
| 278 | - | |
| 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){ | |
| 271 | + | |
| 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) { | |
| 281 | + Map<String, Object> m = new HashMap<String, Object>(); | |
| 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()); | |
| 297 | + resList.add(m); | |
| 298 | + } | |
| 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) { | |
| 289 | 321 | 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()); | |
| 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()); | |
| 305 | 334 | 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 | 335 | } |
| 318 | - | |
| 319 | - | |
| 320 | - | |
| 321 | - | |
| 322 | - | |
| 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 | + | |
| 384 | + ////营运线路名称统计表 | |
| 385 | + @RequestMapping(value = "/alllineExport", method = RequestMethod.POST) | |
| 386 | + public List<Map<String, Object>> alllineExport(@RequestParam Map<String, Object> map) { | |
| 387 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | |
| 388 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | |
| 389 | + ReportUtils ee = new ReportUtils(); | |
| 390 | + List<Allline> allline = formsService.allline(map); | |
| 391 | + Map<String, Object> map1 = new HashMap<String, Object>(); | |
| 392 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | |
| 393 | + for (Allline l : allline) { | |
| 394 | + Map<String, Object> m = new HashMap<String, Object>(); | |
| 395 | + m.put("rq", l.getRq()); | |
| 396 | + m.put("gs", l.getGs()); | |
| 397 | + m.put("zhgs", l.getZhgs()); | |
| 398 | + m.put("xl", l.getXl()); | |
| 399 | + m.put("cchjh", l.getCchjh()); | |
| 400 | + m.put("cchsj", l.getCchsj()); | |
| 401 | + m.put("chl", l.getChl()); | |
| 402 | + m.put("bcjh", l.getBcjh()); | |
| 403 | + m.put("bcsj", l.getBbzxl()); | |
| 404 | + m.put("bbzxl", l.getBbzxl()); | |
| 405 | + m.put("sm", l.getSm()); | |
| 406 | + resList.add(m); | |
| 407 | + } | |
| 408 | + | |
| 409 | + try { | |
| 410 | + listI.add(resList.iterator()); | |
| 411 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; | |
| 412 | + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\allline.xls", path + "export\\营运线路名称统计表" | |
| 413 | + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | |
| 414 | + } catch (Exception e) { | |
| 415 | + e.printStackTrace(); | |
| 416 | + } | |
| 417 | + return resList; | |
| 418 | + } | |
| 419 | + | |
| 323 | 420 | } | ... | ... |
src/main/java/com/bsth/controller/forms/MCY_FormsController.java
| ... | ... | @@ -9,12 +9,15 @@ import org.springframework.web.bind.annotation.RequestMethod; |
| 9 | 9 | import org.springframework.web.bind.annotation.RequestParam; |
| 10 | 10 | import org.springframework.web.bind.annotation.RestController; |
| 11 | 11 | |
| 12 | +import com.bsth.entity.mcy_forms.Allline; | |
| 12 | 13 | import com.bsth.entity.mcy_forms.Changetochange; |
| 14 | +import com.bsth.entity.mcy_forms.Executionrate; | |
| 13 | 15 | import com.bsth.entity.mcy_forms.Linepasswengerflow; |
| 14 | 16 | import com.bsth.entity.mcy_forms.Operationservice; |
| 15 | 17 | import com.bsth.entity.mcy_forms.Shifday; |
| 16 | 18 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 17 | 19 | import com.bsth.entity.mcy_forms.Singledata; |
| 20 | +import com.bsth.entity.mcy_forms.Turnoutrate; | |
| 18 | 21 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 19 | 22 | import com.bsth.entity.mcy_forms.Waybillday; |
| 20 | 23 | import com.bsth.service.forms.FormsService; |
| ... | ... | @@ -39,12 +42,6 @@ public class MCY_FormsController { |
| 39 | 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 | 46 | @RequestMapping(value = "/linepasswengerflow",method = RequestMethod.POST) |
| 50 | 47 | public List<Linepasswengerflow> linepasswengerflow(@RequestParam Map<String, Object> map){ |
| ... | ... | @@ -88,6 +85,8 @@ public class MCY_FormsController { |
| 88 | 85 | public List<Vehicleloading> vehicleloading(@RequestParam String line ,@RequestParam String data){ |
| 89 | 86 | return formsService.vehicleloading(line,data); |
| 90 | 87 | } |
| 88 | + | |
| 89 | + | |
| 91 | 90 | //运营服务阶段报表 |
| 92 | 91 | @RequestMapping(value = "/operationservice",method = RequestMethod.POST) |
| 93 | 92 | public List<Operationservice> operationservice(@RequestParam Map<String, Object> map){ |
| ... | ... | @@ -95,5 +94,25 @@ public class MCY_FormsController { |
| 95 | 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/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/service/forms/FormsService.java
| ... | ... | @@ -3,12 +3,15 @@ package com.bsth.service.forms; |
| 3 | 3 | import java.util.List; |
| 4 | 4 | import java.util.Map; |
| 5 | 5 | |
| 6 | +import com.bsth.entity.mcy_forms.Allline; | |
| 6 | 7 | import com.bsth.entity.mcy_forms.Changetochange; |
| 8 | +import com.bsth.entity.mcy_forms.Executionrate; | |
| 7 | 9 | import com.bsth.entity.mcy_forms.Linepasswengerflow; |
| 8 | 10 | import com.bsth.entity.mcy_forms.Operationservice; |
| 9 | 11 | import com.bsth.entity.mcy_forms.Shifday; |
| 10 | 12 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 11 | 13 | import com.bsth.entity.mcy_forms.Singledata; |
| 14 | +import com.bsth.entity.mcy_forms.Turnoutrate; | |
| 12 | 15 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 13 | 16 | import com.bsth.entity.mcy_forms.Waybillday; |
| 14 | 17 | |
| ... | ... | @@ -17,8 +20,6 @@ public interface FormsService { |
| 17 | 20 | |
| 18 | 21 | public List<Waybillday> waybillday(Map<String, Object> map); |
| 19 | 22 | |
| 20 | - List<Waybillday> waybilldayExcel(Map<String, Object> map); | |
| 21 | - | |
| 22 | 23 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map); |
| 23 | 24 | |
| 24 | 25 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map); |
| ... | ... | @@ -32,4 +33,10 @@ public interface FormsService { |
| 32 | 33 | public List<Vehicleloading> vehicleloading(String line,String data); |
| 33 | 34 | |
| 34 | 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 | 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 | 6 | import java.sql.ResultSet; |
| 4 | 7 | import java.sql.SQLException; |
| 5 | -import java.text.DecimalFormat; | |
| 8 | +import java.text.NumberFormat; | |
| 6 | 9 | import java.text.ParseException; |
| 7 | 10 | import java.text.SimpleDateFormat; |
| 8 | 11 | import java.util.ArrayList; |
| 9 | 12 | import java.util.Date; |
| 10 | 13 | import java.util.HashMap; |
| 11 | -import java.util.Iterator; | |
| 12 | 14 | import java.util.List; |
| 13 | 15 | import java.util.Map; |
| 14 | 16 | |
| ... | ... | @@ -22,33 +24,34 @@ import com.bsth.entity.mcy_forms.Operationservice; |
| 22 | 24 | import com.bsth.entity.mcy_forms.Shifday; |
| 23 | 25 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 24 | 26 | import com.bsth.entity.mcy_forms.Singledata; |
| 27 | +import com.bsth.entity.mcy_forms.Turnoutrate; | |
| 25 | 28 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 26 | 29 | import com.bsth.entity.mcy_forms.Waybillday; |
| 30 | +import com.bsth.entity.mcy_forms.Allline; | |
| 27 | 31 | import com.bsth.entity.mcy_forms.Changetochange; |
| 32 | +import com.bsth.entity.mcy_forms.Executionrate; | |
| 28 | 33 | import com.bsth.service.forms.FormsService; |
| 29 | 34 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 30 | 35 | import com.bsth.util.ReportRelatedUtils; |
| 31 | 36 | import com.bsth.util.ReportUtils; |
| 32 | 37 | |
| 33 | 38 | @Service |
| 34 | -public class FormsServiceImpl implements FormsService{ | |
| 35 | - | |
| 39 | +public class FormsServiceImpl implements FormsService { | |
| 40 | + | |
| 36 | 41 | @Autowired |
| 37 | 42 | JdbcTemplate jdbcTemplate; |
| 38 | - | |
| 43 | + | |
| 39 | 44 | @Autowired |
| 40 | 45 | ScheduleRealInfoService scheduleRealInfoService; |
| 41 | - | |
| 42 | - //行车路单日报表 | |
| 46 | + | |
| 47 | + // 行车路单日报表 | |
| 43 | 48 | @Override |
| 44 | 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 y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,y.YH,c.personnel_name from bsth_c_ylb y" | |
| 52 | + + " LEFT JOIN bsth_c_personnel c ON c.job_code=y.JSY " + " where to_days(y.RQ)=to_days('" | |
| 53 | + + map.get("date").toString() + "') " + " and y.XLBM=" + map.get("line").toString() + " GROUP BY y.NBBM"; | |
| 54 | + | |
| 52 | 55 | List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { |
| 53 | 56 | @Override |
| 54 | 57 | public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { |
| ... | ... | @@ -57,344 +60,483 @@ public class FormsServiceImpl implements FormsService{ |
| 57 | 60 | wbd.setJzl(arg0.getString("JZL")); |
| 58 | 61 | wbd.setYh(arg0.getString("YH")); |
| 59 | 62 | 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")); | |
| 63 | + // wbd.setZlc(arg0.getInt("zlc")); | |
| 64 | + // System.out.println(arg0.getObject("yl")); | |
| 65 | + // wbd.setYl(arg0.getString("yl")); | |
| 66 | + // wbd.setNbbm(arg0.getString("nbbm")); | |
| 67 | + Map<String, Object> maps = new HashMap<>(); | |
| 68 | + maps = scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("nbbm"), | |
| 69 | + arg0.getString("RQ")); | |
| 66 | 70 | wbd.setJzl1(maps.get("ksgl").toString()); |
| 67 | 71 | 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 | - | |
| 72 | + | |
| 71 | 73 | return wbd; |
| 72 | - | |
| 74 | + | |
| 73 | 75 | } |
| 74 | 76 | }); |
| 75 | 77 | return list; |
| 76 | 78 | } |
| 77 | - | |
| 78 | - | |
| 79 | - | |
| 80 | - //线路客流量报表 | |
| 79 | + | |
| 80 | + // 线路客流量报表 | |
| 81 | 81 | @Override |
| 82 | 82 | 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 | - | |
| 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 " + " where to_days(l.create_date)=to_days('" | |
| 85 | + + map.get("date").toString() + "') " + " and l.line_code=" + map.get("line").toString() | |
| 86 | + + " GROUP BY s.station_name "; | |
| 87 | + | |
| 89 | 88 | List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { |
| 90 | 89 | |
| 91 | 90 | @Override |
| 92 | 91 | public Linepasswengerflow mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 93 | 92 | Linepasswengerflow lin = new Linepasswengerflow(); |
| 94 | - lin.setStationName(arg0.getString("station_name")); | |
| 95 | - | |
| 93 | + lin.setStationName(arg0.getString("station_name")); | |
| 94 | + | |
| 96 | 95 | return lin; |
| 97 | 96 | } |
| 98 | 97 | }); |
| 99 | 98 | return list; |
| 100 | 99 | } |
| 101 | 100 | |
| 101 | + // 班次车辆人员月统计 | |
| 102 | + String startDate; | |
| 103 | + String endDate; | |
| 102 | 104 | |
| 103 | - //导出 | |
| 104 | 105 | @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 | - } | |
| 106 | + public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { | |
| 107 | + List list1 = new ArrayList<>();// | |
| 108 | + String sql = "select r.j_name,r.schedule_date_str,r.update_date,r.cl_zbh " + " from bsth_c_s_sp_info_real r " | |
| 109 | + + " LEFT JOIN bsth_c_s_ttinfo_detail d on r.lp_name=d.lp " | |
| 110 | + + " LEFT JOIN bsth_c_line_information l on l.line=r.lp_name " | |
| 111 | + + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " | |
| 112 | + + " and to_days('" + map.get("endDate").toString() + "') " + " and r.xl_bm='" | |
| 113 | + + map.get("line").toString() + "' " + " GROUP BY r.j_name" + " ORDER BY r.j_name"; | |
| 114 | + startDate = map.get("startDate").toString(); | |
| 115 | + endDate = map.get("endDate").toString(); | |
| 116 | + List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { | |
| 145 | 117 | |
| 118 | + @Override | |
| 119 | + public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 120 | + Shiftuehiclemanth shif = new Shiftuehiclemanth(); | |
| 121 | + shif.setjName(arg0.getString("j_name")); | |
| 146 | 122 | |
| 147 | - //班次车辆人员月统计 | |
| 148 | - String startDate; | |
| 149 | - String endDate; | |
| 123 | + Map<String, Object> maps = new HashMap<>(); | |
| 124 | + | |
| 125 | + maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, | |
| 126 | + endDate); | |
| 127 | + shif.setJhlc(maps.get("jhlc").toString()); | |
| 128 | + shif.setEmptMileage(maps.get("ksgl").toString()); | |
| 129 | + shif.setRemMileage(maps.get("remMileage").toString()); | |
| 130 | + shif.setAddMileage(maps.get("addMileage").toString()); | |
| 131 | + shif.setTotalm(maps.get("realMileage").toString()); | |
| 132 | + shif.setCjbc(maps.get("cjbc").toString()); | |
| 133 | + shif.setLjbc(maps.get("ljbc").toString()); | |
| 134 | + shif.setSjbc(maps.get("sjbc").toString()); | |
| 135 | + | |
| 136 | + return shif; | |
| 137 | + | |
| 138 | + } | |
| 139 | + }); | |
| 140 | + | |
| 141 | + return list; | |
| 142 | + } | |
| 143 | + | |
| 144 | + // 班次车辆人员日统计 | |
| 150 | 145 | @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; | |
| 146 | + public List<Shifday> shifday(Map<String, Object> map) { | |
| 147 | + 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 " | |
| 148 | + + " FROM bsth_c_s_sp_info_real r " + " where to_days(r.schedule_date)=to_days('" | |
| 149 | + + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() + " GROUP BY r.j_name "; | |
| 150 | + | |
| 151 | + List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { | |
| 152 | + | |
| 153 | + @Override | |
| 154 | + public Shifday mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 155 | + Shifday shifday = new Shifday(); | |
| 156 | + shifday.setjName(arg0.getString("j_name").toString()); | |
| 157 | + shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString()); | |
| 158 | + shifday.setLpName(arg0.getString("r.lp_name").toString()); | |
| 159 | + shifday.setCarPlate(arg0.getString("cl_zbh").toString()); | |
| 160 | + | |
| 161 | + Map<String, Object> map = new HashMap<>(); | |
| 162 | + map = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | |
| 163 | + arg0.getString("schedule_date")); | |
| 164 | + shifday.setJhlc(map.get("jhlc").toString());// 计划里程 | |
| 165 | + // shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程 | |
| 166 | + shifday.setYygl(map.get("yygl").toString());// 营运里程 | |
| 167 | + shifday.setEmptMileage(map.get("ksgl").toString());// 空驶里程 | |
| 168 | + shifday.setRemMileage(map.get("remMileage").toString());// 抽减里程 | |
| 169 | + shifday.setAddMileage(map.get("addMileage").toString());// 增加里程 | |
| 170 | + shifday.setTotalm(map.get("realMileage").toString());// 总里程 | |
| 171 | + shifday.setJhbc(map.get("jhbc").toString());// 计划班次 | |
| 172 | + // shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次 | |
| 173 | + shifday.setCjbc(map.get("cjbc").toString());// 抽减班次 | |
| 174 | + shifday.setLjbc(map.get("ljbc").toString());// 增加班次 | |
| 175 | + shifday.setSjbc(map.get("sjbc").toString());// 实际班次 | |
| 176 | + return shifday; | |
| 177 | + } | |
| 178 | + }); | |
| 179 | + return list; | |
| 189 | 180 | } |
| 190 | 181 | |
| 182 | + // 换人换车情况日统计 | |
| 183 | + String rq; | |
| 191 | 184 | |
| 192 | - //班次车辆人员日统计 | |
| 193 | 185 | @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; | |
| 186 | + public List<Changetochange> changetochange(Map<String, Object> map) { | |
| 187 | + | |
| 188 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 189 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | |
| 190 | + Date d = null; | |
| 191 | + Date d1 = null; | |
| 192 | + try { | |
| 193 | + d = sdf.parse(map.get("startDate").toString()); | |
| 194 | + d1 = sdf.parse(map.get("endDate").toString()); | |
| 195 | + } catch (ParseException e) { | |
| 196 | + | |
| 197 | + e.printStackTrace(); | |
| 225 | 198 | } |
| 226 | - }); | |
| 227 | - return list; | |
| 228 | - } | |
| 199 | + String rq2 = sdf1.format(d); | |
| 200 | + String rq3 = sdf1.format(d1); | |
| 201 | + | |
| 202 | + rq = rq2 + "-" + rq3; | |
| 203 | + | |
| 204 | + 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 "; | |
| 205 | + if (!map.get("startDate").toString().equals(" ") && !map.get("endDate").toString().equals(" ")) { | |
| 206 | + sql += "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | |
| 207 | + + map.get("endDate").toString() + "'"; | |
| 208 | + } | |
| 209 | + if (!map.get("line").equals("")) { | |
| 210 | + sql += "and line_code='" + map.get("line") + "'"; | |
| 211 | + } | |
| 212 | + if (map.get("sel").equals("2")) { | |
| 213 | + sql += " and c.pcch!=c.pcry"; | |
| 214 | + } else if (map.get("sel").equals("1")) { | |
| 215 | + sql += " and c.jhgh!=c.sjgh"; | |
| 216 | + } | |
| 217 | + | |
| 218 | + List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() { | |
| 229 | 219 | |
| 230 | - //换人换车情况日统计 | |
| 231 | - String rq; | |
| 232 | 220 | @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 | - } | |
| 221 | + public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 222 | + Changetochange chan = new Changetochange(); | |
| 291 | 223 | |
| 224 | + chan.setRq(rq); | |
| 225 | + chan.setGs(arg0.getString("gs").toString()); | |
| 226 | + chan.setFgs(arg0.getString("fgs").toString()); | |
| 227 | + chan.setXl(arg0.getString("xl").toString()); | |
| 228 | + chan.setLp(arg0.getString("lp").toString()); | |
| 229 | + chan.setFssj(arg0.getString("fssj").toString()); | |
| 230 | + chan.setXgsj(arg0.getString("xgsj").toString()); | |
| 231 | + chan.setPcch(arg0.getString("pcch").toString()); | |
| 232 | + chan.setPcry(arg0.getString("pcry").toString()); | |
| 233 | + chan.setJhch(arg0.getString("jhch").toString()); | |
| 234 | + chan.setJhgh(arg0.getString("jhgh").toString()); | |
| 235 | + chan.setSjch(arg0.getString("sjch").toString()); | |
| 236 | + chan.setSjgh(arg0.getString("sjgh").toString()); | |
| 237 | + chan.setYy(arg0.getString("yy").toString()); | |
| 238 | + chan.setXgr(arg0.getString("xgr").toString()); | |
| 239 | + return chan; | |
| 240 | + } | |
| 241 | + }); | |
| 242 | + return list; | |
| 243 | + } | |
| 292 | 244 | |
| 293 | - //路单数据 | |
| 245 | + // 路单数据 | |
| 294 | 246 | @Override |
| 295 | 247 | 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 | 248 | |
| 249 | + String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y" | |
| 250 | + + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "'" + " and '" | |
| 251 | + + map.get("endDate").toString() + "'" + " and y.XLBM='" + map.get("line").toString() + "'" | |
| 252 | + + " GROUP BY y.NBBM "; | |
| 253 | + | |
| 254 | + List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | |
| 255 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 333 | 256 | |
| 334 | - //运营服务阶段报表 | |
| 257 | + @Override | |
| 258 | + public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 259 | + Singledata sin = new Singledata(); | |
| 260 | + sin.setrQ(sdf.format(arg0.getDate("rq"))); | |
| 261 | + sin.setgS(arg0.getString("SSGSDM").toString()); | |
| 262 | + sin.setxL(arg0.getString("XLBM").toString()); | |
| 263 | + sin.setClzbh(arg0.getString("NBBM").toString()); | |
| 264 | + sin.setJsy(arg0.getString("JSY").toString()); | |
| 265 | + sin.setHyl(arg0.getString("YH").toString()); | |
| 266 | + sin.setJzl(arg0.getString("JZL").toString()); | |
| 267 | + // sin.setJzl(arg0.getString(""));//非营业性用油 | |
| 268 | + sin.setJhjl(arg0.getString("JZL")); | |
| 269 | + Map<String, Object> maps = new HashMap<>(); | |
| 270 | + maps = scheduleRealInfoService.findKMBC2(sin.getJsy(), sin.getClzbh(), sin.getrQ()); | |
| 271 | + sin.setjName(maps.get("j_name") == null ? "" : maps.get("j_name").toString()); | |
| 272 | + sin.setSgh(maps.get("s_gh") == null ? "" : maps.get("s_gh").toString()); | |
| 273 | + sin.setsName(maps.get("s_name") == null ? "" : maps.get("s_name").toString()); | |
| 274 | + sin.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | |
| 275 | + sin.setEmptMileage(maps.get("ksgl") == null ? "" : maps.get("ksgl").toString()); | |
| 276 | + sin.setJhjl(maps.get("jhlc") == null ? "" : maps.get("jhlc").toString()); | |
| 277 | + | |
| 278 | + return sin; | |
| 279 | + } | |
| 280 | + }); | |
| 281 | + return list; | |
| 282 | + } | |
| 283 | + | |
| 284 | + // 运营服务阶段报表 | |
| 335 | 285 | @Override |
| 336 | 286 | 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 "; | |
| 287 | + | |
| 288 | + String sql = " SELECT y.RQ,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y" + " where y.RQ BETWEEN '" | |
| 289 | + + map.get("startDate").toString() + "'" + " and '" + map.get("endDate").toString() + "'" | |
| 290 | + + " and y.XLBM='" + map.get("line").toString() + "'" + " GROUP BY y.NBBM "; | |
| 291 | + | |
| 292 | + List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { | |
| 293 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 294 | + | |
| 295 | + @Override | |
| 296 | + public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 297 | + Singledata sin = new Singledata(); | |
| 298 | + Operationservice op = new Operationservice(); | |
| 299 | + op.setXlName(arg0.getString("XLBM").toString()); | |
| 300 | + op.setJzl(arg0.getString("JZL").toString()); | |
| 301 | + op.setXhl(arg0.getString("YH").toString()); | |
| 302 | + Map<String, Object> maps = new HashMap<>(); | |
| 303 | + maps = scheduleRealInfoService.findKMBC2(sin.getJsy(), sin.getClzbh(), sin.getrQ()); | |
| 304 | + op.setXsgl(maps.get("yygl").toString() == null ? "" : maps.get("yygl").toString()); | |
| 305 | + op.setEmptMileage(maps.get("ksgl").toString() == null ? "" : maps.get("ksgl").toString()); | |
| 306 | + op.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString()); | |
| 307 | + return op; | |
| 308 | + } | |
| 309 | + }); | |
| 310 | + return list; | |
| 311 | + } | |
| 312 | + | |
| 313 | + // 车辆加注 | |
| 314 | + @Override | |
| 315 | + public List<Vehicleloading> vehicleloading(String line, String data) { | |
| 316 | + | |
| 317 | + String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y " | |
| 318 | + + " where to_days(y.RQ)=to_days('" + data + "')" + " and y.XLBM='" + line + "' " | |
| 319 | + + " GROUP BY y.NBBM "; | |
| 320 | + | |
| 321 | + List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() { | |
| 322 | + @Override | |
| 323 | + public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 324 | + Vehicleloading ve = new Vehicleloading(); | |
| 325 | + ve.setrQ(arg0.getString("RQ").toString()); | |
| 326 | + ve.setgS(arg0.getString("SSDM").toString()); | |
| 327 | + ve.setxL(arg0.getString("XLBM").toString()); | |
| 328 | + ve.setClzbh(arg0.getString("NBBM").toString()); | |
| 329 | + ve.setHyl(arg0.getString("YH").toString()); | |
| 330 | + ve.setJzl(arg0.getString("JZL").toString()); | |
| 331 | + // ve.setLs(arg0.getString("").toString());//尿素 | |
| 332 | + Map<String, Object> maps = new HashMap<>(); | |
| 333 | + maps = scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("NBBM"), | |
| 334 | + arg0.getString("RQ")); | |
| 335 | + ve.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | |
| 336 | + ve.setJhbc(maps.get("jhbc").toString() == null ? "" : maps.get("jhbc").toString());// 计划班次 | |
| 337 | + ve.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());// 实际班次 | |
| 338 | + return ve; | |
| 339 | + } | |
| 340 | + }); | |
| 341 | + return list; | |
| 342 | + } | |
| 343 | + | |
| 344 | 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; | |
| 345 | + // 营运线路出车率统计表 | |
| 346 | + @Override | |
| 347 | + public List<Turnoutrate> turnoutrate(Map<String, Object> map) { | |
| 348 | + | |
| 349 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 350 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | |
| 351 | + Date d = null; | |
| 352 | + Date d1 = null; | |
| 353 | + try { | |
| 354 | + d = sdf.parse(map.get("startDate").toString()); | |
| 355 | + d1 = sdf.parse(map.get("endDate").toString()); | |
| 356 | + } catch (ParseException e) { | |
| 357 | + | |
| 358 | + e.printStackTrace(); | |
| 360 | 359 | } |
| 361 | - }); | |
| 362 | - return list; | |
| 363 | - } | |
| 360 | + String rq2 = sdf1.format(d); | |
| 361 | + String rq3 = sdf1.format(d1); | |
| 362 | + | |
| 363 | + rq = rq2 + "-" + rq3; | |
| 364 | 364 | |
| 365 | + 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 " | |
| 366 | + + " (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" | |
| 367 | + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | |
| 368 | + + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | |
| 369 | + + map.get("line").toString() + "' AND gs_bm is not null" | |
| 370 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | |
| 371 | + + "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 " | |
| 372 | + + "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 " | |
| 373 | + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | |
| 374 | + + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | |
| 375 | + + "' AND gs_bm is not null " | |
| 376 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | |
| 377 | + + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | |
| 378 | + List<Turnoutrate> list = jdbcTemplate.query(sql, new RowMapper<Turnoutrate>() { | |
| 379 | + | |
| 380 | + @Override | |
| 381 | + public Turnoutrate mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 382 | + Turnoutrate tu = new Turnoutrate(); | |
| 383 | + NumberFormat numberFormat = NumberFormat.getInstance(); | |
| 384 | + numberFormat.setMaximumFractionDigits(2); | |
| 385 | + String result1 = numberFormat.format((float) Integer.parseInt(arg0.getString("scl")) | |
| 386 | + / (float) Integer.parseInt(arg0.getString("jcl")) * 100); | |
| 387 | + String result2 = numberFormat.format((float) Integer.parseInt(arg0.getString("sbc")) | |
| 388 | + / (float) Integer.parseInt(arg0.getString("jbc")) * 100); | |
| 389 | + tu.setRq(rq); | |
| 390 | + tu.setGs(arg0.getString("gs_name").toString()); | |
| 391 | + tu.setZhgs(arg0.getString("fgs_name").toString()); | |
| 392 | + tu.setXl(arg0.getString("xlgs")); | |
| 393 | + tu.setXlmc(arg0.getString("sxl")); | |
| 394 | + tu.setCchjh(arg0.getString("jcl").toString()); | |
| 395 | + tu.setCchsj(arg0.getString("scl").toString()); | |
| 396 | + tu.setCchqz(arg0.getString("sxl").toString()); | |
| 397 | + tu.setChl(result1 + "%");// 出车率 | |
| 398 | + tu.setBcjh(arg0.getString("jbc").toString()); | |
| 399 | + tu.setBcsj(arg0.getString("sbc").toString()); | |
| 400 | + tu.setBbzxl(result2 + "%");// 班次执行率 | |
| 401 | + //tu.setSm(arg0.getString("gs_name").toString()); | |
| 402 | + tu.setGsgs(arg0.getString("gslsbm").toString()); | |
| 403 | + tu.setFgsgs(arg0.getString("fgsbm").toString()); | |
| 404 | + return tu; | |
| 405 | + } | |
| 406 | + | |
| 407 | + }); | |
| 408 | + | |
| 409 | + return list; | |
| 410 | + } | |
| 365 | 411 | |
| 366 | - //车辆加注 | |
| 367 | 412 | @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; | |
| 413 | + public List<Executionrate> executionrate(Map<String, Object> map) { | |
| 414 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 415 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | |
| 416 | + Date d = null; | |
| 417 | + Date d1 = null; | |
| 418 | + try { | |
| 419 | + d = sdf.parse(map.get("startDate").toString()); | |
| 420 | + d1 = sdf.parse(map.get("endDate").toString()); | |
| 421 | + } catch (ParseException e) { | |
| 422 | + | |
| 423 | + e.printStackTrace(); | |
| 393 | 424 | } |
| 394 | - }); | |
| 395 | - return list; | |
| 425 | + String rq2 = sdf1.format(d); | |
| 426 | + String rq3 = sdf1.format(d1); | |
| 427 | + | |
| 428 | + rq = rq2 + "-" + rq3; | |
| 429 | + | |
| 430 | + 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 " | |
| 431 | + + " (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" | |
| 432 | + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | |
| 433 | + + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | |
| 434 | + + map.get("line").toString() + "' AND gs_bm is not null" | |
| 435 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | |
| 436 | + + "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 " | |
| 437 | + + "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 " | |
| 438 | + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | |
| 439 | + + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | |
| 440 | + + "' AND gs_bm is not null " | |
| 441 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | |
| 442 | + + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | |
| 443 | + List<Executionrate> list = jdbcTemplate.query(sql, new RowMapper<Executionrate>() { | |
| 444 | + | |
| 445 | + @Override | |
| 446 | + public Executionrate mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 447 | + Executionrate tu = new Executionrate(); | |
| 448 | + NumberFormat numberFormat = NumberFormat.getInstance(); | |
| 449 | + numberFormat.setMaximumFractionDigits(2); | |
| 450 | + String result1 = numberFormat.format((float) Integer.parseInt(arg0.getString("scl")) | |
| 451 | + / (float) Integer.parseInt(arg0.getString("jcl")) * 100); | |
| 452 | + String result2 = numberFormat.format((float) Integer.parseInt(arg0.getString("sbc")) | |
| 453 | + / (float) Integer.parseInt(arg0.getString("jbc")) * 100); | |
| 454 | + tu.setRq(rq); | |
| 455 | + tu.setGs(arg0.getString("gs_name").toString()); | |
| 456 | + tu.setZhgs(arg0.getString("fgs_name").toString()); | |
| 457 | + tu.setXl(arg0.getString("xlgs")); | |
| 458 | + tu.setXlmc(arg0.getString("sxl")); | |
| 459 | + tu.setCchjh(arg0.getString("jcl").toString()); | |
| 460 | + tu.setCchsj(arg0.getString("scl").toString()); | |
| 461 | + tu.setCchqz(arg0.getString("sxl").toString()); | |
| 462 | + tu.setChl(result1 + "%");// 出车率 | |
| 463 | + tu.setBcjh(arg0.getString("jbc").toString()); | |
| 464 | + tu.setBcsj(arg0.getString("sbc").toString()); | |
| 465 | + tu.setBbzxl(result2 + "%");// 班次执行率 | |
| 466 | + tu.setSm(arg0.getString("xl_name").toString()); | |
| 467 | + tu.setGsgs(arg0.getString("gslsbm").toString()); | |
| 468 | + tu.setFgsgs(arg0.getString("fgsbm").toString()); | |
| 469 | + return tu; | |
| 470 | + } | |
| 471 | + | |
| 472 | + }); | |
| 473 | + | |
| 474 | + return list; | |
| 396 | 475 | } |
| 397 | 476 | |
| 477 | + //营运线路名称统计表 | |
| 478 | + @Override | |
| 479 | + public List<Allline> allline(Map<String, Object> map) { | |
| 480 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 481 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | |
| 482 | + Date d = null; | |
| 483 | + Date d1 = null; | |
| 484 | + try { | |
| 485 | + d = sdf.parse(map.get("startDate").toString()); | |
| 486 | + d1 = sdf.parse(map.get("endDate").toString()); | |
| 487 | + } catch (ParseException e) { | |
| 488 | + | |
| 489 | + e.printStackTrace(); | |
| 490 | + } | |
| 491 | + String rq2 = sdf1.format(d); | |
| 492 | + String rq3 = sdf1.format(d1); | |
| 493 | + | |
| 494 | + rq = rq2 + "-" + rq3; | |
| 398 | 495 | |
| 496 | + 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 " | |
| 497 | + + " (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" | |
| 498 | + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | |
| 499 | + + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | |
| 500 | + + map.get("line").toString() + "' AND gs_bm is not null" | |
| 501 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | |
| 502 | + + "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 " | |
| 503 | + + "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 " | |
| 504 | + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | |
| 505 | + + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | |
| 506 | + + "' AND gs_bm is not null " | |
| 507 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | |
| 508 | + + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | |
| 509 | + List<Allline> list = jdbcTemplate.query(sql, new RowMapper<Allline>() { | |
| 399 | 510 | |
| 511 | + @Override | |
| 512 | + public Allline mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 513 | + Allline tu = new Allline(); | |
| 514 | + NumberFormat numberFormat = NumberFormat.getInstance(); | |
| 515 | + numberFormat.setMaximumFractionDigits(2); | |
| 516 | + String result1 = numberFormat.format((float) Integer.parseInt(arg0.getString("scl")) | |
| 517 | + / (float) Integer.parseInt(arg0.getString("jcl")) * 100); | |
| 518 | + String result2 = numberFormat.format((float) Integer.parseInt(arg0.getString("sbc")) | |
| 519 | + / (float) Integer.parseInt(arg0.getString("jbc")) * 100); | |
| 520 | + tu.setRq(rq); | |
| 521 | + tu.setGs(arg0.getString("gs_name").toString()); | |
| 522 | + tu.setZhgs(arg0.getString("fgs_name").toString()); | |
| 523 | + tu.setXl(arg0.getString("xl_name")); | |
| 524 | + tu.setXlmc(arg0.getString("sxl")); | |
| 525 | + tu.setCchjh(arg0.getString("jcl").toString()); | |
| 526 | + tu.setCchsj(arg0.getString("scl").toString()); | |
| 527 | + tu.setCchqz(arg0.getString("sxl").toString()); | |
| 528 | + tu.setChl(result1 + "%");// 出车率 | |
| 529 | + tu.setBcjh(arg0.getString("jbc").toString()); | |
| 530 | + tu.setBcsj(arg0.getString("sbc").toString()); | |
| 531 | + tu.setBbzxl(result2 + "%");// 班次执行率 | |
| 532 | + //tu.setSm(arg0.getString("xl_name").toString()); | |
| 533 | + tu.setGsgs(arg0.getString("gslsbm").toString()); | |
| 534 | + tu.setFgsgs(arg0.getString("fgsbm").toString()); | |
| 535 | + return tu; | |
| 536 | + } | |
| 537 | + | |
| 538 | + }); | |
| 539 | + | |
| 540 | + return list; | |
| 541 | + } | |
| 400 | 542 | } | ... | ... |
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/changetochange.html
| 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 style="display: inline-block;"> | |
| 53 | - <span class="item-label" style="width: 120px;">类型: </span> | |
| 54 | - <select class="form-control" id="sel"> | |
| 55 | - <option value="">请选择</option> | |
| 56 | - <option value="1">换人</option> | |
| 57 | - <option value="2">换车</option> | |
| 58 | - </select> | |
| 59 | - </div> | |
| 60 | - <div class="form-group"> | |
| 61 | - <input class="btn btn-default" type="button" id="query" value="筛选"/> | |
| 62 | - <input class="btn btn-default" type="button" id="export" value="导出"/> | |
| 63 | - </div> | |
| 64 | - </form> | |
| 65 | - </div> | |
| 66 | - <div class="portlet-body"> | |
| 67 | - <div class="table-container" style="margin-top: 20px;overflow:auto;min-width: 1000px"> | |
| 68 | - <table class="table table-bordered table-hover table-checkable" id="forms"> | |
| 69 | - <thead> | |
| 70 | - <tr> | |
| 71 | - <th colspan="15">换人换车情况统计表</th> | |
| 72 | - </tr> | |
| 73 | - <tr> | |
| 74 | - <td rowspan="3" style=" padding-top: 50px;">日期</td> | |
| 75 | - <td rowspan="3" style=" padding-top: 50px;">公司</td> | |
| 76 | - <td rowspan="3" style=" padding-top: 50px;">分公司</td> | |
| 77 | - <td rowspan="3" style=" padding-top: 50px;">线路</td> | |
| 78 | - <td rowspan="3" style=" padding-top: 50px;">路牌</td> | |
| 79 | - <td rowspan="3" style=" padding-top: 50px;">发生时间</td> | |
| 80 | - <td rowspan="3" style=" padding-top: 50px;">修改时间</td> | |
| 81 | - <td colspan="2">配车</td> | |
| 82 | - <td colspan="4">人员</td> | |
| 83 | - <td rowspan="3" style=" padding-top: 50px;">原因</td> | |
| 84 | - <td rowspan="3" style=" padding-top: 50px;">修改人</td> | |
| 85 | - </tr> | |
| 86 | - <tr> | |
| 87 | - <td>计划</td> | |
| 88 | - <td>实际</td> | |
| 89 | - <td colspan="2">计划</td> | |
| 90 | - <td colspan="2">实际</td> | |
| 91 | - | |
| 92 | - </tr> | |
| 93 | - <tr> | |
| 94 | - <td>车号</td> | |
| 95 | - <td>车号</td> | |
| 96 | - <td>工号</td> | |
| 97 | - <td>人员</td> | |
| 98 | - <td>工号</td> | |
| 99 | - <td>人员</td> | |
| 100 | - </tr> | |
| 101 | - </thead> | |
| 102 | - <tbody> | |
| 103 | - | |
| 104 | - </tbody> | |
| 105 | - </table> | |
| 106 | - </div> | |
| 107 | - </div> | |
| 108 | - </div> | |
| 109 | - </div> | |
| 110 | -</div> | |
| 111 | - | |
| 112 | -<script> | |
| 113 | - $(function(){ | |
| 114 | - // 关闭左侧栏 | |
| 115 | - if (!$('body').hasClass('page-sidebar-closed')) | |
| 116 | - $('.menu-toggler.sidebar-toggler').click(); | |
| 117 | - | |
| 118 | - $("#startDate,#endDate").datetimepicker({ | |
| 119 | - format : 'YYYY-MM-DD', | |
| 120 | - locale : 'zh-cn' | |
| 121 | - }); | |
| 122 | - | |
| 123 | - $('#line').select2({ | |
| 124 | - ajax: { | |
| 125 | - url: '/realSchedule/findLine', | |
| 126 | - type: 'post', | |
| 127 | - dataType: 'json', | |
| 128 | - delay: 150, | |
| 129 | - data: function(params){ | |
| 130 | - return{line: params.term}; | |
| 131 | - }, | |
| 132 | - processResults: function (data) { | |
| 133 | - return { | |
| 134 | - results: data | |
| 135 | - }; | |
| 136 | - }, | |
| 137 | - cache: true | |
| 138 | - }, | |
| 139 | - templateResult: function(repo){ | |
| 140 | - if (repo.loading) return repo.text; | |
| 141 | - var h = '<span>'+repo.text+'</span>'; | |
| 142 | - return h; | |
| 143 | - }, | |
| 144 | - escapeMarkup: function (markup) { return markup; }, | |
| 145 | - minimumInputLength: 1, | |
| 146 | - templateSelection: function(repo){ | |
| 147 | - return repo.text; | |
| 148 | - }, | |
| 149 | - language: { | |
| 150 | - noResults: function(){ | |
| 151 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 152 | - }, | |
| 153 | - inputTooShort : function(e) { | |
| 154 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 155 | - }, | |
| 156 | - searching : function() { | |
| 157 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 158 | - } | |
| 159 | - } | |
| 160 | - }); | |
| 161 | - var line; | |
| 162 | - var startDate; | |
| 163 | - var endDate; | |
| 164 | - $("#query").on("click",function(){ | |
| 165 | - line = $("#line").val(); | |
| 166 | - sel = $("#sel").val(); | |
| 167 | - var startDate1=$("#startDate").val(); | |
| 168 | - var endDate1=$("#endDate").val(); | |
| 169 | - | |
| 170 | - if(startDate1!=''&&endDate1!=''){ | |
| 171 | - $post('/mcy_forms/changetochange',{sel:sel,line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ | |
| 172 | - startDate = $("#startDate").val(); | |
| 173 | - endDate = $("#endDate").val(); | |
| 174 | - $("#sDate").text(startDate); | |
| 175 | - $("#eDate").text(endDate); | |
| 176 | - var temp = {}; | |
| 177 | - var today_account = 0; | |
| 178 | - temp["line"] = $("#line").text(); | |
| 179 | - $.each(result, function(i, obj) { | |
| 180 | - if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){ | |
| 181 | - today_account++; | |
| 182 | - } | |
| 183 | - obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | |
| 184 | - }); | |
| 185 | - // 把数据填充到模版中 | |
| 186 | - var tbodyHtml = template('changetochange',{list:result}); | |
| 187 | - // 把渲染好的模版html文本追加到表格中 | |
| 188 | - $('#forms tbody').html(tbodyHtml); | |
| 189 | - }) | |
| 190 | - | |
| 191 | - }else{ | |
| 192 | - alert("请选择时间范围!"); | |
| 193 | - } | |
| 194 | - }); | |
| 195 | - | |
| 196 | - $("#export").on("click",function(){ | |
| 197 | - $post('/mcy_export/changetochangeExport',{startDate:startDate,endDate:endDate,type:'export'},function(result){ | |
| 198 | - window.open("/downloadFile/download?fileName=换人换车情况日统计"+moment(startDate).format("YYYYMMDD")); | |
| 199 | - }); | |
| 200 | - }); | |
| 201 | - }); | |
| 202 | -</script> | |
| 203 | -<script type="text/html" id="changetochange"> | |
| 204 | - {{each list as obj i}} | |
| 205 | - <tr> | |
| 206 | - <td>{{obj.rq}}</td> | |
| 207 | - <td>{{obj.gs}}</td> | |
| 208 | - <td>{{obj.fgs}}</td> | |
| 209 | - <td>{{obj.xl}}</td> | |
| 210 | - <td>{{obj.lp}}</td> | |
| 211 | - <td>{{obj.fssj}}</td> | |
| 212 | - <td>{{obj.xgsj}}</td> | |
| 213 | - <td>{{obj.pcch}}</td> | |
| 214 | - <td>{{obj.pcry}}</td> | |
| 215 | - <td>{{obj.jhgh}}</td> | |
| 216 | - <td>{{obj.jhch}}</td> | |
| 217 | - <td>{{obj.sjgh}}</td> | |
| 218 | - <td>{{obj.sjch}}</td> | |
| 219 | - <td>{{obj.yy}}</td> | |
| 220 | - <td>{{obj.xgr}}</td> | |
| 221 | - </tr> | |
| 222 | - {{/each}} | |
| 223 | - {{if list.length == 0}} | |
| 224 | - <tr> | |
| 225 | - <td colspan="15"><h6 class="muted">没有找到相关数据</h6></td> | |
| 226 | - </tr> | |
| 227 | - {{/if}} | |
| 228 | -</script> | |
| 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 style="display: inline-block;"> | |
| 53 | + <span class="item-label" style="width: 120px;">绫诲瀷: </span> | |
| 54 | + <select class="form-control" id="sel"> | |
| 55 | + <option value="">璇烽夋嫨</option> | |
| 56 | + <option value="1">鎹汉</option> | |
| 57 | + <option value="2">鎹㈣溅</option> | |
| 58 | + </select> | |
| 59 | + </div> | |
| 60 | + <div class="form-group"> | |
| 61 | + <input class="btn btn-default" type="button" id="query" value="绛涢"/> | |
| 62 | + <input class="btn btn-default" type="button" id="export" value="瀵煎嚭"/> | |
| 63 | + </div> | |
| 64 | + </form> | |
| 65 | + </div> | |
| 66 | + <div class="portlet-body"> | |
| 67 | + <div class="table-container" style="margin-top: 20px;overflow:auto;min-width: 1000px"> | |
| 68 | + <table class="table table-bordered table-hover table-checkable" id="forms"> | |
| 69 | + <thead> | |
| 70 | + <tr> | |
| 71 | + <th colspan="15">鎹汉鎹㈣溅鎯呭喌缁熻琛</th> | |
| 72 | + </tr> | |
| 73 | + <tr> | |
| 74 | + <td rowspan="3" style=" padding-top: 50px;">鏃ユ湡</td> | |
| 75 | + <td rowspan="3" style=" padding-top: 50px;">鍏徃</td> | |
| 76 | + <td rowspan="3" style=" padding-top: 50px;">鍒嗗叕鍙</td> | |
| 77 | + <td rowspan="3" style=" padding-top: 50px;">绾胯矾</td> | |
| 78 | + <td rowspan="3" style=" padding-top: 50px;">璺墝</td> | |
| 79 | + <td rowspan="3" style=" padding-top: 50px;">鍙戠敓鏃堕棿</td> | |
| 80 | + <td rowspan="3" style=" padding-top: 50px;">淇敼鏃堕棿</td> | |
| 81 | + <td colspan="2">閰嶈溅</td> | |
| 82 | + <td colspan="4">浜哄憳</td> | |
| 83 | + <td rowspan="3" style=" padding-top: 50px;">鍘熷洜</td> | |
| 84 | + <td rowspan="3" style=" padding-top: 50px;">淇敼浜</td> | |
| 85 | + </tr> | |
| 86 | + <tr> | |
| 87 | + <td>璁″垝</td> | |
| 88 | + <td>瀹為檯</td> | |
| 89 | + <td colspan="2">璁″垝</td> | |
| 90 | + <td colspan="2">瀹為檯</td> | |
| 91 | + | |
| 92 | + </tr> | |
| 93 | + <tr> | |
| 94 | + <td>杞﹀彿</td> | |
| 95 | + <td>杞﹀彿</td> | |
| 96 | + <td>宸ュ彿</td> | |
| 97 | + <td>浜哄憳</td> | |
| 98 | + <td>宸ュ彿</td> | |
| 99 | + <td>浜哄憳</td> | |
| 100 | + </tr> | |
| 101 | + </thead> | |
| 102 | + <tbody> | |
| 103 | + | |
| 104 | + </tbody> | |
| 105 | + </table> | |
| 106 | + </div> | |
| 107 | + </div> | |
| 108 | + </div> | |
| 109 | + </div> | |
| 110 | +</div> | |
| 111 | + | |
| 112 | +<script> | |
| 113 | + $(function(){ | |
| 114 | + // 鍏抽棴宸︿晶鏍 | |
| 115 | + if (!$('body').hasClass('page-sidebar-closed')) | |
| 116 | + $('.menu-toggler.sidebar-toggler').click(); | |
| 117 | + | |
| 118 | + $("#startDate,#endDate").datetimepicker({ | |
| 119 | + format : 'YYYY-MM-DD', | |
| 120 | + locale : 'zh-cn' | |
| 121 | + }); | |
| 122 | + | |
| 123 | + $('#line').select2({ | |
| 124 | + ajax: { | |
| 125 | + url: '/realSchedule/findLine', | |
| 126 | + type: 'post', | |
| 127 | + dataType: 'json', | |
| 128 | + delay: 150, | |
| 129 | + data: function(params){ | |
| 130 | + return{line: params.term}; | |
| 131 | + }, | |
| 132 | + processResults: function (data) { | |
| 133 | + return { | |
| 134 | + results: data | |
| 135 | + }; | |
| 136 | + }, | |
| 137 | + cache: true | |
| 138 | + }, | |
| 139 | + templateResult: function(repo){ | |
| 140 | + if (repo.loading) return repo.text; | |
| 141 | + var h = '<span>'+repo.text+'</span>'; | |
| 142 | + return h; | |
| 143 | + }, | |
| 144 | + escapeMarkup: function (markup) { return markup; }, | |
| 145 | + minimumInputLength: 1, | |
| 146 | + templateSelection: function(repo){ | |
| 147 | + return repo.text; | |
| 148 | + }, | |
| 149 | + language: { | |
| 150 | + noResults: function(){ | |
| 151 | + return '<span style="color:red;font-size: 12px;">娌℃湁鎼滅储鍒扮嚎璺紒</span>'; | |
| 152 | + }, | |
| 153 | + inputTooShort : function(e) { | |
| 154 | + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 杈撳叆绾胯矾鎼滅储绾胯矾</span>'; | |
| 155 | + }, | |
| 156 | + searching : function() { | |
| 157 | + return '<span style="color:gray;font-size: 12px;"> 姝e湪鎼滅储绾胯矾...</span>'; | |
| 158 | + } | |
| 159 | + } | |
| 160 | + }); | |
| 161 | + var line; | |
| 162 | + var startDate; | |
| 163 | + var endDate; | |
| 164 | + $("#query").on("click",function(){ | |
| 165 | + line = $("#line").val(); | |
| 166 | + sel = $("#sel").val(); | |
| 167 | + var startDate1=$("#startDate").val(); | |
| 168 | + var endDate1=$("#endDate").val(); | |
| 169 | + | |
| 170 | + if(startDate1!=''&&endDate1!=''){ | |
| 171 | + $post('/mcy_forms/changetochange',{sel:sel,line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ | |
| 172 | + startDate = $("#startDate").val(); | |
| 173 | + endDate = $("#endDate").val(); | |
| 174 | + $("#sDate").text(startDate); | |
| 175 | + $("#eDate").text(endDate); | |
| 176 | + var temp = {}; | |
| 177 | + var today_account = 0; | |
| 178 | + temp["line"] = $("#line").text(); | |
| 179 | + $.each(result, function(i, obj) { | |
| 180 | + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){ | |
| 181 | + today_account++; | |
| 182 | + } | |
| 183 | + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | |
| 184 | + }); | |
| 185 | + // 鎶婃暟鎹~鍏呭埌妯$増涓 | |
| 186 | + var tbodyHtml = template('changetochange',{list:result}); | |
| 187 | + // 鎶婃覆鏌撳ソ鐨勬ā鐗坔tml鏂囨湰杩藉姞鍒拌〃鏍间腑 | |
| 188 | + $('#forms tbody').html(tbodyHtml); | |
| 189 | + }) | |
| 190 | + | |
| 191 | + }else{ | |
| 192 | + alert("璇烽夋嫨鏃堕棿鑼冨洿!"); | |
| 193 | + } | |
| 194 | + }); | |
| 195 | + | |
| 196 | + $("#export").on("click",function(){ | |
| 197 | + $post('/mcy_export/changetochangeExport',{startDate:startDate,endDate:endDate,type:'export'},function(result){ | |
| 198 | + window.open("/downloadFile/download?fileName=鎹汉鎹㈣溅鎯呭喌鏃ョ粺璁"+moment(startDate).format("YYYYMMDD")); | |
| 199 | + }); | |
| 200 | + }); | |
| 201 | + }); | |
| 202 | +</script> | |
| 203 | +<script type="text/html" id="changetochange"> | |
| 204 | + {{each list as obj i}} | |
| 205 | + <tr> | |
| 206 | + <td>{{obj.rq}}</td> | |
| 207 | + <td>{{obj.gs}}</td> | |
| 208 | + <td>{{obj.fgs}}</td> | |
| 209 | + <td>{{obj.xl}}</td> | |
| 210 | + <td>{{obj.lp}}</td> | |
| 211 | + <td>{{obj.fssj}}</td> | |
| 212 | + <td>{{obj.xgsj}}</td> | |
| 213 | + <td>{{obj.pcch}}</td> | |
| 214 | + <td>{{obj.pcry}}</td> | |
| 215 | + <td>{{obj.jhgh}}</td> | |
| 216 | + <td>{{obj.jhch}}</td> | |
| 217 | + <td>{{obj.sjgh}}</td> | |
| 218 | + <td>{{obj.sjch}}</td> | |
| 219 | + <td>{{obj.yy}}</td> | |
| 220 | + <td>{{obj.xgr}}</td> | |
| 221 | + </tr> | |
| 222 | + {{/each}} | |
| 223 | + {{if list.length == 0}} | |
| 224 | + <tr> | |
| 225 | + <td colspan="15"><h6 class="muted">娌℃湁鎵惧埌鐩稿叧鏁版嵁</h6></td> | |
| 226 | + </tr> | |
| 227 | + {{/if}} | |
| 228 | +</script> | ... | ... |
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/turnoutrate.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="3">出车数</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 | + <td>实际</td> | |
| 82 | + </tr> | |
| 83 | + </thead> | |
| 84 | + <tbody id="tbody"> | |
| 85 | + | |
| 86 | + </tbody> | |
| 87 | + <tr> | |
| 88 | + <td colspan="1">分类汇总</td> | |
| 89 | + <td><span id="total_gs"> </span></td> | |
| 90 | + <td><span id="total_zhgs"> </span></td> | |
| 91 | + <td><span id="total_xlts"> </span></td> | |
| 92 | + <td><span id="total_jh"> </span></td> | |
| 93 | + <td><span id="total_sj"> </span></td> | |
| 94 | + <td><span id="total_qz"> </span></td> | |
| 95 | + <td><span id="total_ccl"> </span></td> | |
| 96 | + <td><span id="total_bcjh"> </span></td> | |
| 97 | + <td><span id="total_bcsj"> </span></td> | |
| 98 | + <td><span id="total_bczxl"> </span></td> | |
| 99 | + <td><span id="total_sm"> </span></td> | |
| 100 | + </tr> | |
| 101 | + </table> | |
| 102 | + </div> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + </div> | |
| 106 | +</div> | |
| 107 | + | |
| 108 | +<script> | |
| 109 | + $(function(){ | |
| 110 | + // 关闭左侧栏 | |
| 111 | + if (!$('body').hasClass('page-sidebar-closed')) | |
| 112 | + $('.menu-toggler.sidebar-toggler').click(); | |
| 113 | + | |
| 114 | + $("#startDate,#endDate").datetimepicker({ | |
| 115 | + format : 'YYYY-MM-DD', | |
| 116 | + locale : 'zh-cn' | |
| 117 | + }); | |
| 118 | + | |
| 119 | + $.get('/basic/lineCode2Name',function(result){ | |
| 120 | + var data=[]; | |
| 121 | + | |
| 122 | + for(var code in result){ | |
| 123 | + data.push({id: code, text: result[code]}); | |
| 124 | + } | |
| 125 | + initPinYinSelect2('#line',data,''); | |
| 126 | + | |
| 127 | + }) | |
| 128 | + | |
| 129 | + var line; | |
| 130 | + var startDate; | |
| 131 | + var endDate; | |
| 132 | + $("#query").on("click",function(){ | |
| 133 | + | |
| 134 | + line = $("#line").val(); | |
| 135 | + startDate1=$("#startDate").val(); | |
| 136 | + endDate1=$("#endDate").val(); | |
| 137 | + | |
| 138 | + if(startDate1!=''&&endDate1!=''){ | |
| 139 | + $post('/mcy_forms/turnoutrate',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ | |
| 140 | + // 把数据填充到模版中 | |
| 141 | + var tbodyHtml = template('turnoutrate',{list:result}); | |
| 142 | + // 把渲染好的模版html文本追加到表格中 | |
| 143 | + $('#tbody').html(tbodyHtml); | |
| 144 | + line = $("#line").val(); | |
| 145 | + startDate = $("#startDate").val(); | |
| 146 | + endDate = $("#endDate").val(); | |
| 147 | + $("#sDate").text(startDate); | |
| 148 | + $("#eDate").text(endDate); | |
| 149 | + | |
| 150 | + var total_xlts = 0,total_jh = 0; | |
| 151 | + var total_sj = 0,total_qz = 0,total_ccl = 0,total_bcjh = 0; | |
| 152 | + var total_bcjh = 0,total_bcsj = 0,total_bczxl = 0; | |
| 153 | + var total_gs=0; | |
| 154 | + var total_zhgs=0; | |
| 155 | + $.each(result, function(i, obj) { | |
| 156 | + total_gs +=Number(obj.gsgs); | |
| 157 | + total_zhgs +=Number(obj.fgsgs); | |
| 158 | + total_xlts += Number(obj.xl); | |
| 159 | + total_jh = Number(obj.cchjh)+Number(total_jh); | |
| 160 | + total_sj = Number(obj.cchsj)+Number(total_sj); | |
| 161 | + total_qz = Number(obj.cchqz)+Number(total_qz); | |
| 162 | + | |
| 163 | + total_ccl =(Number(total_sj)/Number(total_jh))*100; | |
| 164 | + total_bcjh = Number(obj.bcjh)+Number(total_bcjh); | |
| 165 | + total_bcsj = Number(obj.bcsj)+Number(total_bcsj); | |
| 166 | + total_bczxl = (Number(total_bcsj)/Number(total_bcjh))*100; | |
| 167 | + | |
| 168 | + }); | |
| 169 | + $("#total_gs").text(total_gs); | |
| 170 | + $("#total_zhgs").text(total_zhgs); | |
| 171 | + $("#total_xlts").text(total_xlts); | |
| 172 | + $("#total_jh").text(total_jh); | |
| 173 | + $("#total_sj").text(total_sj); | |
| 174 | + $("#total_qz").text(total_qz); | |
| 175 | + $("#total_ccl").text(total_ccl.toFixed(2)+'%'); | |
| 176 | + $("#total_bcjh").text(total_bcjh); | |
| 177 | + $("#total_bcsj").text(total_bcsj); | |
| 178 | + $("#total_bczxl").text(total_bczxl.toFixed(2)+'%'); | |
| 179 | + | |
| 180 | + var temp = {}; | |
| 181 | + var today_account = 0; | |
| 182 | + | |
| 183 | + temp["line"] = $("#line").text(); | |
| 184 | + $.each(result, function(i, obj) { | |
| 185 | + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){ | |
| 186 | + today_account++; | |
| 187 | + } | |
| 188 | + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | |
| 189 | + }); | |
| 190 | + | |
| 191 | + }) | |
| 192 | + | |
| 193 | + }else{ | |
| 194 | + alert("请选择时间范围!"); | |
| 195 | + } | |
| 196 | + }); | |
| 197 | + | |
| 198 | + $("#export").on("click",function(){ | |
| 199 | + $post('/mcy_export/turnoutrateExport',{line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){ | |
| 200 | + window.open("/downloadFile/download?fileName=营运线路出车率统计表"+moment(startDate).format("YYYYMMDD")); | |
| 201 | + }); | |
| 202 | + }); | |
| 203 | + }); | |
| 204 | +</script> | |
| 205 | +<script type="text/html" id="turnoutrate"> | |
| 206 | + {{each list as obj i}} | |
| 207 | + <tr> | |
| 208 | + <td>{{obj.rq}}</td> | |
| 209 | + <td>{{obj.gs}}</td> | |
| 210 | + <td>{{obj.zhgs}}</td> | |
| 211 | + <td>{{obj.xl}}</td> | |
| 212 | + <td>{{obj.cchjh}}</td> | |
| 213 | + <td>{{obj.cchsj}}</td> | |
| 214 | + <td>{{obj.cchqz}}</td> | |
| 215 | + <td>{{obj.chl}}</td> | |
| 216 | + <td>{{obj.bcjh}}</td> | |
| 217 | + <td>{{obj.bcsj}}</td> | |
| 218 | + <td>{{obj.bbzxl}}</td> | |
| 219 | + <td>{{obj.gs}}</td> | |
| 220 | + </tr> | |
| 221 | + {{/each}} | |
| 222 | + {{if list.length == 0}} | |
| 223 | + <tr> | |
| 224 | + <td colspan="12"><h6 class="muted">没有找到相关数据</h6></td> | |
| 225 | + </tr> | |
| 226 | + {{/if}} | |
| 227 | +</script> | ... | ... |
src/main/resources/static/pages/forms/statement/waybillday.html
| 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 | -</style> | |
| 19 | - | |
| 20 | -<div class="page-head"> | |
| 21 | - <div class="page-title"> | |
| 22 | - <h1>行车路单日报表</h1> | |
| 23 | - </div> | |
| 24 | -</div> | |
| 25 | - | |
| 26 | -<div class="row"> | |
| 27 | - <div class="col-md-12"> | |
| 28 | - <div class="portlet light porttlet-fit bordered"> | |
| 29 | - <div class="portlet-title"> | |
| 30 | - <form class="form-inline" action="" method="post"> | |
| 31 | - <div style="display: inline-block;"> | |
| 32 | - <span class="item-label" style="width: 80px;">线路: </span> | |
| 33 | - <select class="form-control" name="line" id="line" style="width: 180px;"></select> | |
| 34 | - </div> | |
| 35 | - <div style="display: inline-block;margin-left: 15px;"> | |
| 36 | - <span class="item-label" style="width: 80px;">时间: </span> | |
| 37 | - <input class="form-control" type="text" id="date" style="width: 180px;"/> | |
| 38 | - </div> | |
| 39 | - <div class="form-group"> | |
| 40 | - <input class="btn btn-default" type="button" id="query" value="筛选"/> | |
| 41 | - <input class="btn btn-default" type="button" id="export" value="导出"/> | |
| 42 | - </div> | |
| 43 | - </form> | |
| 44 | - </div> | |
| 45 | - <div class="portlet-body"> | |
| 46 | - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | |
| 47 | - <table class="table table-bordered table-hover table-checkable" id="forms" > | |
| 48 | - <thead> | |
| 49 | - <tr> | |
| 50 | - <th>车号</th> | |
| 51 | - <th>空驶公里</th> | |
| 52 | - <th>加注量</th> | |
| 53 | - <th>机油</th> | |
| 54 | - <th>油耗</th> | |
| 55 | - <th>驾驶员</th> | |
| 56 | - <th>里程</th> | |
| 57 | - <th>用油</th> | |
| 58 | - </tr> | |
| 59 | - </thead> | |
| 60 | - <tbody> | |
| 61 | - | |
| 62 | - </tbody> | |
| 63 | - </table> | |
| 64 | - </div> | |
| 65 | - </div> | |
| 66 | - </div> | |
| 67 | - </div> | |
| 68 | -</div> | |
| 69 | - | |
| 70 | -<script> | |
| 71 | - $(function(){ | |
| 72 | - var reqCodeMap = {"0xA1": '请求恢复运营', "0xA2": '申请调档', "0xA3": '出场请求', "0xA5": '进场请求', "0xA7": '加油请求', "0x50": '车辆故障', "0x70": '路阻报告', "0x60": '事故报告', "0x11": '扣证纠纷', "0x12" : '报警'}; | |
| 73 | - // 关闭左侧栏 | |
| 74 | - if (!$('body').hasClass('page-sidebar-closed')) | |
| 75 | - $('.menu-toggler.sidebar-toggler').click(); | |
| 76 | - | |
| 77 | - $("#date").datetimepicker({ | |
| 78 | - format : 'YYYY-MM-DD', | |
| 79 | - locale : 'zh-cn' | |
| 80 | - }); | |
| 81 | - | |
| 82 | - $.get('/basic/lineCode2Name',function(result){ | |
| 83 | - var data=[]; | |
| 84 | - | |
| 85 | - for(var code in result){ | |
| 86 | - data.push({id: code, text: result[code]}); | |
| 87 | - } | |
| 88 | - console.log(data); | |
| 89 | - initPinYinSelect2('#line',data,''); | |
| 90 | - | |
| 91 | - }) | |
| 92 | - var line; | |
| 93 | - var date; | |
| 94 | - $("#query").on("click",function(){ | |
| 95 | - line = $("#line").val(); | |
| 96 | - date = $("#date").val(); | |
| 97 | - $post('/mcy_forms/waybillday',{line:line,date:date},function(result){ | |
| 98 | - $.each(result, function(i, obj) { | |
| 99 | - obj.requestType = reqCodeMap[obj.requestType]; | |
| 100 | - }); | |
| 101 | - // 把数据填充到模版中 | |
| 102 | - var tbodyHtml = template('waybillday',{list:result}); | |
| 103 | - // 把渲染好的模版html文本追加到表格中 | |
| 104 | - $('#forms tbody').html(tbodyHtml); | |
| 105 | - }); | |
| 106 | - }); | |
| 107 | - | |
| 108 | - $("#export").on("click",function(){ | |
| 109 | - $post('/mcy_export/waybilldayExport',{line:line,date:date,type:'export'},function(result){ | |
| 110 | - window.open("/downloadFile/download?fileName=行车路单日报表"+moment(date).format("YYYYMMDD")); | |
| 111 | - }); | |
| 112 | - }); | |
| 113 | - }); | |
| 114 | -</script> | |
| 115 | -<script type="text/html" id="waybillday"> | |
| 116 | - {{each list as obj i}} | |
| 117 | - <tr> | |
| 118 | - <td>{{obj.carPlate}}</td> | |
| 119 | - <td>{{obj.jzl1}} </td> | |
| 120 | - <td>{{obj.jzl}}</td> | |
| 121 | - <td> </td> | |
| 122 | - <td>{{obj.yh}}</td> | |
| 123 | - <td>{{obj.jName}}</td> | |
| 124 | - <td>{{obj.zlc}}</td> | |
| 125 | - <td>{{obj.yh}}</td> | |
| 126 | - </tr> | |
| 127 | - {{/each}} | |
| 128 | - {{if list.length == 0}} | |
| 129 | - <tr> | |
| 130 | - <td colspan="8"><h6 class="muted">没有找到相关数据</h6></td> | |
| 131 | - </tr> | |
| 132 | - {{/if}} | |
| 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 | +</style> | |
| 19 | + | |
| 20 | +<div class="page-head"> | |
| 21 | + <div class="page-title"> | |
| 22 | + <h1>行车路单日报表</h1> | |
| 23 | + </div> | |
| 24 | +</div> | |
| 25 | + | |
| 26 | +<div class="row"> | |
| 27 | + <div class="col-md-12"> | |
| 28 | + <div class="portlet light porttlet-fit bordered"> | |
| 29 | + <div class="portlet-title"> | |
| 30 | + <form class="form-inline" action="" method="post"> | |
| 31 | + <div style="display: inline-block;"> | |
| 32 | + <span class="item-label" style="width: 80px;">线路: </span> | |
| 33 | + <select class="form-control" name="line" id="line" style="width: 180px;"></select> | |
| 34 | + </div> | |
| 35 | + <div style="display: inline-block;margin-left: 15px;"> | |
| 36 | + <span class="item-label" style="width: 80px;">时间: </span> | |
| 37 | + <input class="form-control" type="text" id="date" style="width: 180px;"/> | |
| 38 | + </div> | |
| 39 | + <div class="form-group"> | |
| 40 | + <input class="btn btn-default" type="button" id="query" value="筛选"/> | |
| 41 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | |
| 42 | + </div> | |
| 43 | + </form> | |
| 44 | + </div> | |
| 45 | + <div class="portlet-body"> | |
| 46 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | |
| 47 | + <table class="table table-bordered table-hover table-checkable" id="forms" > | |
| 48 | + <thead> | |
| 49 | + <tr> | |
| 50 | + <th>车号</th> | |
| 51 | + <th>空驶公里</th> | |
| 52 | + <th>加注量</th> | |
| 53 | + <th>机油</th> | |
| 54 | + <th>油耗</th> | |
| 55 | + <th>驾驶员</th> | |
| 56 | + <th>里程</th> | |
| 57 | + <th>用油</th> | |
| 58 | + </tr> | |
| 59 | + </thead> | |
| 60 | + <tbody> | |
| 61 | + | |
| 62 | + </tbody> | |
| 63 | + </table> | |
| 64 | + </div> | |
| 65 | + </div> | |
| 66 | + </div> | |
| 67 | + </div> | |
| 68 | +</div> | |
| 69 | + | |
| 70 | +<script> | |
| 71 | + $(function(){ | |
| 72 | + var reqCodeMap = {"0xA1": '请求恢复运营', "0xA2": '申请调档', "0xA3": '出场请求', "0xA5": '进场请求', "0xA7": '加油请求', "0x50": '车辆故障', "0x70": '路阻报告', "0x60": '事故报告', "0x11": '扣证纠纷', "0x12" : '报警'}; | |
| 73 | + // 关闭左侧栏 | |
| 74 | + if (!$('body').hasClass('page-sidebar-closed')) | |
| 75 | + $('.menu-toggler.sidebar-toggler').click(); | |
| 76 | + | |
| 77 | + $("#date").datetimepicker({ | |
| 78 | + format : 'YYYY-MM-DD', | |
| 79 | + locale : 'zh-cn' | |
| 80 | + }); | |
| 81 | + | |
| 82 | + $.get('/basic/lineCode2Name',function(result){ | |
| 83 | + var data=[]; | |
| 84 | + | |
| 85 | + for(var code in result){ | |
| 86 | + data.push({id: code, text: result[code]}); | |
| 87 | + } | |
| 88 | + console.log(data); | |
| 89 | + initPinYinSelect2('#line',data,''); | |
| 90 | + | |
| 91 | + }) | |
| 92 | + var line; | |
| 93 | + var date; | |
| 94 | + $("#query").on("click",function(){ | |
| 95 | + line = $("#line").val(); | |
| 96 | + date = $("#date").val(); | |
| 97 | + $post('/mcy_forms/waybillday',{line:line,date:date},function(result){ | |
| 98 | + $.each(result, function(i, obj) { | |
| 99 | + obj.requestType = reqCodeMap[obj.requestType]; | |
| 100 | + }); | |
| 101 | + // 把数据填充到模版中 | |
| 102 | + var tbodyHtml = template('waybillday',{list:result}); | |
| 103 | + // 把渲染好的模版html文本追加到表格中 | |
| 104 | + $('#forms tbody').html(tbodyHtml); | |
| 105 | + }); | |
| 106 | + }); | |
| 107 | + | |
| 108 | + $("#export").on("click",function(){ | |
| 109 | + $post('/mcy_export/waybilldayExport',{line:line,date:date,type:'export'},function(result){ | |
| 110 | + window.open("/downloadFile/download?fileName=行车路单日报表"+moment(date).format("YYYYMMDD")); | |
| 111 | + }); | |
| 112 | + }); | |
| 113 | + }); | |
| 114 | +</script> | |
| 115 | +<script type="text/html" id="waybillday"> | |
| 116 | + {{each list as obj i}} | |
| 117 | + <tr> | |
| 118 | + <td>{{obj.carPlate}}</td> | |
| 119 | + <td>{{obj.jzl1}} </td> | |
| 120 | + <td>{{obj.jzl}}</td> | |
| 121 | + <td> </td> | |
| 122 | + <td>{{obj.yh}}</td> | |
| 123 | + <td>{{obj.jName}}</td> | |
| 124 | + <td>{{obj.zlc}}</td> | |
| 125 | + <td>{{obj.yh}}</td> | |
| 126 | + </tr> | |
| 127 | + {{/each}} | |
| 128 | + {{if list.length == 0}} | |
| 129 | + <tr> | |
| 130 | + <td colspan="8"><h6 class="muted">没有找到相关数据</h6></td> | |
| 131 | + </tr> | |
| 132 | + {{/if}} | |
| 133 | 133 | </script> |
| 134 | 134 | \ No newline at end of file | ... | ... |