Commit 61bcb72be685b831b186631d22b85db5d94e8c33
Merge branch 'minhang' of 192.168.168.201:panzhaov5/bsth_control into minhang
Showing
39 changed files
with
3635 additions
and
911 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
| @@ -13,12 +13,15 @@ import org.springframework.web.bind.annotation.RequestMethod; | @@ -13,12 +13,15 @@ import org.springframework.web.bind.annotation.RequestMethod; | ||
| 13 | import org.springframework.web.bind.annotation.RequestParam; | 13 | import org.springframework.web.bind.annotation.RequestParam; |
| 14 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | 15 | ||
| 16 | +import com.bsth.entity.mcy_forms.Allline; | ||
| 16 | import com.bsth.entity.mcy_forms.Changetochange; | 17 | import com.bsth.entity.mcy_forms.Changetochange; |
| 18 | +import com.bsth.entity.mcy_forms.Executionrate; | ||
| 17 | import com.bsth.entity.mcy_forms.Linepasswengerflow; | 19 | import com.bsth.entity.mcy_forms.Linepasswengerflow; |
| 18 | import com.bsth.entity.mcy_forms.Operationservice; | 20 | import com.bsth.entity.mcy_forms.Operationservice; |
| 19 | import com.bsth.entity.mcy_forms.Shifday; | 21 | import com.bsth.entity.mcy_forms.Shifday; |
| 20 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; | 22 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 21 | import com.bsth.entity.mcy_forms.Singledata; | 23 | import com.bsth.entity.mcy_forms.Singledata; |
| 24 | +import com.bsth.entity.mcy_forms.Turnoutrate; | ||
| 22 | import com.bsth.entity.mcy_forms.Vehicleloading; | 25 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 23 | import com.bsth.entity.mcy_forms.Waybillday; | 26 | import com.bsth.entity.mcy_forms.Waybillday; |
| 24 | import com.bsth.service.forms.ExportService; | 27 | import com.bsth.service.forms.ExportService; |
| @@ -28,33 +31,31 @@ import com.bsth.util.ReportUtils; | @@ -28,33 +31,31 @@ import com.bsth.util.ReportUtils; | ||
| 28 | @RestController | 31 | @RestController |
| 29 | @RequestMapping("mcy_export") | 32 | @RequestMapping("mcy_export") |
| 30 | public class ExportController { | 33 | public class ExportController { |
| 31 | - | 34 | + |
| 32 | @Autowired | 35 | @Autowired |
| 33 | FormsService formsService; | 36 | FormsService formsService; |
| 34 | 37 | ||
| 35 | @Autowired | 38 | @Autowired |
| 36 | ExportService exportService; | 39 | ExportService exportService; |
| 37 | - | ||
| 38 | - //行车路单日报表 | ||
| 39 | - @RequestMapping(value = "/waybilldayExport",method = RequestMethod.POST) | ||
| 40 | - public List<Waybillday> waybilldayExport(@RequestParam Map<String, Object> map){ | 40 | + |
| 41 | + // 行车路单日报表 | ||
| 42 | + @RequestMapping(value = "/waybilldayExport", method = RequestMethod.POST) | ||
| 43 | + public List<Waybillday> waybilldayExport(@RequestParam Map<String, Object> map) { | ||
| 41 | List<Waybillday> waybillday = formsService.waybillday(map); | 44 | List<Waybillday> waybillday = formsService.waybillday(map); |
| 42 | exportService.waybillday(map.get("date").toString(), waybillday); | 45 | exportService.waybillday(map.get("date").toString(), waybillday); |
| 43 | return waybillday; | 46 | return waybillday; |
| 44 | } | 47 | } |
| 45 | - | ||
| 46 | - | ||
| 47 | - //线路客流量报表 | ||
| 48 | - @RequestMapping(value = "/linepasswengerflowExport",method = RequestMethod.POST) | ||
| 49 | - public List<Map<String, Object>> linepasswengerflowExport(@RequestParam Map<String, Object> map){ | ||
| 50 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 51 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 48 | + |
| 49 | + // 线路客流量报表 | ||
| 50 | + @RequestMapping(value = "/linepasswengerflowExport", method = RequestMethod.POST) | ||
| 51 | + public List<Map<String, Object>> linepasswengerflowExport(@RequestParam Map<String, Object> map) { | ||
| 52 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 52 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 53 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 53 | ReportUtils ee = new ReportUtils(); | 54 | ReportUtils ee = new ReportUtils(); |
| 54 | List<Linepasswengerflow> linepasswengerflow = formsService.linepasswengerflow(map); | 55 | List<Linepasswengerflow> linepasswengerflow = formsService.linepasswengerflow(map); |
| 55 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 56 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 56 | - int i=1; | ||
| 57 | - for(Linepasswengerflow l : linepasswengerflow){ | 57 | + int i = 1; |
| 58 | + for (Linepasswengerflow l : linepasswengerflow) { | ||
| 58 | Map<String, Object> m = new HashMap<String, Object>(); | 59 | Map<String, Object> m = new HashMap<String, Object>(); |
| 59 | m.put("i", i); | 60 | m.put("i", i); |
| 60 | m.put("stationName", l.getStationName()); | 61 | m.put("stationName", l.getStationName()); |
| @@ -62,78 +63,74 @@ public class ExportController { | @@ -62,78 +63,74 @@ public class ExportController { | ||
| 62 | m.put("2", " "); | 63 | m.put("2", " "); |
| 63 | resList.add(m); | 64 | resList.add(m); |
| 64 | i++; | 65 | i++; |
| 65 | - } | ||
| 66 | - | ||
| 67 | - try { | 66 | + } |
| 67 | + | ||
| 68 | + try { | ||
| 68 | listI.add(resList.iterator()); | 69 | listI.add(resList.iterator()); |
| 69 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 70 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\linepassengerflow.xls", | ||
| 71 | - path+"export\\线路客流量报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | ||
| 72 | - } catch (Exception e) { | ||
| 73 | - e.printStackTrace(); | ||
| 74 | - } | 70 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; |
| 71 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\linepassengerflow.xls", | ||
| 72 | + path + "export\\线路客流量报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | ||
| 73 | + } catch (Exception e) { | ||
| 74 | + e.printStackTrace(); | ||
| 75 | + } | ||
| 75 | return resList; | 76 | return resList; |
| 76 | } | 77 | } |
| 77 | 78 | ||
| 78 | - | ||
| 79 | - | ||
| 80 | - //班次车辆人员日统计 | ||
| 81 | - @RequestMapping(value = "/shifdayExport",method = RequestMethod.POST) | ||
| 82 | - public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map){ | ||
| 83 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 84 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 79 | + // 班次车辆人员日统计 |
| 80 | + @RequestMapping(value = "/shifdayExport", method = RequestMethod.POST) | ||
| 81 | + public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map) { | ||
| 82 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 85 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 83 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 86 | ReportUtils ee = new ReportUtils(); | 84 | ReportUtils ee = new ReportUtils(); |
| 87 | List<Shifday> shifday = formsService.shifday(map); | 85 | List<Shifday> shifday = formsService.shifday(map); |
| 88 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 86 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 89 | - for(Shifday l : shifday){ | 87 | + for (Shifday l : shifday) { |
| 90 | Map<String, Object> m = new HashMap<String, Object>(); | 88 | Map<String, Object> m = new HashMap<String, Object>(); |
| 91 | - m.put("jName",l.getjName()); | 89 | + m.put("jName", l.getjName()); |
| 92 | m.put("sName", l.getsName()); | 90 | m.put("sName", l.getsName()); |
| 93 | m.put("lpName", l.getLpName()); | 91 | m.put("lpName", l.getLpName()); |
| 94 | m.put("carPlate", l.getCarPlate()); | 92 | m.put("carPlate", l.getCarPlate()); |
| 95 | m.put("jhlc", l.getJhlc()); | 93 | m.put("jhlc", l.getJhlc()); |
| 96 | - //m.put("sjjhlc", l.getSjjhlc()); | 94 | + // m.put("sjjhlc", l.getSjjhlc()); |
| 97 | m.put("yygl", l.getYygl()); | 95 | m.put("yygl", l.getYygl()); |
| 98 | m.put("emptMileage", l.getEmptMileage()); | 96 | m.put("emptMileage", l.getEmptMileage()); |
| 99 | m.put("remMileage", l.getRemMileage()); | 97 | m.put("remMileage", l.getRemMileage()); |
| 100 | m.put("addMileage", l.getAddMileage()); | 98 | m.put("addMileage", l.getAddMileage()); |
| 101 | m.put("totalm", l.getTotalm()); | 99 | m.put("totalm", l.getTotalm()); |
| 102 | m.put("jhbc", l.getJhbc()); | 100 | m.put("jhbc", l.getJhbc()); |
| 103 | - //m.put("sjjhbc", l.getSjjhbc()); | 101 | + // m.put("sjjhbc", l.getSjjhbc()); |
| 104 | m.put("cjbc", l.getCjbc()); | 102 | m.put("cjbc", l.getCjbc()); |
| 105 | m.put("ljbc", l.getLjbc()); | 103 | m.put("ljbc", l.getLjbc()); |
| 106 | m.put("sjbc", l.getSjbc()); | 104 | m.put("sjbc", l.getSjbc()); |
| 107 | resList.add(m); | 105 | resList.add(m); |
| 108 | - } | ||
| 109 | - | ||
| 110 | - try { | 106 | + } |
| 107 | + | ||
| 108 | + try { | ||
| 111 | listI.add(resList.iterator()); | 109 | listI.add(resList.iterator()); |
| 112 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 113 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\shifday.xls", | ||
| 114 | - path+"export\\班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | ||
| 115 | - } catch (Exception e) { | ||
| 116 | - e.printStackTrace(); | ||
| 117 | - } | 110 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; |
| 111 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\shifday.xls", | ||
| 112 | + path + "export\\班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | ||
| 113 | + } catch (Exception e) { | ||
| 114 | + e.printStackTrace(); | ||
| 115 | + } | ||
| 118 | return resList; | 116 | return resList; |
| 119 | } | 117 | } |
| 120 | - | ||
| 121 | - //班次车辆人员月统计 | ||
| 122 | - @RequestMapping(value = "/shiftuehiclemanthExport",method = RequestMethod.POST) | ||
| 123 | - public List<Map<String, Object>> shiftuehiclemanthExport(@RequestParam Map<String, Object> map){ | ||
| 124 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 125 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 118 | + |
| 119 | + // 班次车辆人员月统计 | ||
| 120 | + @RequestMapping(value = "/shiftuehiclemanthExport", method = RequestMethod.POST) | ||
| 121 | + public List<Map<String, Object>> shiftuehiclemanthExport(@RequestParam Map<String, Object> map) { | ||
| 122 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 126 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 123 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 127 | ReportUtils ee = new ReportUtils(); | 124 | ReportUtils ee = new ReportUtils(); |
| 128 | List<Shiftuehiclemanth> shiftuehiclemanth = formsService.shiftuehiclemanth(map); | 125 | List<Shiftuehiclemanth> shiftuehiclemanth = formsService.shiftuehiclemanth(map); |
| 129 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 126 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 130 | - int i=1; | ||
| 131 | - for(Shiftuehiclemanth l : shiftuehiclemanth){ | 127 | + int i = 1; |
| 128 | + for (Shiftuehiclemanth l : shiftuehiclemanth) { | ||
| 132 | Map<String, Object> m = new HashMap<String, Object>(); | 129 | Map<String, Object> m = new HashMap<String, Object>(); |
| 133 | m.put("i", i); | 130 | m.put("i", i); |
| 134 | - m.put("jName",l.getjName() ); | 131 | + m.put("jName", l.getjName()); |
| 135 | m.put("jhlc", l.getJhlc()); | 132 | m.put("jhlc", l.getJhlc()); |
| 136 | - m.put("emptMileage",l.getEmptMileage() ); | 133 | + m.put("emptMileage", l.getEmptMileage()); |
| 137 | m.put("remMileage", l.getRemMileage()); | 134 | m.put("remMileage", l.getRemMileage()); |
| 138 | m.put("addMileage", l.getAddMileage()); | 135 | m.put("addMileage", l.getAddMileage()); |
| 139 | m.put("totalm", l.getTotalm()); | 136 | m.put("totalm", l.getTotalm()); |
| @@ -142,39 +139,37 @@ public class ExportController { | @@ -142,39 +139,37 @@ public class ExportController { | ||
| 142 | m.put("sjbc", l.getSjbc()); | 139 | m.put("sjbc", l.getSjbc()); |
| 143 | resList.add(m); | 140 | resList.add(m); |
| 144 | i++; | 141 | i++; |
| 145 | - } | ||
| 146 | - | ||
| 147 | - try { | 142 | + } |
| 143 | + | ||
| 144 | + try { | ||
| 148 | listI.add(resList.iterator()); | 145 | listI.add(resList.iterator()); |
| 149 | - | ||
| 150 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 151 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\shiftuehiclemanth.xls", | ||
| 152 | - path+"export\\班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 153 | - | ||
| 154 | - } catch (Exception e) { | ||
| 155 | - e.printStackTrace(); | ||
| 156 | - } | ||
| 157 | - | 146 | + |
| 147 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; | ||
| 148 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\shiftuehiclemanth.xls", path | ||
| 149 | + + "export\\班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 150 | + | ||
| 151 | + } catch (Exception e) { | ||
| 152 | + e.printStackTrace(); | ||
| 153 | + } | ||
| 154 | + | ||
| 158 | return resList; | 155 | return resList; |
| 159 | } | 156 | } |
| 160 | - | ||
| 161 | 157 | ||
| 162 | - //路单数据报表 | ||
| 163 | - @RequestMapping(value = "/singledataExport",method = RequestMethod.POST) | ||
| 164 | - public List<Map<String, Object>> singledataExport(@RequestParam Map<String, Object> map){ | ||
| 165 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 166 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 158 | + // 路单数据报表 |
| 159 | + @RequestMapping(value = "/singledataExport", method = RequestMethod.POST) | ||
| 160 | + public List<Map<String, Object>> singledataExport(@RequestParam Map<String, Object> map) { | ||
| 161 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 167 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 162 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 168 | ReportUtils ee = new ReportUtils(); | 163 | ReportUtils ee = new ReportUtils(); |
| 169 | List<Singledata> singledata = formsService.singledata(map); | 164 | List<Singledata> singledata = formsService.singledata(map); |
| 170 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 165 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 171 | - int i=1; | ||
| 172 | - for(Singledata l : singledata){ | 166 | + int i = 1; |
| 167 | + for (Singledata l : singledata) { | ||
| 173 | Map<String, Object> m = new HashMap<String, Object>(); | 168 | Map<String, Object> m = new HashMap<String, Object>(); |
| 174 | m.put("i", i); | 169 | m.put("i", i); |
| 175 | - m.put("rQ",l.getrQ()); | 170 | + m.put("rQ", l.getrQ()); |
| 176 | m.put("gS", l.getgS()); | 171 | m.put("gS", l.getgS()); |
| 177 | - m.put("xL",l.getxL() ); | 172 | + m.put("xL", l.getxL()); |
| 178 | m.put("clzbh", l.getClzbh()); | 173 | m.put("clzbh", l.getClzbh()); |
| 179 | m.put("jsy", l.getJsy()); | 174 | m.put("jsy", l.getJsy()); |
| 180 | m.put("jName", l.getjName()); | 175 | m.put("jName", l.getjName()); |
| @@ -184,35 +179,35 @@ public class ExportController { | @@ -184,35 +179,35 @@ public class ExportController { | ||
| 184 | m.put("emptMileage", l.getEmptMileage()); | 179 | m.put("emptMileage", l.getEmptMileage()); |
| 185 | m.put("hyl", l.getHyl()); | 180 | m.put("hyl", l.getHyl()); |
| 186 | m.put("jzl", l.getJzl()); | 181 | m.put("jzl", l.getJzl()); |
| 187 | - m.put("unyyyl",l.getUnyyyl()); | 182 | + m.put("unyyyl", l.getUnyyyl()); |
| 188 | m.put("jhjl", l.getJhjl()); | 183 | m.put("jhjl", l.getJhjl()); |
| 189 | resList.add(m); | 184 | resList.add(m); |
| 190 | i++; | 185 | i++; |
| 191 | - } | ||
| 192 | - | ||
| 193 | - try { | 186 | + } |
| 187 | + | ||
| 188 | + try { | ||
| 194 | listI.add(resList.iterator()); | 189 | listI.add(resList.iterator()); |
| 195 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 196 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\singledata.xls", | ||
| 197 | - path+"export\\路单报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 198 | - } catch (Exception e) { | ||
| 199 | - e.printStackTrace(); | ||
| 200 | - } | ||
| 201 | - | 190 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; |
| 191 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\singledata.xls", | ||
| 192 | + path + "export\\路单报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 193 | + } catch (Exception e) { | ||
| 194 | + e.printStackTrace(); | ||
| 195 | + } | ||
| 196 | + | ||
| 202 | return resList; | 197 | return resList; |
| 203 | } | 198 | } |
| 204 | - | ||
| 205 | - //车辆加注 | ||
| 206 | - @RequestMapping(value = "/vehicleloadingExport",method = RequestMethod.POST) | ||
| 207 | - public List<Map<String, Object>> vehicleloadingExport(@RequestParam Map<String, Object> map){ | ||
| 208 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 209 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 199 | + |
| 200 | + // 车辆加注 | ||
| 201 | + @RequestMapping(value = "/vehicleloadingExport", method = RequestMethod.POST) | ||
| 202 | + public List<Map<String, Object>> vehicleloadingExport(@RequestParam Map<String, Object> map) { | ||
| 203 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 210 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 204 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 211 | ReportUtils ee = new ReportUtils(); | 205 | ReportUtils ee = new ReportUtils(); |
| 212 | - List<Vehicleloading> vehicleloading = formsService.vehicleloading(map.get("line").toString(), map.get("date").toString()); | 206 | + List<Vehicleloading> vehicleloading = formsService.vehicleloading(map.get("line").toString(), |
| 207 | + map.get("date").toString()); | ||
| 213 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 208 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 214 | - int i=1; | ||
| 215 | - for(Vehicleloading l : vehicleloading){ | 209 | + int i = 1; |
| 210 | + for (Vehicleloading l : vehicleloading) { | ||
| 216 | Map<String, Object> m = new HashMap<String, Object>(); | 211 | Map<String, Object> m = new HashMap<String, Object>(); |
| 217 | m.put("i", i); | 212 | m.put("i", i); |
| 218 | m.put("rQ", l.getrQ()); | 213 | m.put("rQ", l.getrQ()); |
| @@ -228,96 +223,199 @@ public class ExportController { | @@ -228,96 +223,199 @@ public class ExportController { | ||
| 228 | m.put("sjbc", l.getSjbc()); | 223 | m.put("sjbc", l.getSjbc()); |
| 229 | resList.add(m); | 224 | resList.add(m); |
| 230 | i++; | 225 | i++; |
| 231 | - } | ||
| 232 | - | ||
| 233 | - try { | 226 | + } |
| 227 | + | ||
| 228 | + try { | ||
| 234 | listI.add(resList.iterator()); | 229 | listI.add(resList.iterator()); |
| 235 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 236 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\vehicleloading.xls", | ||
| 237 | - path+"export\\车辆加注" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | ||
| 238 | - } catch (Exception e) { | ||
| 239 | - e.printStackTrace(); | ||
| 240 | - } | 230 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; |
| 231 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\vehicleloading.xls", | ||
| 232 | + path + "export\\车辆加注" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); | ||
| 233 | + } catch (Exception e) { | ||
| 234 | + e.printStackTrace(); | ||
| 235 | + } | ||
| 241 | return resList; | 236 | return resList; |
| 242 | } | 237 | } |
| 243 | - | ||
| 244 | - //运营服务阶段报表 | ||
| 245 | - @RequestMapping(value = "/operationserviceExport",method = RequestMethod.POST) | ||
| 246 | - public List<Map<String, Object>> operationserviceExport(@RequestParam Map<String, Object> map){ | ||
| 247 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 248 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 238 | + |
| 239 | + // 运营服务阶段报表 | ||
| 240 | + @RequestMapping(value = "/operationserviceExport", method = RequestMethod.POST) | ||
| 241 | + public List<Map<String, Object>> operationserviceExport(@RequestParam Map<String, Object> map) { | ||
| 242 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 249 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 243 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 250 | ReportUtils ee = new ReportUtils(); | 244 | ReportUtils ee = new ReportUtils(); |
| 251 | List<Operationservice> operationservice = formsService.operationservice(map); | 245 | List<Operationservice> operationservice = formsService.operationservice(map); |
| 252 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | 246 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 253 | - int i=1; | ||
| 254 | - for(Operationservice l : operationservice){ | ||
| 255 | - Map<String, Object> m = new HashMap<String, Object>(); | ||
| 256 | - m.put("i", i); | ||
| 257 | - m.put("xlName", l.getXlName()); | ||
| 258 | - m.put("jzl", l.getJzl()); | ||
| 259 | - m.put("xhl", l.getXhl()); | ||
| 260 | - m.put("xsgl", l.getXsgl()); | ||
| 261 | - m.put("emptMileage", l.getEmptMileage()); | ||
| 262 | - m.put("sjbc", l.getSjbc()); | ||
| 263 | - resList.add(m); | ||
| 264 | - i++; | 247 | + int i = 1; |
| 248 | + for (Operationservice l : operationservice) { | ||
| 249 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 250 | + m.put("i", i); | ||
| 251 | + m.put("xlName", l.getXlName()); | ||
| 252 | + m.put("jzl", l.getJzl()); | ||
| 253 | + m.put("xhl", l.getXhl()); | ||
| 254 | + m.put("xsgl", l.getXsgl()); | ||
| 255 | + m.put("emptMileage", l.getEmptMileage()); | ||
| 256 | + m.put("sjbc", l.getSjbc()); | ||
| 257 | + resList.add(m); | ||
| 258 | + i++; | ||
| 265 | } | 259 | } |
| 266 | - | 260 | + |
| 267 | try { | 261 | try { |
| 268 | listI.add(resList.iterator()); | 262 | listI.add(resList.iterator()); |
| 269 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 270 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\operationservice.xls", | ||
| 271 | - path+"export\\运营服务阶段报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 272 | - } catch (Exception e) { | ||
| 273 | - e.printStackTrace(); | ||
| 274 | - } | 263 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; |
| 264 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\operationservice.xls", path + "export\\运营服务阶段报表" | ||
| 265 | + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 266 | + } catch (Exception e) { | ||
| 267 | + e.printStackTrace(); | ||
| 268 | + } | ||
| 275 | return resList; | 269 | return resList; |
| 276 | } | 270 | } |
| 277 | - | ||
| 278 | 271 | ||
| 279 | - //换人换车情况日统计 | ||
| 280 | - @RequestMapping(value = "/changetochangeExport",method = RequestMethod.POST) | ||
| 281 | - public List<Map<String, Object>> changetochangeExport(@RequestParam Map<String, Object> map){ | ||
| 282 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 283 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 284 | - List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 285 | - ReportUtils ee = new ReportUtils(); | ||
| 286 | - List<Changetochange> changetochange = formsService.changetochange(map); | ||
| 287 | - List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 288 | - for(Changetochange l : changetochange){ | 272 | + // 换人换车情况日统计 |
| 273 | + @RequestMapping(value = "/changetochangeExport", method = RequestMethod.POST) | ||
| 274 | + public List<Map<String, Object>> changetochangeExport(@RequestParam Map<String, Object> map) { | ||
| 275 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 276 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 277 | + ReportUtils ee = new ReportUtils(); | ||
| 278 | + List<Changetochange> changetochange = formsService.changetochange(map); | ||
| 279 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 280 | + for (Changetochange l : changetochange) { | ||
| 289 | Map<String, Object> m = new HashMap<String, Object>(); | 281 | Map<String, Object> m = new HashMap<String, Object>(); |
| 290 | - m.put("rq",l.getRq()); | ||
| 291 | - m.put("gs",l.getGs()); | ||
| 292 | - m.put("fgs",l.getFgs()); | ||
| 293 | - m.put("xl",l.getXl()); | ||
| 294 | - m.put("lp",l.getLp()); | ||
| 295 | - m.put("fssj",l.getFssj()); | ||
| 296 | - m.put("xgsj",l.getXgsj()); | ||
| 297 | - m.put("pcch",l.getPcch()); | ||
| 298 | - m.put("pcry",l.getPcry()); | ||
| 299 | - m.put("jhch",l.getJhch()); | ||
| 300 | - m.put("jhgh",l.getJhgh()); | ||
| 301 | - m.put("sjch",l.getSjch()); | ||
| 302 | - m.put("sjgh",l.getSjgh()); | ||
| 303 | - m.put("yy",l.getYy()); | ||
| 304 | - m.put("xgr",l.getXgr()); | 282 | + m.put("rq", l.getRq()); |
| 283 | + m.put("gs", l.getGs()); | ||
| 284 | + m.put("fgs", l.getFgs()); | ||
| 285 | + m.put("xl", l.getXl()); | ||
| 286 | + m.put("lp", l.getLp()); | ||
| 287 | + m.put("fssj", l.getFssj()); | ||
| 288 | + m.put("xgsj", l.getXgsj()); | ||
| 289 | + m.put("pcch", l.getPcch()); | ||
| 290 | + m.put("pcry", l.getPcry()); | ||
| 291 | + m.put("jhch", l.getJhch()); | ||
| 292 | + m.put("jhgh", l.getJhgh()); | ||
| 293 | + m.put("sjch", l.getSjch()); | ||
| 294 | + m.put("sjgh", l.getSjgh()); | ||
| 295 | + m.put("yy", l.getYy()); | ||
| 296 | + m.put("xgr", l.getXgr()); | ||
| 305 | resList.add(m); | 297 | resList.add(m); |
| 306 | - } | ||
| 307 | - | ||
| 308 | - try { | ||
| 309 | - listI.add(resList.iterator()); | ||
| 310 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 311 | - ee.excelReplace(listI, new Object[] { map }, path+"mould\\changetochange.xls", | ||
| 312 | - path+"export\\换人换车情况日统计" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 313 | - } catch (Exception e) { | ||
| 314 | - e.printStackTrace(); | ||
| 315 | - } | ||
| 316 | - return resList; | ||
| 317 | } | 298 | } |
| 318 | - | ||
| 319 | - | ||
| 320 | - | ||
| 321 | - | 299 | + |
| 300 | + try { | ||
| 301 | + listI.add(resList.iterator()); | ||
| 302 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; | ||
| 303 | + ee.excelReplace(listI, new Object[] { map }, path + "mould\\changetochange.xls", path + "export\\换人换车情况日统计" | ||
| 304 | + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 305 | + } catch (Exception e) { | ||
| 306 | + e.printStackTrace(); | ||
| 307 | + } | ||
| 308 | + return resList; | ||
| 309 | + } | ||
| 310 | + | ||
| 311 | + // 营运线路出车率统计表 | ||
| 312 | + @RequestMapping(value = "/turnoutrateExport", method = RequestMethod.POST) | ||
| 313 | + public List<Map<String, Object>> turnoutrateExport(@RequestParam Map<String, Object> map) { | ||
| 314 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 315 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 316 | + ReportUtils ee = new ReportUtils(); | ||
| 317 | + List<Turnoutrate> turnoutrate = formsService.turnoutrate(map); | ||
| 318 | + Map<String, Object> map1 = new HashMap<String, Object>(); | ||
| 319 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 320 | + for (Turnoutrate l : turnoutrate) { | ||
| 321 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 322 | + m.put("rq", l.getRq()); | ||
| 323 | + m.put("gs", l.getGs()); | ||
| 324 | + m.put("zhgs", l.getZhgs()); | ||
| 325 | + m.put("xl", l.getXl()); | ||
| 326 | + m.put("cchjh", l.getCchjh()); | ||
| 327 | + m.put("cchsj", l.getCchsj()); | ||
| 328 | + m.put("cchqz", l.getCchqz()); | ||
| 329 | + m.put("chl", l.getChl()); | ||
| 330 | + m.put("bcjh", l.getBcjh()); | ||
| 331 | + m.put("bcsj", l.getBbzxl()); | ||
| 332 | + m.put("bbzxl", l.getBbzxl()); | ||
| 333 | + m.put("sm", l.getSm()); | ||
| 334 | + resList.add(m); | ||
| 335 | + } | ||
| 336 | + | ||
| 337 | + try { | ||
| 338 | + listI.add(resList.iterator()); | ||
| 339 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; | ||
| 340 | + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\turnoutrate.xls", path + "export\\营运线路出车率统计表" | ||
| 341 | + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 342 | + } catch (Exception e) { | ||
| 343 | + e.printStackTrace(); | ||
| 344 | + } | ||
| 345 | + return resList; | ||
| 346 | + } | ||
| 347 | + | ||
| 348 | + //营运线路出车率统计表 | ||
| 349 | + @RequestMapping(value = "/executionrateExport", method = RequestMethod.POST) | ||
| 350 | + public List<Map<String, Object>> executionrateExport(@RequestParam Map<String, Object> map) { | ||
| 351 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 352 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 353 | + ReportUtils ee = new ReportUtils(); | ||
| 354 | + List<Executionrate> executionrate = formsService.executionrate(map); | ||
| 355 | + Map<String, Object> map1 = new HashMap<String, Object>(); | ||
| 356 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 357 | + for (Executionrate l : executionrate) { | ||
| 358 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 359 | + m.put("rq", l.getRq()); | ||
| 360 | + m.put("gs", l.getGs()); | ||
| 361 | + m.put("zhgs", l.getZhgs()); | ||
| 362 | + m.put("xl", l.getXl()); | ||
| 363 | + m.put("cchjh", l.getCchjh()); | ||
| 364 | + m.put("cchsj", l.getCchsj()); | ||
| 365 | + m.put("chl", l.getChl()); | ||
| 366 | + m.put("bcjh", l.getBcjh()); | ||
| 367 | + m.put("bcsj", l.getBbzxl()); | ||
| 368 | + m.put("bbzxl", l.getBbzxl()); | ||
| 369 | + m.put("sm", l.getSm()); | ||
| 370 | + resList.add(m); | ||
| 371 | + } | ||
| 372 | + | ||
| 373 | + try { | ||
| 374 | + listI.add(resList.iterator()); | ||
| 375 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; | ||
| 376 | + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\executionrate.xls", path + "export\\班次执行率统计表" | ||
| 377 | + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 378 | + } catch (Exception e) { | ||
| 379 | + e.printStackTrace(); | ||
| 380 | + } | ||
| 381 | + return resList; | ||
| 382 | + } | ||
| 383 | + | ||
| 322 | 384 | ||
| 385 | + ////营运线路名称统计表 | ||
| 386 | + @RequestMapping(value = "/alllineExport", method = RequestMethod.POST) | ||
| 387 | + public List<Map<String, Object>> alllineExport(@RequestParam Map<String, Object> map) { | ||
| 388 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 389 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 390 | + ReportUtils ee = new ReportUtils(); | ||
| 391 | + List<Allline> allline = formsService.allline(map); | ||
| 392 | + Map<String, Object> map1 = new HashMap<String, Object>(); | ||
| 393 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 394 | + for (Allline l : allline) { | ||
| 395 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 396 | + m.put("rq", l.getRq()); | ||
| 397 | + m.put("gs", l.getGs()); | ||
| 398 | + m.put("zhgs", l.getZhgs()); | ||
| 399 | + m.put("xl", l.getXl()); | ||
| 400 | + m.put("cchjh", l.getCchjh()); | ||
| 401 | + m.put("cchsj", l.getCchsj()); | ||
| 402 | + m.put("chl", l.getChl()); | ||
| 403 | + m.put("bcjh", l.getBcjh()); | ||
| 404 | + m.put("bcsj", l.getBbzxl()); | ||
| 405 | + m.put("bbzxl", l.getBbzxl()); | ||
| 406 | + m.put("sm", l.getSm()); | ||
| 407 | + resList.add(m); | ||
| 408 | + } | ||
| 409 | + | ||
| 410 | + try { | ||
| 411 | + listI.add(resList.iterator()); | ||
| 412 | + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\"; | ||
| 413 | + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\allline.xls", path + "export\\营运线路名称统计表" | ||
| 414 | + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); | ||
| 415 | + } catch (Exception e) { | ||
| 416 | + e.printStackTrace(); | ||
| 417 | + } | ||
| 418 | + return resList; | ||
| 419 | + } | ||
| 420 | + | ||
| 323 | } | 421 | } |
src/main/java/com/bsth/controller/forms/MCY_FormsController.java
| @@ -9,12 +9,15 @@ import org.springframework.web.bind.annotation.RequestMethod; | @@ -9,12 +9,15 @@ import org.springframework.web.bind.annotation.RequestMethod; | ||
| 9 | import org.springframework.web.bind.annotation.RequestParam; | 9 | import org.springframework.web.bind.annotation.RequestParam; |
| 10 | import org.springframework.web.bind.annotation.RestController; | 10 | import org.springframework.web.bind.annotation.RestController; |
| 11 | 11 | ||
| 12 | +import com.bsth.entity.mcy_forms.Allline; | ||
| 12 | import com.bsth.entity.mcy_forms.Changetochange; | 13 | import com.bsth.entity.mcy_forms.Changetochange; |
| 14 | +import com.bsth.entity.mcy_forms.Executionrate; | ||
| 13 | import com.bsth.entity.mcy_forms.Linepasswengerflow; | 15 | import com.bsth.entity.mcy_forms.Linepasswengerflow; |
| 14 | import com.bsth.entity.mcy_forms.Operationservice; | 16 | import com.bsth.entity.mcy_forms.Operationservice; |
| 15 | import com.bsth.entity.mcy_forms.Shifday; | 17 | import com.bsth.entity.mcy_forms.Shifday; |
| 16 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; | 18 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 17 | import com.bsth.entity.mcy_forms.Singledata; | 19 | import com.bsth.entity.mcy_forms.Singledata; |
| 20 | +import com.bsth.entity.mcy_forms.Turnoutrate; | ||
| 18 | import com.bsth.entity.mcy_forms.Vehicleloading; | 21 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 19 | import com.bsth.entity.mcy_forms.Waybillday; | 22 | import com.bsth.entity.mcy_forms.Waybillday; |
| 20 | import com.bsth.service.forms.FormsService; | 23 | import com.bsth.service.forms.FormsService; |
| @@ -39,12 +42,6 @@ public class MCY_FormsController { | @@ -39,12 +42,6 @@ public class MCY_FormsController { | ||
| 39 | return formsService.waybillday(map); | 42 | return formsService.waybillday(map); |
| 40 | } | 43 | } |
| 41 | 44 | ||
| 42 | - @RequestMapping(value = "/waybilldayExcel") | ||
| 43 | - public List<Waybillday> dailyInfo(@RequestParam Map<String, Object> map) { | ||
| 44 | - return formsService.waybilldayExcel(map); | ||
| 45 | - } | ||
| 46 | - | ||
| 47 | - | ||
| 48 | //线路客流量报表 | 45 | //线路客流量报表 |
| 49 | @RequestMapping(value = "/linepasswengerflow",method = RequestMethod.POST) | 46 | @RequestMapping(value = "/linepasswengerflow",method = RequestMethod.POST) |
| 50 | public List<Linepasswengerflow> linepasswengerflow(@RequestParam Map<String, Object> map){ | 47 | public List<Linepasswengerflow> linepasswengerflow(@RequestParam Map<String, Object> map){ |
| @@ -88,6 +85,8 @@ public class MCY_FormsController { | @@ -88,6 +85,8 @@ public class MCY_FormsController { | ||
| 88 | public List<Vehicleloading> vehicleloading(@RequestParam String line ,@RequestParam String data){ | 85 | public List<Vehicleloading> vehicleloading(@RequestParam String line ,@RequestParam String data){ |
| 89 | return formsService.vehicleloading(line,data); | 86 | return formsService.vehicleloading(line,data); |
| 90 | } | 87 | } |
| 88 | + | ||
| 89 | + | ||
| 91 | //运营服务阶段报表 | 90 | //运营服务阶段报表 |
| 92 | @RequestMapping(value = "/operationservice",method = RequestMethod.POST) | 91 | @RequestMapping(value = "/operationservice",method = RequestMethod.POST) |
| 93 | public List<Operationservice> operationservice(@RequestParam Map<String, Object> map){ | 92 | public List<Operationservice> operationservice(@RequestParam Map<String, Object> map){ |
| @@ -95,5 +94,25 @@ public class MCY_FormsController { | @@ -95,5 +94,25 @@ public class MCY_FormsController { | ||
| 95 | return formsService.operationservice(map); | 94 | return formsService.operationservice(map); |
| 96 | } | 95 | } |
| 97 | 96 | ||
| 97 | + //营运线路出车率统计表 | ||
| 98 | + @RequestMapping(value = "/turnoutrate",method = RequestMethod.POST) | ||
| 99 | + public List<Turnoutrate> turnoutrate(@RequestParam Map<String, Object> map){ | ||
| 100 | + | ||
| 101 | + return formsService.turnoutrate(map); | ||
| 102 | + } | ||
| 98 | 103 | ||
| 104 | + //班次执行率统计表 | ||
| 105 | + @RequestMapping(value = "/executionrate",method = RequestMethod.POST) | ||
| 106 | + public List<Executionrate> executionrate(@RequestParam Map<String, Object> map){ | ||
| 107 | + | ||
| 108 | + return formsService.executionrate(map); | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + | ||
| 112 | + //营运线路名称统计表 | ||
| 113 | + @RequestMapping(value = "/allline",method = RequestMethod.POST) | ||
| 114 | + public List<Allline> allline(@RequestParam Map<String, Object> map){ | ||
| 115 | + | ||
| 116 | + return formsService.allline(map); | ||
| 117 | + } | ||
| 99 | } | 118 | } |
src/main/java/com/bsth/controller/oil/CwjyController.java
| @@ -5,7 +5,6 @@ import java.util.Date; | @@ -5,7 +5,6 @@ import java.util.Date; | ||
| 5 | import java.util.Map; | 5 | import java.util.Map; |
| 6 | 6 | ||
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | -import org.springframework.web.bind.annotation.PathVariable; | ||
| 9 | import org.springframework.web.bind.annotation.RequestMapping; | 8 | import org.springframework.web.bind.annotation.RequestMapping; |
| 10 | import org.springframework.web.bind.annotation.RequestMethod; | 9 | import org.springframework.web.bind.annotation.RequestMethod; |
| 11 | import org.springframework.web.bind.annotation.RequestParam; | 10 | import org.springframework.web.bind.annotation.RequestParam; |
| @@ -62,5 +61,4 @@ public class CwjyController extends BaseController<Cwjy, Integer>{ | @@ -62,5 +61,4 @@ public class CwjyController extends BaseController<Cwjy, Integer>{ | ||
| 62 | return map; | 61 | return map; |
| 63 | } | 62 | } |
| 64 | 63 | ||
| 65 | - | ||
| 66 | } | 64 | } |
src/main/java/com/bsth/controller/oil/CylController.java
| @@ -22,7 +22,6 @@ public class CylController extends BaseController<Cyl, Integer>{ | @@ -22,7 +22,6 @@ public class CylController extends BaseController<Cyl, Integer>{ | ||
| 22 | @RequestMapping(value = "/save",method = RequestMethod.POST) | 22 | @RequestMapping(value = "/save",method = RequestMethod.POST) |
| 23 | public Map<String, Object> saveYlb(Cyl t){ | 23 | public Map<String, Object> saveYlb(Cyl t){ |
| 24 | // SysUser user = SecurityUtils.getCurrentUser(); | 24 | // SysUser user = SecurityUtils.getCurrentUser(); |
| 25 | - t.setGsdm("77"); | ||
| 26 | t.setUpdatetime(new Date()); | 25 | t.setUpdatetime(new Date()); |
| 27 | /*SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | 26 | /*SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); |
| 28 | try { | 27 | try { |
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| @@ -351,7 +351,15 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -351,7 +351,15 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 351 | @RequestMapping(value="/queryListWaybill") | 351 | @RequestMapping(value="/queryListWaybill") |
| 352 | public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName | 352 | public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName |
| 353 | ,@RequestParam String date){ | 353 | ,@RequestParam String date){ |
| 354 | - return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date); | 354 | + String type="fqp"; |
| 355 | + return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date,type); | ||
| 356 | + } | ||
| 357 | + | ||
| 358 | + @RequestMapping(value="/queryListWaybillQp") | ||
| 359 | + public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName | ||
| 360 | + ,@RequestParam String date){ | ||
| 361 | + String type="qp"; | ||
| 362 | + return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date,type); | ||
| 355 | } | 363 | } |
| 356 | 364 | ||
| 357 | @RequestMapping(value="/statisticsDaily") | 365 | @RequestMapping(value="/statisticsDaily") |
src/main/java/com/bsth/entity/mcy_forms/Allline.java
0 → 100644
| 1 | +package com.bsth.entity.mcy_forms; | ||
| 2 | + | ||
| 3 | +public class Allline { | ||
| 4 | + | ||
| 5 | + private String rq;//日期 | ||
| 6 | + | ||
| 7 | + private String gs;//公司 | ||
| 8 | + | ||
| 9 | + private String zhgs;//直属公司 | ||
| 10 | + | ||
| 11 | + private String fgs;//分公司 | ||
| 12 | + | ||
| 13 | + private String xl;//线路条数 | ||
| 14 | + | ||
| 15 | + private String xlmc;//线路名称 | ||
| 16 | + | ||
| 17 | + private String gsgs; | ||
| 18 | + private String fgsgs; | ||
| 19 | + | ||
| 20 | + private String size; | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + public String getGsgs() { | ||
| 24 | + return gsgs; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + public void setGsgs(String gsgs) { | ||
| 28 | + this.gsgs = gsgs; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + public String getFgsgs() { | ||
| 32 | + return fgsgs; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + public void setFgsgs(String fgsgs) { | ||
| 36 | + this.fgsgs = fgsgs; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + | ||
| 40 | + public String getSize() { | ||
| 41 | + return size; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public void setSize(String size) { | ||
| 45 | + this.size = size; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + public String getZhgs() { | ||
| 49 | + return zhgs; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public void setZhgs(String zhgs) { | ||
| 53 | + this.zhgs = zhgs; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public String getXlmc() { | ||
| 57 | + return xlmc; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public void setXlmc(String xlmc) { | ||
| 61 | + this.xlmc = xlmc; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + private String cchjh;//出车数计划 | ||
| 65 | + | ||
| 66 | + private String cchsj;//出车数计划 | ||
| 67 | + | ||
| 68 | + private String cchqz;//出车数权证 | ||
| 69 | + | ||
| 70 | + private String chl;//出车率 | ||
| 71 | + | ||
| 72 | + private String bcjh;//班次计划 | ||
| 73 | + | ||
| 74 | + private String bcsj;//班次实际 | ||
| 75 | + | ||
| 76 | + private String bbzxl;//班次执行率 | ||
| 77 | + | ||
| 78 | + private String sm;//说明 | ||
| 79 | + | ||
| 80 | + public String getRq() { | ||
| 81 | + return rq; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public void setRq(String rq) { | ||
| 85 | + this.rq = rq; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public String getGs() { | ||
| 89 | + return gs; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public void setGs(String gs) { | ||
| 93 | + this.gs = gs; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public String getFgs() { | ||
| 97 | + return fgs; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public void setFgs(String fgs) { | ||
| 101 | + this.fgs = fgs; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public String getXl() { | ||
| 105 | + return xl; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public void setXl(String xl) { | ||
| 109 | + this.xl = xl; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + public String getCchjh() { | ||
| 113 | + return cchjh; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public void setCchjh(String cchjh) { | ||
| 117 | + this.cchjh = cchjh; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public String getCchsj() { | ||
| 121 | + return cchsj; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + public void setCchsj(String cchsj) { | ||
| 125 | + this.cchsj = cchsj; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + public String getCchqz() { | ||
| 129 | + return cchqz; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + public void setCchqz(String cchqz) { | ||
| 133 | + this.cchqz = cchqz; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + public String getChl() { | ||
| 137 | + return chl; | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + public void setChl(String chl) { | ||
| 141 | + this.chl = chl; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + public String getBcjh() { | ||
| 145 | + return bcjh; | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + public void setBcjh(String bcjh) { | ||
| 149 | + this.bcjh = bcjh; | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + public String getBcsj() { | ||
| 153 | + return bcsj; | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + public void setBcsj(String bcsj) { | ||
| 157 | + this.bcsj = bcsj; | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + public String getBbzxl() { | ||
| 161 | + return bbzxl; | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + public void setBbzxl(String bbzxl) { | ||
| 165 | + this.bbzxl = bbzxl; | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + public String getSm() { | ||
| 169 | + return sm; | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + public void setSm(String sm) { | ||
| 173 | + this.sm = sm; | ||
| 174 | + } | ||
| 175 | + | ||
| 176 | + | ||
| 177 | + | ||
| 178 | + | ||
| 179 | +} |
src/main/java/com/bsth/entity/mcy_forms/Executionrate.java
0 → 100644
| 1 | +package com.bsth.entity.mcy_forms; | ||
| 2 | + | ||
| 3 | +public class Executionrate { | ||
| 4 | + | ||
| 5 | + private String rq;//日期 | ||
| 6 | + | ||
| 7 | + private String gs;//公司 | ||
| 8 | + | ||
| 9 | + private String zhgs;//直属公司 | ||
| 10 | + | ||
| 11 | + private String fgs;//分公司 | ||
| 12 | + | ||
| 13 | + private String xl;//线路条数 | ||
| 14 | + | ||
| 15 | + private String xlmc;//线路名称 | ||
| 16 | + | ||
| 17 | + private String gsgs; | ||
| 18 | + private String fgsgs; | ||
| 19 | + | ||
| 20 | + private String size; | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + public String getGsgs() { | ||
| 24 | + return gsgs; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + public void setGsgs(String gsgs) { | ||
| 28 | + this.gsgs = gsgs; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + public String getFgsgs() { | ||
| 32 | + return fgsgs; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + public void setFgsgs(String fgsgs) { | ||
| 36 | + this.fgsgs = fgsgs; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + | ||
| 40 | + public String getSize() { | ||
| 41 | + return size; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public void setSize(String size) { | ||
| 45 | + this.size = size; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + public String getZhgs() { | ||
| 49 | + return zhgs; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public void setZhgs(String zhgs) { | ||
| 53 | + this.zhgs = zhgs; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public String getXlmc() { | ||
| 57 | + return xlmc; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public void setXlmc(String xlmc) { | ||
| 61 | + this.xlmc = xlmc; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + private String cchjh;//出车数计划 | ||
| 65 | + | ||
| 66 | + private String cchsj;//出车数计划 | ||
| 67 | + | ||
| 68 | + private String cchqz;//出车数权证 | ||
| 69 | + | ||
| 70 | + private String chl;//出车率 | ||
| 71 | + | ||
| 72 | + private String bcjh;//班次计划 | ||
| 73 | + | ||
| 74 | + private String bcsj;//班次实际 | ||
| 75 | + | ||
| 76 | + private String bbzxl;//班次执行率 | ||
| 77 | + | ||
| 78 | + private String sm;//说明 | ||
| 79 | + | ||
| 80 | + public String getRq() { | ||
| 81 | + return rq; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public void setRq(String rq) { | ||
| 85 | + this.rq = rq; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public String getGs() { | ||
| 89 | + return gs; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public void setGs(String gs) { | ||
| 93 | + this.gs = gs; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public String getFgs() { | ||
| 97 | + return fgs; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public void setFgs(String fgs) { | ||
| 101 | + this.fgs = fgs; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public String getXl() { | ||
| 105 | + return xl; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public void setXl(String xl) { | ||
| 109 | + this.xl = xl; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + public String getCchjh() { | ||
| 113 | + return cchjh; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public void setCchjh(String cchjh) { | ||
| 117 | + this.cchjh = cchjh; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public String getCchsj() { | ||
| 121 | + return cchsj; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + public void setCchsj(String cchsj) { | ||
| 125 | + this.cchsj = cchsj; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + public String getCchqz() { | ||
| 129 | + return cchqz; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + public void setCchqz(String cchqz) { | ||
| 133 | + this.cchqz = cchqz; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + public String getChl() { | ||
| 137 | + return chl; | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + public void setChl(String chl) { | ||
| 141 | + this.chl = chl; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + public String getBcjh() { | ||
| 145 | + return bcjh; | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + public void setBcjh(String bcjh) { | ||
| 149 | + this.bcjh = bcjh; | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + public String getBcsj() { | ||
| 153 | + return bcsj; | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + public void setBcsj(String bcsj) { | ||
| 157 | + this.bcsj = bcsj; | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + public String getBbzxl() { | ||
| 161 | + return bbzxl; | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + public void setBbzxl(String bbzxl) { | ||
| 165 | + this.bbzxl = bbzxl; | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + public String getSm() { | ||
| 169 | + return sm; | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + public void setSm(String sm) { | ||
| 173 | + this.sm = sm; | ||
| 174 | + } | ||
| 175 | + | ||
| 176 | + | ||
| 177 | + | ||
| 178 | +} |
src/main/java/com/bsth/entity/mcy_forms/Turnoutrate.java
0 → 100644
| 1 | +package com.bsth.entity.mcy_forms; | ||
| 2 | + | ||
| 3 | +public class Turnoutrate { | ||
| 4 | +private String rq;//日期 | ||
| 5 | + | ||
| 6 | + private String gs;//公司 | ||
| 7 | + | ||
| 8 | + private String zhgs;//直属公司 | ||
| 9 | + | ||
| 10 | + private String fgs;//分公司 | ||
| 11 | + | ||
| 12 | + private String xl;//线路条数 | ||
| 13 | + | ||
| 14 | + private String xlmc;//线路名称 | ||
| 15 | + | ||
| 16 | + private String gsgs; | ||
| 17 | + private String fgsgs; | ||
| 18 | + | ||
| 19 | + private String size; | ||
| 20 | + | ||
| 21 | + | ||
| 22 | + public String getGsgs() { | ||
| 23 | + return gsgs; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public void setGsgs(String gsgs) { | ||
| 27 | + this.gsgs = gsgs; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + public String getFgsgs() { | ||
| 31 | + return fgsgs; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + public void setFgsgs(String fgsgs) { | ||
| 35 | + this.fgsgs = fgsgs; | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + | ||
| 39 | + public String getSize() { | ||
| 40 | + return size; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + public void setSize(String size) { | ||
| 44 | + this.size = size; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + public String getZhgs() { | ||
| 48 | + return zhgs; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + public void setZhgs(String zhgs) { | ||
| 52 | + this.zhgs = zhgs; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + public String getXlmc() { | ||
| 56 | + return xlmc; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + public void setXlmc(String xlmc) { | ||
| 60 | + this.xlmc = xlmc; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + private String cchjh;//出车数计划 | ||
| 64 | + | ||
| 65 | + private String cchsj;//出车数计划 | ||
| 66 | + | ||
| 67 | + private String cchqz;//出车数权证 | ||
| 68 | + | ||
| 69 | + private String chl;//出车率 | ||
| 70 | + | ||
| 71 | + private String bcjh;//班次计划 | ||
| 72 | + | ||
| 73 | + private String bcsj;//班次实际 | ||
| 74 | + | ||
| 75 | + private String bbzxl;//班次执行率 | ||
| 76 | + | ||
| 77 | + private String sm;//说明 | ||
| 78 | + | ||
| 79 | + public String getRq() { | ||
| 80 | + return rq; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + public void setRq(String rq) { | ||
| 84 | + this.rq = rq; | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + public String getGs() { | ||
| 88 | + return gs; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + public void setGs(String gs) { | ||
| 92 | + this.gs = gs; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + public String getFgs() { | ||
| 96 | + return fgs; | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + public void setFgs(String fgs) { | ||
| 100 | + this.fgs = fgs; | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + public String getXl() { | ||
| 104 | + return xl; | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + public void setXl(String xl) { | ||
| 108 | + this.xl = xl; | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + public String getCchjh() { | ||
| 112 | + return cchjh; | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + public void setCchjh(String cchjh) { | ||
| 116 | + this.cchjh = cchjh; | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + public String getCchsj() { | ||
| 120 | + return cchsj; | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + public void setCchsj(String cchsj) { | ||
| 124 | + this.cchsj = cchsj; | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + public String getCchqz() { | ||
| 128 | + return cchqz; | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + public void setCchqz(String cchqz) { | ||
| 132 | + this.cchqz = cchqz; | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + public String getChl() { | ||
| 136 | + return chl; | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + public void setChl(String chl) { | ||
| 140 | + this.chl = chl; | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + public String getBcjh() { | ||
| 144 | + return bcjh; | ||
| 145 | + } | ||
| 146 | + | ||
| 147 | + public void setBcjh(String bcjh) { | ||
| 148 | + this.bcjh = bcjh; | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + public String getBcsj() { | ||
| 152 | + return bcsj; | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + public void setBcsj(String bcsj) { | ||
| 156 | + this.bcsj = bcsj; | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + public String getBbzxl() { | ||
| 160 | + return bbzxl; | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + public void setBbzxl(String bbzxl) { | ||
| 164 | + this.bbzxl = bbzxl; | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + public String getSm() { | ||
| 168 | + return sm; | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + public void setSm(String sm) { | ||
| 172 | + this.sm = sm; | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + | ||
| 176 | +} |
src/main/java/com/bsth/entity/oil/Cwjy.java
| @@ -6,6 +6,9 @@ import javax.persistence.Entity; | @@ -6,6 +6,9 @@ import javax.persistence.Entity; | ||
| 6 | import javax.persistence.GeneratedValue; | 6 | import javax.persistence.GeneratedValue; |
| 7 | import javax.persistence.Id; | 7 | import javax.persistence.Id; |
| 8 | import javax.persistence.Table; | 8 | import javax.persistence.Table; |
| 9 | +import javax.persistence.Transient; | ||
| 10 | + | ||
| 11 | +import com.bsth.data.BasicData; | ||
| 9 | 12 | ||
| 10 | @Entity | 13 | @Entity |
| 11 | @Table(name = "bsth_c_cwjy") | 14 | @Table(name = "bsth_c_cwjy") |
| @@ -24,6 +27,11 @@ public class Cwjy { | @@ -24,6 +27,11 @@ public class Cwjy { | ||
| 24 | 27 | ||
| 25 | private Date createDate; | 28 | private Date createDate; |
| 26 | 29 | ||
| 30 | + @Transient | ||
| 31 | + private String gsname; | ||
| 32 | + | ||
| 33 | + @Transient | ||
| 34 | + private String fgsname; | ||
| 27 | public Integer getId() { | 35 | public Integer getId() { |
| 28 | return id; | 36 | return id; |
| 29 | } | 37 | } |
| @@ -71,6 +79,22 @@ public class Cwjy { | @@ -71,6 +79,22 @@ public class Cwjy { | ||
| 71 | public void setCreateDate(Date createDate) { | 79 | public void setCreateDate(Date createDate) { |
| 72 | this.createDate = createDate; | 80 | this.createDate = createDate; |
| 73 | } | 81 | } |
| 82 | + | ||
| 83 | + public String getGsname() { | ||
| 84 | + return BasicData.businessCodeNameMap.get(this.gsdm); | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + public void setGsname(String gsname) { | ||
| 88 | + this.gsname = gsname; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + public String getFgsname() { | ||
| 92 | + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm); | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + public void setFgsname(String fgsname) { | ||
| 96 | + this.fgsname = fgsname; | ||
| 97 | + } | ||
| 74 | 98 | ||
| 75 | 99 | ||
| 76 | } | 100 | } |
src/main/java/com/bsth/entity/oil/Cyl.java
| @@ -6,6 +6,9 @@ import javax.persistence.Entity; | @@ -6,6 +6,9 @@ import javax.persistence.Entity; | ||
| 6 | import javax.persistence.GeneratedValue; | 6 | import javax.persistence.GeneratedValue; |
| 7 | import javax.persistence.Id; | 7 | import javax.persistence.Id; |
| 8 | import javax.persistence.Table; | 8 | import javax.persistence.Table; |
| 9 | +import javax.persistence.Transient; | ||
| 10 | + | ||
| 11 | +import com.bsth.data.BasicData; | ||
| 9 | 12 | ||
| 10 | @Entity | 13 | @Entity |
| 11 | @Table(name = "bsth_c_cyl") | 14 | @Table(name = "bsth_c_cyl") |
| @@ -25,6 +28,16 @@ public class Cyl { | @@ -25,6 +28,16 @@ public class Cyl { | ||
| 25 | private Double cxrl; | 28 | private Double cxrl; |
| 26 | //公司代码 | 29 | //公司代码 |
| 27 | private String gsdm; | 30 | private String gsdm; |
| 31 | + | ||
| 32 | + @Transient | ||
| 33 | + private String gsname; | ||
| 34 | + | ||
| 35 | + @Transient | ||
| 36 | + private String fgsname; | ||
| 37 | + | ||
| 38 | + //分公司代码 | ||
| 39 | + private String fgsdm; | ||
| 40 | + | ||
| 28 | public Integer getId() { | 41 | public Integer getId() { |
| 29 | return id; | 42 | return id; |
| 30 | } | 43 | } |
| @@ -72,4 +85,30 @@ public class Cyl { | @@ -72,4 +85,30 @@ public class Cyl { | ||
| 72 | public void setGsdm(String gsdm){ | 85 | public void setGsdm(String gsdm){ |
| 73 | this.gsdm=gsdm; | 86 | this.gsdm=gsdm; |
| 74 | } | 87 | } |
| 88 | + | ||
| 89 | + public String getFgsdm() { | ||
| 90 | + return fgsdm; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + public void setFgsdm(String fgsdm) { | ||
| 94 | + this.fgsdm = fgsdm; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + public String getGsname() { | ||
| 98 | + return BasicData.businessCodeNameMap.get(this.gsdm); | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + public void setGsname(String gsname) { | ||
| 102 | + this.gsname = gsname; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + public String getFgsname() { | ||
| 106 | + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm); | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + public void setFgsname(String fgsname) { | ||
| 110 | + this.fgsname = fgsname; | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + | ||
| 75 | } | 114 | } |
src/main/java/com/bsth/entity/oil/Ylxxb.java
| @@ -10,6 +10,8 @@ import javax.persistence.Transient; | @@ -10,6 +10,8 @@ import javax.persistence.Transient; | ||
| 10 | 10 | ||
| 11 | import org.springframework.format.annotation.DateTimeFormat; | 11 | import org.springframework.format.annotation.DateTimeFormat; |
| 12 | 12 | ||
| 13 | +import com.bsth.data.BasicData; | ||
| 14 | + | ||
| 13 | @Entity | 15 | @Entity |
| 14 | @Table(name = "bsth_c_ylxxb") | 16 | @Table(name = "bsth_c_ylxxb") |
| 15 | public class Ylxxb { | 17 | public class Ylxxb { |
| @@ -25,6 +27,7 @@ public class Ylxxb { | @@ -25,6 +27,7 @@ public class Ylxxb { | ||
| 25 | private String stationid; | 27 | private String stationid; |
| 26 | private Date createtime; | 28 | private Date createtime; |
| 27 | private String gsdm; | 29 | private String gsdm; |
| 30 | + private String fgsdm; | ||
| 28 | private String yp; | 31 | private String yp; |
| 29 | private String jyggh; | 32 | private String jyggh; |
| 30 | private Double yj; | 33 | private Double yj; |
| @@ -37,6 +40,10 @@ public class Ylxxb { | @@ -37,6 +40,10 @@ public class Ylxxb { | ||
| 37 | private String ldgh; | 40 | private String ldgh; |
| 38 | //0为接口数据,1为手工输入 | 41 | //0为接口数据,1为手工输入 |
| 39 | private int jylx=0; | 42 | private int jylx=0; |
| 43 | + @Transient | ||
| 44 | + private String gsname; | ||
| 45 | + @Transient | ||
| 46 | + private String fgsname; | ||
| 40 | 47 | ||
| 41 | 48 | ||
| 42 | public Integer getId() { | 49 | public Integer getId() { |
| @@ -93,6 +100,14 @@ public class Ylxxb { | @@ -93,6 +100,14 @@ public class Ylxxb { | ||
| 93 | public void setGsdm(String gsdm) { | 100 | public void setGsdm(String gsdm) { |
| 94 | this.gsdm = gsdm; | 101 | this.gsdm = gsdm; |
| 95 | } | 102 | } |
| 103 | + | ||
| 104 | + | ||
| 105 | + public String getFgsdm() { | ||
| 106 | + return fgsdm; | ||
| 107 | + } | ||
| 108 | + public void setFgsdm(String fgsdm) { | ||
| 109 | + this.fgsdm = fgsdm; | ||
| 110 | + } | ||
| 96 | public String getYp() { | 111 | public String getYp() { |
| 97 | return yp; | 112 | return yp; |
| 98 | } | 113 | } |
| @@ -154,6 +169,20 @@ public class Ylxxb { | @@ -154,6 +169,20 @@ public class Ylxxb { | ||
| 154 | this.jylx = jylx; | 169 | this.jylx = jylx; |
| 155 | } | 170 | } |
| 156 | 171 | ||
| 172 | + public String getGsname() { | ||
| 173 | + return BasicData.businessCodeNameMap.get(this.gsdm); | ||
| 174 | + } | ||
| 175 | + | ||
| 176 | + public void setGsname(String gsname) { | ||
| 177 | + this.gsname = gsname; | ||
| 178 | + } | ||
| 157 | 179 | ||
| 180 | + public String getFgsname() { | ||
| 181 | + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm); | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + public void setFgsname(String fgsname) { | ||
| 185 | + this.fgsname = fgsname; | ||
| 186 | + } | ||
| 158 | 187 | ||
| 159 | } | 188 | } |
src/main/java/com/bsth/entity/search/PredicatesBuilder.java
| @@ -8,7 +8,9 @@ import javax.persistence.criteria.Predicate; | @@ -8,7 +8,9 @@ import javax.persistence.criteria.Predicate; | ||
| 8 | import java.text.NumberFormat; | 8 | import java.text.NumberFormat; |
| 9 | import java.text.ParseException; | 9 | import java.text.ParseException; |
| 10 | import java.text.SimpleDateFormat; | 10 | import java.text.SimpleDateFormat; |
| 11 | +import java.util.ArrayList; | ||
| 11 | import java.util.Date; | 12 | import java.util.Date; |
| 13 | +import java.util.List; | ||
| 12 | 14 | ||
| 13 | /** | 15 | /** |
| 14 | * | 16 | * |
| @@ -58,6 +60,15 @@ public class PredicatesBuilder { | @@ -58,6 +60,15 @@ public class PredicatesBuilder { | ||
| 58 | return cb.notEqual(expression, object); | 60 | return cb.notEqual(expression, object); |
| 59 | } | 61 | } |
| 60 | 62 | ||
| 63 | + public static Predicate in(CriteriaBuilder cb,Path<?> expression, Object object){ | ||
| 64 | + String[] obj=object.toString().split(","); | ||
| 65 | + List<String> list=new ArrayList<String>(); | ||
| 66 | + for(int i=0;i<obj.length;i++){ | ||
| 67 | + list.add(obj[i]); | ||
| 68 | + } | ||
| 69 | + return cb.in(expression).value(list); | ||
| 70 | + } | ||
| 71 | + | ||
| 61 | public static Predicate gt(CriteriaBuilder cb,Path<Number> expression, Object object){ | 72 | public static Predicate gt(CriteriaBuilder cb,Path<Number> expression, Object object){ |
| 62 | try { | 73 | try { |
| 63 | return cb.gt(expression, nf.parse(object.toString())); | 74 | return cb.gt(expression, nf.parse(object.toString())); |
src/main/java/com/bsth/entity/search/SearchOperator.java
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| @@ -82,7 +82,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -82,7 +82,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 82 | @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 and s.scheduleDate = str_to_date(?4,'%Y-%m-%d') and bcType='normal' order by bcs") | 82 | @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 and s.scheduleDate = str_to_date(?4,'%Y-%m-%d') and bcType='normal' order by bcs") |
| 83 | List<ScheduleRealInfo> queryListWaybill2(String jName,String clZbh,String lpName,String date); | 83 | List<ScheduleRealInfo> queryListWaybill2(String jName,String clZbh,String lpName,String date); |
| 84 | 84 | ||
| 85 | - @Query(value="select s from ScheduleRealInfo s where s.jGh = ?1 and s.clZbh = ?2 and s.scheduleDate = str_to_date(?3,'%Y-%m-%d') and bcType='normal' order by bcs") | 85 | + @Query(value="select s from ScheduleRealInfo s where s.jGh = ?1 and s.clZbh = ?2 and s.scheduleDate = str_to_date(?3,'%Y-%m-%d') order by bcs") |
| 86 | List<ScheduleRealInfo> queryListWaybill3(String jName,String clZbh,String date); | 86 | List<ScheduleRealInfo> queryListWaybill3(String jName,String clZbh,String date); |
| 87 | 87 | ||
| 88 | @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") | 88 | @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") |
src/main/java/com/bsth/service/forms/FormsService.java
| @@ -3,12 +3,15 @@ package com.bsth.service.forms; | @@ -3,12 +3,15 @@ package com.bsth.service.forms; | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import java.util.Map; | 4 | import java.util.Map; |
| 5 | 5 | ||
| 6 | +import com.bsth.entity.mcy_forms.Allline; | ||
| 6 | import com.bsth.entity.mcy_forms.Changetochange; | 7 | import com.bsth.entity.mcy_forms.Changetochange; |
| 8 | +import com.bsth.entity.mcy_forms.Executionrate; | ||
| 7 | import com.bsth.entity.mcy_forms.Linepasswengerflow; | 9 | import com.bsth.entity.mcy_forms.Linepasswengerflow; |
| 8 | import com.bsth.entity.mcy_forms.Operationservice; | 10 | import com.bsth.entity.mcy_forms.Operationservice; |
| 9 | import com.bsth.entity.mcy_forms.Shifday; | 11 | import com.bsth.entity.mcy_forms.Shifday; |
| 10 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; | 12 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 11 | import com.bsth.entity.mcy_forms.Singledata; | 13 | import com.bsth.entity.mcy_forms.Singledata; |
| 14 | +import com.bsth.entity.mcy_forms.Turnoutrate; | ||
| 12 | import com.bsth.entity.mcy_forms.Vehicleloading; | 15 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 13 | import com.bsth.entity.mcy_forms.Waybillday; | 16 | import com.bsth.entity.mcy_forms.Waybillday; |
| 14 | 17 | ||
| @@ -17,8 +20,6 @@ public interface FormsService { | @@ -17,8 +20,6 @@ public interface FormsService { | ||
| 17 | 20 | ||
| 18 | public List<Waybillday> waybillday(Map<String, Object> map); | 21 | public List<Waybillday> waybillday(Map<String, Object> map); |
| 19 | 22 | ||
| 20 | - List<Waybillday> waybilldayExcel(Map<String, Object> map); | ||
| 21 | - | ||
| 22 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map); | 23 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map); |
| 23 | 24 | ||
| 24 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map); | 25 | public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map); |
| @@ -32,4 +33,10 @@ public interface FormsService { | @@ -32,4 +33,10 @@ public interface FormsService { | ||
| 32 | public List<Vehicleloading> vehicleloading(String line,String data); | 33 | public List<Vehicleloading> vehicleloading(String line,String data); |
| 33 | 34 | ||
| 34 | public List<Operationservice> operationservice(Map<String, Object> map); | 35 | public List<Operationservice> operationservice(Map<String, Object> map); |
| 36 | + | ||
| 37 | + public List<Turnoutrate> turnoutrate(Map<String, Object> map); | ||
| 38 | + | ||
| 39 | + public List<Executionrate> executionrate(Map<String, Object> map); | ||
| 40 | + | ||
| 41 | + public List<Allline> allline(Map<String, Object> map); | ||
| 35 | } | 42 | } |
src/main/java/com/bsth/service/forms/impl/ExportServiceImpl.java
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| 1 | package com.bsth.service.forms.impl; | 1 | package com.bsth.service.forms.impl; |
| 2 | 2 | ||
| 3 | +import java.math.BigDecimal; | ||
| 4 | +import java.math.MathContext; | ||
| 5 | +import java.math.RoundingMode; | ||
| 3 | import java.sql.ResultSet; | 6 | import java.sql.ResultSet; |
| 4 | import java.sql.SQLException; | 7 | import java.sql.SQLException; |
| 5 | -import java.text.DecimalFormat; | 8 | +import java.text.NumberFormat; |
| 6 | import java.text.ParseException; | 9 | import java.text.ParseException; |
| 7 | import java.text.SimpleDateFormat; | 10 | import java.text.SimpleDateFormat; |
| 8 | import java.util.ArrayList; | 11 | import java.util.ArrayList; |
| 9 | import java.util.Date; | 12 | import java.util.Date; |
| 10 | import java.util.HashMap; | 13 | import java.util.HashMap; |
| 11 | -import java.util.Iterator; | ||
| 12 | import java.util.List; | 14 | import java.util.List; |
| 13 | import java.util.Map; | 15 | import java.util.Map; |
| 14 | 16 | ||
| @@ -22,379 +24,522 @@ import com.bsth.entity.mcy_forms.Operationservice; | @@ -22,379 +24,522 @@ import com.bsth.entity.mcy_forms.Operationservice; | ||
| 22 | import com.bsth.entity.mcy_forms.Shifday; | 24 | import com.bsth.entity.mcy_forms.Shifday; |
| 23 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; | 25 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 24 | import com.bsth.entity.mcy_forms.Singledata; | 26 | import com.bsth.entity.mcy_forms.Singledata; |
| 27 | +import com.bsth.entity.mcy_forms.Turnoutrate; | ||
| 25 | import com.bsth.entity.mcy_forms.Vehicleloading; | 28 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 26 | import com.bsth.entity.mcy_forms.Waybillday; | 29 | import com.bsth.entity.mcy_forms.Waybillday; |
| 30 | +import com.bsth.entity.mcy_forms.Allline; | ||
| 27 | import com.bsth.entity.mcy_forms.Changetochange; | 31 | import com.bsth.entity.mcy_forms.Changetochange; |
| 32 | +import com.bsth.entity.mcy_forms.Executionrate; | ||
| 28 | import com.bsth.service.forms.FormsService; | 33 | import com.bsth.service.forms.FormsService; |
| 29 | import com.bsth.service.realcontrol.ScheduleRealInfoService; | 34 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 30 | import com.bsth.util.ReportRelatedUtils; | 35 | import com.bsth.util.ReportRelatedUtils; |
| 31 | import com.bsth.util.ReportUtils; | 36 | import com.bsth.util.ReportUtils; |
| 32 | 37 | ||
| 33 | @Service | 38 | @Service |
| 34 | -public class FormsServiceImpl implements FormsService{ | ||
| 35 | - | 39 | +public class FormsServiceImpl implements FormsService { |
| 40 | + | ||
| 36 | @Autowired | 41 | @Autowired |
| 37 | JdbcTemplate jdbcTemplate; | 42 | JdbcTemplate jdbcTemplate; |
| 38 | - | 43 | + |
| 39 | @Autowired | 44 | @Autowired |
| 40 | ScheduleRealInfoService scheduleRealInfoService; | 45 | ScheduleRealInfoService scheduleRealInfoService; |
| 41 | - | ||
| 42 | - //行车路单日报表 | 46 | + |
| 47 | + // 行车路单日报表 | ||
| 43 | @Override | 48 | @Override |
| 44 | public List<Waybillday> waybillday(Map<String, Object> map) { | 49 | public List<Waybillday> waybillday(Map<String, Object> map) { |
| 45 | - List list1=new ArrayList<>();// | ||
| 46 | - String sql = "select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,y.YH,c.personnel_name from bsth_c_ylb y" + | ||
| 47 | - " LEFT JOIN bsth_c_personnel c ON c.job_code=y.JSY " + | ||
| 48 | - " where to_days(y.RQ)=to_days('"+map.get("date").toString()+"') " + | ||
| 49 | - " and y.XLBM="+map.get("line").toString()+ | ||
| 50 | - " GROUP BY y.NBBM"; | ||
| 51 | - | 50 | + List list1 = new ArrayList<>();// |
| 51 | + String sql ="select x.schedule_date,x.j_gh,x.cl_zbh,z.JZL,z.YH,z.personnel_name " | ||
| 52 | + + "from bsth_c_s_sp_info_real x INNER join " | ||
| 53 | + + "( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,c.personnel_name from" | ||
| 54 | + + " bsth_c_ylb y LEFT JOIN bsth_c_personnel c ON c.job_code=y.JSY " | ||
| 55 | + + "where to_days(y.RQ)=to_days('"+map.get("date").toString() + "') and y.XLBM= '"+ map.get("line").toString()+"' GROUP BY y.NBBM) " | ||
| 56 | + + "z on x.cl_zbh=z.nbbm where to_days( x.schedule_date)=to_days('"+map.get("date").toString()+"') " | ||
| 57 | + + "and x.xl_bm='"+map.get("line").toString()+"' GROUP BY x.cl_zbh,j_gh"; | ||
| 52 | List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { | 58 | List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { |
| 53 | @Override | 59 | @Override |
| 54 | public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { | 60 | public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 55 | Waybillday wbd = new Waybillday(); | 61 | Waybillday wbd = new Waybillday(); |
| 56 | - wbd.setCarPlate(arg0.getString("NBBM")); | 62 | + wbd.setCarPlate(arg0.getString("cl_zbh")); |
| 57 | wbd.setJzl(arg0.getString("JZL")); | 63 | wbd.setJzl(arg0.getString("JZL")); |
| 58 | wbd.setYh(arg0.getString("YH")); | 64 | wbd.setYh(arg0.getString("YH")); |
| 59 | wbd.setjName(arg0.getString("personnel_name")); | 65 | wbd.setjName(arg0.getString("personnel_name")); |
| 60 | - //wbd.setZlc(arg0.getInt("zlc")); | ||
| 61 | - //System.out.println(arg0.getObject("yl")); | ||
| 62 | - //wbd.setYl(arg0.getString("yl")); | ||
| 63 | - //wbd.setNbbm(arg0.getString("nbbm")); | ||
| 64 | - Map<String, Object> maps=new HashMap<>(); | ||
| 65 | - maps=scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("nbbm"), arg0.getString("RQ")); | 66 | + // wbd.setZlc(arg0.getInt("zlc")); |
| 67 | + // System.out.println(arg0.getObject("yl")); | ||
| 68 | + // wbd.setYl(arg0.getString("yl")); | ||
| 69 | + // wbd.setNbbm(arg0.getString("nbbm")); | ||
| 70 | + Map<String, Object> maps = new HashMap<>(); | ||
| 71 | + maps = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | ||
| 72 | + arg0.getString("schedule_date")); | ||
| 66 | wbd.setJzl1(maps.get("ksgl").toString()); | 73 | wbd.setJzl1(maps.get("ksgl").toString()); |
| 67 | wbd.setZlc(maps.get("realMileage").toString()); | 74 | wbd.setZlc(maps.get("realMileage").toString()); |
| 68 | -// {realMileage=211.20, cjbc=2, ljbc=0, remMileage=38.40, ksgl=0.00, | ||
| 69 | -// jhlc=211.20, sjbc=9, jhbc=11, addMileage=0.00, yygl=211.20 | ||
| 70 | - | 75 | + |
| 71 | return wbd; | 76 | return wbd; |
| 72 | - | 77 | + |
| 73 | } | 78 | } |
| 74 | }); | 79 | }); |
| 75 | return list; | 80 | return list; |
| 76 | } | 81 | } |
| 77 | - | ||
| 78 | - | ||
| 79 | - | ||
| 80 | - //线路客流量报表 | 82 | + |
| 83 | + // 线路客流量报表 | ||
| 81 | @Override | 84 | @Override |
| 82 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) { | 85 | public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) { |
| 83 | - String sql = " SELECT s.station_name,l.name,l.create_date from bsth_c_stationroute s " + | ||
| 84 | - " LEFT JOIN bsth_c_line l on s.line_code=l.line_code " + | ||
| 85 | - " where to_days(l.create_date)=to_days('"+map.get("date").toString()+"') " + | ||
| 86 | - " and l.line_code="+map.get("line").toString()+ | ||
| 87 | - " GROUP BY s.station_name "; | ||
| 88 | - | 86 | + String sql = " SELECT s.station_name,l.name,l.create_date from bsth_c_stationroute s " |
| 87 | + + " LEFT JOIN bsth_c_line l on s.line_code=l.line_code " | ||
| 88 | + + " where to_days(l.create_date)=to_days('"+map.get("date").toString() + "') " | ||
| 89 | + + " and l.line_code=" + map.get("line").toString() | ||
| 90 | + + " GROUP BY s.station_name "; | ||
| 91 | + | ||
| 89 | List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { | 92 | List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { |
| 90 | 93 | ||
| 91 | @Override | 94 | @Override |
| 92 | public Linepasswengerflow mapRow(ResultSet arg0, int arg1) throws SQLException { | 95 | public Linepasswengerflow mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 93 | Linepasswengerflow lin = new Linepasswengerflow(); | 96 | Linepasswengerflow lin = new Linepasswengerflow(); |
| 94 | - lin.setStationName(arg0.getString("station_name")); | ||
| 95 | - | 97 | + lin.setStationName(arg0.getString("station_name")); |
| 98 | + | ||
| 96 | return lin; | 99 | return lin; |
| 97 | } | 100 | } |
| 98 | }); | 101 | }); |
| 99 | return list; | 102 | return list; |
| 100 | } | 103 | } |
| 101 | 104 | ||
| 105 | + // 班次车辆人员月统计 | ||
| 106 | + String startDate; | ||
| 107 | + String endDate; | ||
| 102 | 108 | ||
| 103 | - //导出 | ||
| 104 | @Override | 109 | @Override |
| 105 | - public List<Waybillday> waybilldayExcel(Map<String,Object> map) { | ||
| 106 | - ReportUtils ee = new ReportUtils(); | ||
| 107 | - ReportRelatedUtils rru = new ReportRelatedUtils(); | ||
| 108 | - List<Iterator<?>> list = new ArrayList<Iterator<?>>(); | ||
| 109 | - List<Waybillday> Waybilldays = waybillday(map); | ||
| 110 | - List<Map<String,Object>> listMap = new ArrayList<Map<String,Object>>(); | ||
| 111 | - | ||
| 112 | - DecimalFormat format = new DecimalFormat("0.00"); | ||
| 113 | - String jName=null; | ||
| 114 | - Map<String,Object> map1 = new HashMap<>(); | ||
| 115 | - for(Waybillday Waybillday : Waybilldays){ | ||
| 116 | - map1.put("carPlate", Waybillday.getCarPlate()); | ||
| 117 | - map1.put("jzl1", Waybillday.getJzl1()); | ||
| 118 | - map1.put("jzl", Waybillday.getJzl()); | ||
| 119 | - map1.put("yh", Waybillday.getYh()); | ||
| 120 | - map1.put("jName", Waybillday.getjName()); | ||
| 121 | - jName=Waybillday.getjName(); | ||
| 122 | - map1.put("zlc", Waybillday.getZlc()); | ||
| 123 | - } | ||
| 124 | -// | ||
| 125 | -// //计算里程和班次数,并放入Map里 | ||
| 126 | -// map1 = new HashMap<String, Object>(); | ||
| 127 | -// map1.put("jhlc", format.format(jhlc)); | ||
| 128 | -// map1.put("remMileage", format.format(remMileage)); | ||
| 129 | -// map1.put("addMileage", format.format(addMileage)); | ||
| 130 | -// map1.put("yygl", format.format(yygl)); | ||
| 131 | -// map1.put("ksgl", format.format(ksgl)); | ||
| 132 | -// map1.put("realMileage", format.format(yygl+ksgl)); | ||
| 133 | -// map1.put("jhbc", jhbc); | ||
| 134 | -// map1.put("cjbc", cjbc); | ||
| 135 | -// map1.put("ljbc", ljbc); | ||
| 136 | -// map1.put("sjbc", jhbc-cjbc+ljbc); | ||
| 137 | - | ||
| 138 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 139 | - | ||
| 140 | - list.add(listMap.iterator()); | ||
| 141 | - ee.excelReplace(list, new Object[] { Waybilldays.get(0),map1 }, path+"mould\\waybill_minhang.xls", | ||
| 142 | - path+"export\\" + jName + ".xls"); | ||
| 143 | - return Waybilldays; | ||
| 144 | - } | 110 | + public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { |
| 111 | + List list1 = new ArrayList<>();// | ||
| 112 | + String sql = "select r.j_name,r.schedule_date_str,r.update_date,r.cl_zbh " + " from bsth_c_s_sp_info_real r " | ||
| 113 | + + " LEFT JOIN bsth_c_s_ttinfo_detail d on r.lp_name=d.lp " | ||
| 114 | + + " LEFT JOIN bsth_c_line_information l on l.line=r.lp_name " | ||
| 115 | + + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " | ||
| 116 | + + " and to_days('" + map.get("endDate").toString() + "') " + " and r.xl_bm='" | ||
| 117 | + + map.get("line").toString() + "' " + " GROUP BY r.j_name" + " ORDER BY r.j_name"; | ||
| 118 | + startDate = map.get("startDate").toString(); | ||
| 119 | + endDate = map.get("endDate").toString(); | ||
| 120 | + List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { | ||
| 145 | 121 | ||
| 122 | + @Override | ||
| 123 | + public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 124 | + Shiftuehiclemanth shif = new Shiftuehiclemanth(); | ||
| 125 | + shif.setjName(arg0.getString("j_name")); | ||
| 146 | 126 | ||
| 147 | - //班次车辆人员月统计 | ||
| 148 | - String startDate; | ||
| 149 | - String endDate; | 127 | + Map<String, Object> maps = new HashMap<>(); |
| 128 | + | ||
| 129 | + maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, | ||
| 130 | + endDate); | ||
| 131 | + shif.setJhlc(maps.get("jhlc").toString()); | ||
| 132 | + shif.setEmptMileage(maps.get("ksgl").toString()); | ||
| 133 | + shif.setRemMileage(maps.get("remMileage").toString()); | ||
| 134 | + shif.setAddMileage(maps.get("addMileage").toString()); | ||
| 135 | + shif.setTotalm(maps.get("realMileage").toString()); | ||
| 136 | + shif.setCjbc(maps.get("cjbc").toString()); | ||
| 137 | + shif.setLjbc(maps.get("ljbc").toString()); | ||
| 138 | + shif.setSjbc(maps.get("sjbc").toString()); | ||
| 139 | + | ||
| 140 | + return shif; | ||
| 141 | + | ||
| 142 | + } | ||
| 143 | + }); | ||
| 144 | + | ||
| 145 | + return list; | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + // 班次车辆人员日统计 | ||
| 150 | @Override | 149 | @Override |
| 151 | - public List<Shiftuehiclemanth> shiftuehiclemanth( Map<String, Object> map) { | ||
| 152 | - List list1=new ArrayList<>();// | ||
| 153 | - String sql = "select r.j_name,r.schedule_date_str,r.update_date,r.cl_zbh " + | ||
| 154 | - " from bsth_c_s_sp_info_real r " + | ||
| 155 | - " LEFT JOIN bsth_c_s_ttinfo_detail d on r.lp_name=d.lp " + | ||
| 156 | - " LEFT JOIN bsth_c_line_information l on l.line=r.lp_name " + | ||
| 157 | - " where to_days(r.schedule_date_str) BETWEEN to_days('"+map.get("startDate").toString()+"') " + | ||
| 158 | - " and to_days('"+map.get("endDate").toString()+"') " + | ||
| 159 | - " and r.xl_bm='"+map.get("line").toString() +"' " + | ||
| 160 | - " GROUP BY r.j_name" + | ||
| 161 | - " ORDER BY r.j_name"; | ||
| 162 | - startDate=map.get("startDate").toString(); | ||
| 163 | - endDate=map.get("endDate").toString(); | ||
| 164 | - List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { | ||
| 165 | - | ||
| 166 | - @Override | ||
| 167 | - public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 168 | - Shiftuehiclemanth shif = new Shiftuehiclemanth(); | ||
| 169 | - shif.setjName(arg0.getString("j_name")); | ||
| 170 | - | ||
| 171 | - Map<String, Object> maps=new HashMap<>(); | ||
| 172 | - | ||
| 173 | - maps=scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate , endDate ); | ||
| 174 | - shif.setJhlc(maps.get("jhlc").toString()); | ||
| 175 | - shif.setEmptMileage(maps.get("ksgl").toString()); | ||
| 176 | - shif.setRemMileage(maps.get("remMileage").toString()); | ||
| 177 | - shif.setAddMileage(maps.get("addMileage").toString()); | ||
| 178 | - shif.setTotalm(maps.get("realMileage").toString()); | ||
| 179 | - shif.setCjbc(maps.get("cjbc").toString()); | ||
| 180 | - shif.setLjbc(maps.get("ljbc").toString()); | ||
| 181 | - shif.setSjbc(maps.get("sjbc").toString()); | ||
| 182 | - | ||
| 183 | - return shif; | ||
| 184 | - | ||
| 185 | - } | ||
| 186 | - }); | ||
| 187 | - | ||
| 188 | - return list; | 150 | + public List<Shifday> shifday(Map<String, Object> map) { |
| 151 | + String sql = " select r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.schedule_date,r.cl_zbh,r.j_gh " | ||
| 152 | + + " FROM bsth_c_s_sp_info_real r " + " where to_days(r.schedule_date)=to_days('" | ||
| 153 | + + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() + " GROUP BY r.j_name "; | ||
| 154 | + | ||
| 155 | + List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { | ||
| 156 | + | ||
| 157 | + @Override | ||
| 158 | + public Shifday mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 159 | + Shifday shifday = new Shifday(); | ||
| 160 | + shifday.setjName(arg0.getString("j_name").toString()); | ||
| 161 | + shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString()); | ||
| 162 | + shifday.setLpName(arg0.getString("r.lp_name").toString()); | ||
| 163 | + shifday.setCarPlate(arg0.getString("cl_zbh").toString()); | ||
| 164 | + | ||
| 165 | + Map<String, Object> map = new HashMap<>(); | ||
| 166 | + map = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), | ||
| 167 | + arg0.getString("schedule_date")); | ||
| 168 | + shifday.setJhlc(map.get("jhlc").toString());// 计划里程 | ||
| 169 | + // shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程 | ||
| 170 | + shifday.setYygl(map.get("yygl").toString());// 营运里程 | ||
| 171 | + shifday.setEmptMileage(map.get("ksgl").toString());// 空驶里程 | ||
| 172 | + shifday.setRemMileage(map.get("remMileage").toString());// 抽减里程 | ||
| 173 | + shifday.setAddMileage(map.get("addMileage").toString());// 增加里程 | ||
| 174 | + shifday.setTotalm(map.get("realMileage").toString());// 总里程 | ||
| 175 | + shifday.setJhbc(map.get("jhbc").toString());// 计划班次 | ||
| 176 | + // shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次 | ||
| 177 | + shifday.setCjbc(map.get("cjbc").toString());// 抽减班次 | ||
| 178 | + shifday.setLjbc(map.get("ljbc").toString());// 增加班次 | ||
| 179 | + shifday.setSjbc(map.get("sjbc").toString());// 实际班次 | ||
| 180 | + return shifday; | ||
| 181 | + } | ||
| 182 | + }); | ||
| 183 | + return list; | ||
| 189 | } | 184 | } |
| 190 | 185 | ||
| 186 | + // 换人换车情况日统计 | ||
| 187 | + String rq; | ||
| 191 | 188 | ||
| 192 | - //班次车辆人员日统计 | ||
| 193 | @Override | 189 | @Override |
| 194 | - public List<Shifday> shifday(Map<String, Object> map) { | ||
| 195 | - String sql = " select r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.schedule_date,r.cl_zbh,r.j_gh " + | ||
| 196 | - " FROM bsth_c_s_sp_info_real r " + | ||
| 197 | - " where to_days(r.schedule_date)=to_days('"+map.get("date").toString()+"') and r.xl_bm="+map.get("line").toString()+ | ||
| 198 | - " GROUP BY r.j_name "; | ||
| 199 | - | ||
| 200 | - List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { | ||
| 201 | - | ||
| 202 | - @Override | ||
| 203 | - public Shifday mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 204 | - Shifday shifday = new Shifday(); | ||
| 205 | - shifday.setjName(arg0.getString("j_name").toString()); | ||
| 206 | - shifday.setsName(arg0.getString("s_name")==null?"":arg0.getString("s_name").toString()); | ||
| 207 | - shifday.setLpName(arg0.getString("r.lp_name").toString()); | ||
| 208 | - shifday.setCarPlate(arg0.getString("cl_zbh").toString()); | ||
| 209 | - | ||
| 210 | - Map<String, Object> map=new HashMap<>(); | ||
| 211 | - map=scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), arg0.getString("schedule_date")); | ||
| 212 | - shifday.setJhlc(map.get("jhlc").toString());//计划里程 | ||
| 213 | - //shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程 | ||
| 214 | - shifday.setYygl(map.get("yygl").toString());//营运里程 | ||
| 215 | - shifday.setEmptMileage(map.get("ksgl").toString());//空驶里程 | ||
| 216 | - shifday.setRemMileage(map.get("remMileage").toString());//抽减里程 | ||
| 217 | - shifday.setAddMileage(map.get("addMileage").toString());//增加里程 | ||
| 218 | - shifday.setTotalm(map.get("realMileage").toString());//总里程 | ||
| 219 | - shifday.setJhbc(map.get("jhbc").toString());//计划班次 | ||
| 220 | - //shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次 | ||
| 221 | - shifday.setCjbc(map.get("cjbc").toString());//抽减班次 | ||
| 222 | - shifday.setLjbc(map.get("ljbc").toString());//增加班次 | ||
| 223 | - shifday.setSjbc(map.get("sjbc").toString());//实际班次 | ||
| 224 | - return shifday; | 190 | + public List<Changetochange> changetochange(Map<String, Object> map) { |
| 191 | + | ||
| 192 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 193 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | ||
| 194 | + Date d = null; | ||
| 195 | + Date d1 = null; | ||
| 196 | + try { | ||
| 197 | + d = sdf.parse(map.get("startDate").toString()); | ||
| 198 | + d1 = sdf.parse(map.get("endDate").toString()); | ||
| 199 | + } catch (ParseException e) { | ||
| 200 | + | ||
| 201 | + e.printStackTrace(); | ||
| 225 | } | 202 | } |
| 226 | - }); | ||
| 227 | - return list; | ||
| 228 | - } | 203 | + String rq2 = sdf1.format(d); |
| 204 | + String rq3 = sdf1.format(d1); | ||
| 205 | + | ||
| 206 | + rq = rq2 + "-" + rq3; | ||
| 207 | + | ||
| 208 | + String sql = " select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 "; | ||
| 209 | + if (!map.get("startDate").toString().equals(" ") && !map.get("endDate").toString().equals(" ")) { | ||
| 210 | + sql += "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | ||
| 211 | + + map.get("endDate").toString() + "'"; | ||
| 212 | + } | ||
| 213 | + if (!map.get("line").equals("")) { | ||
| 214 | + sql += "and line_code='" + map.get("line") + "'"; | ||
| 215 | + } | ||
| 216 | + if (map.get("sel").equals("2")) { | ||
| 217 | + sql += " and c.pcch!=c.pcry"; | ||
| 218 | + } else if (map.get("sel").equals("1")) { | ||
| 219 | + sql += " and c.jhgh!=c.sjgh"; | ||
| 220 | + } | ||
| 221 | + | ||
| 222 | + List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() { | ||
| 229 | 223 | ||
| 230 | - //换人换车情况日统计 | ||
| 231 | - String rq; | ||
| 232 | @Override | 224 | @Override |
| 233 | - public List<Changetochange> changetochange(Map<String, Object> map) { | ||
| 234 | - | ||
| 235 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd") ; | ||
| 236 | - SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日") ; | ||
| 237 | - Date d = null ; | ||
| 238 | - Date d1 = null ; | ||
| 239 | - try { | ||
| 240 | - d = sdf.parse(map.get("startDate").toString()); | ||
| 241 | - d1 = sdf.parse(map.get("endDate").toString()); | ||
| 242 | - } catch (ParseException e) { | ||
| 243 | - | ||
| 244 | - e.printStackTrace(); | ||
| 245 | - } | ||
| 246 | - String rq2=sdf1.format(d); | ||
| 247 | - String rq3=sdf1.format(d1); | ||
| 248 | - | ||
| 249 | - rq=rq2+"-"+ rq3; | ||
| 250 | - | ||
| 251 | - String sql=" select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 "; | ||
| 252 | - if(!map.get("startDate").toString().equals(" ")&&!map.get("endDate").toString().equals(" ")){ | ||
| 253 | - sql+= "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '"+map.get("startDate").toString()+"' and '"+map.get("endDate").toString()+"'"; | ||
| 254 | - } | ||
| 255 | - if(!map.get("line").equals("")){ | ||
| 256 | - sql+="and line_code='"+map.get("line")+"'"; | ||
| 257 | - } | ||
| 258 | - if(map.get("sel").equals("2")){ | ||
| 259 | - sql+=" and c.pcch!=c.pcry"; | ||
| 260 | - }else if(map.get("sel").equals("1")){ | ||
| 261 | - sql+=" and c.jhgh!=c.sjgh"; | ||
| 262 | - } | ||
| 263 | - | ||
| 264 | - | ||
| 265 | - List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() { | ||
| 266 | - | ||
| 267 | - @Override | ||
| 268 | - public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 269 | - Changetochange chan= new Changetochange(); | ||
| 270 | - | ||
| 271 | - chan.setRq(rq); | ||
| 272 | - chan.setGs(arg0.getString("gs").toString()); | ||
| 273 | - chan.setFgs(arg0.getString("fgs").toString()); | ||
| 274 | - chan.setXl(arg0.getString("xl").toString()); | ||
| 275 | - chan.setLp(arg0.getString("lp").toString()); | ||
| 276 | - chan.setFssj(arg0.getString("fssj").toString()); | ||
| 277 | - chan.setXgsj(arg0.getString("xgsj").toString()); | ||
| 278 | - chan.setPcch(arg0.getString("pcch").toString()); | ||
| 279 | - chan.setPcry(arg0.getString("pcry").toString()); | ||
| 280 | - chan.setJhch(arg0.getString("jhch").toString()); | ||
| 281 | - chan.setJhgh(arg0.getString("jhgh").toString()); | ||
| 282 | - chan.setSjch(arg0.getString("sjch").toString()); | ||
| 283 | - chan.setSjgh(arg0.getString("sjgh").toString()); | ||
| 284 | - chan.setYy(arg0.getString("yy").toString()); | ||
| 285 | - chan.setXgr(arg0.getString("xgr").toString()); | ||
| 286 | - return chan; | ||
| 287 | - } | ||
| 288 | - }); | ||
| 289 | - return list; | ||
| 290 | - } | 225 | + public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 226 | + Changetochange chan = new Changetochange(); | ||
| 291 | 227 | ||
| 228 | + chan.setRq(rq); | ||
| 229 | + chan.setGs(arg0.getString("gs").toString()); | ||
| 230 | + chan.setFgs(arg0.getString("fgs").toString()); | ||
| 231 | + chan.setXl(arg0.getString("xl").toString()); | ||
| 232 | + chan.setLp(arg0.getString("lp").toString()); | ||
| 233 | + chan.setFssj(arg0.getString("fssj").toString()); | ||
| 234 | + chan.setXgsj(arg0.getString("xgsj").toString()); | ||
| 235 | + chan.setPcch(arg0.getString("pcch").toString()); | ||
| 236 | + chan.setPcry(arg0.getString("pcry").toString()); | ||
| 237 | + chan.setJhch(arg0.getString("jhch").toString()); | ||
| 238 | + chan.setJhgh(arg0.getString("jhgh").toString()); | ||
| 239 | + chan.setSjch(arg0.getString("sjch").toString()); | ||
| 240 | + chan.setSjgh(arg0.getString("sjgh").toString()); | ||
| 241 | + chan.setYy(arg0.getString("yy").toString()); | ||
| 242 | + chan.setXgr(arg0.getString("xgr").toString()); | ||
| 243 | + return chan; | ||
| 244 | + } | ||
| 245 | + }); | ||
| 246 | + return list; | ||
| 247 | + } | ||
| 292 | 248 | ||
| 293 | - //路单数据 | 249 | + // 路单数据 |
| 294 | @Override | 250 | @Override |
| 295 | public List<Singledata> singledata(Map<String, Object> map) { | 251 | public List<Singledata> singledata(Map<String, Object> map) { |
| 296 | - | ||
| 297 | - String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + | ||
| 298 | - " FROM bsth_c_ylb y" + | ||
| 299 | - " where y.RQ BETWEEN '"+map.get("startDate").toString() +"'" + | ||
| 300 | - " and '"+map.get("endDate").toString()+"'"+ | ||
| 301 | - " and y.XLBM='"+map.get("line").toString()+"'"+ | ||
| 302 | - " GROUP BY y.NBBM "; | ||
| 303 | - | ||
| 304 | - List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | ||
| 305 | - SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | ||
| 306 | - @Override | ||
| 307 | - public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 308 | - Singledata sin = new Singledata(); | ||
| 309 | - sin.setrQ(sdf.format(arg0.getDate("rq"))); | ||
| 310 | - sin.setgS(arg0.getString("SSGSDM").toString()); | ||
| 311 | - sin.setxL(arg0.getString("XLBM").toString()); | ||
| 312 | - sin.setClzbh(arg0.getString("NBBM").toString()); | ||
| 313 | - sin.setJsy(arg0.getString("JSY").toString()); | ||
| 314 | - sin.setHyl(arg0.getString("YH").toString()); | ||
| 315 | - sin.setJzl(arg0.getString("JZL").toString()); | ||
| 316 | - // sin.setJzl(arg0.getString(""));//非营业性用油 | ||
| 317 | - sin.setJhjl(arg0.getString("JZL")); | ||
| 318 | - Map<String, Object> maps=new HashMap<>(); | ||
| 319 | - maps=scheduleRealInfoService.findKMBC2(sin.getJsy(),sin.getClzbh(),sin.getrQ()); | ||
| 320 | - sin.setjName(maps.get("j_name")==null?"":maps.get("j_name").toString()); | ||
| 321 | - sin.setSgh(maps.get("s_gh")==null?"":maps.get("s_gh").toString()); | ||
| 322 | - sin.setsName(maps.get("s_name")==null?"":maps.get("s_name").toString()); | ||
| 323 | - sin.setJhlc(maps.get("yygl")==null?"":maps.get("yygl").toString()); | ||
| 324 | - sin.setEmptMileage(maps.get("ksgl")==null?"":maps.get("ksgl").toString()); | ||
| 325 | - sin.setJhjl(maps.get("jhlc")==null?"":maps.get("jhlc").toString()); | ||
| 326 | - | ||
| 327 | - return sin; | ||
| 328 | - } | ||
| 329 | - }); | ||
| 330 | - return list; | ||
| 331 | -} | ||
| 332 | 252 | ||
| 253 | + String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y" | ||
| 254 | + + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "'" + " and '" | ||
| 255 | + + map.get("endDate").toString() + "'" + " and y.XLBM='" + map.get("line").toString() + "'" | ||
| 256 | + + " GROUP BY y.NBBM "; | ||
| 333 | 257 | ||
| 334 | - //运营服务阶段报表 | 258 | + List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 259 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 260 | + | ||
| 261 | + @Override | ||
| 262 | + public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 263 | + Singledata sin = new Singledata(); | ||
| 264 | + sin.setrQ(sdf.format(arg0.getDate("rq"))); | ||
| 265 | + sin.setgS(arg0.getString("SSGSDM").toString()); | ||
| 266 | + sin.setxL(arg0.getString("XLBM").toString()); | ||
| 267 | + sin.setClzbh(arg0.getString("NBBM").toString()); | ||
| 268 | + sin.setJsy(arg0.getString("JSY").toString()); | ||
| 269 | + sin.setHyl(arg0.getString("YH").toString()); | ||
| 270 | + sin.setJzl(arg0.getString("JZL").toString()); | ||
| 271 | + // sin.setJzl(arg0.getString(""));//非营业性用油 | ||
| 272 | + sin.setJhjl(arg0.getString("JZL")); | ||
| 273 | + Map<String, Object> maps = new HashMap<>(); | ||
| 274 | + maps = scheduleRealInfoService.findKMBC2(sin.getJsy(), sin.getClzbh(), sin.getrQ()); | ||
| 275 | + sin.setjName(maps.get("j_name") == null ? "" : maps.get("j_name").toString()); | ||
| 276 | + sin.setSgh(maps.get("s_gh") == null ? "" : maps.get("s_gh").toString()); | ||
| 277 | + sin.setsName(maps.get("s_name") == null ? "" : maps.get("s_name").toString()); | ||
| 278 | + sin.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | ||
| 279 | + sin.setEmptMileage(maps.get("ksgl") == null ? "" : maps.get("ksgl").toString()); | ||
| 280 | + sin.setJhjl(maps.get("jhlc") == null ? "" : maps.get("jhlc").toString()); | ||
| 281 | + | ||
| 282 | + return sin; | ||
| 283 | + } | ||
| 284 | + }); | ||
| 285 | + return list; | ||
| 286 | + } | ||
| 287 | + | ||
| 288 | + // 运营服务阶段报表 | ||
| 335 | @Override | 289 | @Override |
| 336 | public List<Operationservice> operationservice(Map<String, Object> map) { | 290 | public List<Operationservice> operationservice(Map<String, Object> map) { |
| 337 | - | ||
| 338 | - String sql = " SELECT y.RQ,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + | ||
| 339 | - " FROM bsth_c_ylb y" + | ||
| 340 | - " where y.RQ BETWEEN '"+map.get("startDate").toString() +"'" + | ||
| 341 | - " and '"+map.get("endDate").toString()+"'"+ | ||
| 342 | - " and y.XLBM='"+map.get("line").toString()+"'"+ | ||
| 343 | - " GROUP BY y.NBBM "; | ||
| 344 | - | ||
| 345 | - List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { | ||
| 346 | - SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | ||
| 347 | - @Override | ||
| 348 | - public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 349 | - Singledata sin = new Singledata(); | ||
| 350 | - Operationservice op = new Operationservice(); | ||
| 351 | - op.setXlName(arg0.getString("XLBM").toString()); | ||
| 352 | - op.setJzl(arg0.getString("JZL").toString()); | ||
| 353 | - op.setXhl(arg0.getString("YH").toString()); | ||
| 354 | - Map<String, Object> maps=new HashMap<>(); | ||
| 355 | - maps=scheduleRealInfoService.findKMBC2(sin.getJsy(),sin.getClzbh(),sin.getrQ()); | ||
| 356 | - op.setXsgl(maps.get("yygl").toString()==null?"":maps.get("yygl").toString()); | ||
| 357 | - op.setEmptMileage(maps.get("ksgl").toString()==null?"":maps.get("ksgl").toString()); | ||
| 358 | - op.setSjbc(maps.get("sjbc").toString()==null?"":maps.get("sjbc").toString()); | ||
| 359 | - return op; | ||
| 360 | - } | ||
| 361 | - }); | ||
| 362 | - return list; | 291 | + |
| 292 | + String sql = " SELECT y.RQ,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y" + " where y.RQ BETWEEN '" | ||
| 293 | + + map.get("startDate").toString() + "'" + " and '" + map.get("endDate").toString() + "'" | ||
| 294 | + + " and y.XLBM='" + map.get("line").toString() + "'" + " GROUP BY y.NBBM "; | ||
| 295 | + | ||
| 296 | + List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { | ||
| 297 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 298 | + | ||
| 299 | + @Override | ||
| 300 | + public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 301 | + Singledata sin = new Singledata(); | ||
| 302 | + Operationservice op = new Operationservice(); | ||
| 303 | + op.setXlName(arg0.getString("XLBM").toString()); | ||
| 304 | + op.setJzl(arg0.getString("JZL").toString()); | ||
| 305 | + op.setXhl(arg0.getString("YH").toString()); | ||
| 306 | + Map<String, Object> maps = new HashMap<>(); | ||
| 307 | + maps = scheduleRealInfoService.findKMBC2(sin.getJsy(), sin.getClzbh(), sin.getrQ()); | ||
| 308 | + op.setXsgl(maps.get("yygl").toString() == null ? "" : maps.get("yygl").toString()); | ||
| 309 | + op.setEmptMileage(maps.get("ksgl").toString() == null ? "" : maps.get("ksgl").toString()); | ||
| 310 | + op.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString()); | ||
| 311 | + return op; | ||
| 312 | + } | ||
| 313 | + }); | ||
| 314 | + return list; | ||
| 363 | } | 315 | } |
| 364 | 316 | ||
| 317 | + // 车辆加注 | ||
| 318 | + @Override | ||
| 319 | + public List<Vehicleloading> vehicleloading(String line, String data) { | ||
| 320 | + | ||
| 321 | + String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y " | ||
| 322 | + + " where to_days(y.RQ)=to_days('" + data + "')" + " and y.XLBM='" + line + "' " | ||
| 323 | + + " GROUP BY y.NBBM "; | ||
| 324 | + | ||
| 325 | + List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() { | ||
| 326 | + @Override | ||
| 327 | + public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 328 | + Vehicleloading ve = new Vehicleloading(); | ||
| 329 | + ve.setrQ(arg0.getString("RQ").toString()); | ||
| 330 | + ve.setgS(arg0.getString("SSDM").toString()); | ||
| 331 | + ve.setxL(arg0.getString("XLBM").toString()); | ||
| 332 | + ve.setClzbh(arg0.getString("NBBM").toString()); | ||
| 333 | + ve.setHyl(arg0.getString("YH").toString()); | ||
| 334 | + ve.setJzl(arg0.getString("JZL").toString()); | ||
| 335 | + // ve.setLs(arg0.getString("").toString());//尿素 | ||
| 336 | + Map<String, Object> maps = new HashMap<>(); | ||
| 337 | + maps = scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("NBBM"), | ||
| 338 | + arg0.getString("RQ")); | ||
| 339 | + ve.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); | ||
| 340 | + ve.setJhbc(maps.get("jhbc").toString() == null ? "" : maps.get("jhbc").toString());// 计划班次 | ||
| 341 | + ve.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());// 实际班次 | ||
| 342 | + return ve; | ||
| 343 | + } | ||
| 344 | + }); | ||
| 345 | + return list; | ||
| 346 | + } | ||
| 347 | + | ||
| 348 | + // 营运线路出车率统计表 | ||
| 349 | + @Override | ||
| 350 | + public List<Turnoutrate> turnoutrate(Map<String, Object> map) { | ||
| 351 | + | ||
| 352 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 353 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | ||
| 354 | + Date d = null; | ||
| 355 | + Date d1 = null; | ||
| 356 | + try { | ||
| 357 | + d = sdf.parse(map.get("startDate").toString()); | ||
| 358 | + d1 = sdf.parse(map.get("endDate").toString()); | ||
| 359 | + } catch (ParseException e) { | ||
| 360 | + | ||
| 361 | + e.printStackTrace(); | ||
| 362 | + } | ||
| 363 | + String rq2 = sdf1.format(d); | ||
| 364 | + String rq3 = sdf1.format(d1); | ||
| 365 | + | ||
| 366 | + rq = rq2 + "-" + rq3; | ||
| 367 | + | ||
| 368 | + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,b.warrant_car from " | ||
| 369 | + + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | ||
| 370 | + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | ||
| 371 | + + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | ||
| 372 | + + map.get("line").toString() + "' AND gs_bm is not null" | ||
| 373 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | ||
| 374 | + + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl,t.warrant_car " | ||
| 375 | + + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | ||
| 376 | + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | ||
| 377 | + + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | ||
| 378 | + + "' AND gs_bm is not null " | ||
| 379 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | ||
| 380 | + + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | ||
| 381 | + List<Turnoutrate> list = jdbcTemplate.query(sql, new RowMapper<Turnoutrate>() { | ||
| 382 | + | ||
| 383 | + @Override | ||
| 384 | + public Turnoutrate mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 385 | + Turnoutrate tu = new Turnoutrate(); | ||
| 386 | + NumberFormat numberFormat = NumberFormat.getInstance(); | ||
| 387 | + numberFormat.setMaximumFractionDigits(2); | ||
| 388 | + String result1 = numberFormat.format((float) Integer.parseInt(arg0.getString("scl")) | ||
| 389 | + / (float) Integer.parseInt(arg0.getString("jcl")) * 100); | ||
| 390 | + String result2 = numberFormat.format((float) Integer.parseInt(arg0.getString("sbc")) | ||
| 391 | + / (float) Integer.parseInt(arg0.getString("jbc")) * 100); | ||
| 392 | + tu.setRq(rq); | ||
| 393 | + tu.setGs(arg0.getString("gs_name").toString()); | ||
| 394 | + tu.setZhgs(arg0.getString("fgs_name").toString()); | ||
| 395 | + tu.setXl(arg0.getString("xlgs")); | ||
| 396 | + tu.setXlmc(arg0.getString("sxl")); | ||
| 397 | + tu.setCchjh(arg0.getString("jcl").toString()); | ||
| 398 | + tu.setCchsj(arg0.getString("scl").toString()); | ||
| 399 | + tu.setCchqz(arg0.getString("sxl").toString()); | ||
| 400 | + tu.setChl(result1 + "%");// 出车率 | ||
| 401 | + tu.setBcjh(arg0.getString("jbc").toString()); | ||
| 402 | + tu.setBcsj(arg0.getString("sbc").toString()); | ||
| 403 | + tu.setBbzxl(result2 + "%");// 班次执行率 | ||
| 404 | + // tu.setSm(arg0.getString("gs_name").toString()); | ||
| 405 | + tu.setGsgs(arg0.getString("gslsbm").toString()); | ||
| 406 | + tu.setFgsgs(arg0.getString("fgsbm").toString()); | ||
| 407 | + return tu; | ||
| 408 | + } | ||
| 409 | + | ||
| 410 | + }); | ||
| 411 | + | ||
| 412 | + return list; | ||
| 413 | + } | ||
| 365 | 414 | ||
| 366 | - //车辆加注 | ||
| 367 | @Override | 415 | @Override |
| 368 | - public List<Vehicleloading> vehicleloading(String line,String data) { | ||
| 369 | - | ||
| 370 | - String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + | ||
| 371 | - " FROM bsth_c_ylb y " + | ||
| 372 | - " where to_days(y.RQ)=to_days('"+data +"')" + | ||
| 373 | - " and y.XLBM='"+line+"' "+ | ||
| 374 | - " GROUP BY y.NBBM "; | ||
| 375 | - | ||
| 376 | - List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() { | ||
| 377 | - @Override | ||
| 378 | - public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 379 | - Vehicleloading ve = new Vehicleloading(); | ||
| 380 | - ve.setrQ(arg0.getString("RQ").toString()); | ||
| 381 | - ve.setgS(arg0.getString("SSGSDM").toString()); | ||
| 382 | - ve.setxL(arg0.getString("XLBM").toString()); | ||
| 383 | - ve.setClzbh(arg0.getString("NBBM").toString()); | ||
| 384 | - ve.setHyl(arg0.getString("YH").toString()); | ||
| 385 | - ve.setJzl(arg0.getString("JZL").toString()); | ||
| 386 | - //ve.setLs(arg0.getString("").toString());//尿素 | ||
| 387 | - Map<String, Object> maps=new HashMap<>(); | ||
| 388 | - maps=scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("NBBM"), arg0.getString("RQ")); | ||
| 389 | - ve.setJhlc(maps.get("yygl")==null?"":maps.get("yygl").toString()); | ||
| 390 | - ve.setJhbc(maps.get("jhbc").toString()==null?"":maps.get("jhbc").toString());//计划班次 | ||
| 391 | - ve.setSjbc(maps.get("sjbc").toString()==null?"":maps.get("sjbc").toString());//实际班次 | ||
| 392 | - return ve; | 416 | + public List<Executionrate> executionrate(Map<String, Object> map) { |
| 417 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 418 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | ||
| 419 | + Date d = null; | ||
| 420 | + Date d1 = null; | ||
| 421 | + try { | ||
| 422 | + d = sdf.parse(map.get("startDate").toString()); | ||
| 423 | + d1 = sdf.parse(map.get("endDate").toString()); | ||
| 424 | + } catch (ParseException e) { | ||
| 425 | + | ||
| 426 | + e.printStackTrace(); | ||
| 393 | } | 427 | } |
| 394 | - }); | ||
| 395 | - return list; | 428 | + String rq2 = sdf1.format(d); |
| 429 | + String rq3 = sdf1.format(d1); | ||
| 430 | + | ||
| 431 | + rq = rq2 + "-" + rq3; | ||
| 432 | + | ||
| 433 | + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm from " | ||
| 434 | + + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | ||
| 435 | + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | ||
| 436 | + + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | ||
| 437 | + + map.get("line").toString() + "' AND gs_bm is not null" | ||
| 438 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | ||
| 439 | + + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | ||
| 440 | + + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | ||
| 441 | + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | ||
| 442 | + + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | ||
| 443 | + + "' AND gs_bm is not null " | ||
| 444 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | ||
| 445 | + + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | ||
| 446 | + List<Executionrate> list = jdbcTemplate.query(sql, new RowMapper<Executionrate>() { | ||
| 447 | + | ||
| 448 | + @Override | ||
| 449 | + public Executionrate mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 450 | + Executionrate tu = new Executionrate(); | ||
| 451 | + NumberFormat numberFormat = NumberFormat.getInstance(); | ||
| 452 | + numberFormat.setMaximumFractionDigits(2); | ||
| 453 | + String result1 = numberFormat.format((float) Integer.parseInt(arg0.getString("scl")) | ||
| 454 | + / (float) Integer.parseInt(arg0.getString("jcl")) * 100); | ||
| 455 | + String result2 = numberFormat.format((float) Integer.parseInt(arg0.getString("sbc")) | ||
| 456 | + / (float) Integer.parseInt(arg0.getString("jbc")) * 100); | ||
| 457 | + tu.setRq(rq); | ||
| 458 | + tu.setGs(arg0.getString("gs_name").toString()); | ||
| 459 | + tu.setZhgs(arg0.getString("fgs_name").toString()); | ||
| 460 | + tu.setXl(arg0.getString("xlgs")); | ||
| 461 | + tu.setXlmc(arg0.getString("sxl")); | ||
| 462 | + tu.setCchjh(arg0.getString("jcl").toString()); | ||
| 463 | + tu.setCchsj(arg0.getString("scl").toString()); | ||
| 464 | + tu.setCchqz(arg0.getString("sxl").toString()); | ||
| 465 | + tu.setChl(result1 + "%");// 出车率 | ||
| 466 | + tu.setBcjh(arg0.getString("jbc").toString()); | ||
| 467 | + tu.setBcsj(arg0.getString("sbc").toString()); | ||
| 468 | + tu.setBbzxl(result2 + "%");// 班次执行率 | ||
| 469 | + tu.setSm(arg0.getString("xl_name").toString()); | ||
| 470 | + tu.setGsgs(arg0.getString("gslsbm").toString()); | ||
| 471 | + tu.setFgsgs(arg0.getString("fgsbm").toString()); | ||
| 472 | + return tu; | ||
| 473 | + } | ||
| 474 | + | ||
| 475 | + }); | ||
| 476 | + | ||
| 477 | + return list; | ||
| 396 | } | 478 | } |
| 397 | 479 | ||
| 480 | + // 营运线路名称统计表 | ||
| 481 | + @Override | ||
| 482 | + public List<Allline> allline(Map<String, Object> map) { | ||
| 483 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 484 | + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日"); | ||
| 485 | + Date d = null; | ||
| 486 | + Date d1 = null; | ||
| 487 | + try { | ||
| 488 | + d = sdf.parse(map.get("startDate").toString()); | ||
| 489 | + d1 = sdf.parse(map.get("endDate").toString()); | ||
| 490 | + } catch (ParseException e) { | ||
| 398 | 491 | ||
| 492 | + e.printStackTrace(); | ||
| 493 | + } | ||
| 494 | + String rq2 = sdf1.format(d); | ||
| 495 | + String rq3 = sdf1.format(d1); | ||
| 399 | 496 | ||
| 497 | + rq = rq2 + "-" + rq3; | ||
| 498 | + | ||
| 499 | + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm from " | ||
| 500 | + + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" | ||
| 501 | + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" | ||
| 502 | + + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" | ||
| 503 | + + map.get("line").toString() + "' AND gs_bm is not null" | ||
| 504 | + + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" | ||
| 505 | + + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " | ||
| 506 | + + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " | ||
| 507 | + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" | ||
| 508 | + + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() | ||
| 509 | + + "' AND gs_bm is not null " | ||
| 510 | + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " | ||
| 511 | + + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm "; | ||
| 512 | + List<Allline> list = jdbcTemplate.query(sql, new RowMapper<Allline>() { | ||
| 513 | + | ||
| 514 | + @Override | ||
| 515 | + public Allline mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 516 | + Allline tu = new Allline(); | ||
| 517 | + NumberFormat numberFormat = NumberFormat.getInstance(); | ||
| 518 | + numberFormat.setMaximumFractionDigits(2); | ||
| 519 | + String result1 = numberFormat.format((float) Integer.parseInt(arg0.getString("scl")) | ||
| 520 | + / (float) Integer.parseInt(arg0.getString("jcl")) * 100); | ||
| 521 | + String result2 = numberFormat.format((float) Integer.parseInt(arg0.getString("sbc")) | ||
| 522 | + / (float) Integer.parseInt(arg0.getString("jbc")) * 100); | ||
| 523 | + tu.setRq(rq); | ||
| 524 | + tu.setGs(arg0.getString("gs_name").toString()); | ||
| 525 | + tu.setZhgs(arg0.getString("fgs_name").toString()); | ||
| 526 | + tu.setXl(arg0.getString("xl_name")); | ||
| 527 | + tu.setXlmc(arg0.getString("sxl")); | ||
| 528 | + tu.setCchjh(arg0.getString("jcl").toString()); | ||
| 529 | + tu.setCchsj(arg0.getString("scl").toString()); | ||
| 530 | + tu.setCchqz(arg0.getString("sxl").toString()); | ||
| 531 | + tu.setChl(result1 + "%");// 出车率 | ||
| 532 | + tu.setBcjh(arg0.getString("jbc").toString()); | ||
| 533 | + tu.setBcsj(arg0.getString("sbc").toString()); | ||
| 534 | + tu.setBbzxl(result2 + "%");// 班次执行率 | ||
| 535 | + // tu.setSm(arg0.getString("xl_name").toString()); | ||
| 536 | + tu.setGsgs(arg0.getString("gslsbm").toString()); | ||
| 537 | + tu.setFgsgs(arg0.getString("fgsbm").toString()); | ||
| 538 | + return tu; | ||
| 539 | + } | ||
| 540 | + | ||
| 541 | + }); | ||
| 542 | + | ||
| 543 | + return list; | ||
| 544 | + } | ||
| 400 | } | 545 | } |
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
| 1 | package com.bsth.service.oil.impl; | 1 | package com.bsth.service.oil.impl; |
| 2 | 2 | ||
| 3 | +import java.sql.ResultSet; | ||
| 4 | +import java.sql.SQLException; | ||
| 3 | import java.text.ParseException; | 5 | import java.text.ParseException; |
| 4 | import java.text.SimpleDateFormat; | 6 | import java.text.SimpleDateFormat; |
| 5 | import java.util.ArrayList; | 7 | import java.util.ArrayList; |
| 8 | +import java.util.Arrays; | ||
| 6 | import java.util.HashMap; | 9 | import java.util.HashMap; |
| 7 | import java.util.List; | 10 | import java.util.List; |
| 8 | import java.util.Map; | 11 | import java.util.Map; |
| 9 | 12 | ||
| 10 | import org.springframework.beans.factory.annotation.Autowired; | 13 | import org.springframework.beans.factory.annotation.Autowired; |
| 14 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 15 | +import org.springframework.jdbc.core.RowMapper; | ||
| 11 | import org.springframework.stereotype.Service; | 16 | import org.springframework.stereotype.Service; |
| 12 | 17 | ||
| 13 | import com.bsth.common.ResponseCode; | 18 | import com.bsth.common.ResponseCode; |
| @@ -28,17 +33,103 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw | @@ -28,17 +33,103 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw | ||
| 28 | @Autowired | 33 | @Autowired |
| 29 | YlxxbRepository ylxxbRepository; | 34 | YlxxbRepository ylxxbRepository; |
| 30 | 35 | ||
| 36 | + @Autowired | ||
| 37 | + JdbcTemplate jdbcTemplate; | ||
| 38 | + | ||
| 31 | @SuppressWarnings("unchecked") | 39 | @SuppressWarnings("unchecked") |
| 32 | public PageObject<Ylxxb> Pagequery(Map<String, Object> map) { | 40 | public PageObject<Ylxxb> Pagequery(Map<String, Object> map) { |
| 33 | - // TODO Auto-generated method stub | 41 | + int page=Integer.parseInt(map.get("page").toString()); |
| 34 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | 42 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); |
| 35 | - List<Ylxxb> yList=new ArrayList<Ylxxb>(); | 43 | + |
| 36 | String rq=map.get("rq").toString(); | 44 | String rq=map.get("rq").toString(); |
| 37 | String nbbm=""; | 45 | String nbbm=""; |
| 38 | - if(map.get("nbbm")!=null){ | ||
| 39 | - nbbm=map.get("nbbm").toString(); | 46 | + if(map.get("nbbh")!=null){ |
| 47 | + nbbm=map.get("nbbh").toString(); | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + Object gsdmIn=map.get("gsdm_in"); | ||
| 51 | + Object fgsdmIn=map.get("fgsdm_in"); | ||
| 52 | + String addSql=""; | ||
| 53 | + String gsdmLike=""; | ||
| 54 | + String fgsdmLike=""; | ||
| 55 | + | ||
| 56 | + //选择了公司 | ||
| 57 | + if(gsdmIn==null){ | ||
| 58 | + gsdmLike=map.get("gsdm_like").toString(); | ||
| 59 | + addSql += " and a.gsdm = '"+gsdmLike+ "' "; | ||
| 60 | + | ||
| 61 | + //选择了分公司 | ||
| 62 | + if(fgsdmIn==null){ | ||
| 63 | + fgsdmLike=map.get("fgsdm_like").toString();; | ||
| 64 | + addSql += " and a.fgsdm = '"+fgsdmLike+ "' "; | ||
| 65 | + }else{ | ||
| 66 | + String fgsdmIns[]= fgsdmIn.toString().split(","); | ||
| 67 | + addSql +=" and a.fgsdm in ("; | ||
| 68 | + for(int i=0;i<fgsdmIns.length;i++){ | ||
| 69 | + addSql +="'"+fgsdmIns[i]+"'"; | ||
| 70 | + if(i<fgsdmIns.length-1){ | ||
| 71 | + addSql +=","; | ||
| 72 | + } | ||
| 73 | + } | ||
| 74 | + addSql +=")"; | ||
| 75 | + } | ||
| 76 | + }else{ | ||
| 77 | + //没有选择公司 (分公司也没有选择) | ||
| 78 | + String gsdmIns[]=gsdmIn.toString().split(","); | ||
| 79 | + addSql += " and a.gsdm in ("; | ||
| 80 | + for(int i=0;i<gsdmIns.length;i++){ | ||
| 81 | + addSql +="'" +gsdmIns[i]+"'"; | ||
| 82 | + if(i<gsdmIns.length-1){ | ||
| 83 | + addSql+=","; | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + addSql +=")"; | ||
| 87 | + String fgsdmIns[]= fgsdmIn.toString().split(","); | ||
| 88 | + addSql +=" and a.fgsdm in ("; | ||
| 89 | + for(int i=0;i<fgsdmIns.length;i++){ | ||
| 90 | + addSql +="'"+fgsdmIns[i]+"'"; | ||
| 91 | + if(i<fgsdmIns.length-1){ | ||
| 92 | + addSql +=","; | ||
| 93 | + } | ||
| 94 | + } | ||
| 95 | + addSql +=")"; | ||
| 96 | + | ||
| 97 | + | ||
| 40 | } | 98 | } |
| 41 | - List<Object[]> list=repository.obtainCwjycl(rq,nbbm); | 99 | + String countSql="SELECT ifnull(count(*),0) as countTs FROM bsth_c_cwjy a "+ |
| 100 | + " left join ( select * from bsth_c_ylxxb b where to_days(b.yyrq)=to_days('"+rq+"') and jylx=1) b " + | ||
| 101 | + " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy " | ||
| 102 | + + "from bsth_c_ylb where to_days(rq)= to_days('"+rq+"' ) group by nbbm "+ | ||
| 103 | + " ) c on a.nbbm=c.nbbm where a.nbbm like '%"+nbbm+"%' " +addSql ; | ||
| 104 | + int listsize=jdbcTemplate.queryForObject(countSql, Integer.class); | ||
| 105 | + // TODO Auto-generated method stub | ||
| 106 | + String sql="SELECT a.gsdm as gsdm,a.fgsdm as fgsdm,a.nbbm as nbbm,b.jsy as jsy,b.jzl as jzl ,b.stationid as stationid," | ||
| 107 | + + "b.nylx as nylx,b.yj as yj,b.bz as bz,c.jsy as ldgh FROM bsth_c_cwjy a "+ | ||
| 108 | + " left join ( select * from bsth_c_ylxxb b where to_days(b.yyrq)=to_days('"+rq+"') and jylx=1) b " + | ||
| 109 | + " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy " | ||
| 110 | + + "from bsth_c_ylb where to_days(rq)= to_days('"+rq+"' ) group by nbbm "+ | ||
| 111 | + " ) c on a.nbbm=c.nbbm where a.nbbm like '%"+nbbm+"%' " +addSql+ " limit "+page*10+","+10; | ||
| 112 | + | ||
| 113 | + | ||
| 114 | + List<Ylxxb> yList= jdbcTemplate.query(sql, | ||
| 115 | + new RowMapper<Ylxxb>(){ | ||
| 116 | + @Override | ||
| 117 | + public Ylxxb mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 118 | + Ylxxb t=new Ylxxb(); | ||
| 119 | + t.setGsdm(rs.getString("gsdm")); | ||
| 120 | + t.setFgsdm(rs.getString("fgsdm")); | ||
| 121 | + t.setNbbm(rs.getString("nbbm")); | ||
| 122 | + t.setJsy(rs.getString("jsy")); | ||
| 123 | + t.setJzl(rs.getDouble("jzl")); | ||
| 124 | + t.setStationid(rs.getString("stationid")); | ||
| 125 | + t.setNylx(rs.getInt("nylx")); | ||
| 126 | + t.setYj(rs.getDouble("yj")); | ||
| 127 | + t.setBz(rs.getString("bz")); | ||
| 128 | + t.setLdgh(rs.getString("ldgh")); | ||
| 129 | + return t; | ||
| 130 | + } | ||
| 131 | + }); | ||
| 132 | + /*List<Object[]> list=repository.obtainCwjycl(rq,nbbm); | ||
| 42 | for (int i = 0; i < list.size(); i++) { | 133 | for (int i = 0; i < list.size(); i++) { |
| 43 | Ylxxb y=new Ylxxb(); | 134 | Ylxxb y=new Ylxxb(); |
| 44 | y.setGsdm(list.get(i)[0]==null?"":list.get(i)[0].toString()); | 135 | y.setGsdm(list.get(i)[0]==null?"":list.get(i)[0].toString()); |
| @@ -57,8 +148,8 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw | @@ -57,8 +148,8 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw | ||
| 57 | e.printStackTrace(); | 148 | e.printStackTrace(); |
| 58 | } | 149 | } |
| 59 | yList.add(y); | 150 | yList.add(y); |
| 60 | - } | ||
| 61 | - PageHelper pageHelper = new PageHelper(yList.size(), map); | 151 | + }*/ |
| 152 | + PageHelper pageHelper = new PageHelper(listsize, map); | ||
| 62 | pageHelper.getMap(); | 153 | pageHelper.getMap(); |
| 63 | PageObject<Ylxxb> pageObject=pageHelper.getPageObject(); | 154 | PageObject<Ylxxb> pageObject=pageHelper.getPageObject(); |
| 64 | pageObject.setDataList(yList); | 155 | pageObject.setDataList(yList); |
src/main/java/com/bsth/service/oil/impl/YlxxbServiceImpl.java
| @@ -34,6 +34,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl<Ylxxb,Integer> implements | @@ -34,6 +34,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl<Ylxxb,Integer> implements | ||
| 34 | 34 | ||
| 35 | @Override | 35 | @Override |
| 36 | public PageObject<Ylxxb> Pagequery(Map<String, Object> map) { | 36 | public PageObject<Ylxxb> Pagequery(Map<String, Object> map) { |
| 37 | + | ||
| 37 | String rq=map.get("yyrq").toString(); | 38 | String rq=map.get("yyrq").toString(); |
| 38 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | 39 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); |
| 39 | try { | 40 | try { |
| @@ -51,6 +52,15 @@ public class YlxxbServiceImpl extends BaseServiceImpl<Ylxxb,Integer> implements | @@ -51,6 +52,15 @@ public class YlxxbServiceImpl extends BaseServiceImpl<Ylxxb,Integer> implements | ||
| 51 | // TODO Auto-generated catch block | 52 | // TODO Auto-generated catch block |
| 52 | e.printStackTrace(); | 53 | e.printStackTrace(); |
| 53 | } | 54 | } |
| 55 | + /*if(map.get("gsdm_in")!=null){ | ||
| 56 | + map.put("ssgsdm_in", map.get("gsdm_in")); | ||
| 57 | + map.remove("gsdm_in"); | ||
| 58 | + | ||
| 59 | + }else{ | ||
| 60 | + map.put("ssgsdm_like", map.get("gsdm_like")); | ||
| 61 | + map.remove("gsdm_like"); | ||
| 62 | + }*/ | ||
| 63 | + | ||
| 54 | //根具条件查询指定日期Ylb的数据 | 64 | //根具条件查询指定日期Ylb的数据 |
| 55 | List<Ylb> ylbIterator=(List<Ylb>) ylbRepository.findAll(new CustomerSpecs<Ylb>(map)); | 65 | List<Ylb> ylbIterator=(List<Ylb>) ylbRepository.findAll(new CustomerSpecs<Ylb>(map)); |
| 56 | List<Ylxxb> list=new ArrayList<Ylxxb>(); | 66 | List<Ylxxb> list=new ArrayList<Ylxxb>(); |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| @@ -98,7 +98,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | @@ -98,7 +98,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | ||
| 98 | 98 | ||
| 99 | List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code); | 99 | List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code); |
| 100 | 100 | ||
| 101 | - List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date); | 101 | + List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String type); |
| 102 | 102 | ||
| 103 | Map<String, Object> removeChildTask(Long taskId); | 103 | Map<String, Object> removeChildTask(Long taskId); |
| 104 | 104 |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -1209,8 +1209,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1209,8 +1209,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1209 | 1209 | ||
| 1210 | @Override | 1210 | @Override |
| 1211 | public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh, | 1211 | public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh, |
| 1212 | - String lpName,String date) { | ||
| 1213 | - return scheduleRealInfoRepository.queryListWaybill2(jName,clZbh,lpName,date); | 1212 | + String lpName,String date,String type) { |
| 1213 | + if(type.equals("qp")){ | ||
| 1214 | + return scheduleRealInfoRepository.queryListWaybill2(jName,clZbh,lpName,date); | ||
| 1215 | + }else{ | ||
| 1216 | + return scheduleRealInfoRepository.queryListWaybill(jName,clZbh,lpName,date); | ||
| 1217 | + } | ||
| 1214 | } | 1218 | } |
| 1215 | 1219 | ||
| 1216 | @Override | 1220 | @Override |
src/main/resources/static/pages/excep/offlineList.html
| @@ -223,6 +223,7 @@ $(function(){ | @@ -223,6 +223,7 @@ $(function(){ | ||
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | function showPagination(data){ | 225 | function showPagination(data){ |
| 226 | + console.log(data); | ||
| 226 | //分页 | 227 | //分页 |
| 227 | $('#pagination').jqPaginator({ | 228 | $('#pagination').jqPaginator({ |
| 228 | totalPages: data.totalPage, | 229 | totalPages: data.totalPage, |
| @@ -299,11 +300,4 @@ $(function(){ | @@ -299,11 +300,4 @@ $(function(){ | ||
| 299 | } | 300 | } |
| 300 | }); | 301 | }); |
| 301 | }); | 302 | }); |
| 302 | -//改变状态 | ||
| 303 | -function changeEnabled(id,enabled){ | ||
| 304 | - debugger | ||
| 305 | - $get('/user/changeEnabled',{id:id,enabled:enabled},function(result){ | ||
| 306 | - jsDoQuery(null, true); | ||
| 307 | - }) | ||
| 308 | -} | ||
| 309 | </script> | 303 | </script> |
| 310 | \ No newline at end of file | 304 | \ No newline at end of file |
src/main/resources/static/pages/forms/mould/allline.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/executionrate.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/turnoutrate.xls
0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/allline.html
0 → 100644
| 1 | +<style type="text/css"> | ||
| 2 | + .table-bordered { | ||
| 3 | + border: 1px solid; } | ||
| 4 | + .table-bordered > thead > tr > th, | ||
| 5 | + .table-bordered > thead > tr > td, | ||
| 6 | + .table-bordered > tbody > tr > th, | ||
| 7 | + .table-bordered > tbody > tr > td, | ||
| 8 | + .table-bordered > tfoot > tr > th, | ||
| 9 | + .table-bordered > tfoot > tr > td { | ||
| 10 | + border: 1px solid; } | ||
| 11 | + .table-bordered > thead > tr > th, | ||
| 12 | + .table-bordered > thead > tr > td { | ||
| 13 | + border-bottom-width: 2px; | ||
| 14 | + text-align: center;} | ||
| 15 | + | ||
| 16 | + .table > tbody + tbody { | ||
| 17 | + border-top: 1px solid; } | ||
| 18 | + .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{ text-align: center; } | ||
| 19 | +.table-checkable tr > th:first-child, .table-checkable tr > td:first-child { | ||
| 20 | + text-align: center; | ||
| 21 | + max-width: initial; | ||
| 22 | + min-width: 40px; | ||
| 23 | + padding-left: 0; | ||
| 24 | + padding-right: 0; | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +</style> | ||
| 28 | + | ||
| 29 | +<div class="page-head"> | ||
| 30 | + <div class="page-title"> | ||
| 31 | + <h1>营运线路名称统计表</h1> | ||
| 32 | + </div> | ||
| 33 | +</div> | ||
| 34 | + | ||
| 35 | +<div class="row"> | ||
| 36 | + <div class="col-md-12"> | ||
| 37 | + <div class="portlet light porttlet-fit bordered"> | ||
| 38 | + <div class="portlet-title"> | ||
| 39 | + <form class="form-inline" action="" method="post"> | ||
| 40 | + <div style="display: inline-block;"> | ||
| 41 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 42 | + <select class="form-control" name="line" id="line" style="width: 120px;"></select> | ||
| 43 | + </div> | ||
| 44 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 45 | + <span class="item-label" style="width: 80px;">开始时间: </span> | ||
| 46 | + <input class="form-control" type="text" id="startDate" style="width: 120px;"/> | ||
| 47 | + </div> | ||
| 48 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 49 | + <span class="item-label" style="width: 80px;">结束时间: </span> | ||
| 50 | + <input class="form-control" type="text" id="endDate" style="width: 120px;"/> | ||
| 51 | + </div> | ||
| 52 | + <div class="form-group"> | ||
| 53 | + <input class="btn btn-default" type="button" id="query" value="筛选"/> | ||
| 54 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 55 | + </div> | ||
| 56 | + </form> | ||
| 57 | + </div> | ||
| 58 | + <div class="portlet-body"> | ||
| 59 | + <div class="table-container" style="margin-top: 20px;overflow:auto;min-width: 1000px"> | ||
| 60 | + <table class="table table-bordered table-hover table-checkable" id="forms1"> | ||
| 61 | + <thead> | ||
| 62 | + <tr> | ||
| 63 | + <th colspan="15">营运线路名称统计表</th> | ||
| 64 | + </tr> | ||
| 65 | + <tr> | ||
| 66 | + <td rowspan="2" style=" padding-top: 20px;">日期</td> | ||
| 67 | + <td rowspan="2" style=" padding-top: 20px;">公司</td> | ||
| 68 | + <td rowspan="2" style=" padding-top: 20px;">直属公司</td> | ||
| 69 | + <td rowspan="2" style=" padding-top: 20px;">线路名称</td> | ||
| 70 | + <td colspan="2">出车数</td> | ||
| 71 | + <td rowspan="2" >出车率</td> | ||
| 72 | + <td colspan="2" >班次数</td> | ||
| 73 | + <td rowspan="2" style=" padding-top: 20px;">班次执行率</td> | ||
| 74 | + <td rowspan="2" style=" padding-top: 20px;">说明</td> | ||
| 75 | + </tr> | ||
| 76 | + <tr> | ||
| 77 | + <td>计划</td> | ||
| 78 | + <td>实际</td> | ||
| 79 | + <td>计划</td> | ||
| 80 | + <td>实际</td> | ||
| 81 | + </tr> | ||
| 82 | + </thead> | ||
| 83 | + <tbody id="tbody"> | ||
| 84 | + | ||
| 85 | + </tbody> | ||
| 86 | + <tr> | ||
| 87 | + <td colspan="1">分类汇总</td> | ||
| 88 | + <td><span id="total_gs"> </span></td> | ||
| 89 | + <td><span id="total_zhgs"> </span></td> | ||
| 90 | + <td><span id="total_xlts"> </span></td> | ||
| 91 | + <td><span id="total_jh"> </span></td> | ||
| 92 | + <td><span id="total_sj"> </span></td> | ||
| 93 | + <td><span id="total_ccl"> </span></td> | ||
| 94 | + <td><span id="total_bcjh"> </span></td> | ||
| 95 | + <td><span id="total_bcsj"> </span></td> | ||
| 96 | + <td><span id="total_bczxl"> </span></td> | ||
| 97 | + <td><span id="total_sm"> </span></td> | ||
| 98 | + </tr> | ||
| 99 | + </table> | ||
| 100 | + </div> | ||
| 101 | + </div> | ||
| 102 | + </div> | ||
| 103 | + </div> | ||
| 104 | +</div> | ||
| 105 | + | ||
| 106 | +<script> | ||
| 107 | + $(function(){ | ||
| 108 | + // 关闭左侧栏 | ||
| 109 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 110 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 111 | + | ||
| 112 | + $("#startDate,#endDate").datetimepicker({ | ||
| 113 | + format : 'YYYY-MM-DD', | ||
| 114 | + locale : 'zh-cn' | ||
| 115 | + }); | ||
| 116 | + | ||
| 117 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 118 | + var data=[]; | ||
| 119 | + | ||
| 120 | + for(var code in result){ | ||
| 121 | + data.push({id: code, text: result[code]}); | ||
| 122 | + } | ||
| 123 | + initPinYinSelect2('#line',data,''); | ||
| 124 | + | ||
| 125 | + }) | ||
| 126 | + | ||
| 127 | + var line; | ||
| 128 | + var startDate; | ||
| 129 | + var endDate; | ||
| 130 | + $("#query").on("click",function(){ | ||
| 131 | + | ||
| 132 | + line = $("#line").val(); | ||
| 133 | + startDate1=$("#startDate").val(); | ||
| 134 | + endDate1=$("#endDate").val(); | ||
| 135 | + | ||
| 136 | + if(startDate1!=''&&endDate1!=''){ | ||
| 137 | + $post('/mcy_forms/allline',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ | ||
| 138 | + // 把数据填充到模版中 | ||
| 139 | + var tbodyHtml = template('allline',{list:result}); | ||
| 140 | + // 把渲染好的模版html文本追加到表格中 | ||
| 141 | + $('#tbody').html(tbodyHtml); | ||
| 142 | + line = $("#line").val(); | ||
| 143 | + startDate = $("#startDate").val(); | ||
| 144 | + endDate = $("#endDate").val(); | ||
| 145 | + $("#sDate").text(startDate); | ||
| 146 | + $("#eDate").text(endDate); | ||
| 147 | + | ||
| 148 | + var total_jh = 0; | ||
| 149 | + var total_sj = 0,total_ccl = 0,total_bcjh = 0; | ||
| 150 | + var total_bcjh = 0,total_bcsj = 0,total_bczxl = 0; | ||
| 151 | + var total_gs=0; | ||
| 152 | + var total_zhgs=0; | ||
| 153 | + $.each(result, function(i, obj) { | ||
| 154 | + total_gs +=Number(obj.gsgs); | ||
| 155 | + total_zhgs +=Number(obj.fgsgs); | ||
| 156 | + total_jh = Number(obj.cchjh)+Number(total_jh); | ||
| 157 | + total_sj = Number(obj.cchsj)+Number(total_sj); | ||
| 158 | + | ||
| 159 | + total_ccl =(Number(total_sj)/Number(total_jh))*100; | ||
| 160 | + total_bcjh = Number(obj.bcjh)+Number(total_bcjh); | ||
| 161 | + total_bcsj = Number(obj.bcsj)+Number(total_bcsj); | ||
| 162 | + total_bczxl = (Number(total_bcsj)/Number(total_bcjh))*100; | ||
| 163 | + | ||
| 164 | + }); | ||
| 165 | + $("#total_gs").text(total_gs); | ||
| 166 | + $("#total_zhgs").text(total_zhgs); | ||
| 167 | + $("#total_jh").text(total_jh); | ||
| 168 | + $("#total_sj").text(total_sj); | ||
| 169 | + $("#total_ccl").text(total_ccl.toFixed(2)+'%'); | ||
| 170 | + $("#total_bcjh").text(total_bcjh); | ||
| 171 | + $("#total_bcsj").text(total_bcsj); | ||
| 172 | + $("#total_bczxl").text(total_bczxl.toFixed(2)+'%'); | ||
| 173 | + | ||
| 174 | + var temp = {}; | ||
| 175 | + var today_account = 0; | ||
| 176 | + | ||
| 177 | + temp["line"] = $("#line").text(); | ||
| 178 | + $.each(result, function(i, obj) { | ||
| 179 | + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){ | ||
| 180 | + today_account++; | ||
| 181 | + } | ||
| 182 | + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); | ||
| 183 | + }); | ||
| 184 | + | ||
| 185 | + }) | ||
| 186 | + | ||
| 187 | + }else{ | ||
| 188 | + alert("请选择时间范围!"); | ||
| 189 | + } | ||
| 190 | + }); | ||
| 191 | + | ||
| 192 | + $("#export").on("click",function(){ | ||
| 193 | + $post('/mcy_export/alllineExport',{line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){ | ||
| 194 | + window.open("/downloadFile/download?fileName=营运线路名称统计表"+moment(startDate).format("YYYYMMDD")); | ||
| 195 | + }); | ||
| 196 | + }); | ||
| 197 | + }); | ||
| 198 | +</script> | ||
| 199 | +<script type="text/html" id="allline"> | ||
| 200 | + {{each list as obj i}} | ||
| 201 | + <tr> | ||
| 202 | + <td>{{obj.rq}}</td> | ||
| 203 | + <td>{{obj.gs}}</td> | ||
| 204 | + <td>{{obj.zhgs}}</td> | ||
| 205 | + <td>{{obj.xl}}</td> | ||
| 206 | + <td>{{obj.cchjh}}</td> | ||
| 207 | + <td>{{obj.cchsj}}</td> | ||
| 208 | + <td>{{obj.chl}}</td> | ||
| 209 | + <td>{{obj.bcjh}}</td> | ||
| 210 | + <td>{{obj.bcsj}}</td> | ||
| 211 | + <td>{{obj.bbzxl}}</td> | ||
| 212 | + <td>{{obj.xl}}</td> | ||
| 213 | + </tr> | ||
| 214 | + {{/each}} | ||
| 215 | + {{if list.length == 0}} | ||
| 216 | + <tr> | ||
| 217 | + <td colspan="12"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 218 | + </tr> | ||
| 219 | + {{/if}} | ||
| 220 | +</script> |
src/main/resources/static/pages/forms/statement/changetochange.html
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/waybillBf.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 | - | ||
| 15 | - .table > tbody + tbody { | ||
| 16 | - border-top: 1px solid; } | ||
| 17 | -</style> | ||
| 18 | - | ||
| 19 | -<div class="page-head"> | ||
| 20 | - <div class="page-title"> | ||
| 21 | - <h1>行车路单</h1> | ||
| 22 | - </div> | ||
| 23 | -</div> | 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 | + | ||
| 15 | + .table > tbody + tbody { | ||
| 16 | + border-top: 1px solid; } | ||
| 17 | +</style> | ||
| 18 | + | ||
| 19 | +<div class="page-head"> | ||
| 20 | + <div class="page-title"> | ||
| 21 | + <h1>行车路单</h1> | ||
| 22 | + </div> | ||
| 23 | +</div> | ||
| 24 | + | ||
| 24 | 25 | ||
| 25 | <div class="row"> | 26 | <div class="row"> |
| 27 | + | ||
| 26 | <div class="col-md-12"> | 28 | <div class="col-md-12"> |
| 29 | + | ||
| 27 | <div class="portlet light porttlet-fit bordered"> | 30 | <div class="portlet light porttlet-fit bordered"> |
| 31 | + | ||
| 28 | <div class="portlet-title"> | 32 | <div class="portlet-title"> |
| 33 | + | ||
| 29 | <form class="form-inline" action=""> | 34 | <form class="form-inline" action=""> |
| 35 | + | ||
| 30 | <div style="display: inline-block;"> | 36 | <div style="display: inline-block;"> |
| 31 | - <span class="item-label" style="width: 80px;">线路: </span> | 37 | + |
| 38 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 32 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 39 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 40 | + | ||
| 33 | </div> | 41 | </div> |
| 42 | + | ||
| 34 | <div style="display: inline-block;margin-left: 15px;"> | 43 | <div style="display: inline-block;margin-left: 15px;"> |
| 44 | + | ||
| 35 | <span class="item-label" style="width: 80px;">时间: </span> | 45 | <span class="item-label" style="width: 80px;">时间: </span> |
| 46 | + | ||
| 36 | <input class="form-control" type="text" id="date" style="width: 180px;"/> | 47 | <input class="form-control" type="text" id="date" style="width: 180px;"/> |
| 48 | + | ||
| 37 | </div> | 49 | </div> |
| 50 | + | ||
| 38 | <div class="form-group" style="display: inline-block;margin-left: 15px;"> | 51 | <div class="form-group" style="display: inline-block;margin-left: 15px;"> |
| 52 | + | ||
| 39 | <input class="btn btn-default" type="button" id="query" value="查询"/> | 53 | <input class="btn btn-default" type="button" id="query" value="查询"/> |
| 54 | + | ||
| 40 | <input class="btn btn-default" type="button" id="export" value="导出"/> | 55 | <input class="btn btn-default" type="button" id="export" value="导出"/> |
| 56 | + | ||
| 41 | <input class="btn btn-default" type="button" id="print" value="打印"/> | 57 | <input class="btn btn-default" type="button" id="print" value="打印"/> |
| 58 | + | ||
| 42 | <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> | 59 | <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> |
| 60 | + | ||
| 43 | </div> | 61 | </div> |
| 62 | + | ||
| 44 | </form> | 63 | </form> |
| 64 | + | ||
| 45 | </div> | 65 | </div> |
| 66 | + | ||
| 46 | <div class="portlet-body"> | 67 | <div class="portlet-body"> |
| 68 | + | ||
| 47 | <div class="row"> | 69 | <div class="row"> |
| 70 | + | ||
| 48 | <div class="col-md-3"> | 71 | <div class="col-md-3"> |
| 72 | + | ||
| 49 | <div class="" style="margin-top: 10px;overflow:auto;height: 860px"> | 73 | <div class="" style="margin-top: 10px;overflow:auto;height: 860px"> |
| 74 | + | ||
| 50 | <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> | 75 | <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> |
| 76 | + | ||
| 51 | <thead> | 77 | <thead> |
| 78 | + | ||
| 52 | <tr class="hidden"> | 79 | <tr class="hidden"> |
| 80 | + | ||
| 53 | <th>人员</th> | 81 | <th>人员</th> |
| 82 | + | ||
| 54 | <th>自编号</th> | 83 | <th>自编号</th> |
| 84 | + | ||
| 55 | <th>路牌</th> | 85 | <th>路牌</th> |
| 86 | + | ||
| 56 | </tr> | 87 | </tr> |
| 88 | + | ||
| 57 | </thead> | 89 | </thead> |
| 90 | + | ||
| 58 | <tbody> | 91 | <tbody> |
| 92 | + | ||
| 59 | 93 | ||
| 94 | + | ||
| 60 | </tbody> | 95 | </tbody> |
| 96 | + | ||
| 61 | </table> | 97 | </table> |
| 98 | + | ||
| 62 | </div> | 99 | </div> |
| 100 | + | ||
| 63 | </div> | 101 | </div> |
| 102 | + | ||
| 64 | <div class="col-md-9" id="printArea"> | 103 | <div class="col-md-9" id="printArea"> |
| 104 | + | ||
| 65 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | 105 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 106 | + | ||
| 66 | <table class="table table-bordered table-checkable" id="forms"> | 107 | <table class="table table-bordered table-checkable" id="forms"> |
| 67 | - <tbody class="ludan_1"> | ||
| 68 | - | ||
| 69 | - </tbody> | ||
| 70 | - <tbody class="ludan_2"> | ||
| 71 | - | ||
| 72 | - </tbody> | ||
| 73 | - <tbody class="ludan_3"> | ||
| 74 | - | ||
| 75 | - </tbody> | ||
| 76 | - <tbody class="ludan_4"> | ||
| 77 | - | 108 | + |
| 109 | + <tbody class="ludan_1"> | ||
| 110 | + | ||
| 111 | + </tbody> | ||
| 112 | + <tbody class="ludan_2"> | ||
| 113 | + | ||
| 114 | + </tbody> | ||
| 115 | + <tbody class="ludan_3"> | ||
| 116 | + | ||
| 117 | + </tbody> | ||
| 118 | + <tbody class="ludan_4"> | ||
| 119 | + | ||
| 78 | </tbody> | 120 | </tbody> |
| 121 | + | ||
| 79 | </table> | 122 | </table> |
| 123 | + | ||
| 80 | </div> | 124 | </div> |
| 125 | + | ||
| 81 | </div> | 126 | </div> |
| 127 | + | ||
| 82 | </div> | 128 | </div> |
| 129 | + | ||
| 83 | </div> | 130 | </div> |
| 131 | + | ||
| 84 | </div> | 132 | </div> |
| 133 | + | ||
| 85 | </div> | 134 | </div> |
| 135 | + | ||
| 86 | </div> | 136 | </div> |
| 87 | 137 | ||
| 138 | + | ||
| 139 | + | ||
| 88 | <script> | 140 | <script> |
| 141 | + | ||
| 89 | $(function(){ | 142 | $(function(){ |
| 143 | + | ||
| 90 | // 关闭左侧栏 | 144 | // 关闭左侧栏 |
| 145 | + | ||
| 91 | if (!$('body').hasClass('page-sidebar-closed')) | 146 | if (!$('body').hasClass('page-sidebar-closed')) |
| 92 | - $('.menu-toggler.sidebar-toggler').click(); | 147 | + |
| 148 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 93 | 149 | ||
| 150 | + | ||
| 94 | $("#date").datetimepicker({ | 151 | $("#date").datetimepicker({ |
| 152 | + | ||
| 95 | format : 'YYYY-MM-DD', | 153 | format : 'YYYY-MM-DD', |
| 154 | + | ||
| 96 | locale : 'zh-cn' | 155 | locale : 'zh-cn' |
| 97 | - }); | ||
| 98 | - | ||
| 99 | - $('#line').select2({ | ||
| 100 | - ajax: { | ||
| 101 | - url: '/realSchedule/findLine', | ||
| 102 | - type: 'post', | ||
| 103 | - dataType: 'json', | ||
| 104 | - delay: 150, | ||
| 105 | - data: function(params){ | ||
| 106 | - return{line: params.term}; | ||
| 107 | - }, | ||
| 108 | - processResults: function (data) { | ||
| 109 | - return { | ||
| 110 | - results: data | ||
| 111 | - }; | ||
| 112 | - }, | ||
| 113 | - cache: true | ||
| 114 | - }, | ||
| 115 | - templateResult: function(repo){ | ||
| 116 | - if (repo.loading) return repo.text; | ||
| 117 | - var h = '<span>'+repo.text+'</span>'; | ||
| 118 | - return h; | ||
| 119 | - }, | ||
| 120 | - escapeMarkup: function (markup) { return markup; }, | ||
| 121 | - minimumInputLength: 1, | ||
| 122 | - templateSelection: function(repo){ | ||
| 123 | - return repo.text; | ||
| 124 | - }, | ||
| 125 | - language: { | ||
| 126 | - noResults: function(){ | ||
| 127 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 128 | - }, | ||
| 129 | - inputTooShort : function(e) { | ||
| 130 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 131 | - }, | ||
| 132 | - searching : function() { | ||
| 133 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 134 | - } | ||
| 135 | - } | ||
| 136 | - }); | ||
| 137 | - | 156 | + |
| 157 | + }); | ||
| 158 | + | ||
| 159 | + $('#line').select2({ | ||
| 160 | + ajax: { | ||
| 161 | + url: '/realSchedule/findLine', | ||
| 162 | + type: 'post', | ||
| 163 | + dataType: 'json', | ||
| 164 | + delay: 150, | ||
| 165 | + data: function(params){ | ||
| 166 | + return{line: params.term}; | ||
| 167 | + }, | ||
| 168 | + processResults: function (data) { | ||
| 169 | + return { | ||
| 170 | + results: data | ||
| 171 | + }; | ||
| 172 | + }, | ||
| 173 | + cache: true | ||
| 174 | + }, | ||
| 175 | + templateResult: function(repo){ | ||
| 176 | + if (repo.loading) return repo.text; | ||
| 177 | + var h = '<span>'+repo.text+'</span>'; | ||
| 178 | + return h; | ||
| 179 | + }, | ||
| 180 | + escapeMarkup: function (markup) { return markup; }, | ||
| 181 | + minimumInputLength: 1, | ||
| 182 | + templateSelection: function(repo){ | ||
| 183 | + return repo.text; | ||
| 184 | + }, | ||
| 185 | + language: { | ||
| 186 | + noResults: function(){ | ||
| 187 | + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 188 | + }, | ||
| 189 | + inputTooShort : function(e) { | ||
| 190 | + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 191 | + }, | ||
| 192 | + searching : function() { | ||
| 193 | + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 194 | + } | ||
| 195 | + } | ||
| 196 | + }); | ||
| 197 | + | ||
| 138 | var date = ''; | 198 | var date = ''; |
| 199 | + | ||
| 139 | $("#query").on("click",function(){ | 200 | $("#query").on("click",function(){ |
| 201 | + | ||
| 140 | var line = $("#line").val(); | 202 | var line = $("#line").val(); |
| 141 | - date = $("#date").val(); | 203 | + |
| 204 | + date = $("#date").val(); | ||
| 142 | $(".hidden").removeClass("hidden"); | 205 | $(".hidden").removeClass("hidden"); |
| 206 | + | ||
| 143 | $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ | 207 | $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ |
| 208 | + | ||
| 144 | // 把数据填充到模版中 | 209 | // 把数据填充到模版中 |
| 210 | + | ||
| 145 | var tbodyHtml = template('list_info',{list:result}); | 211 | var tbodyHtml = template('list_info',{list:result}); |
| 212 | + | ||
| 146 | // 把渲染好的模版html文本追加到表格中 | 213 | // 把渲染好的模版html文本追加到表格中 |
| 214 | + | ||
| 147 | $('#info tbody').html(tbodyHtml); | 215 | $('#info tbody').html(tbodyHtml); |
| 216 | + | ||
| 148 | }); | 217 | }); |
| 149 | - }); | ||
| 150 | - | ||
| 151 | - var params = new Array(); | 218 | + |
| 219 | + }); | ||
| 220 | + | ||
| 221 | + var params = new Array(); | ||
| 152 | var jName = ''; | 222 | var jName = ''; |
| 153 | - $("#info tbody").on("click","tr",function(){ | ||
| 154 | - if($(this).children().size() < 2){ | ||
| 155 | - return; | 223 | + |
| 224 | + $("#info tbody").on("click","tr",function(){ | ||
| 225 | + if($(this).children().size() < 2){ | ||
| 226 | + return; | ||
| 156 | } | 227 | } |
| 228 | + | ||
| 157 | 229 | ||
| 230 | + | ||
| 158 | $(this).children().each(function(index){ | 231 | $(this).children().each(function(index){ |
| 232 | + | ||
| 159 | params[index] = $(this).text(); | 233 | params[index] = $(this).text(); |
| 160 | - }); | ||
| 161 | - console.log(params); | ||
| 162 | - jName = params[0].split("\\")[0]; | ||
| 163 | - var id = $("#"+params[1]).val(); | ||
| 164 | - $get('/realSchedule/'+id,null,function(result){ | ||
| 165 | - console.log(result); | ||
| 166 | - result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD"); | ||
| 167 | - var ludan_1 = template('ludan_1',result); | ||
| 168 | - //var ludan_4 = template('ludan_4',result); | ||
| 169 | - // 把渲染好的模版html文本追加到表格中 | ||
| 170 | - $('#forms .ludan_1').html(ludan_1); | ||
| 171 | - //$('#forms .ludan_4').html(ludan_4); | 234 | + |
| 235 | + }); | ||
| 236 | + console.log(params); | ||
| 237 | + jName = params[0].split("\\")[0]; | ||
| 238 | + var id = $("#"+params[1]).val(); | ||
| 239 | + $get('/realSchedule/'+id,null,function(result){ | ||
| 240 | + console.log(result); | ||
| 241 | + result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD"); | ||
| 242 | + var ludan_1 = template('ludan_1',result); | ||
| 243 | + //var ludan_4 = template('ludan_4',result); | ||
| 244 | + // 把渲染好的模版html文本追加到表格中 | ||
| 245 | + $('#forms .ludan_1').html(ludan_1); | ||
| 246 | + //$('#forms .ludan_4').html(ludan_4); | ||
| 172 | }); | 247 | }); |
| 173 | - $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ | 248 | + |
| 249 | + $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ | ||
| 174 | getTime(result); | 250 | getTime(result); |
| 251 | + | ||
| 175 | var ludan_2 = template('ludan_2',{list:result}); | 252 | var ludan_2 = template('ludan_2',{list:result}); |
| 253 | + | ||
| 176 | // 把渲染好的模版html文本追加到表格中 | 254 | // 把渲染好的模版html文本追加到表格中 |
| 255 | + | ||
| 177 | $('#forms .ludan_2').html(ludan_2); | 256 | $('#forms .ludan_2').html(ludan_2); |
| 178 | - }); | ||
| 179 | - $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ | ||
| 180 | - var ludan_3 = template('ludan_3',result); | ||
| 181 | - $('#forms .ludan_3').html(ludan_3); | ||
| 182 | - }); | 257 | + |
| 258 | + }); | ||
| 259 | + $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ | ||
| 260 | + var ludan_3 = template('ludan_3',result); | ||
| 261 | + $('#forms .ludan_3').html(ludan_3); | ||
| 262 | + }); | ||
| 183 | 263 | ||
| 184 | - }); | ||
| 185 | - | ||
| 186 | - $("#export").on("click",function(){ | ||
| 187 | - if(params.length < 1){ | ||
| 188 | - return; | ||
| 189 | - } | ||
| 190 | - $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ | ||
| 191 | - window.open("/downloadFile/download?fileName="+jName); | ||
| 192 | - }); | ||
| 193 | - }); | ||
| 194 | - | ||
| 195 | - $("#print").click(function(){ | ||
| 196 | - $("#printArea").printArea(); | ||
| 197 | - }); | ||
| 198 | - | ||
| 199 | - $("#exportMore").on("click",function(){ | ||
| 200 | - return; | ||
| 201 | - $post('/realSchedule/exportWaybillMore',{date:date},function(result){ | ||
| 202 | - window.open("/downloadFile/download?fileName="+jName); | ||
| 203 | - }); | ||
| 204 | - }); | ||
| 205 | - | ||
| 206 | - function getTime(list){ | ||
| 207 | - $.each(list, function(i, obj) { | ||
| 208 | - if(obj.zdsj != null && obj.zdsjActual != null ){ | ||
| 209 | - var zdsjActual = (obj.zdsjActual).split(":"); | ||
| 210 | - var zdsj = (obj.zdsj).split(":"); | ||
| 211 | - if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){ | ||
| 212 | - obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1])); | ||
| 213 | - } | ||
| 214 | - else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){ | ||
| 215 | - obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1])); | ||
| 216 | - } | ||
| 217 | - } | ||
| 218 | - }); | 264 | + |
| 265 | + }); | ||
| 266 | + | ||
| 267 | + $("#export").on("click",function(){ | ||
| 268 | + if(params.length < 1){ | ||
| 269 | + return; | ||
| 270 | + } | ||
| 271 | + $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ | ||
| 272 | + window.open("/downloadFile/download?fileName="+jName); | ||
| 273 | + }); | ||
| 274 | + }); | ||
| 275 | + | ||
| 276 | + $("#print").click(function(){ | ||
| 277 | + $("#printArea").printArea(); | ||
| 278 | + }); | ||
| 279 | + | ||
| 280 | + $("#exportMore").on("click",function(){ | ||
| 281 | + return; | ||
| 282 | + $post('/realSchedule/exportWaybillMore',{date:date},function(result){ | ||
| 283 | + window.open("/downloadFile/download?fileName="+jName); | ||
| 284 | + }); | ||
| 285 | + }); | ||
| 286 | + | ||
| 287 | + function getTime(list){ | ||
| 288 | + $.each(list, function(i, obj) { | ||
| 289 | + if(obj.zdsj != null && obj.zdsjActual != null ){ | ||
| 290 | + var zdsjActual = (obj.zdsjActual).split(":"); | ||
| 291 | + var zdsj = (obj.zdsj).split(":"); | ||
| 292 | + if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){ | ||
| 293 | + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1])); | ||
| 294 | + } | ||
| 295 | + else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){ | ||
| 296 | + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1])); | ||
| 297 | + } | ||
| 298 | + } | ||
| 299 | + }); | ||
| 219 | } | 300 | } |
| 301 | + | ||
| 220 | }); | 302 | }); |
| 303 | + | ||
| 221 | </script> | 304 | </script> |
| 305 | + | ||
| 222 | <script type="text/html" id="list_info"> | 306 | <script type="text/html" id="list_info"> |
| 307 | + | ||
| 223 | {{each list as obj i}} | 308 | {{each list as obj i}} |
| 309 | + | ||
| 224 | <tr> | 310 | <tr> |
| 311 | + | ||
| 225 | <td width="45%">{{obj[4]}}\{{obj[1]}}</td> | 312 | <td width="45%">{{obj[4]}}\{{obj[1]}}</td> |
| 313 | + | ||
| 226 | <td width="32%">{{obj[2]}}</td> | 314 | <td width="32%">{{obj[2]}}</td> |
| 315 | + | ||
| 227 | <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td> | 316 | <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td> |
| 317 | + | ||
| 228 | </tr> | 318 | </tr> |
| 319 | + | ||
| 229 | {{/each}} | 320 | {{/each}} |
| 321 | + | ||
| 230 | {{if list.length == 0}} | 322 | {{if list.length == 0}} |
| 323 | + | ||
| 231 | <tr> | 324 | <tr> |
| 325 | + | ||
| 232 | <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td> | 326 | <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td> |
| 327 | + | ||
| 233 | </tr> | 328 | </tr> |
| 329 | + | ||
| 234 | {{/if}} | 330 | {{/if}} |
| 235 | -</script> | ||
| 236 | -<script type="text/html" id="ludan_1"> | ||
| 237 | - <tr> | ||
| 238 | - <td colspan="14">行车路单</td> | ||
| 239 | - </tr> | ||
| 240 | - <tr> | ||
| 241 | - <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}} 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派: 日期:{{scheduleDate}}</td> | ||
| 242 | - </tr> | ||
| 243 | - <tr> | ||
| 244 | - <td colspan="2">出场存油 升</td> | ||
| 245 | - <td colspan="2">加注油量 升</td> | ||
| 246 | - <td colspan="2">进场存油 升</td> | ||
| 247 | - <td colspan="4">加注机油 升</td> | ||
| 248 | - <td colspan="4">本日耗油 升</td> | ||
| 249 | - </tr> | ||
| 250 | - <tr> | ||
| 251 | - <td rowspan="2">调度章</td> | ||
| 252 | - <td colspan="1"> </td> | ||
| 253 | - <td rowspan="2">早班</td> | ||
| 254 | - <td colspan="1"> </td> | ||
| 255 | - <td rowspan="2">夜班</td> | ||
| 256 | - <td colspan="1"> </td> | ||
| 257 | - <td rowspan="2" colspan="2">交叉</td> | ||
| 258 | - <td colspan="2"> </td> | ||
| 259 | - <td rowspan="2">其他</td> | ||
| 260 | - <td colspan="1"> </td> | ||
| 261 | - <td colspan="1"> </td> | ||
| 262 | - <td colspan="1"> </td> | ||
| 263 | - </tr> | ||
| 264 | - <tr> | ||
| 265 | - <td colspan="1"> </td> | ||
| 266 | - <td colspan="1"> </td> | ||
| 267 | - <td colspan="1"> </td> | ||
| 268 | - <td colspan="2"> </td> | ||
| 269 | - <td colspan="1"> </td> | ||
| 270 | - <td colspan="1"> </td> | ||
| 271 | - <td colspan="1"> </td> | ||
| 272 | - </tr> | ||
| 273 | - <tr> | ||
| 274 | - <td rowspan="2">车次</td> | ||
| 275 | - <td colspan="2">工号</td> | ||
| 276 | - <td rowspan="2">公里耗油</td> | ||
| 277 | - <td colspan="2">起讫站</td> | ||
| 278 | - <td colspan="4">时间</td> | ||
| 279 | - <td colspan="2">误点</td> | ||
| 280 | - <td rowspan="2" width="66px">里程(公里)计划</td> | ||
| 281 | - <td rowspan="2">备注</td> | ||
| 282 | - </tr> | ||
| 283 | - <tr> | ||
| 284 | - <td colspan="1" width="60px">司 机</td> | ||
| 285 | - <td colspan="1" width="60px">售 票</td> | ||
| 286 | - <td colspan="1">起点</td> | ||
| 287 | - <td colspan="1">终点</td> | ||
| 288 | - <td colspan="1">计发</td> | ||
| 289 | - <td colspan="1">实发</td> | ||
| 290 | - <td colspan="1">应到</td> | ||
| 291 | - <td colspan="1">实到</td> | ||
| 292 | - <td colspan="1">快</td> | ||
| 293 | - <td colspan="1">慢</td> | ||
| 294 | - </tr> | 331 | + |
| 295 | </script> | 332 | </script> |
| 333 | +<script type="text/html" id="ludan_1"> | ||
| 334 | + <tr> | ||
| 335 | + <td colspan="14">行车路单</td> | ||
| 336 | + </tr> | ||
| 337 | + <tr> | ||
| 338 | + <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}} 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派: 日期:{{scheduleDate}}</td> | ||
| 339 | + </tr> | ||
| 340 | + <tr> | ||
| 341 | + <td colspan="2">出场存油 升</td> | ||
| 342 | + <td colspan="2">加注油量 升</td> | ||
| 343 | + <td colspan="2">进场存油 升</td> | ||
| 344 | + <td colspan="4">加注机油 升</td> | ||
| 345 | + <td colspan="4">本日耗油 升</td> | ||
| 346 | + </tr> | ||
| 347 | + <tr> | ||
| 348 | + <td rowspan="2">调度章</td> | ||
| 349 | + <td colspan="1"> </td> | ||
| 350 | + <td rowspan="2">早班</td> | ||
| 351 | + <td colspan="1"> </td> | ||
| 352 | + <td rowspan="2">夜班</td> | ||
| 353 | + <td colspan="1"> </td> | ||
| 354 | + <td rowspan="2" colspan="2">交叉</td> | ||
| 355 | + <td colspan="2"> </td> | ||
| 356 | + <td rowspan="2">其他</td> | ||
| 357 | + <td colspan="1"> </td> | ||
| 358 | + <td colspan="1"> </td> | ||
| 359 | + <td colspan="1"> </td> | ||
| 360 | + </tr> | ||
| 361 | + <tr> | ||
| 362 | + <td colspan="1"> </td> | ||
| 363 | + <td colspan="1"> </td> | ||
| 364 | + <td colspan="1"> </td> | ||
| 365 | + <td colspan="2"> </td> | ||
| 366 | + <td colspan="1"> </td> | ||
| 367 | + <td colspan="1"> </td> | ||
| 368 | + <td colspan="1"> </td> | ||
| 369 | + </tr> | ||
| 370 | + <tr> | ||
| 371 | + <td rowspan="2">车次</td> | ||
| 372 | + <td colspan="2">工号</td> | ||
| 373 | + <td rowspan="2">公里耗油</td> | ||
| 374 | + <td colspan="2">起讫站</td> | ||
| 375 | + <td colspan="4">时间</td> | ||
| 376 | + <td colspan="2">误点</td> | ||
| 377 | + <td rowspan="2" width="66px">里程(公里)计划</td> | ||
| 378 | + <td rowspan="2">备注</td> | ||
| 379 | + </tr> | ||
| 380 | + <tr> | ||
| 381 | + <td colspan="1" width="60px">司 机</td> | ||
| 382 | + <td colspan="1" width="60px">售 票</td> | ||
| 383 | + <td colspan="1">起点</td> | ||
| 384 | + <td colspan="1">终点</td> | ||
| 385 | + <td colspan="1">计发</td> | ||
| 386 | + <td colspan="1">实发</td> | ||
| 387 | + <td colspan="1">应到</td> | ||
| 388 | + <td colspan="1">实到</td> | ||
| 389 | + <td colspan="1">快</td> | ||
| 390 | + <td colspan="1">慢</td> | ||
| 391 | + </tr> | ||
| 392 | +</script> | ||
| 393 | + | ||
| 296 | <script type="text/html" id="ludan_2"> | 394 | <script type="text/html" id="ludan_2"> |
| 395 | + | ||
| 297 | {{each list as obj i}} | 396 | {{each list as obj i}} |
| 397 | + | ||
| 298 | <tr> | 398 | <tr> |
| 399 | + | ||
| 299 | <td>{{i+1}}</td> | 400 | <td>{{i+1}}</td> |
| 401 | + | ||
| 300 | <td>{{obj.jName}}</td> | 402 | <td>{{obj.jName}}</td> |
| 403 | + | ||
| 301 | <td>{{obj.sName}}</td> | 404 | <td>{{obj.sName}}</td> |
| 405 | + | ||
| 302 | <td> </td> | 406 | <td> </td> |
| 407 | + | ||
| 303 | <td>{{obj.qdzName}}</td> | 408 | <td>{{obj.qdzName}}</td> |
| 409 | + | ||
| 304 | <td>{{obj.zdzName}}</td> | 410 | <td>{{obj.zdzName}}</td> |
| 411 | + | ||
| 305 | <td>{{obj.fcsj}}</td> | 412 | <td>{{obj.fcsj}}</td> |
| 413 | + | ||
| 306 | <td>{{obj.fcsjActual}}</td> | 414 | <td>{{obj.fcsjActual}}</td> |
| 415 | + | ||
| 307 | <td>{{obj.zdsj}}</td> | 416 | <td>{{obj.zdsj}}</td> |
| 417 | + | ||
| 308 | <td>{{obj.zdsjActual}}</td> | 418 | <td>{{obj.zdsjActual}}</td> |
| 419 | + | ||
| 309 | <td>{{obj.fast}}</td> | 420 | <td>{{obj.fast}}</td> |
| 421 | + | ||
| 310 | <td>{{obj.slow}}</td> | 422 | <td>{{obj.slow}}</td> |
| 311 | - <td>{{obj.jhlc}}</td> | 423 | + |
| 424 | + <td>{{obj.jhlc}}</td> | ||
| 312 | <td>{{obj.remarks}}</td> | 425 | <td>{{obj.remarks}}</td> |
| 426 | + | ||
| 427 | + </tr> | ||
| 428 | + | ||
| 429 | + {{/each}} | ||
| 430 | + {{if list.length == 0}} | ||
| 431 | + <tr> | ||
| 432 | + <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 313 | </tr> | 433 | </tr> |
| 314 | - {{/each}} | ||
| 315 | - {{if list.length == 0}} | ||
| 316 | - <tr> | ||
| 317 | - <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 318 | - </tr> | ||
| 319 | {{/if}} | 434 | {{/if}} |
| 320 | -</script> | ||
| 321 | -<script type="text/html" id="ludan_3"> | ||
| 322 | - <tr> | ||
| 323 | - <td colspan="2">计划公里</td> | ||
| 324 | - <td>{{jhlc}}</td> | ||
| 325 | - <td colspan="2">烂班公里</td> | ||
| 326 | - <td>{{remMileage}}</td> | ||
| 327 | - <td colspan="2">临加公里</td> | ||
| 328 | - <td>{{addMileage}}</td> | ||
| 329 | - <td colspan="2">营运公里</td> | ||
| 330 | - <td colspan="3">{{yygl}}</td> | ||
| 331 | - </tr> | ||
| 332 | - <tr> | ||
| 333 | - <td colspan="2">空驶公里</td> | ||
| 334 | - <td>{{ksgl}}</td> | ||
| 335 | - <td colspan="2">总公里</td> | ||
| 336 | - <td>{{realMileage}}</td> | ||
| 337 | - <td colspan="2">计划班次</td> | ||
| 338 | - <td>{{jhbc}}</td> | ||
| 339 | - <td colspan="2">烂班班次</td> | ||
| 340 | - <td colspan="3">{{cjbc}}</td> | ||
| 341 | - </tr> | ||
| 342 | - <tr> | ||
| 343 | - <td colspan="2">增加班次</td> | ||
| 344 | - <td>{{ljbc}}</td> | ||
| 345 | - <td colspan="2">实际班次</td> | ||
| 346 | - <td>{{sjbc}}</td> | ||
| 347 | - <td colspan="2"></td> | ||
| 348 | - <td></td> | ||
| 349 | - <td colspan="2"></td> | ||
| 350 | - <td colspan="3"></td> | ||
| 351 | - </tr> | ||
| 352 | -</script> | ||
| 353 | -<script type="text/html" id="ludan_4"> | ||
| 354 | - <tr> | ||
| 355 | - <td colspan="12">认真做好终点项目的例保保修工作,杜绝机械火警事故!</td> | ||
| 356 | - <td>轮胎</td> | ||
| 357 | - <td> </td> | ||
| 358 | - </tr> | ||
| 359 | - <tr> | ||
| 360 | - <td colspan="3">重点例保项目</td> | ||
| 361 | - <td>1</td> | ||
| 362 | - <td>2</td> | ||
| 363 | - <td>3</td> | ||
| 364 | - <td colspan="3">重点例保项目</td> | ||
| 365 | - <td>1</td> | ||
| 366 | - <td>2</td> | ||
| 367 | - <td>3</td> | ||
| 368 | - <td>灭火机</td> | ||
| 369 | - <td> </td> | ||
| 370 | - </tr> | ||
| 371 | - <tr> | ||
| 372 | - <td colspan="3">各类制动</td> | ||
| 373 | - <td> </td> | ||
| 374 | - <td> </td> | ||
| 375 | - <td> </td> | ||
| 376 | - <td colspan="3">各类灯光</td> | ||
| 377 | - <td> </td> | ||
| 378 | - <td> </td> | ||
| 379 | - <td> </td> | ||
| 380 | - <td colspan="2">出场路码表里程</td> | ||
| 381 | - </tr> | ||
| 382 | - <tr> | ||
| 383 | - <td colspan="3">方向机</td> | ||
| 384 | - <td> </td> | ||
| 385 | - <td> </td> | ||
| 386 | - <td> </td> | ||
| 387 | - <td colspan="3">各类仪表</td> | ||
| 388 | - <td> </td> | ||
| 389 | - <td> </td> | ||
| 390 | - <td> </td> | ||
| 391 | - <td colspan="2" rowspan="2"> </td> | ||
| 392 | - </tr> | ||
| 393 | - <tr> | ||
| 394 | - <td colspan="3">欠压报警器</td> | ||
| 395 | - <td> </td> | ||
| 396 | - <td> </td> | ||
| 397 | - <td> </td> | ||
| 398 | - <td colspan="3">各类皮带</td> | ||
| 399 | - <td> </td> | ||
| 400 | - <td> </td> | ||
| 401 | - <td> </td> | ||
| 402 | - </tr> | ||
| 403 | - <tr> | ||
| 404 | - <td colspan="3">发动机清洁及响声</td> | ||
| 405 | - <td> </td> | ||
| 406 | - <td> </td> | ||
| 407 | - <td> </td> | ||
| 408 | - <td colspan="3">油箱及托架</td> | ||
| 409 | - <td> </td> | ||
| 410 | - <td> </td> | ||
| 411 | - <td> </td> | ||
| 412 | - <td colspan="2">出场路码表里程</td> | ||
| 413 | - </tr> | ||
| 414 | - <tr> | ||
| 415 | - <td colspan="3">地盘响声</td> | ||
| 416 | - <td> </td> | ||
| 417 | - <td> </td> | ||
| 418 | - <td> </td> | ||
| 419 | - <td colspan="3">轮胎、半轴螺栓螺母</td> | ||
| 420 | - <td> </td> | ||
| 421 | - <td> </td> | ||
| 422 | - <td> </td> | ||
| 423 | - <td colspan="2" rowspan="3"> </td> | ||
| 424 | - </tr> | ||
| 425 | - <tr> | ||
| 426 | - <td colspan="3">化油器及油路</td> | ||
| 427 | - <td> </td> | ||
| 428 | - <td> </td> | ||
| 429 | - <td> </td> | ||
| 430 | - <td colspan="3">油、电、水、气</td> | ||
| 431 | - <td> </td> | ||
| 432 | - <td> </td> | ||
| 433 | - <td> </td> | ||
| 434 | - </tr> | ||
| 435 | - <tr> | ||
| 436 | - <td colspan="3">进排歧管及排气管</td> | ||
| 437 | - <td> </td> | ||
| 438 | - <td> </td> | ||
| 439 | - <td> </td> | ||
| 440 | - <td colspan="3">内外车身及附件</td> | ||
| 441 | - <td> </td> | ||
| 442 | - <td> </td> | ||
| 443 | - <td> </td> | ||
| 444 | - </tr> | ||
| 445 | - <tr> | ||
| 446 | - <td colspan="14">1 首次出场,2 复使中途,3 某次进场。√正常,ⓧ报修,×尚未报修</td> | ||
| 447 | - </tr> | 435 | + |
| 436 | +</script> | ||
| 437 | +<script type="text/html" id="ludan_3"> | ||
| 438 | + <tr> | ||
| 439 | + <td colspan="2">计划公里</td> | ||
| 440 | + <td>{{jhlc}}</td> | ||
| 441 | + <td colspan="2">烂班公里</td> | ||
| 442 | + <td>{{remMileage}}</td> | ||
| 443 | + <td colspan="2">临加公里</td> | ||
| 444 | + <td>{{addMileage}}</td> | ||
| 445 | + <td colspan="2">营运公里</td> | ||
| 446 | + <td colspan="3">{{yygl}}</td> | ||
| 447 | + </tr> | ||
| 448 | + <tr> | ||
| 449 | + <td colspan="2">空驶公里</td> | ||
| 450 | + <td>{{ksgl}}</td> | ||
| 451 | + <td colspan="2">总公里</td> | ||
| 452 | + <td>{{realMileage}}</td> | ||
| 453 | + <td colspan="2">计划班次</td> | ||
| 454 | + <td>{{jhbc}}</td> | ||
| 455 | + <td colspan="2">烂班班次</td> | ||
| 456 | + <td colspan="3">{{cjbc}}</td> | ||
| 457 | + </tr> | ||
| 458 | + <tr> | ||
| 459 | + <td colspan="2">增加班次</td> | ||
| 460 | + <td>{{ljbc}}</td> | ||
| 461 | + <td colspan="2">实际班次</td> | ||
| 462 | + <td>{{sjbc}}</td> | ||
| 463 | + <td colspan="2"></td> | ||
| 464 | + <td></td> | ||
| 465 | + <td colspan="2"></td> | ||
| 466 | + <td colspan="3"></td> | ||
| 467 | + </tr> | ||
| 468 | +</script> | ||
| 469 | +<script type="text/html" id="ludan_4"> | ||
| 470 | + <tr> | ||
| 471 | + <td colspan="12">认真做好终点项目的例保保修工作,杜绝机械火警事故!</td> | ||
| 472 | + <td>轮胎</td> | ||
| 473 | + <td> </td> | ||
| 474 | + </tr> | ||
| 475 | + <tr> | ||
| 476 | + <td colspan="3">重点例保项目</td> | ||
| 477 | + <td>1</td> | ||
| 478 | + <td>2</td> | ||
| 479 | + <td>3</td> | ||
| 480 | + <td colspan="3">重点例保项目</td> | ||
| 481 | + <td>1</td> | ||
| 482 | + <td>2</td> | ||
| 483 | + <td>3</td> | ||
| 484 | + <td>灭火机</td> | ||
| 485 | + <td> </td> | ||
| 486 | + </tr> | ||
| 487 | + <tr> | ||
| 488 | + <td colspan="3">各类制动</td> | ||
| 489 | + <td> </td> | ||
| 490 | + <td> </td> | ||
| 491 | + <td> </td> | ||
| 492 | + <td colspan="3">各类灯光</td> | ||
| 493 | + <td> </td> | ||
| 494 | + <td> </td> | ||
| 495 | + <td> </td> | ||
| 496 | + <td colspan="2">出场路码表里程</td> | ||
| 497 | + </tr> | ||
| 498 | + <tr> | ||
| 499 | + <td colspan="3">方向机</td> | ||
| 500 | + <td> </td> | ||
| 501 | + <td> </td> | ||
| 502 | + <td> </td> | ||
| 503 | + <td colspan="3">各类仪表</td> | ||
| 504 | + <td> </td> | ||
| 505 | + <td> </td> | ||
| 506 | + <td> </td> | ||
| 507 | + <td colspan="2" rowspan="2"> </td> | ||
| 508 | + </tr> | ||
| 509 | + <tr> | ||
| 510 | + <td colspan="3">欠压报警器</td> | ||
| 511 | + <td> </td> | ||
| 512 | + <td> </td> | ||
| 513 | + <td> </td> | ||
| 514 | + <td colspan="3">各类皮带</td> | ||
| 515 | + <td> </td> | ||
| 516 | + <td> </td> | ||
| 517 | + <td> </td> | ||
| 518 | + </tr> | ||
| 519 | + <tr> | ||
| 520 | + <td colspan="3">发动机清洁及响声</td> | ||
| 521 | + <td> </td> | ||
| 522 | + <td> </td> | ||
| 523 | + <td> </td> | ||
| 524 | + <td colspan="3">油箱及托架</td> | ||
| 525 | + <td> </td> | ||
| 526 | + <td> </td> | ||
| 527 | + <td> </td> | ||
| 528 | + <td colspan="2">出场路码表里程</td> | ||
| 529 | + </tr> | ||
| 530 | + <tr> | ||
| 531 | + <td colspan="3">地盘响声</td> | ||
| 532 | + <td> </td> | ||
| 533 | + <td> </td> | ||
| 534 | + <td> </td> | ||
| 535 | + <td colspan="3">轮胎、半轴螺栓螺母</td> | ||
| 536 | + <td> </td> | ||
| 537 | + <td> </td> | ||
| 538 | + <td> </td> | ||
| 539 | + <td colspan="2" rowspan="3"> </td> | ||
| 540 | + </tr> | ||
| 541 | + <tr> | ||
| 542 | + <td colspan="3">化油器及油路</td> | ||
| 543 | + <td> </td> | ||
| 544 | + <td> </td> | ||
| 545 | + <td> </td> | ||
| 546 | + <td colspan="3">油、电、水、气</td> | ||
| 547 | + <td> </td> | ||
| 548 | + <td> </td> | ||
| 549 | + <td> </td> | ||
| 550 | + </tr> | ||
| 551 | + <tr> | ||
| 552 | + <td colspan="3">进排歧管及排气管</td> | ||
| 553 | + <td> </td> | ||
| 554 | + <td> </td> | ||
| 555 | + <td> </td> | ||
| 556 | + <td colspan="3">内外车身及附件</td> | ||
| 557 | + <td> </td> | ||
| 558 | + <td> </td> | ||
| 559 | + <td> </td> | ||
| 560 | + </tr> | ||
| 561 | + <tr> | ||
| 562 | + <td colspan="14">1 首次出场,2 复使中途,3 某次进场。√正常,ⓧ报修,×尚未报修</td> | ||
| 563 | + </tr> | ||
| 448 | </script> | 564 | </script> |
| 449 | \ No newline at end of file | 565 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/waybillQp.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 | + | ||
| 15 | + .table > tbody + tbody { | ||
| 16 | + border-top: 1px solid; } | ||
| 17 | +</style> | ||
| 18 | + | ||
| 19 | +<div class="page-head"> | ||
| 20 | + <div class="page-title"> | ||
| 21 | + <h1>行车路单</h1> | ||
| 22 | + </div> | ||
| 23 | +</div> | ||
| 24 | + | ||
| 25 | +<div class="row"> | ||
| 26 | + <div class="col-md-12"> | ||
| 27 | + <div class="portlet light porttlet-fit bordered"> | ||
| 28 | + <div class="portlet-title"> | ||
| 29 | + <form class="form-inline" action=""> | ||
| 30 | + <div style="display: inline-block;"> | ||
| 31 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 32 | + <select class="form-control" name="line" id="line" style="width: 180px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block;margin-left: 15px;"> | ||
| 35 | + <span class="item-label" style="width: 80px;">时间: </span> | ||
| 36 | + <input class="form-control" type="text" id="date" style="width: 180px;"/> | ||
| 37 | + </div> | ||
| 38 | + <div class="form-group" style="display: inline-block;margin-left: 15px;"> | ||
| 39 | + <input class="btn btn-default" type="button" id="query" value="查询"/> | ||
| 40 | + <input class="btn btn-default" type="button" id="export" value="导出"/> | ||
| 41 | + <input class="btn btn-default" type="button" id="print" value="打印"/> | ||
| 42 | + <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> | ||
| 43 | + </div> | ||
| 44 | + </form> | ||
| 45 | + </div> | ||
| 46 | + <div class="portlet-body"> | ||
| 47 | + <div class="row"> | ||
| 48 | + <div class="col-md-3"> | ||
| 49 | + <div class="" style="margin-top: 10px;overflow:auto;height: 860px"> | ||
| 50 | + <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> | ||
| 51 | + <thead> | ||
| 52 | + <tr class="hidden"> | ||
| 53 | + <th>人员</th> | ||
| 54 | + <th>自编号</th> | ||
| 55 | + <th>路牌</th> | ||
| 56 | + </tr> | ||
| 57 | + </thead> | ||
| 58 | + <tbody> | ||
| 59 | + | ||
| 60 | + </tbody> | ||
| 61 | + </table> | ||
| 62 | + </div> | ||
| 63 | + </div> | ||
| 64 | + <div class="col-md-9" id="printArea"> | ||
| 65 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> | ||
| 66 | + <table class="table table-bordered table-checkable" id="forms"> | ||
| 67 | + <tbody class="ludan_1"> | ||
| 68 | + | ||
| 69 | + </tbody> | ||
| 70 | + <tbody class="ludan_2"> | ||
| 71 | + | ||
| 72 | + </tbody> | ||
| 73 | + <tbody class="ludan_3"> | ||
| 74 | + | ||
| 75 | + </tbody> | ||
| 76 | + <tbody class="ludan_4"> | ||
| 77 | + | ||
| 78 | + </tbody> | ||
| 79 | + </table> | ||
| 80 | + </div> | ||
| 81 | + </div> | ||
| 82 | + </div> | ||
| 83 | + </div> | ||
| 84 | + </div> | ||
| 85 | + </div> | ||
| 86 | +</div> | ||
| 87 | + | ||
| 88 | +<script> | ||
| 89 | + $(function(){ | ||
| 90 | + // 关闭左侧栏 | ||
| 91 | + if (!$('body').hasClass('page-sidebar-closed')) | ||
| 92 | + $('.menu-toggler.sidebar-toggler').click(); | ||
| 93 | + | ||
| 94 | + $("#date").datetimepicker({ | ||
| 95 | + format : 'YYYY-MM-DD', | ||
| 96 | + locale : 'zh-cn' | ||
| 97 | + }); | ||
| 98 | + | ||
| 99 | + $.get('/basic/lineCode2Name',function(result){ | ||
| 100 | + var data=[]; | ||
| 101 | + | ||
| 102 | + for(var code in result){ | ||
| 103 | + data.push({id: code, text: result[code]}); | ||
| 104 | + } | ||
| 105 | + console.log(data); | ||
| 106 | + initPinYinSelect2('#line',data,''); | ||
| 107 | + | ||
| 108 | + }) | ||
| 109 | + | ||
| 110 | + /* $('#line').select2({ | ||
| 111 | + ajax: { | ||
| 112 | + url: '/realSchedule/findLine', | ||
| 113 | + type: 'post', | ||
| 114 | + dataType: 'json', | ||
| 115 | + delay: 150, | ||
| 116 | + data: function(params){ | ||
| 117 | + return{line: params.term}; | ||
| 118 | + }, | ||
| 119 | + processResults: function (data) { | ||
| 120 | + return { | ||
| 121 | + results: data | ||
| 122 | + }; | ||
| 123 | + }, | ||
| 124 | + cache: true | ||
| 125 | + }, | ||
| 126 | + templateResult: function(repo){ | ||
| 127 | + if (repo.loading) return repo.text; | ||
| 128 | + var h = '<span>'+repo.text+'</span>'; | ||
| 129 | + return h; | ||
| 130 | + }, | ||
| 131 | + escapeMarkup: function (markup) { return markup; }, | ||
| 132 | + minimumInputLength: 1, | ||
| 133 | + templateSelection: function(repo){ | ||
| 134 | + return repo.text; | ||
| 135 | + }, | ||
| 136 | + language: { | ||
| 137 | + noResults: function(){ | ||
| 138 | + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | ||
| 139 | + }, | ||
| 140 | + inputTooShort : function(e) { | ||
| 141 | + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | ||
| 142 | + }, | ||
| 143 | + searching : function() { | ||
| 144 | + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | ||
| 145 | + } | ||
| 146 | + } | ||
| 147 | + }); | ||
| 148 | + */ | ||
| 149 | + | ||
| 150 | + var date = ''; | ||
| 151 | + $("#query").on("click",function(){ | ||
| 152 | + var line = $("#line").val(); | ||
| 153 | + date = $("#date").val(); | ||
| 154 | + $(".hidden").removeClass("hidden"); | ||
| 155 | + $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ | ||
| 156 | + // 把数据填充到模版中 | ||
| 157 | + var tbodyHtml = template('list_info',{list:result}); | ||
| 158 | + // 把渲染好的模版html文本追加到表格中 | ||
| 159 | + $('#info tbody').html(tbodyHtml); | ||
| 160 | + }); | ||
| 161 | + }); | ||
| 162 | + | ||
| 163 | + var params = new Array(); | ||
| 164 | + var jName = ''; | ||
| 165 | + $("#info tbody").on("click","tr",function(){ | ||
| 166 | + if($(this).children().size() < 2){ | ||
| 167 | + return; | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + $(this).children().each(function(index){ | ||
| 171 | + params[index] = $(this).text(); | ||
| 172 | + }); | ||
| 173 | + console.log(params); | ||
| 174 | + jName = params[0].split("\\")[0]; | ||
| 175 | + var id = $("#"+params[1]).val(); | ||
| 176 | + $get('/realSchedule/'+id,null,function(result){ | ||
| 177 | + console.log(result); | ||
| 178 | + result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD"); | ||
| 179 | + var ludan_1 = template('ludan_1',result); | ||
| 180 | + //var ludan_4 = template('ludan_4',result); | ||
| 181 | + // 把渲染好的模版html文本追加到表格中 | ||
| 182 | + $('#forms .ludan_1').html(ludan_1); | ||
| 183 | + //$('#forms .ludan_4').html(ludan_4); | ||
| 184 | + }); | ||
| 185 | + $post('/realSchedule/queryListWaybillQp',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ | ||
| 186 | + getTime(result); | ||
| 187 | + var ludan_2 = template('ludan_2',{list:result}); | ||
| 188 | + // 把渲染好的模版html文本追加到表格中 | ||
| 189 | + $('#forms .ludan_2').html(ludan_2); | ||
| 190 | + }); | ||
| 191 | + $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ | ||
| 192 | + var ludan_3 = template('ludan_3',result); | ||
| 193 | + $('#forms .ludan_3').html(ludan_3); | ||
| 194 | + }); | ||
| 195 | + | ||
| 196 | + }); | ||
| 197 | + | ||
| 198 | + $("#export").on("click",function(){ | ||
| 199 | + if(params.length < 1){ | ||
| 200 | + return; | ||
| 201 | + } | ||
| 202 | + $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ | ||
| 203 | + window.open("/downloadFile/download?fileName="+jName); | ||
| 204 | + }); | ||
| 205 | + }); | ||
| 206 | + | ||
| 207 | + $("#print").click(function(){ | ||
| 208 | + $("#printArea").printArea(); | ||
| 209 | + }); | ||
| 210 | + | ||
| 211 | + $("#exportMore").on("click",function(){ | ||
| 212 | + return; | ||
| 213 | + $post('/realSchedule/exportWaybillMore',{date:date},function(result){ | ||
| 214 | + window.open("/downloadFile/download?fileName="+jName); | ||
| 215 | + }); | ||
| 216 | + }); | ||
| 217 | + | ||
| 218 | + function getTime(list){ | ||
| 219 | + $.each(list, function(i, obj) { | ||
| 220 | + if(obj.zdsj != null && obj.zdsjActual != null ){ | ||
| 221 | + var zdsjActual = (obj.zdsjActual).split(":"); | ||
| 222 | + var zdsj = (obj.zdsj).split(":"); | ||
| 223 | + if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){ | ||
| 224 | + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1])); | ||
| 225 | + } | ||
| 226 | + else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){ | ||
| 227 | + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1])); | ||
| 228 | + } | ||
| 229 | + } | ||
| 230 | + }); | ||
| 231 | + } | ||
| 232 | + }); | ||
| 233 | +</script> | ||
| 234 | +<script type="text/html" id="list_info"> | ||
| 235 | + {{each list as obj i}} | ||
| 236 | + <tr> | ||
| 237 | + <td width="45%">{{obj[4]}}\{{obj[1]}}</td> | ||
| 238 | + <td width="32%">{{obj[2]}}</td> | ||
| 239 | + <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td> | ||
| 240 | + </tr> | ||
| 241 | + {{/each}} | ||
| 242 | + {{if list.length == 0}} | ||
| 243 | + <tr> | ||
| 244 | + <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 245 | + </tr> | ||
| 246 | + {{/if}} | ||
| 247 | +</script> | ||
| 248 | +<script type="text/html" id="ludan_1"> | ||
| 249 | + <tr> | ||
| 250 | + <td colspan="14">行车路单</td> | ||
| 251 | + </tr> | ||
| 252 | + <tr> | ||
| 253 | + <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}} 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派: 日期:{{scheduleDate}}</td> | ||
| 254 | + </tr> | ||
| 255 | + <tr> | ||
| 256 | + <td colspan="2">出场存油 升</td> | ||
| 257 | + <td colspan="2">加注油量 升</td> | ||
| 258 | + <td colspan="2">进场存油 升</td> | ||
| 259 | + <td colspan="4">加注机油 升</td> | ||
| 260 | + <td colspan="4">本日耗油 升</td> | ||
| 261 | + </tr> | ||
| 262 | + <tr> | ||
| 263 | + <td rowspan="2">调度章</td> | ||
| 264 | + <td colspan="1"> </td> | ||
| 265 | + <td rowspan="2">早班</td> | ||
| 266 | + <td colspan="1"> </td> | ||
| 267 | + <td rowspan="2">夜班</td> | ||
| 268 | + <td colspan="1"> </td> | ||
| 269 | + <td rowspan="2" colspan="2">交叉</td> | ||
| 270 | + <td colspan="2"> </td> | ||
| 271 | + <td rowspan="2">其他</td> | ||
| 272 | + <td colspan="1"> </td> | ||
| 273 | + <td colspan="1"> </td> | ||
| 274 | + <td colspan="1"> </td> | ||
| 275 | + </tr> | ||
| 276 | + <tr> | ||
| 277 | + <td colspan="1"> </td> | ||
| 278 | + <td colspan="1"> </td> | ||
| 279 | + <td colspan="1"> </td> | ||
| 280 | + <td colspan="2"> </td> | ||
| 281 | + <td colspan="1"> </td> | ||
| 282 | + <td colspan="1"> </td> | ||
| 283 | + <td colspan="1"> </td> | ||
| 284 | + </tr> | ||
| 285 | + <tr> | ||
| 286 | + <td rowspan="2">车次</td> | ||
| 287 | + <td colspan="2">工号</td> | ||
| 288 | + <td rowspan="2">公里耗油</td> | ||
| 289 | + <td colspan="2">起讫站</td> | ||
| 290 | + <td colspan="4">时间</td> | ||
| 291 | + <td colspan="2">误点</td> | ||
| 292 | + <td rowspan="2" width="66px">里程(公里)计划</td> | ||
| 293 | + <td rowspan="2">备注</td> | ||
| 294 | + </tr> | ||
| 295 | + <tr> | ||
| 296 | + <td colspan="1" width="60px">司 机</td> | ||
| 297 | + <td colspan="1" width="60px">售 票</td> | ||
| 298 | + <td colspan="1">起点</td> | ||
| 299 | + <td colspan="1">终点</td> | ||
| 300 | + <td colspan="1">计发</td> | ||
| 301 | + <td colspan="1">实发</td> | ||
| 302 | + <td colspan="1">应到</td> | ||
| 303 | + <td colspan="1">实到</td> | ||
| 304 | + <td colspan="1">快</td> | ||
| 305 | + <td colspan="1">慢</td> | ||
| 306 | + </tr> | ||
| 307 | +</script> | ||
| 308 | +<script type="text/html" id="ludan_2"> | ||
| 309 | + {{each list as obj i}} | ||
| 310 | + <tr> | ||
| 311 | + <td>{{i+1}}</td> | ||
| 312 | + <td>{{obj.jName}}</td> | ||
| 313 | + <td>{{obj.sName}}</td> | ||
| 314 | + <td> </td> | ||
| 315 | + <td>{{obj.qdzName}}</td> | ||
| 316 | + <td>{{obj.zdzName}}</td> | ||
| 317 | + <td>{{obj.fcsj}}</td> | ||
| 318 | + <td>{{obj.fcsjActual}}</td> | ||
| 319 | + <td>{{obj.zdsj}}</td> | ||
| 320 | + <td>{{obj.zdsjActual}}</td> | ||
| 321 | + <td>{{obj.fast}}</td> | ||
| 322 | + <td>{{obj.slow}}</td> | ||
| 323 | + <td>{{obj.jhlc}}</td> | ||
| 324 | + <td>{{obj.remarks}}</td> | ||
| 325 | + </tr> | ||
| 326 | + {{/each}} | ||
| 327 | + {{if list.length == 0}} | ||
| 328 | + <tr> | ||
| 329 | + <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 330 | + </tr> | ||
| 331 | + {{/if}} | ||
| 332 | +</script> | ||
| 333 | +<script type="text/html" id="ludan_3"> | ||
| 334 | + <tr> | ||
| 335 | + <td colspan="2">计划公里</td> | ||
| 336 | + <td>{{jhlc}}</td> | ||
| 337 | + <td colspan="2">烂班公里</td> | ||
| 338 | + <td>{{remMileage}}</td> | ||
| 339 | + <td colspan="2">临加公里</td> | ||
| 340 | + <td>{{addMileage}}</td> | ||
| 341 | + <td colspan="2">营运公里</td> | ||
| 342 | + <td colspan="3">{{yygl}}</td> | ||
| 343 | + </tr> | ||
| 344 | + <tr> | ||
| 345 | + <td colspan="2">空驶公里</td> | ||
| 346 | + <td>{{ksgl}}</td> | ||
| 347 | + <td colspan="2">总公里</td> | ||
| 348 | + <td>{{realMileage}}</td> | ||
| 349 | + <td colspan="2">计划班次</td> | ||
| 350 | + <td>{{jhbc}}</td> | ||
| 351 | + <td colspan="2">烂班班次</td> | ||
| 352 | + <td colspan="3">{{cjbc}}</td> | ||
| 353 | + </tr> | ||
| 354 | + <tr> | ||
| 355 | + <td colspan="2">增加班次</td> | ||
| 356 | + <td>{{ljbc}}</td> | ||
| 357 | + <td colspan="2">实际班次</td> | ||
| 358 | + <td>{{sjbc}}</td> | ||
| 359 | + <td colspan="2"></td> | ||
| 360 | + <td></td> | ||
| 361 | + <td colspan="2"></td> | ||
| 362 | + <td colspan="3"></td> | ||
| 363 | + </tr> | ||
| 364 | +</script> | ||
| 365 | +<script type="text/html" id="ludan_4"> | ||
| 366 | + <tr> | ||
| 367 | + <td colspan="12">认真做好终点项目的例保保修工作,杜绝机械火警事故!</td> | ||
| 368 | + <td>轮胎</td> | ||
| 369 | + <td> </td> | ||
| 370 | + </tr> | ||
| 371 | + <tr> | ||
| 372 | + <td colspan="3">重点例保项目</td> | ||
| 373 | + <td>1</td> | ||
| 374 | + <td>2</td> | ||
| 375 | + <td>3</td> | ||
| 376 | + <td colspan="3">重点例保项目</td> | ||
| 377 | + <td>1</td> | ||
| 378 | + <td>2</td> | ||
| 379 | + <td>3</td> | ||
| 380 | + <td>灭火机</td> | ||
| 381 | + <td> </td> | ||
| 382 | + </tr> | ||
| 383 | + <tr> | ||
| 384 | + <td colspan="3">各类制动</td> | ||
| 385 | + <td> </td> | ||
| 386 | + <td> </td> | ||
| 387 | + <td> </td> | ||
| 388 | + <td colspan="3">各类灯光</td> | ||
| 389 | + <td> </td> | ||
| 390 | + <td> </td> | ||
| 391 | + <td> </td> | ||
| 392 | + <td colspan="2">出场路码表里程</td> | ||
| 393 | + </tr> | ||
| 394 | + <tr> | ||
| 395 | + <td colspan="3">方向机</td> | ||
| 396 | + <td> </td> | ||
| 397 | + <td> </td> | ||
| 398 | + <td> </td> | ||
| 399 | + <td colspan="3">各类仪表</td> | ||
| 400 | + <td> </td> | ||
| 401 | + <td> </td> | ||
| 402 | + <td> </td> | ||
| 403 | + <td colspan="2" rowspan="2"> </td> | ||
| 404 | + </tr> | ||
| 405 | + <tr> | ||
| 406 | + <td colspan="3">欠压报警器</td> | ||
| 407 | + <td> </td> | ||
| 408 | + <td> </td> | ||
| 409 | + <td> </td> | ||
| 410 | + <td colspan="3">各类皮带</td> | ||
| 411 | + <td> </td> | ||
| 412 | + <td> </td> | ||
| 413 | + <td> </td> | ||
| 414 | + </tr> | ||
| 415 | + <tr> | ||
| 416 | + <td colspan="3">发动机清洁及响声</td> | ||
| 417 | + <td> </td> | ||
| 418 | + <td> </td> | ||
| 419 | + <td> </td> | ||
| 420 | + <td colspan="3">油箱及托架</td> | ||
| 421 | + <td> </td> | ||
| 422 | + <td> </td> | ||
| 423 | + <td> </td> | ||
| 424 | + <td colspan="2">出场路码表里程</td> | ||
| 425 | + </tr> | ||
| 426 | + <tr> | ||
| 427 | + <td colspan="3">地盘响声</td> | ||
| 428 | + <td> </td> | ||
| 429 | + <td> </td> | ||
| 430 | + <td> </td> | ||
| 431 | + <td colspan="3">轮胎、半轴螺栓螺母</td> | ||
| 432 | + <td> </td> | ||
| 433 | + <td> </td> | ||
| 434 | + <td> </td> | ||
| 435 | + <td colspan="2" rowspan="3"> </td> | ||
| 436 | + </tr> | ||
| 437 | + <tr> | ||
| 438 | + <td colspan="3">化油器及油路</td> | ||
| 439 | + <td> </td> | ||
| 440 | + <td> </td> | ||
| 441 | + <td> </td> | ||
| 442 | + <td colspan="3">油、电、水、气</td> | ||
| 443 | + <td> </td> | ||
| 444 | + <td> </td> | ||
| 445 | + <td> </td> | ||
| 446 | + </tr> | ||
| 447 | + <tr> | ||
| 448 | + <td colspan="3">进排歧管及排气管</td> | ||
| 449 | + <td> </td> | ||
| 450 | + <td> </td> | ||
| 451 | + <td> </td> | ||
| 452 | + <td colspan="3">内外车身及附件</td> | ||
| 453 | + <td> </td> | ||
| 454 | + <td> </td> | ||
| 455 | + <td> </td> | ||
| 456 | + </tr> | ||
| 457 | + <tr> | ||
| 458 | + <td colspan="14">1 首次出场,2 复使中途,3 某次进场。√正常,ⓧ报修,×尚未报修</td> | ||
| 459 | + </tr> | ||
| 460 | +</script> | ||
| 0 | \ No newline at end of file | 461 | \ No newline at end of file |
src/main/resources/static/pages/forms/statement/waybillday.html
| @@ -94,7 +94,7 @@ | @@ -94,7 +94,7 @@ | ||
| 94 | $("#query").on("click",function(){ | 94 | $("#query").on("click",function(){ |
| 95 | line = $("#line").val(); | 95 | line = $("#line").val(); |
| 96 | date = $("#date").val(); | 96 | date = $("#date").val(); |
| 97 | - $post('/mcy_forms/waybillday',{line:line,date:date},function(result){ | 97 | + $post('/mcy_forms/waybillday',{line:line,date:$("#date").val(),type:'query'},function(result){ |
| 98 | $.each(result, function(i, obj) { | 98 | $.each(result, function(i, obj) { |
| 99 | obj.requestType = reqCodeMap[obj.requestType]; | 99 | obj.requestType = reqCodeMap[obj.requestType]; |
| 100 | }); | 100 | }); |
src/main/resources/static/pages/oil/checkJyryList.html
| @@ -56,14 +56,15 @@ | @@ -56,14 +56,15 @@ | ||
| 56 | <tr role="row" class="heading"> | 56 | <tr role="row" class="heading"> |
| 57 | <th width="3%">#</th> | 57 | <th width="3%">#</th> |
| 58 | <th width="10%">日期</th> | 58 | <th width="10%">日期</th> |
| 59 | - <th width="8%">公司</th> | ||
| 60 | - <th width="8%">车辆</th> | 59 | + <th width="10%">公司</th> |
| 60 | + <th width="10%">分公司</th> | ||
| 61 | + <th width="6%">车辆</th> | ||
| 61 | <th width="10%">驾驶员</th> | 62 | <th width="10%">驾驶员</th> |
| 62 | - <th width="5%">加注量</th> | ||
| 63 | - <th width="5%">加油站</th> | ||
| 64 | - <th width="5%">加油类型</th> | 63 | + <th width="2%">加注量</th> |
| 64 | + <th width="4%">加油站</th> | ||
| 65 | + <th width="4%">加油类型</th> | ||
| 65 | <th width="5%">加油工工号</th> | 66 | <th width="5%">加油工工号</th> |
| 66 | - <th width="5%">油价</th> | 67 | + <th width="2%">油价</th> |
| 67 | <th width="5%">路单工号</th> | 68 | <th width="5%">路单工号</th> |
| 68 | <th width="4%">备注</th> | 69 | <th width="4%">备注</th> |
| 69 | <th width="19%">操作</th> | 70 | <th width="19%">操作</th> |
| @@ -74,7 +75,10 @@ | @@ -74,7 +75,10 @@ | ||
| 74 | <input type="text" id="yyrq" class="form-control form-filter input-sm" name="yyrq"> | 75 | <input type="text" id="yyrq" class="form-control form-filter input-sm" name="yyrq"> |
| 75 | </td> | 76 | </td> |
| 76 | <td> | 77 | <td> |
| 77 | - <input type="text" class="form-control form-filter input-sm" name="nbbm_like"> | 78 | +<!-- <select class="form-control" name="gsdm_like" id="jyryListGsdmId" ></select> --> |
| 79 | + </td> | ||
| 80 | + <td> | ||
| 81 | +<!-- <select class="form-control" name="fgsdm_like" id="jyryListFgsdmId" ></select> --> | ||
| 78 | </td> | 82 | </td> |
| 79 | <td> | 83 | <td> |
| 80 | </td> | 84 | </td> |
| @@ -114,7 +118,10 @@ | @@ -114,7 +118,10 @@ | ||
| 114 | </td> | 118 | </td> |
| 115 | <td>{{obj.yyrq}}</td> | 119 | <td>{{obj.yyrq}}</td> |
| 116 | <td> | 120 | <td> |
| 117 | - {{obj.gsdm}} | 121 | + {{obj.gsname}} |
| 122 | + </td> | ||
| 123 | + <td> | ||
| 124 | + {{obj.fgsname}} | ||
| 118 | </td> | 125 | </td> |
| 119 | <td> | 126 | <td> |
| 120 | {{obj.nbbm}} | 127 | {{obj.nbbm}} |
| @@ -173,15 +180,54 @@ $(function(){ | @@ -173,15 +180,54 @@ $(function(){ | ||
| 173 | radioClass: 'iradio_square-blue icheck', | 180 | radioClass: 'iradio_square-blue icheck', |
| 174 | increaseArea: '20%' | 181 | increaseArea: '20%' |
| 175 | } | 182 | } |
| 176 | - if($("#yyrq").val()!=""){ | ||
| 177 | - jsDoQuery(null,true); | ||
| 178 | - } | ||
| 179 | //重置 | 183 | //重置 |
| 180 | $('tr.filter .filter-cancel').on('click', function(){ | 184 | $('tr.filter .filter-cancel').on('click', function(){ |
| 181 | $('tr.filter input, select').val('').change(); | 185 | $('tr.filter input, select').val('').change(); |
| 182 | - jsDoQuery(null, true); | 186 | +// jsDoQuery(null, true); |
| 183 | }); | 187 | }); |
| 184 | 188 | ||
| 189 | + var gsqx=""; | ||
| 190 | + var fgsqx=""; | ||
| 191 | + | ||
| 192 | + $.get('/user/companyData', function(result){ | ||
| 193 | + obj = result; | ||
| 194 | + var options = '<option value="">请选择</option>'; | ||
| 195 | + for(var i = 0; i < obj.length; i++){ | ||
| 196 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 197 | + setFgsqx(obj[i].companyCode); | ||
| 198 | + gsqx +=obj[i].companyCode+","; | ||
| 199 | + } | ||
| 200 | + $('#jyryListGsdmId').html(options); | ||
| 201 | + updateCompany(); | ||
| 202 | + }); | ||
| 203 | + function setFgsqx(gs){ | ||
| 204 | + var company =gs | ||
| 205 | + var options = ''; | ||
| 206 | + for(var i = 0; i < obj.length; i++){ | ||
| 207 | + if(obj[i].companyCode == company){ | ||
| 208 | + var children = obj[i].children; | ||
| 209 | + for(var j = 0; j < children.length; j++){ | ||
| 210 | + fgsqx +=children[j].code+","; | ||
| 211 | + } | ||
| 212 | + } | ||
| 213 | + } | ||
| 214 | + } | ||
| 215 | + $("#jyryListGsdmId").on("change",updateCompany); | ||
| 216 | + function updateCompany(){ | ||
| 217 | + var company = $('#jyryListGsdmId').val(); | ||
| 218 | + var options = '<option value="">请选择</option>'; | ||
| 219 | + for(var i = 0; i < obj.length; i++){ | ||
| 220 | + if(obj[i].companyCode == company){ | ||
| 221 | + var children = obj[i].children; | ||
| 222 | + for(var j = 0; j < children.length; j++){ | ||
| 223 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 224 | + } | ||
| 225 | + } | ||
| 226 | + } | ||
| 227 | + $('#jyryListFgsdmId').html(options); | ||
| 228 | + } | ||
| 229 | + | ||
| 230 | + | ||
| 185 | //提交 | 231 | //提交 |
| 186 | $('tr.filter .filter-submit').on('click', function(){ | 232 | $('tr.filter .filter-submit').on('click', function(){ |
| 187 | if($("#yyrq").val()!=""){ | 233 | if($("#yyrq").val()!=""){ |
| @@ -216,7 +262,29 @@ $(function(){ | @@ -216,7 +262,29 @@ $(function(){ | ||
| 216 | params['order'] = 'nbbm'; | 262 | params['order'] = 'nbbm'; |
| 217 | params['page'] = page; | 263 | params['page'] = page; |
| 218 | params['yyrq']=$("#yyrq").val(); | 264 | params['yyrq']=$("#yyrq").val(); |
| 219 | - var i = layer.load(2); | 265 | +// var i = layer.load(2); |
| 266 | + | ||
| 267 | + var i = 2; | ||
| 268 | + /* var jyryGsdm=$("#jyryListGsdmId").val(); | ||
| 269 | + var jyryFgsdm=$("#jyryListFgsdmId").val(); | ||
| 270 | + if(jyryGsdm=="" || jyryGsdm==null){ | ||
| 271 | + params['gsdm_in']=gsqx; | ||
| 272 | + params['fgsdm_in']=fgsqx; | ||
| 273 | + }else{ | ||
| 274 | + if(jyryFgsdm==''||jyryFgsdm==null){ | ||
| 275 | + var fgsqx1=''; | ||
| 276 | + for(var i = 0; i < obj.length; i++){ | ||
| 277 | + if(obj[i].companyCode == jyryGsdm){ | ||
| 278 | + var children = obj[i].children; | ||
| 279 | + for(var j = 0; j < children.length; j++){ | ||
| 280 | + fgsqx1 +=children[j].code+","; | ||
| 281 | + } | ||
| 282 | + } | ||
| 283 | + } | ||
| 284 | + params['fgsdm_in']=fgsqx1; | ||
| 285 | + } | ||
| 286 | + } */ | ||
| 287 | + | ||
| 220 | $get('/ylxxb/pagequery' ,params, function(data){ | 288 | $get('/ylxxb/pagequery' ,params, function(data){ |
| 221 | $.each(data.dataList, function(i, obj) { | 289 | $.each(data.dataList, function(i, obj) { |
| 222 | obj.yyrq = moment(obj.yyrq).format("YYYY-MM-DD"); | 290 | obj.yyrq = moment(obj.yyrq).format("YYYY-MM-DD"); |
src/main/resources/static/pages/oil/cylAdd.html
| @@ -25,6 +25,20 @@ | @@ -25,6 +25,20 @@ | ||
| 25 | 您的输入有误,请检查下面的输入项 | 25 | 您的输入有误,请检查下面的输入项 |
| 26 | </div> | 26 | </div> |
| 27 | <div class="form-body"> | 27 | <div class="form-body"> |
| 28 | + <div class="form-group" id="gsdmDivId"> | ||
| 29 | + <label class="col-md-3 control-label">公司</label> | ||
| 30 | + <div class="col-md-4"> | ||
| 31 | + <select class="form-control" name="gsdm" id="gsdm" ></select> | ||
| 32 | + <span class="help-block"> 公司</span> | ||
| 33 | + </div> | ||
| 34 | + </div> | ||
| 35 | + <div class="form-group" id="fgsdmDivId"> | ||
| 36 | + <label class="col-md-3 control-label">分公司</label> | ||
| 37 | + <div class="col-md-4"> | ||
| 38 | + <select class="form-control" name="fgsdm" id="fgsdm" ></select> | ||
| 39 | + <span class="help-block"> 分公司</span> | ||
| 40 | + </div> | ||
| 41 | + </div> | ||
| 28 | <div class="form-group"> | 42 | <div class="form-group"> |
| 29 | <label class="col-md-3 control-label">内部编号</label> | 43 | <label class="col-md-3 control-label">内部编号</label> |
| 30 | <div class="col-md-4"> | 44 | <div class="col-md-4"> |
| @@ -63,11 +77,64 @@ | @@ -63,11 +77,64 @@ | ||
| 63 | var form = $('#cyl_add_form'); | 77 | var form = $('#cyl_add_form'); |
| 64 | var error = $('.alert-danger', form); | 78 | var error = $('.alert-danger', form); |
| 65 | 79 | ||
| 80 | + var obj = []; | ||
| 81 | + $.get('/user/companyData', function(result){ | ||
| 82 | + obj = result; | ||
| 83 | + var options = ''; | ||
| 84 | + for(var i = 0; i < obj.length; i++){ | ||
| 85 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + if(obj.length ==0){ | ||
| 89 | + $("#gsdmDivId").css('display','none'); | ||
| 90 | + $('#fgsdmDivId').css('display','none'); | ||
| 91 | + }else if(obj.length ==1){ | ||
| 92 | + $("#gsdmDivId").css('display','none'); | ||
| 93 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 94 | + $('#fgsdmDivId').css('display','none'); | ||
| 95 | + } | ||
| 96 | + $('#gsdm').html(options); | ||
| 97 | + updateCompany(); | ||
| 98 | + }); | ||
| 99 | + | ||
| 100 | + $("#gsdm").on("change",updateCompany); | ||
| 101 | + function updateCompany(){ | ||
| 102 | + var company = $('#gsdm').val(); | ||
| 103 | + var options = ''; | ||
| 104 | + for(var i = 0; i < obj.length; i++){ | ||
| 105 | + if(obj[i].companyCode == company){ | ||
| 106 | + var children = obj[i].children; | ||
| 107 | + for(var j = 0; j < children.length; j++){ | ||
| 108 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 109 | + } | ||
| 110 | + } | ||
| 111 | + } | ||
| 112 | + $('#fgsdm').html(options); | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + | ||
| 66 | //表单 validate | 116 | //表单 validate |
| 67 | form.validate({ | 117 | form.validate({ |
| 68 | errorElement : 'span', | 118 | errorElement : 'span', |
| 69 | errorClass : 'help-block help-block-error', | 119 | errorClass : 'help-block help-block-error', |
| 70 | focusInvalid : false, | 120 | focusInvalid : false, |
| 121 | + rules : { | ||
| 122 | + 'nbbm' : { | ||
| 123 | + minlength : 2, | ||
| 124 | + required : true, | ||
| 125 | + maxlength : 10 | ||
| 126 | + }, | ||
| 127 | + 'cyl' : { | ||
| 128 | + number:true, | ||
| 129 | + required : true, | ||
| 130 | + min:0 | ||
| 131 | + }, | ||
| 132 | + 'cxrl' : { | ||
| 133 | + number:true, | ||
| 134 | + required : true, | ||
| 135 | + min:0 | ||
| 136 | + } | ||
| 137 | + }, | ||
| 71 | invalidHandler : function(event, validator) { | 138 | invalidHandler : function(event, validator) { |
| 72 | error.show(); | 139 | error.show(); |
| 73 | App.scrollTo(error, -200); | 140 | App.scrollTo(error, -200); |
| @@ -88,7 +155,7 @@ | @@ -88,7 +155,7 @@ | ||
| 88 | submitHandler : function(f) { | 155 | submitHandler : function(f) { |
| 89 | var params = form.serializeJSON(); | 156 | var params = form.serializeJSON(); |
| 90 | error.hide(); | 157 | error.hide(); |
| 91 | - //检查一下用户是否存在 | 158 | + //检查一下车辆是否存在 |
| 92 | $get('/cyl/all', {nbbm_eq: params.nbbm}, function(list){ | 159 | $get('/cyl/all', {nbbm_eq: params.nbbm}, function(list){ |
| 93 | if(!list || list.length == 0){ | 160 | if(!list || list.length == 0){ |
| 94 | console.log(params); | 161 | console.log(params); |
src/main/resources/static/pages/oil/cylList.html
| @@ -55,16 +55,20 @@ | @@ -55,16 +55,20 @@ | ||
| 55 | <tr role="row" class="heading"> | 55 | <tr role="row" class="heading"> |
| 56 | <th width="3%">#</th> | 56 | <th width="3%">#</th> |
| 57 | <th width="15%">公司</th> | 57 | <th width="15%">公司</th> |
| 58 | - <th width="15%">车辆编码</th> | ||
| 59 | - <th width="15%">油箱存油</th> | ||
| 60 | - <th width="15%">车辆容量</th> | 58 | + <th width="15%">分公司</th> |
| 59 | + <th width="14%">车辆编码</th> | ||
| 60 | + <th width="8%">油箱存油</th> | ||
| 61 | + <th width="8%">车辆容量</th> | ||
| 61 | <th width="18%">最后更新时间</th> | 62 | <th width="18%">最后更新时间</th> |
| 62 | <th width="19%">操作</th> | 63 | <th width="19%">操作</th> |
| 63 | </tr> | 64 | </tr> |
| 64 | <tr role="row" class="filter"> | 65 | <tr role="row" class="filter"> |
| 65 | <td></td> | 66 | <td></td> |
| 66 | <td> | 67 | <td> |
| 67 | - <input type="text" class="form-control form-filter input-sm" name="gsdm_like"> | 68 | + <select class="form-control" name="gsdm_like" id="cylListGsdmId" ></select> |
| 69 | + </td> | ||
| 70 | + <td> | ||
| 71 | + <select class="form-control" name="fgsdm_like" id="cylListFgsdmId" ></select> | ||
| 68 | </td> | 72 | </td> |
| 69 | <td> | 73 | <td> |
| 70 | <input type="text" class="form-control form-filter input-sm" name="nbbm_like"> | 74 | <input type="text" class="form-control form-filter input-sm" name="nbbm_like"> |
| @@ -100,7 +104,10 @@ | @@ -100,7 +104,10 @@ | ||
| 100 | <input type="checkbox" class="group-checkable icheck" data-id="{{obj.id}}"> | 104 | <input type="checkbox" class="group-checkable icheck" data-id="{{obj.id}}"> |
| 101 | </td> | 105 | </td> |
| 102 | <td> | 106 | <td> |
| 103 | - {{obj.gsdm}} | 107 | + {{obj.gsname}} |
| 108 | + </td> | ||
| 109 | + <td> | ||
| 110 | + {{obj.fgsname}} | ||
| 104 | </td> | 111 | </td> |
| 105 | <td> | 112 | <td> |
| 106 | {{obj.nbbm}} | 113 | {{obj.nbbm}} |
| @@ -115,7 +122,7 @@ | @@ -115,7 +122,7 @@ | ||
| 115 | {{obj.updatetime}} | 122 | {{obj.updatetime}} |
| 116 | </td> | 123 | </td> |
| 117 | <td> | 124 | <td> |
| 118 | - <a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a> | 125 | + <!--<a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>--> |
| 119 | </td> | 126 | </td> |
| 120 | </tr> | 127 | </tr> |
| 121 | {{/each}} | 128 | {{/each}} |
| @@ -134,8 +141,50 @@ $(function(){ | @@ -134,8 +141,50 @@ $(function(){ | ||
| 134 | increaseArea: '20%' | 141 | increaseArea: '20%' |
| 135 | } | 142 | } |
| 136 | 143 | ||
| 137 | - jsDoQuery(null,true); | 144 | + var gsqx=""; |
| 145 | + var fgsqx=""; | ||
| 138 | 146 | ||
| 147 | + $.get('/user/companyData', function(result){ | ||
| 148 | + obj = result; | ||
| 149 | + var options = '<option value="">请选择</option>'; | ||
| 150 | + for(var i = 0; i < obj.length; i++){ | ||
| 151 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 152 | + setFgsqx(obj[i].companyCode); | ||
| 153 | + gsqx +=obj[i].companyCode+","; | ||
| 154 | + } | ||
| 155 | + $('#cylListGsdmId').html(options); | ||
| 156 | + updateCompany(); | ||
| 157 | + jsDoQuery(null,true); | ||
| 158 | + }); | ||
| 159 | + | ||
| 160 | + function setFgsqx(gs){ | ||
| 161 | + var company =gs | ||
| 162 | + var options = ''; | ||
| 163 | + for(var i = 0; i < obj.length; i++){ | ||
| 164 | + if(obj[i].companyCode == company){ | ||
| 165 | + var children = obj[i].children; | ||
| 166 | + for(var j = 0; j < children.length; j++){ | ||
| 167 | + fgsqx +=children[j].code+","; | ||
| 168 | + } | ||
| 169 | + } | ||
| 170 | + } | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + $("#cylListGsdmId").on("change",updateCompany); | ||
| 174 | + function updateCompany(){ | ||
| 175 | + var company = $('#cylListGsdmId').val(); | ||
| 176 | + var options = '<option value="">请选择</option>'; | ||
| 177 | + for(var i = 0; i < obj.length; i++){ | ||
| 178 | + if(obj[i].companyCode == company){ | ||
| 179 | + var children = obj[i].children; | ||
| 180 | + for(var j = 0; j < children.length; j++){ | ||
| 181 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 182 | + } | ||
| 183 | + } | ||
| 184 | + } | ||
| 185 | + $('#cylListFgsdmId').html(options); | ||
| 186 | + } | ||
| 187 | + | ||
| 139 | //重置 | 188 | //重置 |
| 140 | $('tr.filter .filter-cancel').on('click', function(){ | 189 | $('tr.filter .filter-cancel').on('click', function(){ |
| 141 | $('tr.filter input, select').val('').change(); | 190 | $('tr.filter input, select').val('').change(); |
| @@ -160,6 +209,8 @@ $(function(){ | @@ -160,6 +209,8 @@ $(function(){ | ||
| 160 | jsDoQuery(params, true); | 209 | jsDoQuery(params, true); |
| 161 | }); | 210 | }); |
| 162 | 211 | ||
| 212 | + | ||
| 213 | + | ||
| 163 | /* | 214 | /* |
| 164 | * 获取数据 p: 要提交的参数, pagination: 是否重新分页 | 215 | * 获取数据 p: 要提交的参数, pagination: 是否重新分页 |
| 165 | */ | 216 | */ |
| @@ -170,7 +221,27 @@ $(function(){ | @@ -170,7 +221,27 @@ $(function(){ | ||
| 170 | //更新时间排序 | 221 | //更新时间排序 |
| 171 | params['order'] = 'nbbm'; | 222 | params['order'] = 'nbbm'; |
| 172 | params['page'] = page; | 223 | params['page'] = page; |
| 173 | - var i = layer.load(2); | 224 | + var i = 2; |
| 225 | + var cylGsdm=$("#cylListGsdmId").val(); | ||
| 226 | + var cylFgsdm=$("#cylListFgsdmId").val(); | ||
| 227 | + if(cylGsdm==''|| cylGsdm==null){ | ||
| 228 | + params['gsdm_in']=gsqx; | ||
| 229 | + params['fgsdm_in']=fgsqx; | ||
| 230 | + }else{ | ||
| 231 | + if(cylFgsdm==''||cylFgsdm==null){ | ||
| 232 | + var fgsqx1=''; | ||
| 233 | + for(var i = 0; i < obj.length; i++){ | ||
| 234 | + if(obj[i].companyCode == cylGsdm){ | ||
| 235 | + var children = obj[i].children; | ||
| 236 | + for(var j = 0; j < children.length; j++){ | ||
| 237 | + fgsqx1 +=children[j].code+","; | ||
| 238 | + } | ||
| 239 | + } | ||
| 240 | + } | ||
| 241 | + params['fgsdm_in']=fgsqx1; | ||
| 242 | + } | ||
| 243 | + } | ||
| 244 | + console.log(params); | ||
| 174 | $get('/cyl' ,params, function(data){ | 245 | $get('/cyl' ,params, function(data){ |
| 175 | $.each(data.content, function(i, obj) { | 246 | $.each(data.content, function(i, obj) { |
| 176 | obj.updatetime = moment(obj.updatetime).format("YYYY-MM-DD"); | 247 | obj.updatetime = moment(obj.updatetime).format("YYYY-MM-DD"); |
| @@ -219,7 +290,19 @@ $(function(){ | @@ -219,7 +290,19 @@ $(function(){ | ||
| 219 | return; | 290 | return; |
| 220 | } | 291 | } |
| 221 | page = num - 1; | 292 | page = num - 1; |
| 222 | - jsDoQuery(null, false); | 293 | + var cells = $('tr.filter')[0].cells |
| 294 | + ,params = {} | ||
| 295 | + ,name; | ||
| 296 | + $.each(cells, function(i, cell){ | ||
| 297 | + var items = $('input,select', cell); | ||
| 298 | + for(var j = 0, item; item = items[j++];){ | ||
| 299 | + name = $(item).attr('name'); | ||
| 300 | + if(name){ | ||
| 301 | + params[name] = $(item).val(); | ||
| 302 | + } | ||
| 303 | + } | ||
| 304 | + }); | ||
| 305 | + jsDoQuery(params, false); | ||
| 223 | } | 306 | } |
| 224 | }); | 307 | }); |
| 225 | } | 308 | } |
src/main/resources/static/pages/oil/jyglList.html
| @@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
| 22 | class="caption-subject font-dark sbold uppercase">场外加油管理</span> | 22 | class="caption-subject font-dark sbold uppercase">场外加油管理</span> |
| 23 | </div> | 23 | </div> |
| 24 | <div class="actions"> | 24 | <div class="actions"> |
| 25 | - <a class="btn btn-circle blue" href="cylAdd.html" data-pjax><i class="fa fa-plus"></i> 添加</a> | 25 | +<!-- <a class="btn btn-circle blue" href="cylAdd.html" data-pjax><i class="fa fa-plus"></i> 添加</a> --> |
| 26 | <button type="button" class="btn btn-circle blue" id="saveButton"><i class="fa fa-minus-square"></i> 保存</button> | 26 | <button type="button" class="btn btn-circle blue" id="saveButton"><i class="fa fa-minus-square"></i> 保存</button> |
| 27 | <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> --> | 27 | <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> --> |
| 28 | <!-- <div class="btn-group"> | 28 | <!-- <div class="btn-group"> |
| @@ -56,18 +56,19 @@ | @@ -56,18 +56,19 @@ | ||
| 56 | id="datatable_cwjy"> | 56 | id="datatable_cwjy"> |
| 57 | <thead> | 57 | <thead> |
| 58 | <tr role="row" class="heading"> | 58 | <tr role="row" class="heading"> |
| 59 | - <th width="3%">#</th> | 59 | + <th width="2%">#</th> |
| 60 | <th width="10%">日期</th> | 60 | <th width="10%">日期</th> |
| 61 | - <th width="6%">公司</th> | ||
| 62 | - <th width="6%">车辆</th> | ||
| 63 | - <th width="12%">驾驶员</th> | ||
| 64 | - <th width="5%">加注量</th> | ||
| 65 | - <th width="5%">加油站</th> | ||
| 66 | - <th width="5%">加油类型</th> | 61 | + <th width="10%">公司</th> |
| 62 | + <th width="10%">分公司</th> | ||
| 63 | + <th width="8%">车辆</th> | ||
| 64 | + <th width="8%">驾驶员</th> | ||
| 65 | + <th width="3%">加注量</th> | ||
| 66 | + <th width="3%">加油站</th> | ||
| 67 | + <th width="3%">加油类型</th> | ||
| 67 | <th width="5%">加油工工号</th> | 68 | <th width="5%">加油工工号</th> |
| 68 | - <th width="5%">油价</th> | ||
| 69 | - <th width="6%">路单工号</th> | ||
| 70 | - <th width="5%">备注</th> | 69 | + <th width="3%">油价</th> |
| 70 | + <th width="4%">路单工号</th> | ||
| 71 | + <th width="4%">备注</th> | ||
| 71 | <th width="19%">操作</th> | 72 | <th width="19%">操作</th> |
| 72 | </tr> | 73 | </tr> |
| 73 | <tr role="row" class="filter"> | 74 | <tr role="row" class="filter"> |
| @@ -76,10 +77,13 @@ | @@ -76,10 +77,13 @@ | ||
| 76 | <input type="text" id="rq" class="form-control form-filter input-sm" name="rq"> | 77 | <input type="text" id="rq" class="form-control form-filter input-sm" name="rq"> |
| 77 | </td> | 78 | </td> |
| 78 | <td> | 79 | <td> |
| 79 | - <input type="text" class="form-control form-filter input-sm" name="nbbm_like"> | 80 | + <select class="form-control" name="gsdm_like" id="jyglListGsdmId" ></select> |
| 80 | </td> | 81 | </td> |
| 81 | <td> | 82 | <td> |
| 82 | - <input type="hidden" class="form-control form-filter input-sm" name="nbbh" id="nbbh"> | 83 | + <select class="form-control" name="fgsdm_like" id="jyglListFgsdmId" ></select> |
| 84 | + </td> | ||
| 85 | + <td> | ||
| 86 | + <input type="text" class="form-control form-filter input-sm" name="nbbh" id="nbbh"> | ||
| 83 | </td> | 87 | </td> |
| 84 | <td></td> | 88 | <td></td> |
| 85 | <td></td> | 89 | <td></td> |
| @@ -117,7 +121,10 @@ | @@ -117,7 +121,10 @@ | ||
| 117 | </td> | 121 | </td> |
| 118 | <td>{{obj.yyrq}}</td> | 122 | <td>{{obj.yyrq}}</td> |
| 119 | <td> | 123 | <td> |
| 120 | - {{obj.gsdm}} | 124 | + {{obj.gsname}} |
| 125 | + </td> | ||
| 126 | + <td> | ||
| 127 | + {{obj.fgsname}} | ||
| 121 | </td> | 128 | </td> |
| 122 | <td> | 129 | <td> |
| 123 | {{obj.nbbm}} | 130 | {{obj.nbbm}} |
| @@ -162,7 +169,22 @@ $(function(){ | @@ -162,7 +169,22 @@ $(function(){ | ||
| 162 | params['jsy']=jsy; | 169 | params['jsy']=jsy; |
| 163 | params['id']=id; | 170 | params['id']=id; |
| 164 | $get('/ylxxb/check', params, function(){ | 171 | $get('/ylxxb/check', params, function(){ |
| 165 | - jsDoQuery(null,true); | 172 | + if($("#rq").val()!=""){ |
| 173 | + var cells = $('tr.filter')[0].cells | ||
| 174 | + ,params = {} | ||
| 175 | + ,name; | ||
| 176 | + $.each(cells, function(i, cell){ | ||
| 177 | + var items = $('input,select', cell); | ||
| 178 | + for(var j = 0, item; item = items[j++];){ | ||
| 179 | + name = $(item).attr('name'); | ||
| 180 | + if(name){ | ||
| 181 | + params[name] = $(item).val(); | ||
| 182 | + } | ||
| 183 | + } | ||
| 184 | + }); | ||
| 185 | + jsDoQuery(params,true); | ||
| 186 | + } | ||
| 187 | + | ||
| 166 | }); | 188 | }); |
| 167 | } | 189 | } |
| 168 | }) | 190 | }) |
| @@ -176,15 +198,68 @@ $(function(){ | @@ -176,15 +198,68 @@ $(function(){ | ||
| 176 | radioClass: 'iradio_square-blue icheck', | 198 | radioClass: 'iradio_square-blue icheck', |
| 177 | increaseArea: '20%' | 199 | increaseArea: '20%' |
| 178 | } | 200 | } |
| 179 | - if($("#rq").val()!=""){ | ||
| 180 | - jsDoQuery(null,true); | ||
| 181 | - } | 201 | + |
| 182 | //重置 | 202 | //重置 |
| 183 | $('tr.filter .filter-cancel').on('click', function(){ | 203 | $('tr.filter .filter-cancel').on('click', function(){ |
| 184 | $('tr.filter input, select').val('').change(); | 204 | $('tr.filter input, select').val('').change(); |
| 185 | - jsDoQuery(null, true); | 205 | + if($("#rq").val()!=""){ |
| 206 | + var cells = $('tr.filter')[0].cells | ||
| 207 | + ,params = {} | ||
| 208 | + ,name; | ||
| 209 | + $.each(cells, function(i, cell){ | ||
| 210 | + var items = $('input,select', cell); | ||
| 211 | + for(var j = 0, item; item = items[j++];){ | ||
| 212 | + name = $(item).attr('name'); | ||
| 213 | + if(name){ | ||
| 214 | + params[name] = $(item).val(); | ||
| 215 | + } | ||
| 216 | + } | ||
| 217 | + }); | ||
| 218 | + jsDoQuery(params, true); | ||
| 219 | + } | ||
| 186 | }); | 220 | }); |
| 187 | 221 | ||
| 222 | + | ||
| 223 | + var gsqx=""; | ||
| 224 | + var fgsqx=""; | ||
| 225 | + | ||
| 226 | + $.get('/user/companyData', function(result){ | ||
| 227 | + obj = result; | ||
| 228 | + var options = '<option value="">请选择</option>'; | ||
| 229 | + for(var i = 0; i < obj.length; i++){ | ||
| 230 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 231 | + setFgsqx(obj[i].companyCode); | ||
| 232 | + gsqx +=obj[i].companyCode+","; | ||
| 233 | + } | ||
| 234 | + $('#jyglListGsdmId').html(options); | ||
| 235 | + updateCompany(); | ||
| 236 | + }); | ||
| 237 | + function setFgsqx(gs){ | ||
| 238 | + var company =gs | ||
| 239 | + var options = ''; | ||
| 240 | + for(var i = 0; i < obj.length; i++){ | ||
| 241 | + if(obj[i].companyCode == company){ | ||
| 242 | + var children = obj[i].children; | ||
| 243 | + for(var j = 0; j < children.length; j++){ | ||
| 244 | + fgsqx +=children[j].code+","; | ||
| 245 | + } | ||
| 246 | + } | ||
| 247 | + } | ||
| 248 | + } | ||
| 249 | + $("#jyglListGsdmId").on("change",updateCompany); | ||
| 250 | + function updateCompany(){ | ||
| 251 | + var company = $('#jyglListGsdmId').val(); | ||
| 252 | + var options = '<option value="">请选择</option>'; | ||
| 253 | + for(var i = 0; i < obj.length; i++){ | ||
| 254 | + if(obj[i].companyCode == company){ | ||
| 255 | + var children = obj[i].children; | ||
| 256 | + for(var j = 0; j < children.length; j++){ | ||
| 257 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 258 | + } | ||
| 259 | + } | ||
| 260 | + } | ||
| 261 | + $('#jyglListFgsdmId').html(options); | ||
| 262 | + } | ||
| 188 | //提交 | 263 | //提交 |
| 189 | $('tr.filter .filter-submit').on('click', function(){ | 264 | $('tr.filter .filter-submit').on('click', function(){ |
| 190 | if($("#rq").val()!=""){ | 265 | if($("#rq").val()!=""){ |
| @@ -219,10 +294,30 @@ $(function(){ | @@ -219,10 +294,30 @@ $(function(){ | ||
| 219 | params['order'] = 'nbbm'; | 294 | params['order'] = 'nbbm'; |
| 220 | params['page'] = page; | 295 | params['page'] = page; |
| 221 | params['rq']=$("#rq").val(); | 296 | params['rq']=$("#rq").val(); |
| 222 | - var i = layer.load(2); | 297 | + |
| 298 | + var i = 2; | ||
| 299 | + var jyglGsdm=$("#jyglListGsdmId").val(); | ||
| 300 | + var jyglFgsdm=$("#jyglListFgsdmId").val(); | ||
| 301 | + if(jyglGsdm=="" || jyglGsdm==null){ | ||
| 302 | + params['gsdm_in']=gsqx; | ||
| 303 | + params['fgsdm_in']=fgsqx; | ||
| 304 | + }else{ | ||
| 305 | + if(jyglFgsdm==''||jyglFgsdm==null){ | ||
| 306 | + var fgsqx1=''; | ||
| 307 | + for(var i = 0; i < obj.length; i++){ | ||
| 308 | + if(obj[i].companyCode == jyglGsdm){ | ||
| 309 | + var children = obj[i].children; | ||
| 310 | + for(var j = 0; j < children.length; j++){ | ||
| 311 | + fgsqx1 +=children[j].code+","; | ||
| 312 | + } | ||
| 313 | + } | ||
| 314 | + } | ||
| 315 | + params['fgsdm_in']=fgsqx1; | ||
| 316 | + } | ||
| 317 | + } | ||
| 223 | $get('/cwjy/pagequery' ,params, function(data){ | 318 | $get('/cwjy/pagequery' ,params, function(data){ |
| 224 | $.each(data.dataList, function(i, obj) { | 319 | $.each(data.dataList, function(i, obj) { |
| 225 | - obj.yyrq = moment(obj.yyrq).format("YYYY-MM-DD"); | 320 | + obj.yyrq = $("#rq").val(); |
| 226 | }); | 321 | }); |
| 227 | var bodyHtm = template('jygl_list_temp', {list: data.dataList}); | 322 | var bodyHtm = template('jygl_list_temp', {list: data.dataList}); |
| 228 | $('#datatable_cwjy tbody').html(bodyHtm) | 323 | $('#datatable_cwjy tbody').html(bodyHtm) |
| @@ -273,9 +368,11 @@ $(function(){ | @@ -273,9 +368,11 @@ $(function(){ | ||
| 273 | return; | 368 | return; |
| 274 | } | 369 | } |
| 275 | page = num - 1; | 370 | page = num - 1; |
| 276 | - jsDoQuery(null, false); | 371 | + |
| 372 | + jsDoQuery(null, false); | ||
| 277 | } | 373 | } |
| 278 | }); | 374 | }); |
| 375 | + | ||
| 279 | } | 376 | } |
| 280 | 377 | ||
| 281 | 378 |
src/main/resources/static/pages/oil/jyszAdd.html
| @@ -17,15 +17,18 @@ | @@ -17,15 +17,18 @@ | ||
| 17 | 您的输入有误,请检查下面的输入项 | 17 | 您的输入有误,请检查下面的输入项 |
| 18 | </div> | 18 | </div> |
| 19 | <div class="form-body"> | 19 | <div class="form-body"> |
| 20 | - <div class="form-group"> | 20 | + <div class="form-group" id="gsdmDivId"> |
| 21 | <label class="col-md-3 control-label">公司</label> | 21 | <label class="col-md-3 control-label">公司</label> |
| 22 | - <div class="col-md-9"> | ||
| 23 | - <select class="form-control input-medium " name="gsdm"> | ||
| 24 | - <option value="22">金高公交</option> | ||
| 25 | - <option value="05">杨高公交</option> | ||
| 26 | - <option value="55">上南公交</option> | ||
| 27 | - <option value="26">南汇公交</option> | ||
| 28 | - </select> | 22 | + <div class="col-md-4"> |
| 23 | + <select class="form-control" name="gsdm" id="gsdm" ></select> | ||
| 24 | + <span class="help-block"> 公司</span> | ||
| 25 | + </div> | ||
| 26 | + </div> | ||
| 27 | + <div class="form-group" id="fgsdmDivId"> | ||
| 28 | + <label class="col-md-3 control-label">分公司</label> | ||
| 29 | + <div class="col-md-4"> | ||
| 30 | + <select class="form-control" name="fgsdm" id="fgsdm" ></select> | ||
| 31 | + <span class="help-block"> 分公司</span> | ||
| 29 | </div> | 32 | </div> |
| 30 | </div> | 33 | </div> |
| 31 | <div class="form-group"> | 34 | <div class="form-group"> |
| @@ -51,7 +54,41 @@ $(function(){ | @@ -51,7 +54,41 @@ $(function(){ | ||
| 51 | 54 | ||
| 52 | var form = $('#jysz_add_form'); | 55 | var form = $('#jysz_add_form'); |
| 53 | var error = $('.alert-danger', form); | 56 | var error = $('.alert-danger', form); |
| 54 | - | 57 | + var obj = []; |
| 58 | + $.get('/user/companyData', function(result){ | ||
| 59 | + obj = result; | ||
| 60 | + var options = ''; | ||
| 61 | + for(var i = 0; i < obj.length; i++){ | ||
| 62 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + if(obj.length ==0){ | ||
| 66 | + $("#gsdmDivId").css('display','none'); | ||
| 67 | + $('#fgsdmDivId').css('display','none'); | ||
| 68 | + }else if(obj.length ==1){ | ||
| 69 | + $("#gsdmDivId").css('display','none'); | ||
| 70 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 71 | + $('#fgsdmDivId').css('display','none'); | ||
| 72 | + } | ||
| 73 | + $('#gsdm').html(options); | ||
| 74 | + updateCompany(); | ||
| 75 | + }); | ||
| 76 | + | ||
| 77 | + $("#gsdm").on("change",updateCompany); | ||
| 78 | + function updateCompany(){ | ||
| 79 | + var company = $('#gsdm').val(); | ||
| 80 | + var options = ''; | ||
| 81 | + for(var i = 0; i < obj.length; i++){ | ||
| 82 | + if(obj[i].companyCode == company){ | ||
| 83 | + var children = obj[i].children; | ||
| 84 | + for(var j = 0; j < children.length; j++){ | ||
| 85 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 86 | + } | ||
| 87 | + } | ||
| 88 | + } | ||
| 89 | + $('#fgsdm').html(options); | ||
| 90 | + } | ||
| 91 | + | ||
| 55 | //提交 | 92 | //提交 |
| 56 | $('#addJyszModuleButton').on('click', function() { | 93 | $('#addJyszModuleButton').on('click', function() { |
| 57 | form.submit(); | 94 | form.submit(); |
| @@ -95,6 +132,11 @@ $(function(){ | @@ -95,6 +132,11 @@ $(function(){ | ||
| 95 | }); | 132 | }); |
| 96 | } | 133 | } |
| 97 | }); | 134 | }); |
| 135 | + | ||
| 136 | + function refreshJsTree(){ | ||
| 137 | + var pjaxContainer = '#monde-page'; | ||
| 138 | + $.pjax({url: "/pages/oil/jyszList.html", container: pjaxContainer}) | ||
| 139 | + } | ||
| 98 | /* $('#nbbm').select2({ | 140 | /* $('#nbbm').select2({ |
| 99 | placeholder: '搜索车辆...', | 141 | placeholder: '搜索车辆...', |
| 100 | ajax: { | 142 | ajax: { |
src/main/resources/static/pages/oil/jyszList.html
| @@ -57,8 +57,9 @@ | @@ -57,8 +57,9 @@ | ||
| 57 | <thead> | 57 | <thead> |
| 58 | <tr role="row" class="heading"> | 58 | <tr role="row" class="heading"> |
| 59 | <th width="3%">#</th> | 59 | <th width="3%">#</th> |
| 60 | - <th width="18%">公司</th> | ||
| 61 | - <th width="20%">车辆</th> | 60 | + <th width="15%">公司</th> |
| 61 | + <th width="13%">分公司</th> | ||
| 62 | + <th width="10%">车辆</th> | ||
| 62 | <th width="10%">修改人</th> | 63 | <th width="10%">修改人</th> |
| 63 | <th width="20%">日期</th> | 64 | <th width="20%">日期</th> |
| 64 | <th width="19%">操作</th> | 65 | <th width="19%">操作</th> |
| @@ -66,7 +67,10 @@ | @@ -66,7 +67,10 @@ | ||
| 66 | <tr role="row" class="filter"> | 67 | <tr role="row" class="filter"> |
| 67 | <td></td> | 68 | <td></td> |
| 68 | <td> | 69 | <td> |
| 69 | - <input type="text" class="form-control form-filter input-sm" name="gsdm_like"> | 70 | + <select class="form-control" name="gsdm_like" id="jyszListGsdmId" ></select> |
| 71 | + </td> | ||
| 72 | + <td> | ||
| 73 | + <select class="form-control" name="fgsdm_like" id="jyszListFgsdmId" ></select> | ||
| 70 | </td> | 74 | </td> |
| 71 | <td> | 75 | <td> |
| 72 | <input type="text" class="form-control form-filter input-sm" name="nbbm_like"> | 76 | <input type="text" class="form-control form-filter input-sm" name="nbbm_like"> |
| @@ -100,7 +104,8 @@ | @@ -100,7 +104,8 @@ | ||
| 100 | <td style="vertical-align: middle;"> | 104 | <td style="vertical-align: middle;"> |
| 101 | <input type="checkbox" class="group-checkable icheck" data-id="{{obj.id}}"> | 105 | <input type="checkbox" class="group-checkable icheck" data-id="{{obj.id}}"> |
| 102 | </td> | 106 | </td> |
| 103 | - <td>{{obj.gsdm}}</td> | 107 | + <td>{{obj.gsname}}</td> |
| 108 | + <td>{{obj.fgsname}}</td> | ||
| 104 | <td>{{obj.nbbm}}</td> | 109 | <td>{{obj.nbbm}}</td> |
| 105 | <td>{{obj.xgr}}</td> | 110 | <td>{{obj.xgr}}</td> |
| 106 | <td>{{obj.createDate}}</td> | 111 | <td>{{obj.createDate}}</td> |
| @@ -122,8 +127,48 @@ $(function(){ | @@ -122,8 +127,48 @@ $(function(){ | ||
| 122 | checkboxClass: 'icheckbox_flat-blue', | 127 | checkboxClass: 'icheckbox_flat-blue', |
| 123 | increaseArea: '20%' | 128 | increaseArea: '20%' |
| 124 | } | 129 | } |
| 130 | + var gsqx=""; | ||
| 131 | + var fgsqx=""; | ||
| 132 | + $.get('/user/companyData', function(result){ | ||
| 133 | + obj = result; | ||
| 134 | + var options = '<option value="">请选择</option>'; | ||
| 135 | + for(var i = 0; i < obj.length; i++){ | ||
| 136 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 137 | + setFgsqx(obj[i].companyCode); | ||
| 138 | + gsqx +=obj[i].companyCode+","; | ||
| 139 | + } | ||
| 140 | + $('#jyszListGsdmId').html(options); | ||
| 141 | + updateCompany(); | ||
| 142 | + jsDoQuery(null,true); | ||
| 143 | + }); | ||
| 144 | + | ||
| 145 | + function setFgsqx(gs){ | ||
| 146 | + var company =gs | ||
| 147 | + for(var i = 0; i < obj.length; i++){ | ||
| 148 | + if(obj[i].companyCode == company){ | ||
| 149 | + var children = obj[i].children; | ||
| 150 | + for(var j = 0; j < children.length; j++){ | ||
| 151 | + fgsqx +=children[j].code+","; | ||
| 152 | + } | ||
| 153 | + } | ||
| 154 | + } | ||
| 155 | + } | ||
| 156 | + $("#jyszListGsdmId").on("change",updateCompany); | ||
| 157 | + function updateCompany(){ | ||
| 158 | + var company = $('#jyszListGsdmId').val(); | ||
| 159 | + var options = ''; | ||
| 160 | + for(var i = 0; i < obj.length; i++){ | ||
| 161 | + if(obj[i].companyCode == company){ | ||
| 162 | + var children = obj[i].children; | ||
| 163 | + options += '<option value="">请选择</option>'; | ||
| 164 | + for(var j = 0; j < children.length; j++){ | ||
| 165 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 166 | + } | ||
| 167 | + } | ||
| 168 | + } | ||
| 169 | + $('#jyszListFgsdmId').html(options); | ||
| 170 | + } | ||
| 125 | 171 | ||
| 126 | - jsDoQuery(null,true); | ||
| 127 | 172 | ||
| 128 | //重置 | 173 | //重置 |
| 129 | $('tr.filter .filter-cancel').on('click', function(){ | 174 | $('tr.filter .filter-cancel').on('click', function(){ |
| @@ -153,6 +198,7 @@ $(function(){ | @@ -153,6 +198,7 @@ $(function(){ | ||
| 153 | * 获取数据 p: 要提交的参数, pagination: 是否重新分页 | 198 | * 获取数据 p: 要提交的参数, pagination: 是否重新分页 |
| 154 | */ | 199 | */ |
| 155 | function jsDoQuery(p, pagination){ | 200 | function jsDoQuery(p, pagination){ |
| 201 | + | ||
| 156 | var params = {}; | 202 | var params = {}; |
| 157 | if(p) | 203 | if(p) |
| 158 | params = p; | 204 | params = p; |
| @@ -160,6 +206,25 @@ $(function(){ | @@ -160,6 +206,25 @@ $(function(){ | ||
| 160 | params['order'] = 'nbbm'; | 206 | params['order'] = 'nbbm'; |
| 161 | params['page'] = page; | 207 | params['page'] = page; |
| 162 | var i = layer.load(2); | 208 | var i = layer.load(2); |
| 209 | + var jyszGsdm=$("#jyszListGsdmId").val(); | ||
| 210 | + var jyszFgsdm=$("#jyszListFgsdmId").val(); | ||
| 211 | + if(jyszGsdm==''|| jyszGsdm==null){ | ||
| 212 | + params['gsdm_in']=gsqx; | ||
| 213 | + params['fgsdm_in']=fgsqx; | ||
| 214 | + }else{ | ||
| 215 | + if(jyszFgsdm==''||jyszFgsdm==null){ | ||
| 216 | + var fgsqx1=''; | ||
| 217 | + for(var i = 0; i < obj.length; i++){ | ||
| 218 | + if(obj[i].companyCode == jyszGsdm){ | ||
| 219 | + var children = obj[i].children; | ||
| 220 | + for(var j = 0; j < children.length; j++){ | ||
| 221 | + fgsqx1 +=children[j].code+","; | ||
| 222 | + } | ||
| 223 | + } | ||
| 224 | + } | ||
| 225 | + params['fgsdm_in']=fgsqx1; | ||
| 226 | + } | ||
| 227 | + } | ||
| 163 | $get('/cwjy' ,params, function(data){ | 228 | $get('/cwjy' ,params, function(data){ |
| 164 | $.each(data.content, function(i, obj) { | 229 | $.each(data.content, function(i, obj) { |
| 165 | obj.createDate = moment(obj.createDate).format("YYYY-MM-DD"); | 230 | obj.createDate = moment(obj.createDate).format("YYYY-MM-DD"); |
| @@ -208,7 +273,19 @@ $(function(){ | @@ -208,7 +273,19 @@ $(function(){ | ||
| 208 | return; | 273 | return; |
| 209 | } | 274 | } |
| 210 | page = num - 1; | 275 | page = num - 1; |
| 211 | - jsDoQuery(null, false); | 276 | + var cells = $('tr.filter')[0].cells |
| 277 | + ,params = {} | ||
| 278 | + ,name; | ||
| 279 | + $.each(cells, function(i, cell){ | ||
| 280 | + var items = $('input,select', cell); | ||
| 281 | + for(var j = 0, item; item = items[j++];){ | ||
| 282 | + name = $(item).attr('name'); | ||
| 283 | + if(name){ | ||
| 284 | + params[name] = $(item).val(); | ||
| 285 | + } | ||
| 286 | + } | ||
| 287 | + }); | ||
| 288 | + jsDoQuery(params, false); | ||
| 212 | } | 289 | } |
| 213 | }); | 290 | }); |
| 214 | } | 291 | } |
| @@ -230,19 +307,10 @@ $(function(){ | @@ -230,19 +307,10 @@ $(function(){ | ||
| 230 | $('#addJysz').on('click', function(){ | 307 | $('#addJysz').on('click', function(){ |
| 231 | $.get('jyszAdd.html', function(m){$(pjaxContainer).append(m);}); | 308 | $.get('jyszAdd.html', function(m){$(pjaxContainer).append(m);}); |
| 232 | }); | 309 | }); |
| 310 | + | ||
| 311 | + | ||
| 233 | }); | 312 | }); |
| 234 | 313 | ||
| 235 | -function refreshJsTree(){ | ||
| 236 | - var pjaxContainer = '#monde-page'; | ||
| 237 | - $.pjax({url: "/pages/oil/jyszList.html", container: pjaxContainer}) | ||
| 238 | -} | ||
| 239 | -//改变状态 | ||
| 240 | -function changeEnabled(id,enabled){ | ||
| 241 | - debugger | ||
| 242 | - $get('/user/changeEnabled',{id:id,enabled:enabled},function(result){ | ||
| 243 | - jsDoQuery(null, true); | ||
| 244 | - }) | ||
| 245 | -} | ||
| 246 | 314 | ||
| 247 | 315 | ||
| 248 | </script> | 316 | </script> |
| 249 | \ No newline at end of file | 317 | \ No newline at end of file |
src/main/resources/static/pages/report/timetable/timetable.html
| @@ -27,6 +27,14 @@ | @@ -27,6 +27,14 @@ | ||
| 27 | <div class="portlet light porttlet-fit bordered"> | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | <div class="portlet-title"> | 28 | <div class="portlet-title"> |
| 29 | <form class="form-inline" action=""> | 29 | <form class="form-inline" action=""> |
| 30 | + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_time"> | ||
| 31 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 32 | + <select class="form-control" name="company" id="gsdmTime" style="width: 140px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_time"> | ||
| 35 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 36 | + <select class="form-control" name="subCompany" id="fgsdmTime" style="width: 140px;"></select> | ||
| 37 | + </div> | ||
| 30 | <div style="display: inline-block;"> | 38 | <div style="display: inline-block;"> |
| 31 | <span class="item-label" style="width: 80px;">线路: </span> | 39 | <span class="item-label" style="width: 80px;">线路: </span> |
| 32 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> | 40 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| @@ -193,7 +201,40 @@ | @@ -193,7 +201,40 @@ | ||
| 193 | locale : 'zh-cn' | 201 | locale : 'zh-cn' |
| 194 | }); | 202 | }); |
| 195 | 203 | ||
| 204 | + var obj = []; | ||
| 205 | + $.get('/user/companyData', function(result){ | ||
| 206 | + obj = result; | ||
| 207 | + var options = ''; | ||
| 208 | + for(var i = 0; i < obj.length; i++){ | ||
| 209 | + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 210 | + } | ||
| 211 | + | ||
| 212 | + if(obj.length ==0){ | ||
| 213 | + $("#gsdmDiv_time").css('display','none'); | ||
| 214 | + $('#fgsdmDiv_time').css('display','none'); | ||
| 215 | + }else if(obj.length ==1){ | ||
| 216 | + $("#gsdmDiv_time").css('display','none'); | ||
| 217 | + if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 218 | + $('#fgsdmDiv_time').css('display','none'); | ||
| 219 | + } | ||
| 220 | + $('#gsdmTime').html(options); | ||
| 221 | + updateCompany(); | ||
| 222 | + }); | ||
| 196 | 223 | ||
| 224 | + $("#gsdmTime").on("change",updateCompany); | ||
| 225 | + function updateCompany(){ | ||
| 226 | + var company = $('#gsdmTime').val(); | ||
| 227 | + var options = ''; | ||
| 228 | + for(var i = 0; i < obj.length; i++){ | ||
| 229 | + if(obj[i].companyCode == company){ | ||
| 230 | + var children = obj[i].children; | ||
| 231 | + for(var j = 0; j < children.length; j++){ | ||
| 232 | + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 233 | + } | ||
| 234 | + } | ||
| 235 | + } | ||
| 236 | + $('#fgsdmTime').html(options); | ||
| 237 | + } | ||
| 197 | 238 | ||
| 198 | $.get('/basic/lineCode2Name',function(result){ | 239 | $.get('/basic/lineCode2Name',function(result){ |
| 199 | var data=[]; | 240 | var data=[]; |
| @@ -206,6 +247,8 @@ | @@ -206,6 +247,8 @@ | ||
| 206 | }) | 247 | }) |
| 207 | //查询 | 248 | //查询 |
| 208 | $("#query").on('click',function(){ | 249 | $("#query").on('click',function(){ |
| 250 | + console.log($("#gsdmTime").val()); | ||
| 251 | + console.log($("#fgsdmTime").val()); | ||
| 209 | var line = $("#line").val(); | 252 | var line = $("#line").val(); |
| 210 | var xlName = $("#select2-line-container").html(); | 253 | var xlName = $("#select2-line-container").html(); |
| 211 | var date = $("#date").val(); | 254 | var date = $("#date").val(); |