Commit 23f73f0052d2d7151aa0d3b44d45c115ef5f897c

Authored by 廖磊
2 parents b07324df fc2ceb7d

Merge branch 'minhang' of 192.168.168.201:panzhaov5/bsth_control into

minhang
Showing 25 changed files with 2130 additions and 534 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,198 @@ public class ExportController { @@ -228,96 +223,198 @@ 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 -  
279 - //换人换车情况日统计  
280 - @RequestMapping(value = "/changetochangeExport",method = RequestMethod.POST)  
281 - public List<Map<String, Object>> changetochangeExport(@RequestParam Map<String, Object> map){  
282 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),  
283 - sdfSimple = new SimpleDateFormat("yyyyMMdd");  
284 - List<Iterator<?>> listI = new ArrayList<Iterator<?>>();  
285 - ReportUtils ee = new ReportUtils();  
286 - List<Changetochange> changetochange = formsService.changetochange(map);  
287 - List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();  
288 - for(Changetochange l : changetochange){ 271 +
  272 + // 换人换车情况日统计
  273 + @RequestMapping(value = "/changetochangeExport", method = RequestMethod.POST)
  274 + public List<Map<String, Object>> changetochangeExport(@RequestParam Map<String, Object> map) {
  275 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
  276 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  277 + ReportUtils ee = new ReportUtils();
  278 + List<Changetochange> changetochange = formsService.changetochange(map);
  279 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  280 + for (Changetochange l : changetochange) {
  281 + Map<String, Object> m = new HashMap<String, Object>();
  282 + m.put("rq", l.getRq());
  283 + m.put("gs", l.getGs());
  284 + m.put("fgs", l.getFgs());
  285 + m.put("xl", l.getXl());
  286 + m.put("lp", l.getLp());
  287 + m.put("fssj", l.getFssj());
  288 + m.put("xgsj", l.getXgsj());
  289 + m.put("pcch", l.getPcch());
  290 + m.put("pcry", l.getPcry());
  291 + m.put("jhch", l.getJhch());
  292 + m.put("jhgh", l.getJhgh());
  293 + m.put("sjch", l.getSjch());
  294 + m.put("sjgh", l.getSjgh());
  295 + m.put("yy", l.getYy());
  296 + m.put("xgr", l.getXgr());
  297 + resList.add(m);
  298 + }
  299 +
  300 + try {
  301 + listI.add(resList.iterator());
  302 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  303 + ee.excelReplace(listI, new Object[] { map }, path + "mould\\changetochange.xls", path + "export\\换人换车情况日统计"
  304 + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  305 + } catch (Exception e) {
  306 + e.printStackTrace();
  307 + }
  308 + return resList;
  309 + }
  310 +
  311 + // 营运线路出车率统计表
  312 + @RequestMapping(value = "/turnoutrateExport", method = RequestMethod.POST)
  313 + public List<Map<String, Object>> turnoutrateExport(@RequestParam Map<String, Object> map) {
  314 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
  315 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  316 + ReportUtils ee = new ReportUtils();
  317 + List<Turnoutrate> turnoutrate = formsService.turnoutrate(map);
  318 + Map<String, Object> map1 = new HashMap<String, Object>();
  319 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  320 + for (Turnoutrate l : turnoutrate) {
289 Map<String, Object> m = new HashMap<String, Object>(); 321 Map<String, Object> m = new HashMap<String, Object>();
290 - m.put("rq",l.getRq());  
291 - m.put("gs",l.getGs());  
292 - m.put("fgs",l.getFgs());  
293 - m.put("xl",l.getXl());  
294 - m.put("lp",l.getLp());  
295 - m.put("fssj",l.getFssj());  
296 - m.put("xgsj",l.getXgsj());  
297 - m.put("pcch",l.getPcch());  
298 - m.put("pcry",l.getPcry());  
299 - m.put("jhch",l.getJhch());  
300 - m.put("jhgh",l.getJhgh());  
301 - m.put("sjch",l.getSjch());  
302 - m.put("sjgh",l.getSjgh());  
303 - m.put("yy",l.getYy());  
304 - m.put("xgr",l.getXgr()); 322 + m.put("rq", l.getRq());
  323 + m.put("gs", l.getGs());
  324 + m.put("zhgs", l.getZhgs());
  325 + m.put("xl", l.getXl());
  326 + m.put("cchjh", l.getCchjh());
  327 + m.put("cchsj", l.getCchsj());
  328 + m.put("cchqz", l.getCchqz());
  329 + m.put("chl", l.getChl());
  330 + m.put("bcjh", l.getBcjh());
  331 + m.put("bcsj", l.getBbzxl());
  332 + m.put("bbzxl", l.getBbzxl());
  333 + m.put("sm", l.getSm());
305 resList.add(m); 334 resList.add(m);
306 - }  
307 -  
308 - try {  
309 - listI.add(resList.iterator());  
310 - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";  
311 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\changetochange.xls",  
312 - path+"export\\换人换车情况日统计" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");  
313 - } catch (Exception e) {  
314 - e.printStackTrace();  
315 - }  
316 - return resList;  
317 } 335 }
318 -  
319 -  
320 -  
321 -  
322 - 336 +
  337 + try {
  338 + listI.add(resList.iterator());
  339 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  340 + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\turnoutrate.xls", path + "export\\营运线路出车率统计表"
  341 + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  342 + } catch (Exception e) {
  343 + e.printStackTrace();
  344 + }
  345 + return resList;
  346 + }
  347 +
  348 + //营运线路出车率统计表
  349 + @RequestMapping(value = "/executionrateExport", method = RequestMethod.POST)
  350 + public List<Map<String, Object>> executionrateExport(@RequestParam Map<String, Object> map) {
  351 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
  352 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  353 + ReportUtils ee = new ReportUtils();
  354 + List<Executionrate> executionrate = formsService.executionrate(map);
  355 + Map<String, Object> map1 = new HashMap<String, Object>();
  356 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  357 + for (Executionrate l : executionrate) {
  358 + Map<String, Object> m = new HashMap<String, Object>();
  359 + m.put("rq", l.getRq());
  360 + m.put("gs", l.getGs());
  361 + m.put("zhgs", l.getZhgs());
  362 + m.put("xl", l.getXl());
  363 + m.put("cchjh", l.getCchjh());
  364 + m.put("cchsj", l.getCchsj());
  365 + m.put("chl", l.getChl());
  366 + m.put("bcjh", l.getBcjh());
  367 + m.put("bcsj", l.getBbzxl());
  368 + m.put("bbzxl", l.getBbzxl());
  369 + m.put("sm", l.getSm());
  370 + resList.add(m);
  371 + }
  372 +
  373 + try {
  374 + listI.add(resList.iterator());
  375 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  376 + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\executionrate.xls", path + "export\\班次执行率统计表"
  377 + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  378 + } catch (Exception e) {
  379 + e.printStackTrace();
  380 + }
  381 + return resList;
  382 + }
  383 +
  384 + ////营运线路名称统计表
  385 + @RequestMapping(value = "/alllineExport", method = RequestMethod.POST)
  386 + public List<Map<String, Object>> alllineExport(@RequestParam Map<String, Object> map) {
  387 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
  388 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  389 + ReportUtils ee = new ReportUtils();
  390 + List<Allline> allline = formsService.allline(map);
  391 + Map<String, Object> map1 = new HashMap<String, Object>();
  392 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  393 + for (Allline l : allline) {
  394 + Map<String, Object> m = new HashMap<String, Object>();
  395 + m.put("rq", l.getRq());
  396 + m.put("gs", l.getGs());
  397 + m.put("zhgs", l.getZhgs());
  398 + m.put("xl", l.getXl());
  399 + m.put("cchjh", l.getCchjh());
  400 + m.put("cchsj", l.getCchsj());
  401 + m.put("chl", l.getChl());
  402 + m.put("bcjh", l.getBcjh());
  403 + m.put("bcsj", l.getBbzxl());
  404 + m.put("bbzxl", l.getBbzxl());
  405 + m.put("sm", l.getSm());
  406 + resList.add(m);
  407 + }
  408 +
  409 + try {
  410 + listI.add(resList.iterator());
  411 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  412 + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\allline.xls", path + "export\\营运线路名称统计表"
  413 + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  414 + } catch (Exception e) {
  415 + e.printStackTrace();
  416 + }
  417 + return resList;
  418 + }
  419 +
323 } 420 }
src/main/java/com/bsth/controller/forms/MCY_FormsController.java
@@ -9,12 +9,15 @@ import org.springframework.web.bind.annotation.RequestMethod; @@ -9,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/entity/mcy_forms/Allline.java 0 → 100644
  1 +package com.bsth.entity.mcy_forms;
  2 +
  3 +public class Allline {
  4 +
  5 + private String rq;//日期
  6 +
  7 + private String gs;//公司
  8 +
  9 + private String zhgs;//直属公司
  10 +
  11 + private String fgs;//分公司
  12 +
  13 + private String xl;//线路条数
  14 +
  15 + private String xlmc;//线路名称
  16 +
  17 + private String gsgs;
  18 + private String fgsgs;
  19 +
  20 + private String size;
  21 +
  22 +
  23 + public String getGsgs() {
  24 + return gsgs;
  25 + }
  26 +
  27 + public void setGsgs(String gsgs) {
  28 + this.gsgs = gsgs;
  29 + }
  30 +
  31 + public String getFgsgs() {
  32 + return fgsgs;
  33 + }
  34 +
  35 + public void setFgsgs(String fgsgs) {
  36 + this.fgsgs = fgsgs;
  37 + }
  38 +
  39 +
  40 + public String getSize() {
  41 + return size;
  42 + }
  43 +
  44 + public void setSize(String size) {
  45 + this.size = size;
  46 + }
  47 +
  48 + public String getZhgs() {
  49 + return zhgs;
  50 + }
  51 +
  52 + public void setZhgs(String zhgs) {
  53 + this.zhgs = zhgs;
  54 + }
  55 +
  56 + public String getXlmc() {
  57 + return xlmc;
  58 + }
  59 +
  60 + public void setXlmc(String xlmc) {
  61 + this.xlmc = xlmc;
  62 + }
  63 +
  64 + private String cchjh;//出车数计划
  65 +
  66 + private String cchsj;//出车数计划
  67 +
  68 + private String cchqz;//出车数权证
  69 +
  70 + private String chl;//出车率
  71 +
  72 + private String bcjh;//班次计划
  73 +
  74 + private String bcsj;//班次实际
  75 +
  76 + private String bbzxl;//班次执行率
  77 +
  78 + private String sm;//说明
  79 +
  80 + public String getRq() {
  81 + return rq;
  82 + }
  83 +
  84 + public void setRq(String rq) {
  85 + this.rq = rq;
  86 + }
  87 +
  88 + public String getGs() {
  89 + return gs;
  90 + }
  91 +
  92 + public void setGs(String gs) {
  93 + this.gs = gs;
  94 + }
  95 +
  96 + public String getFgs() {
  97 + return fgs;
  98 + }
  99 +
  100 + public void setFgs(String fgs) {
  101 + this.fgs = fgs;
  102 + }
  103 +
  104 + public String getXl() {
  105 + return xl;
  106 + }
  107 +
  108 + public void setXl(String xl) {
  109 + this.xl = xl;
  110 + }
  111 +
  112 + public String getCchjh() {
  113 + return cchjh;
  114 + }
  115 +
  116 + public void setCchjh(String cchjh) {
  117 + this.cchjh = cchjh;
  118 + }
  119 +
  120 + public String getCchsj() {
  121 + return cchsj;
  122 + }
  123 +
  124 + public void setCchsj(String cchsj) {
  125 + this.cchsj = cchsj;
  126 + }
  127 +
  128 + public String getCchqz() {
  129 + return cchqz;
  130 + }
  131 +
  132 + public void setCchqz(String cchqz) {
  133 + this.cchqz = cchqz;
  134 + }
  135 +
  136 + public String getChl() {
  137 + return chl;
  138 + }
  139 +
  140 + public void setChl(String chl) {
  141 + this.chl = chl;
  142 + }
  143 +
  144 + public String getBcjh() {
  145 + return bcjh;
  146 + }
  147 +
  148 + public void setBcjh(String bcjh) {
  149 + this.bcjh = bcjh;
  150 + }
  151 +
  152 + public String getBcsj() {
  153 + return bcsj;
  154 + }
  155 +
  156 + public void setBcsj(String bcsj) {
  157 + this.bcsj = bcsj;
  158 + }
  159 +
  160 + public String getBbzxl() {
  161 + return bbzxl;
  162 + }
  163 +
  164 + public void setBbzxl(String bbzxl) {
  165 + this.bbzxl = bbzxl;
  166 + }
  167 +
  168 + public String getSm() {
  169 + return sm;
  170 + }
  171 +
  172 + public void setSm(String sm) {
  173 + this.sm = sm;
  174 + }
  175 +
  176 +
  177 +
  178 +
  179 +}
src/main/java/com/bsth/entity/mcy_forms/Executionrate.java 0 → 100644
  1 +package com.bsth.entity.mcy_forms;
  2 +
  3 +public class Executionrate {
  4 +
  5 + private String rq;//日期
  6 +
  7 + private String gs;//公司
  8 +
  9 + private String zhgs;//直属公司
  10 +
  11 + private String fgs;//分公司
  12 +
  13 + private String xl;//线路条数
  14 +
  15 + private String xlmc;//线路名称
  16 +
  17 + private String gsgs;
  18 + private String fgsgs;
  19 +
  20 + private String size;
  21 +
  22 +
  23 + public String getGsgs() {
  24 + return gsgs;
  25 + }
  26 +
  27 + public void setGsgs(String gsgs) {
  28 + this.gsgs = gsgs;
  29 + }
  30 +
  31 + public String getFgsgs() {
  32 + return fgsgs;
  33 + }
  34 +
  35 + public void setFgsgs(String fgsgs) {
  36 + this.fgsgs = fgsgs;
  37 + }
  38 +
  39 +
  40 + public String getSize() {
  41 + return size;
  42 + }
  43 +
  44 + public void setSize(String size) {
  45 + this.size = size;
  46 + }
  47 +
  48 + public String getZhgs() {
  49 + return zhgs;
  50 + }
  51 +
  52 + public void setZhgs(String zhgs) {
  53 + this.zhgs = zhgs;
  54 + }
  55 +
  56 + public String getXlmc() {
  57 + return xlmc;
  58 + }
  59 +
  60 + public void setXlmc(String xlmc) {
  61 + this.xlmc = xlmc;
  62 + }
  63 +
  64 + private String cchjh;//出车数计划
  65 +
  66 + private String cchsj;//出车数计划
  67 +
  68 + private String cchqz;//出车数权证
  69 +
  70 + private String chl;//出车率
  71 +
  72 + private String bcjh;//班次计划
  73 +
  74 + private String bcsj;//班次实际
  75 +
  76 + private String bbzxl;//班次执行率
  77 +
  78 + private String sm;//说明
  79 +
  80 + public String getRq() {
  81 + return rq;
  82 + }
  83 +
  84 + public void setRq(String rq) {
  85 + this.rq = rq;
  86 + }
  87 +
  88 + public String getGs() {
  89 + return gs;
  90 + }
  91 +
  92 + public void setGs(String gs) {
  93 + this.gs = gs;
  94 + }
  95 +
  96 + public String getFgs() {
  97 + return fgs;
  98 + }
  99 +
  100 + public void setFgs(String fgs) {
  101 + this.fgs = fgs;
  102 + }
  103 +
  104 + public String getXl() {
  105 + return xl;
  106 + }
  107 +
  108 + public void setXl(String xl) {
  109 + this.xl = xl;
  110 + }
  111 +
  112 + public String getCchjh() {
  113 + return cchjh;
  114 + }
  115 +
  116 + public void setCchjh(String cchjh) {
  117 + this.cchjh = cchjh;
  118 + }
  119 +
  120 + public String getCchsj() {
  121 + return cchsj;
  122 + }
  123 +
  124 + public void setCchsj(String cchsj) {
  125 + this.cchsj = cchsj;
  126 + }
  127 +
  128 + public String getCchqz() {
  129 + return cchqz;
  130 + }
  131 +
  132 + public void setCchqz(String cchqz) {
  133 + this.cchqz = cchqz;
  134 + }
  135 +
  136 + public String getChl() {
  137 + return chl;
  138 + }
  139 +
  140 + public void setChl(String chl) {
  141 + this.chl = chl;
  142 + }
  143 +
  144 + public String getBcjh() {
  145 + return bcjh;
  146 + }
  147 +
  148 + public void setBcjh(String bcjh) {
  149 + this.bcjh = bcjh;
  150 + }
  151 +
  152 + public String getBcsj() {
  153 + return bcsj;
  154 + }
  155 +
  156 + public void setBcsj(String bcsj) {
  157 + this.bcsj = bcsj;
  158 + }
  159 +
  160 + public String getBbzxl() {
  161 + return bbzxl;
  162 + }
  163 +
  164 + public void setBbzxl(String bbzxl) {
  165 + this.bbzxl = bbzxl;
  166 + }
  167 +
  168 + public String getSm() {
  169 + return sm;
  170 + }
  171 +
  172 + public void setSm(String sm) {
  173 + this.sm = sm;
  174 + }
  175 +
  176 +
  177 +
  178 +}
src/main/java/com/bsth/entity/mcy_forms/Turnoutrate.java 0 → 100644
  1 +package com.bsth.entity.mcy_forms;
  2 +
  3 +public class Turnoutrate {
  4 +private String rq;//日期
  5 +
  6 + private String gs;//公司
  7 +
  8 + private String zhgs;//直属公司
  9 +
  10 + private String fgs;//分公司
  11 +
  12 + private String xl;//线路条数
  13 +
  14 + private String xlmc;//线路名称
  15 +
  16 + private String gsgs;
  17 + private String fgsgs;
  18 +
  19 + private String size;
  20 +
  21 +
  22 + public String getGsgs() {
  23 + return gsgs;
  24 + }
  25 +
  26 + public void setGsgs(String gsgs) {
  27 + this.gsgs = gsgs;
  28 + }
  29 +
  30 + public String getFgsgs() {
  31 + return fgsgs;
  32 + }
  33 +
  34 + public void setFgsgs(String fgsgs) {
  35 + this.fgsgs = fgsgs;
  36 + }
  37 +
  38 +
  39 + public String getSize() {
  40 + return size;
  41 + }
  42 +
  43 + public void setSize(String size) {
  44 + this.size = size;
  45 + }
  46 +
  47 + public String getZhgs() {
  48 + return zhgs;
  49 + }
  50 +
  51 + public void setZhgs(String zhgs) {
  52 + this.zhgs = zhgs;
  53 + }
  54 +
  55 + public String getXlmc() {
  56 + return xlmc;
  57 + }
  58 +
  59 + public void setXlmc(String xlmc) {
  60 + this.xlmc = xlmc;
  61 + }
  62 +
  63 + private String cchjh;//出车数计划
  64 +
  65 + private String cchsj;//出车数计划
  66 +
  67 + private String cchqz;//出车数权证
  68 +
  69 + private String chl;//出车率
  70 +
  71 + private String bcjh;//班次计划
  72 +
  73 + private String bcsj;//班次实际
  74 +
  75 + private String bbzxl;//班次执行率
  76 +
  77 + private String sm;//说明
  78 +
  79 + public String getRq() {
  80 + return rq;
  81 + }
  82 +
  83 + public void setRq(String rq) {
  84 + this.rq = rq;
  85 + }
  86 +
  87 + public String getGs() {
  88 + return gs;
  89 + }
  90 +
  91 + public void setGs(String gs) {
  92 + this.gs = gs;
  93 + }
  94 +
  95 + public String getFgs() {
  96 + return fgs;
  97 + }
  98 +
  99 + public void setFgs(String fgs) {
  100 + this.fgs = fgs;
  101 + }
  102 +
  103 + public String getXl() {
  104 + return xl;
  105 + }
  106 +
  107 + public void setXl(String xl) {
  108 + this.xl = xl;
  109 + }
  110 +
  111 + public String getCchjh() {
  112 + return cchjh;
  113 + }
  114 +
  115 + public void setCchjh(String cchjh) {
  116 + this.cchjh = cchjh;
  117 + }
  118 +
  119 + public String getCchsj() {
  120 + return cchsj;
  121 + }
  122 +
  123 + public void setCchsj(String cchsj) {
  124 + this.cchsj = cchsj;
  125 + }
  126 +
  127 + public String getCchqz() {
  128 + return cchqz;
  129 + }
  130 +
  131 + public void setCchqz(String cchqz) {
  132 + this.cchqz = cchqz;
  133 + }
  134 +
  135 + public String getChl() {
  136 + return chl;
  137 + }
  138 +
  139 + public void setChl(String chl) {
  140 + this.chl = chl;
  141 + }
  142 +
  143 + public String getBcjh() {
  144 + return bcjh;
  145 + }
  146 +
  147 + public void setBcjh(String bcjh) {
  148 + this.bcjh = bcjh;
  149 + }
  150 +
  151 + public String getBcsj() {
  152 + return bcsj;
  153 + }
  154 +
  155 + public void setBcsj(String bcsj) {
  156 + this.bcsj = bcsj;
  157 + }
  158 +
  159 + public String getBbzxl() {
  160 + return bbzxl;
  161 + }
  162 +
  163 + public void setBbzxl(String bbzxl) {
  164 + this.bbzxl = bbzxl;
  165 + }
  166 +
  167 + public String getSm() {
  168 + return sm;
  169 + }
  170 +
  171 + public void setSm(String sm) {
  172 + this.sm = sm;
  173 + }
  174 +
  175 +
  176 +}
src/main/java/com/bsth/service/forms/FormsService.java
@@ -3,12 +3,15 @@ package com.bsth.service.forms; @@ -3,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
@@ -270,4 +270,5 @@ public class ExportServiceImpl implements ExportService{ @@ -270,4 +270,5 @@ public class ExportServiceImpl implements ExportService{
270 } 270 }
271 271
272 272
  273 +
273 } 274 }
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/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">&nbsp;</span></td>
  89 + <td><span id="total_zhgs">&nbsp;</span></td>
  90 + <td><span id="total_xlts">&nbsp;</span></td>
  91 + <td><span id="total_jh">&nbsp;</span></td>
  92 + <td><span id="total_sj">&nbsp;</span></td>
  93 + <td><span id="total_ccl">&nbsp;</span></td>
  94 + <td><span id="total_bcjh">&nbsp;</span></td>
  95 + <td><span id="total_bcsj">&nbsp;</span></td>
  96 + <td><span id="total_bczxl">&nbsp;</span></td>
  97 + <td><span id="total_sm">&nbsp;</span></td>
  98 + </tr>
  99 + </table>
  100 + </div>
  101 + </div>
  102 + </div>
  103 + </div>
  104 +</div>
  105 +
  106 +<script>
  107 + $(function(){
  108 + // 关闭左侧栏
  109 + if (!$('body').hasClass('page-sidebar-closed'))
  110 + $('.menu-toggler.sidebar-toggler').click();
  111 +
  112 + $("#startDate,#endDate").datetimepicker({
  113 + format : 'YYYY-MM-DD',
  114 + locale : 'zh-cn'
  115 + });
  116 +
  117 + $.get('/basic/lineCode2Name',function(result){
  118 + var data=[];
  119 +
  120 + for(var code in result){
  121 + data.push({id: code, text: result[code]});
  122 + }
  123 + initPinYinSelect2('#line',data,'');
  124 +
  125 + })
  126 +
  127 + var line;
  128 + var startDate;
  129 + var endDate;
  130 + $("#query").on("click",function(){
  131 +
  132 + line = $("#line").val();
  133 + startDate1=$("#startDate").val();
  134 + endDate1=$("#endDate").val();
  135 +
  136 + if(startDate1!=''&&endDate1!=''){
  137 + $post('/mcy_forms/allline',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){
  138 + // 把数据填充到模版中
  139 + var tbodyHtml = template('allline',{list:result});
  140 + // 把渲染好的模版html文本追加到表格中
  141 + $('#tbody').html(tbodyHtml);
  142 + line = $("#line").val();
  143 + startDate = $("#startDate").val();
  144 + endDate = $("#endDate").val();
  145 + $("#sDate").text(startDate);
  146 + $("#eDate").text(endDate);
  147 +
  148 + var total_jh = 0;
  149 + var total_sj = 0,total_ccl = 0,total_bcjh = 0;
  150 + var total_bcjh = 0,total_bcsj = 0,total_bczxl = 0;
  151 + var total_gs=0;
  152 + var total_zhgs=0;
  153 + $.each(result, function(i, obj) {
  154 + total_gs +=Number(obj.gsgs);
  155 + total_zhgs +=Number(obj.fgsgs);
  156 + total_jh = Number(obj.cchjh)+Number(total_jh);
  157 + total_sj = Number(obj.cchsj)+Number(total_sj);
  158 +
  159 + total_ccl =(Number(total_sj)/Number(total_jh))*100;
  160 + total_bcjh = Number(obj.bcjh)+Number(total_bcjh);
  161 + total_bcsj = Number(obj.bcsj)+Number(total_bcsj);
  162 + total_bczxl = (Number(total_bcsj)/Number(total_bcjh))*100;
  163 +
  164 + });
  165 + $("#total_gs").text(total_gs);
  166 + $("#total_zhgs").text(total_zhgs);
  167 + $("#total_jh").text(total_jh);
  168 + $("#total_sj").text(total_sj);
  169 + $("#total_ccl").text(total_ccl.toFixed(2)+'%');
  170 + $("#total_bcjh").text(total_bcjh);
  171 + $("#total_bcsj").text(total_bcsj);
  172 + $("#total_bczxl").text(total_bczxl.toFixed(2)+'%');
  173 +
  174 + var temp = {};
  175 + var today_account = 0;
  176 +
  177 + temp["line"] = $("#line").text();
  178 + $.each(result, function(i, obj) {
  179 + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){
  180 + today_account++;
  181 + }
  182 + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");
  183 + });
  184 +
  185 + })
  186 +
  187 + }else{
  188 + alert("请选择时间范围!");
  189 + }
  190 + });
  191 +
  192 + $("#export").on("click",function(){
  193 + $post('/mcy_export/alllineExport',{line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){
  194 + window.open("/downloadFile/download?fileName=营运线路名称统计表"+moment(startDate).format("YYYYMMDD"));
  195 + });
  196 + });
  197 + });
  198 +</script>
  199 +<script type="text/html" id="allline">
  200 + {{each list as obj i}}
  201 + <tr>
  202 + <td>{{obj.rq}}</td>
  203 + <td>{{obj.gs}}</td>
  204 + <td>{{obj.zhgs}}</td>
  205 + <td>{{obj.xl}}</td>
  206 + <td>{{obj.cchjh}}</td>
  207 + <td>{{obj.cchsj}}</td>
  208 + <td>{{obj.chl}}</td>
  209 + <td>{{obj.bcjh}}</td>
  210 + <td>{{obj.bcsj}}</td>
  211 + <td>{{obj.bbzxl}}</td>
  212 + <td>{{obj.xl}}</td>
  213 + </tr>
  214 + {{/each}}
  215 + {{if list.length == 0}}
  216 + <tr>
  217 + <td colspan="12"><h6 class="muted">没有找到相关数据</h6></td>
  218 + </tr>
  219 + {{/if}}
  220 +</script>
src/main/resources/static/pages/forms/statement/busInterval.html
@@ -29,16 +29,16 @@ @@ -29,16 +29,16 @@
29 <div class="portlet light porttlet-fit bordered"> 29 <div class="portlet light porttlet-fit bordered">
30 <div class="portlet-title"> 30 <div class="portlet-title">
31 <form id="history" class="form-inline" action=""> 31 <form id="history" class="form-inline" action="">
32 - <div style="display: inline-block;">  
33 - <span class="item-label" style="width: 80px; margin-left: 33px">公司: </span> 32 + <div style="display: inline-block; margin-left: 33px;" id="company1">
  33 + <span class="item-label" style="width: 80px;">公司: </span>
34 <select class="form-control" name="company" id="company" style="width: 180px;"></select> 34 <select class="form-control" name="company" id="company" style="width: 180px;"></select>
35 </div> 35 </div>
36 - <div style="display: inline-block;">  
37 - <span class="item-label" style="width: 80px; margin-left: 24px">分公司: </span> 36 + <div style="display: inline-block; margin-left: 24px;" id="subCompany1">
  37 + <span class="item-label" style="width: 80px;">分公司: </span>
38 <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select> 38 <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select>
39 </div> 39 </div>
40 - <div style="display: inline-block;">  
41 - <span class="item-label" style="width: 80px; margin-left: 24px">线路: </span> 40 + <div style="display: inline-block; margin-left: 24px;">
  41 + <span class="item-label" style="width: 80px;">线路: </span>
42 <select class="form-control" name="line" id="line" style="width: 180px;"></select> 42 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
43 </div> 43 </div>
44 <div style="display: inline-block; margin-left: 10px"> 44 <div style="display: inline-block; margin-left: 10px">
@@ -145,6 +145,11 @@ @@ -145,6 +145,11 @@
145 for(var i = 0; i < obj.length; i++){ 145 for(var i = 0; i < obj.length; i++){
146 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 146 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
147 } 147 }
  148 + if(obj.length == 1){
  149 + $('#company1').hide();
  150 + if(obj[0].children.length == 1)
  151 + $('#subCompany1').hide();
  152 + }
148 $('#company').html(options); 153 $('#company').html(options);
149 updateCompany(); 154 updateCompany();
150 }); 155 });
src/main/resources/static/pages/forms/statement/changetochange.html
@@ -225,4 +225,4 @@ @@ -225,4 +225,4 @@
225 <td colspan="15"><h6 class="muted">没有找到相关数据</h6></td> 225 <td colspan="15"><h6 class="muted">没有找到相关数据</h6></td>
226 </tr> 226 </tr>
227 {{/if}} 227 {{/if}}
228 -</script> 228 +</script>
229 \ No newline at end of file 229 \ No newline at end of file
src/main/resources/static/pages/forms/statement/commandState.html
@@ -27,19 +27,28 @@ @@ -27,19 +27,28 @@
27 <div class="portlet light porttlet-fit bordered"> 27 <div class="portlet light porttlet-fit bordered">
28 <div class="portlet-title"> 28 <div class="portlet-title">
29 <form id="history" class="form-inline" action=""> 29 <form id="history" class="form-inline" action="">
30 - <div style="display: inline-block;"> 30 + <div style="display: inline-block; margin-left: 15px;" id="company1">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="company" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 22px;" id="subCompany1">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select>
  37 + </div>
  38 + <div style="display: inline-block; margin-left: 15px;">
31 <span class="item-label" style="width: 80px;">线路: </span> 39 <span class="item-label" style="width: 80px;">线路: </span>
32 <select class="form-control" name="line" id="line" style="width: 180px;"></select> 40 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
33 </div> 41 </div>
  42 + <div style="margin-top: 10px" />
34 <div style="display: inline-block;margin-left: 15px;"> 43 <div style="display: inline-block;margin-left: 15px;">
35 <span class="item-label" style="width: 80px;">时间: </span> 44 <span class="item-label" style="width: 80px;">时间: </span>
36 <input class="form-control" type="text" id="date" style="width: 180px;"/> 45 <input class="form-control" type="text" id="date" style="width: 180px;"/>
37 </div> 46 </div>
38 - <div style="display: inline-block;margin-left: 15px">  
39 - <span class="item-label" style="width: 140px;">内部编码: </span> 47 + <div style="display: inline-block;margin-left: 8px">
  48 + <span class="item-label" style="width: 140px;">内部编码: </span>
40 <select class="form-control" name="code" id="code" style="width: 180px;"></select> 49 <select class="form-control" name="code" id="code" style="width: 180px;"></select>
41 </div> 50 </div>
42 - <div class="form-group"> 51 + <div class="form-group" style="margin-left: 9px">
43 <input class="btn btn-default" type="button" id="query" value="筛选"/> 52 <input class="btn btn-default" type="button" id="query" value="筛选"/>
44 <!-- <input class="btn btn-default" type="button" id="export" value="导出"/> --> 53 <!-- <input class="btn btn-default" type="button" id="export" value="导出"/> -->
45 </div> 54 </div>
@@ -64,7 +73,7 @@ @@ -64,7 +73,7 @@
64 </tbody> 73 </tbody>
65 </table> 74 </table>
66 <div id="works_hidden" class="hidden"> 75 <div id="works_hidden" class="hidden">
67 - <span class="item-label" style="width: 80px;">明细: </span> 76 + <span class="item-label" style="width: 80px;margin-left: 20px;">明细: </span>
68 <span class="item-label" style="width: 80px;margin-left: 60px;">日期 </span> 77 <span class="item-label" style="width: 80px;margin-left: 60px;">日期 </span>
69 <span class="item-label" style="width: 80px;" id="date1"></span> 78 <span class="item-label" style="width: 80px;" id="date1"></span>
70 <span class="item-label" style="width: 80px;margin-left: 60px;">线路 </span> 79 <span class="item-label" style="width: 80px;margin-left: 60px;">线路 </span>
@@ -132,6 +141,36 @@ @@ -132,6 +141,36 @@
132 initPinYinSelect2('#line',data,''); 141 initPinYinSelect2('#line',data,'');
133 }) 142 })
134 143
  144 + var obj = [];
  145 + $.get('/user/companyData', function(result){
  146 + obj = result;
  147 + var options = '';
  148 + for(var i = 0; i < obj.length; i++){
  149 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  150 + }
  151 + if(obj.length == 1){
  152 + $('#company1').hide();
  153 + if(obj[0].children.length == 1)
  154 + $('#subCompany1').hide();
  155 + }
  156 + $('#company').html(options);
  157 + updateCompany();
  158 + });
  159 + $("#company").on("change",updateCompany);
  160 + function updateCompany(){
  161 + var company = $('#company').val();
  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 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  168 + }
  169 + }
  170 + }
  171 + $('#subCompany').html(options);
  172 + }
  173 +
135 $('#code').select2({ 174 $('#code').select2({
136 ajax: { 175 ajax: {
137 url: '/realSchedule/sreachVehic', 176 url: '/realSchedule/sreachVehic',
src/main/resources/static/pages/forms/statement/correctStatis.html
@@ -166,7 +166,6 @@ @@ -166,7 +166,6 @@
166 $('#company').html(options); 166 $('#company').html(options);
167 updateCompany(); 167 updateCompany();
168 }); 168 });
169 -  
170 $("#company").on("change",updateCompany); 169 $("#company").on("change",updateCompany);
171 function updateCompany(){ 170 function updateCompany(){
172 var company = $('#company').val(); 171 var company = $('#company').val();
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">&nbsp;</span></td>
  89 + <td><span id="total_zhgs">&nbsp;</span></td>
  90 + <td><span id="total_xlts">&nbsp;</span></td>
  91 + <td><span id="total_jh">&nbsp;</span></td>
  92 + <td><span id="total_sj">&nbsp;</span></td>
  93 + <td><span id="total_ccl">&nbsp;</span></td>
  94 + <td><span id="total_bcjh">&nbsp;</span></td>
  95 + <td><span id="total_bcsj">&nbsp;</span></td>
  96 + <td><span id="total_bczxl">&nbsp;</span></td>
  97 + <td><span id="total_sm">&nbsp;</span></td>
  98 + </tr>
  99 + </table>
  100 + </div>
  101 + </div>
  102 + </div>
  103 + </div>
  104 +</div>
  105 +
  106 +<script>
  107 + $(function(){
  108 + // 关闭左侧栏
  109 + if (!$('body').hasClass('page-sidebar-closed'))
  110 + $('.menu-toggler.sidebar-toggler').click();
  111 +
  112 + $("#startDate,#endDate").datetimepicker({
  113 + format : 'YYYY-MM-DD',
  114 + locale : 'zh-cn'
  115 + });
  116 +
  117 + $.get('/basic/lineCode2Name',function(result){
  118 + var data=[];
  119 +
  120 + for(var code in result){
  121 + data.push({id: code, text: result[code]});
  122 + }
  123 + initPinYinSelect2('#line',data,'');
  124 +
  125 + })
  126 +
  127 + var line;
  128 + var startDate;
  129 + var endDate;
  130 + $("#query").on("click",function(){
  131 +
  132 + line = $("#line").val();
  133 + startDate1=$("#startDate").val();
  134 + endDate1=$("#endDate").val();
  135 +
  136 + if(startDate1!=''&&endDate1!=''){
  137 + $post('/mcy_forms/executionrate',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){
  138 + // 把数据填充到模版中
  139 + var tbodyHtml = template('executionrate',{list:result});
  140 + // 把渲染好的模版html文本追加到表格中
  141 + $('#tbody').html(tbodyHtml);
  142 + line = $("#line").val();
  143 + startDate = $("#startDate").val();
  144 + endDate = $("#endDate").val();
  145 + $("#sDate").text(startDate);
  146 + $("#eDate").text(endDate);
  147 +
  148 + var total_xlts = 0,total_jh = 0;
  149 + var total_sj = 0,total_ccl = 0,total_bcjh = 0;
  150 + var total_bcjh = 0,total_bcsj = 0,total_bczxl = 0;
  151 + var total_gs=0;
  152 + var total_zhgs=0;
  153 + $.each(result, function(i, obj) {
  154 + total_gs +=Number(obj.gsgs);
  155 + total_zhgs +=Number(obj.fgsgs);
  156 + total_xlts += Number(obj.xl);
  157 + total_jh = Number(obj.cchjh)+Number(total_jh);
  158 + total_sj = Number(obj.cchsj)+Number(total_sj);
  159 +
  160 + total_ccl =(Number(total_sj)/Number(total_jh))*100;
  161 + total_bcjh = Number(obj.bcjh)+Number(total_bcjh);
  162 + total_bcsj = Number(obj.bcsj)+Number(total_bcsj);
  163 + total_bczxl = (Number(total_bcsj)/Number(total_bcjh))*100;
  164 +
  165 + });
  166 + $("#total_gs").text(total_gs);
  167 + $("#total_zhgs").text(total_zhgs);
  168 + $("#total_xlts").text(total_xlts);
  169 + $("#total_jh").text(total_jh);
  170 + $("#total_sj").text(total_sj);
  171 + $("#total_ccl").text(total_ccl.toFixed(2)+'%');
  172 + $("#total_bcjh").text(total_bcjh);
  173 + $("#total_bcsj").text(total_bcsj);
  174 + $("#total_bczxl").text(total_bczxl.toFixed(2)+'%');
  175 +
  176 + var temp = {};
  177 + var today_account = 0;
  178 +
  179 + temp["line"] = $("#line").text();
  180 + $.each(result, function(i, obj) {
  181 + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){
  182 + today_account++;
  183 + }
  184 + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");
  185 + });
  186 +
  187 + })
  188 +
  189 + }else{
  190 + alert("请选择时间范围!");
  191 + }
  192 + });
  193 +
  194 + $("#export").on("click",function(){
  195 + $post('/mcy_export/executionrateExport',{line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){
  196 + window.open("/downloadFile/download?fileName=班次执行率统计表"+moment(startDate).format("YYYYMMDD"));
  197 + });
  198 + });
  199 + });
  200 +</script>
  201 +<script type="text/html" id="executionrate">
  202 + {{each list as obj i}}
  203 + <tr>
  204 + <td>{{obj.rq}}</td>
  205 + <td>{{obj.gs}}</td>
  206 + <td>{{obj.zhgs}}</td>
  207 + <td>{{obj.xl}}</td>
  208 + <td>{{obj.cchjh}}</td>
  209 + <td>{{obj.cchsj}}</td>
  210 + <td>{{obj.chl}}</td>
  211 + <td>{{obj.bcjh}}</td>
  212 + <td>{{obj.bcsj}}</td>
  213 + <td>{{obj.bbzxl}}</td>
  214 + <td>{{obj.sm}}</td>
  215 + </tr>
  216 + {{/each}}
  217 + {{if list.length == 0}}
  218 + <tr>
  219 + <td colspan="11"><h6 class="muted">没有找到相关数据</h6></td>
  220 + </tr>
  221 + {{/if}}
  222 +</script>
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
@@ -27,19 +27,19 @@ @@ -27,19 +27,19 @@
27 <div class="portlet light porttlet-fit bordered"> 27 <div class="portlet light porttlet-fit bordered">
28 <div class="portlet-title"> 28 <div class="portlet-title">
29 <form id="history" class="form-inline" action=""> 29 <form id="history" class="form-inline" action="">
30 - <div style="display: inline-block;margin-left: 10px;"> 30 + <div style="display: inline-block;margin-left: 10px;" id="company1">
31 <span class="item-label" style="width: 80px;">公司: </span> 31 <span class="item-label" style="width: 80px;">公司: </span>
32 <select class="form-control" name="company" id="company" style="width: 160px;"></select> 32 <select class="form-control" name="company" id="company" style="width: 160px;"></select>
33 </div> 33 </div>
34 - <div style="display: inline-block;margin-left: 15px;"> 34 + <div style="display: inline-block;margin-left: 10px;" id="subCompany1">
35 <span class="item-label" style="width: 80px;">分公司: </span> 35 <span class="item-label" style="width: 80px;">分公司: </span>
36 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> 36 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
37 </div> 37 </div>
38 - <div style="display: inline-block;margin-left: 15px;"> 38 + <div style="display: inline-block;margin-left: 10px;">
39 <span class="item-label" style="width: 80px;">线路: </span> 39 <span class="item-label" style="width: 80px;">线路: </span>
40 <select class="form-control" name="line" id="line" style="width: 160px;"></select> 40 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
41 </div> 41 </div>
42 - <div style="display: inline-block;margin-left: 15px;"> 42 + <div style="display: inline-block;margin-left: 10px;">
43 <span class="item-label" style="width: 80px;">时间: </span> 43 <span class="item-label" style="width: 80px;">时间: </span>
44 <input class="form-control" type="text" id="date" style="width: 160px;"/> 44 <input class="form-control" type="text" id="date" style="width: 160px;"/>
45 </div> 45 </div>
@@ -134,6 +134,11 @@ @@ -134,6 +134,11 @@
134 for(var i = 0; i < obj.length; i++){ 134 for(var i = 0; i < obj.length; i++){
135 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 135 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
136 } 136 }
  137 + if(obj.length == 1){
  138 + $('#company1').hide();
  139 + if(obj[0].children.length == 1)
  140 + $('#subCompany1').hide();
  141 + }
137 $('#company').html(options); 142 $('#company').html(options);
138 updateCompany(); 143 updateCompany();
139 }); 144 });
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
@@ -45,16 +45,16 @@ @@ -45,16 +45,16 @@
45 <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="10" checked="true"/>其他 45 <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="10" checked="true"/>其他
46 </div> 46 </div>
47 <div style="margin-top: 5px"></div> 47 <div style="margin-top: 5px"></div>
48 - <div style="display: inline-block;">  
49 - <span class="item-label" style="width: 80px; margin-left: 33px">公司: </span> 48 + <div style="display: inline-block; margin-left: 33px;" id="company1">
  49 + <span class="item-label" style="width: 80px;">公司: </span>
50 <select class="form-control" name="company" id="company" style="width: 140px;"></select> 50 <select class="form-control" name="company" id="company" style="width: 140px;"></select>
51 </div> 51 </div>
52 - <div style="display: inline-block;">  
53 - <span class="item-label" style="width: 80px; margin-left: 24px">分公司: </span> 52 + <div style="display: inline-block; margin-left: 24px;" id="subCompany1">
  53 + <span class="item-label" style="width: 80px;">分公司: </span>
54 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> 54 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select>
55 </div> 55 </div>
56 - <div style="display: inline-block;">  
57 - <span class="item-label" style="width: 80px; margin-left: 24px">线路: </span> 56 + <div style="display: inline-block; margin-left: 24px;">
  57 + <span class="item-label" style="width: 80px;">线路: </span>
58 <select class="form-control" name="line" id="line" style="width: 140px;"></select> 58 <select class="form-control" name="line" id="line" style="width: 140px;"></select>
59 </div> 59 </div>
60 <div style="display: inline-block; margin-left: 10px"> 60 <div style="display: inline-block; margin-left: 10px">
@@ -165,6 +165,11 @@ @@ -165,6 +165,11 @@
165 for(var i = 0; i < obj.length; i++){ 165 for(var i = 0; i < obj.length; i++){
166 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 166 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
167 } 167 }
  168 + if(obj.length == 1){
  169 + $('#company1').hide();
  170 + if(obj[0].children.length == 1)
  171 + $('#subCompany1').hide();
  172 + }
168 $('#company').html(options); 173 $('#company').html(options);
169 updateCompany(); 174 updateCompany();
170 }); 175 });
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
@@ -33,16 +33,20 @@ @@ -33,16 +33,20 @@
33 <div class="portlet light porttlet-fit bordered"> 33 <div class="portlet light porttlet-fit bordered">
34 <div class="portlet-title"> 34 <div class="portlet-title">
35 <form id="history" class="form-inline" action=""> 35 <form id="history" class="form-inline" action="">
36 - <div style="display: inline-block;">  
37 - <span class="item-label" style="width: 80px; margin-left: 33px">公司: </span> 36 + <div style="display: inline-block; margin-left: 33px;" id="company1">
  37 + <span class="item-label" style="width: 80px;">公司: </span>
38 <select class="form-control" name="company" id="company" style="width: 140px;"></select> 38 <select class="form-control" name="company" id="company" style="width: 140px;"></select>
39 </div> 39 </div>
40 - <div style="display: inline-block;">  
41 - <span class="item-label" style="width: 80px; margin-left: 38px">线路: </span> 40 + <div style="display: inline-block; margin-left: 24px;" id="subCompany1">
  41 + <span class="item-label" style="width: 80px;">分公司: </span>
  42 + <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select>
  43 + </div>
  44 + <div style="display: inline-block; margin-left: 24px;">
  45 + <span class="item-label" style="width: 80px;">线路: </span>
42 <select class="form-control" name="line" id="line" style="width: 140px;"></select> 46 <select class="form-control" name="line" id="line" style="width: 140px;"></select>
43 </div> 47 </div>
44 - <div style="display: inline-block;">  
45 - <span class="item-label" style="width: 80px; margin-left: 24px">方向: </span> 48 + <div style="display: inline-block; margin-left: 15px;">
  49 + <span class="item-label" style="width: 80px;">方向: </span>
46 <select class="form-control" name="upDown" id="upDown" style="width: 140px;"> 50 <select class="form-control" name="upDown" id="upDown" style="width: 140px;">
47 <option value="">请先选择线路</option> 51 <option value="">请先选择线路</option>
48 </select> 52 </select>
@@ -205,9 +209,28 @@ @@ -205,9 +209,28 @@
205 for(var i = 0; i < obj.length; i++){ 209 for(var i = 0; i < obj.length; i++){
206 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 210 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
207 } 211 }
  212 + if(obj.length == 1){
  213 + $('#company1').hide();
  214 + if(obj[0].children.length == 1)
  215 + $('#subCompany1').hide();
  216 + }
208 $('#company').html(options); 217 $('#company').html(options);
209 updateCompany(); 218 updateCompany();
210 }); 219 });
  220 + $("#company").on("change",updateCompany);
  221 + function updateCompany(){
  222 + var company = $('#company').val();
  223 + var options = '';
  224 + for(var i = 0; i < obj.length; i++){
  225 + if(obj[i].companyCode == company){
  226 + var children = obj[i].children;
  227 + for(var j = 0; j < children.length; j++){
  228 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  229 + }
  230 + }
  231 + }
  232 + $('#subCompany').html(options);
  233 + }
211 234
212 $.get('/basic/lineCode2Name',function(result){ 235 $.get('/basic/lineCode2Name',function(result){
213 var data=[]; 236 var data=[];
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
@@ -27,19 +27,19 @@ @@ -27,19 +27,19 @@
27 <div class="portlet light porttlet-fit bordered"> 27 <div class="portlet light porttlet-fit bordered">
28 <div class="portlet-title"> 28 <div class="portlet-title">
29 <form id="history" class="form-inline" action=""> 29 <form id="history" class="form-inline" action="">
30 - <div style="display: inline-block;"> 30 + <div style="display: inline-block; margin-left: 10px;" id="company1">
31 <span class="item-label" style="width: 80px;">公司: </span> 31 <span class="item-label" style="width: 80px;">公司: </span>
32 <select class="form-control" name="company" id="company" style="width: 160px;"></select> 32 <select class="form-control" name="company" id="company" style="width: 160px;"></select>
33 </div> 33 </div>
34 - <div style="display: inline-block;"> 34 + <div style="display: inline-block; margin-left: 10px;" id="subCompany1">
35 <span class="item-label" style="width: 80px;">分公司: </span> 35 <span class="item-label" style="width: 80px;">分公司: </span>
36 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> 36 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
37 </div> 37 </div>
38 - <div style="display: inline-block;"> 38 + <div style="display: inline-block; margin-left: 10px;">
39 <span class="item-label" style="width: 80px;">线路: </span> 39 <span class="item-label" style="width: 80px;">线路: </span>
40 <select class="form-control" name="line" id="line" style="width: 160px;"></select> 40 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
41 </div> 41 </div>
42 - <div style="display: inline-block;margin-left: 15px;"> 42 + <div style="display: inline-block; margin-left: 10px;">
43 <span class="item-label" style="width: 80px;">时间: </span> 43 <span class="item-label" style="width: 80px;">时间: </span>
44 <input class="form-control" type="text" id="date" style="width: 160px;"/> 44 <input class="form-control" type="text" id="date" style="width: 160px;"/>
45 </div> 45 </div>
@@ -116,6 +116,11 @@ @@ -116,6 +116,11 @@
116 for(var i = 0; i < obj.length; i++){ 116 for(var i = 0; i < obj.length; i++){
117 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 117 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
118 } 118 }
  119 + if(obj.length == 1){
  120 + $('#company1').hide();
  121 + if(obj[0].children.length == 1)
  122 + $('#subCompany1').hide();
  123 + }
119 $('#company').html(options); 124 $('#company').html(options);
120 updateCompany(); 125 updateCompany();
121 }); 126 });
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
@@ -27,28 +27,28 @@ @@ -27,28 +27,28 @@
27 <div class="portlet light porttlet-fit bordered"> 27 <div class="portlet light porttlet-fit bordered">
28 <div class="portlet-title"> 28 <div class="portlet-title">
29 <form id="history" class="form-inline" action=""> 29 <form id="history" class="form-inline" action="">
30 -<!-- <div style="display: inline-block;margin-left: 38px;"> -->  
31 -<!-- <span class="item-label" style="width: 80px;">公司: </span> -->  
32 -<!-- <select class="form-control" name="company" id="company" style="width: 160px;"></select> -->  
33 -<!-- </div> -->  
34 -<!-- <div style="display: inline-block;margin-left: 29px;"> -->  
35 -<!-- <span class="item-label" style="width: 80px;">分公司: </span> -->  
36 -<!-- <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> -->  
37 -<!-- </div> -->  
38 - <div style="display: inline-block;margin-left: 43px;"> 30 + <div style="display: inline-block;margin-left: 38px;" id="company1">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="company" style="width: 160px;"></select>
  33 + </div>
  34 + <div style="display: inline-block;margin-left: 24px;" id="subCompany1">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
  37 + </div>
  38 + <div style="display: inline-block;margin-left: 38px;">
39 <span class="item-label" style="width: 80px;">线路: </span> 39 <span class="item-label" style="width: 80px;">线路: </span>
40 <select class="form-control" name="line" id="line" style="width: 160px;"></select> 40 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
41 </div> 41 </div>
42 -<!-- <div style="margin-top: 10px"></div> --> 42 + <div style="margin-top: 10px"></div>
43 <div style="display: inline-block;margin-left: 10px;"> 43 <div style="display: inline-block;margin-left: 10px;">
44 <span class="item-label" style="width: 80px;">开始时间: </span> 44 <span class="item-label" style="width: 80px;">开始时间: </span>
45 <input class="form-control" type="text" id="startDate" style="width: 160px;"/> 45 <input class="form-control" type="text" id="startDate" style="width: 160px;"/>
46 </div> 46 </div>
47 - <div style="display: inline-block;margin-left: 15px;"> 47 + <div style="display: inline-block;margin-left: 10px;">
48 <span class="item-label" style="width: 80px;">结束时间: </span> 48 <span class="item-label" style="width: 80px;">结束时间: </span>
49 <input class="form-control" type="text" id="endDate" style="width: 160px;"/> 49 <input class="form-control" type="text" id="endDate" style="width: 160px;"/>
50 </div> 50 </div>
51 - <div style="display: inline-block;margin-left: 15px;"> 51 + <div style="display: inline-block;margin-left: 10px;">
52 <span class="item-label" style="width: 80px;">模板类型: </span> 52 <span class="item-label" style="width: 80px;">模板类型: </span>
53 <select class="form-control" name="model" id="model" style="width: 160px;"> 53 <select class="form-control" name="model" id="model" style="width: 160px;">
54 <option value="">请选择...</option> 54 <option value="">请选择...</option>
@@ -143,6 +143,11 @@ @@ -143,6 +143,11 @@
143 for(var i = 0; i < obj.length; i++){ 143 for(var i = 0; i < obj.length; i++){
144 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 144 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
145 } 145 }
  146 + if(obj.length == 1){
  147 + $('#company1').hide();
  148 + if(obj[0].children.length == 1)
  149 + $('#subCompany1').hide();
  150 + }
146 $('#company').html(options); 151 $('#company').html(options);
147 updateCompany(); 152 updateCompany();
148 }); 153 });
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">&nbsp;</span></td>
  90 + <td><span id="total_zhgs">&nbsp;</span></td>
  91 + <td><span id="total_xlts">&nbsp;</span></td>
  92 + <td><span id="total_jh">&nbsp;</span></td>
  93 + <td><span id="total_sj">&nbsp;</span></td>
  94 + <td><span id="total_qz">&nbsp;</span></td>
  95 + <td><span id="total_ccl">&nbsp;</span></td>
  96 + <td><span id="total_bcjh">&nbsp;</span></td>
  97 + <td><span id="total_bcsj">&nbsp;</span></td>
  98 + <td><span id="total_bczxl">&nbsp;</span></td>
  99 + <td><span id="total_sm">&nbsp;</span></td>
  100 + </tr>
  101 + </table>
  102 + </div>
  103 + </div>
  104 + </div>
  105 + </div>
  106 +</div>
  107 +
  108 +<script>
  109 + $(function(){
  110 + // 关闭左侧栏
  111 + if (!$('body').hasClass('page-sidebar-closed'))
  112 + $('.menu-toggler.sidebar-toggler').click();
  113 +
  114 + $("#startDate,#endDate").datetimepicker({
  115 + format : 'YYYY-MM-DD',
  116 + locale : 'zh-cn'
  117 + });
  118 +
  119 + $.get('/basic/lineCode2Name',function(result){
  120 + var data=[];
  121 +
  122 + for(var code in result){
  123 + data.push({id: code, text: result[code]});
  124 + }
  125 + initPinYinSelect2('#line',data,'');
  126 +
  127 + })
  128 +
  129 + var line;
  130 + var startDate;
  131 + var endDate;
  132 + $("#query").on("click",function(){
  133 +
  134 + line = $("#line").val();
  135 + startDate1=$("#startDate").val();
  136 + endDate1=$("#endDate").val();
  137 +
  138 + if(startDate1!=''&&endDate1!=''){
  139 + $post('/mcy_forms/turnoutrate',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){
  140 + // 把数据填充到模版中
  141 + var tbodyHtml = template('turnoutrate',{list:result});
  142 + // 把渲染好的模版html文本追加到表格中
  143 + $('#tbody').html(tbodyHtml);
  144 + line = $("#line").val();
  145 + startDate = $("#startDate").val();
  146 + endDate = $("#endDate").val();
  147 + $("#sDate").text(startDate);
  148 + $("#eDate").text(endDate);
  149 +
  150 + var total_xlts = 0,total_jh = 0;
  151 + var total_sj = 0,total_qz = 0,total_ccl = 0,total_bcjh = 0;
  152 + var total_bcjh = 0,total_bcsj = 0,total_bczxl = 0;
  153 + var total_gs=0;
  154 + var total_zhgs=0;
  155 + $.each(result, function(i, obj) {
  156 + total_gs +=Number(obj.gsgs);
  157 + total_zhgs +=Number(obj.fgsgs);
  158 + total_xlts += Number(obj.xl);
  159 + total_jh = Number(obj.cchjh)+Number(total_jh);
  160 + total_sj = Number(obj.cchsj)+Number(total_sj);
  161 + total_qz = Number(obj.cchqz)+Number(total_qz);
  162 +
  163 + total_ccl =(Number(total_sj)/Number(total_jh))*100;
  164 + total_bcjh = Number(obj.bcjh)+Number(total_bcjh);
  165 + total_bcsj = Number(obj.bcsj)+Number(total_bcsj);
  166 + total_bczxl = (Number(total_bcsj)/Number(total_bcjh))*100;
  167 +
  168 + });
  169 + $("#total_gs").text(total_gs);
  170 + $("#total_zhgs").text(total_zhgs);
  171 + $("#total_xlts").text(total_xlts);
  172 + $("#total_jh").text(total_jh);
  173 + $("#total_sj").text(total_sj);
  174 + $("#total_qz").text(total_qz);
  175 + $("#total_ccl").text(total_ccl.toFixed(2)+'%');
  176 + $("#total_bcjh").text(total_bcjh);
  177 + $("#total_bcsj").text(total_bcsj);
  178 + $("#total_bczxl").text(total_bczxl.toFixed(2)+'%');
  179 +
  180 + var temp = {};
  181 + var today_account = 0;
  182 +
  183 + temp["line"] = $("#line").text();
  184 + $.each(result, function(i, obj) {
  185 + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){
  186 + today_account++;
  187 + }
  188 + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");
  189 + });
  190 +
  191 + })
  192 +
  193 + }else{
  194 + alert("请选择时间范围!");
  195 + }
  196 + });
  197 +
  198 + $("#export").on("click",function(){
  199 + $post('/mcy_export/turnoutrateExport',{line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){
  200 + window.open("/downloadFile/download?fileName=营运线路出车率统计表"+moment(startDate).format("YYYYMMDD"));
  201 + });
  202 + });
  203 + });
  204 +</script>
  205 +<script type="text/html" id="turnoutrate">
  206 + {{each list as obj i}}
  207 + <tr>
  208 + <td>{{obj.rq}}</td>
  209 + <td>{{obj.gs}}</td>
  210 + <td>{{obj.zhgs}}</td>
  211 + <td>{{obj.xl}}</td>
  212 + <td>{{obj.cchjh}}</td>
  213 + <td>{{obj.cchsj}}</td>
  214 + <td>{{obj.cchqz}}</td>
  215 + <td>{{obj.chl}}</td>
  216 + <td>{{obj.bcjh}}</td>
  217 + <td>{{obj.bcsj}}</td>
  218 + <td>{{obj.bbzxl}}</td>
  219 + <td>{{obj.gs}}</td>
  220 + </tr>
  221 + {{/each}}
  222 + {{if list.length == 0}}
  223 + <tr>
  224 + <td colspan="12"><h6 class="muted">没有找到相关数据</h6></td>
  225 + </tr>
  226 + {{/if}}
  227 +</script>
src/main/resources/static/pages/forms/statement/waybillday.html
@@ -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/forms/statement/workDaily.html
@@ -27,11 +27,19 @@ @@ -27,11 +27,19 @@
27 <div class="portlet light porttlet-fit bordered"> 27 <div class="portlet light porttlet-fit bordered">
28 <div class="portlet-title"> 28 <div class="portlet-title">
29 <form id="history" class="form-inline" action=""> 29 <form id="history" class="form-inline" action="">
30 - <div style="display: inline-block;"> 30 + <div style="display: inline-block; margin-left: 10px;" id="company1">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="company" style="width: 160px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 10px;" id="subCompany1">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
  37 + </div>
  38 + <div style="display: inline-block; margin-left: 10px;">
31 <span class="item-label" style="width: 80px;">线路: </span> 39 <span class="item-label" style="width: 80px;">线路: </span>
32 <select class="form-control" name="line" id="line" style="width: 180px;"></select> 40 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
33 </div> 41 </div>
34 - <div style="display: inline-block;margin-left: 15px;"> 42 + <div style="display: inline-block;margin-left: 10px;">
35 <span class="item-label" style="width: 80px;">时间: </span> 43 <span class="item-label" style="width: 80px;">时间: </span>
36 <input class="form-control" type="text" id="date" style="width: 180px;"/> 44 <input class="form-control" type="text" id="date" style="width: 180px;"/>
37 </div> 45 </div>
@@ -110,6 +118,37 @@ @@ -110,6 +118,37 @@
110 initPinYinSelect2('#line',data,''); 118 initPinYinSelect2('#line',data,'');
111 }) 119 })
112 120
  121 + var obj = [];
  122 + $.get('/user/companyData', function(result){
  123 + obj = result;
  124 + var options = '';
  125 + for(var i = 0; i < obj.length; i++){
  126 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  127 + }
  128 + if(obj.length == 1){
  129 + $('#company1').hide();
  130 + if(obj[0].children.length == 1)
  131 + $('#subCompany1').hide();
  132 + }
  133 + $('#company').html(options);
  134 + updateCompany();
  135 + });
  136 + $("#company").on("change",updateCompany);
  137 + function updateCompany(){
  138 + var company = $('#company').val();
  139 + var options = '';
  140 + for(var i = 0; i < obj.length; i++){
  141 + if(obj[i].companyCode == company){
  142 + var children = obj[i].children;
  143 + for(var j = 0; j < children.length; j++){
  144 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  145 + }
  146 + }
  147 + }
  148 + $('#subCompany').html(options);
  149 + }
  150 +
  151 +
113 $("#query").on("click",jsDoQuery); 152 $("#query").on("click",jsDoQuery);
114 153
115 var line = $("#line").val(); 154 var line = $("#line").val();