Commit 954bca51d5f15c51c0446910cb421490214862f0

Authored by mcy123
1 parent 0734f5ef

mcy

src/main/java/com/bsth/controller/forms/ExportController.java
... ... @@ -34,6 +34,7 @@ import com.bsth.util.ReportUtils;
34 34 @RequestMapping("mcy_export")
35 35 public class ExportController {
36 36  
  37 +
37 38 @Autowired
38 39 FormsService formsService;
39 40  
... ... @@ -71,9 +72,9 @@ public class ExportController {
71 72  
72 73 try {
73 74 listI.add(resList.iterator());
74   - String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
75   - ee.excelReplace(listI, new Object[] { map }, path + "mould\\linepasswengerflow.xls",
76   - path + "export\\线路客流量报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
  75 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  76 + ee.excelReplace(listI, new Object[] { map }, path + "mould/linepasswengerflow.xls",
  77 + path + "export/线路客流量报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
77 78 } catch (Exception e) {
78 79 e.printStackTrace();
79 80 }
... ... @@ -111,9 +112,9 @@ public class ExportController {
111 112  
112 113 try {
113 114 listI.add(resList.iterator());
114   - String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
115   - ee.excelReplace(listI, new Object[] { map }, path + "mould\\shifday.xls",
116   - path + "export\\班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
  115 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  116 + ee.excelReplace(listI, new Object[] { map }, path + "mould/shifday.xls",
  117 + path + "export/班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
117 118 } catch (Exception e) {
118 119 e.printStackTrace();
119 120 }
... ... @@ -148,9 +149,9 @@ public class ExportController {
148 149 try {
149 150 listI.add(resList.iterator());
150 151  
151   - String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
152   - ee.excelReplace(listI, new Object[] { map }, path + "mould\\shiftuehiclemanth.xls", path
153   - + "export\\班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  152 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  153 + ee.excelReplace(listI, new Object[] { map }, path + "mould/shiftuehiclemanth.xls", path
  154 + + "export/班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
154 155  
155 156 } catch (Exception e) {
156 157 e.printStackTrace();
... ... @@ -177,6 +178,9 @@ public class ExportController {
177 178 m.put("clzbh", l.getClzbh());
178 179 m.put("jsy", l.getJsy());
179 180 m.put("jName", l.getjName());
  181 +
  182 +
  183 +
180 184 m.put("sgh", l.getSgh());
181 185 m.put("sName", l.getsName());
182 186 m.put("jhlc", l.getJhlc());
... ... @@ -186,14 +190,15 @@ public class ExportController {
186 190 m.put("unyyyl", l.getUnyyyl());
187 191 m.put("jhjl", l.getJhjl());
188 192 resList.add(m);
  193 +
189 194 i++;
190 195 }
191 196  
192 197 try {
193 198 listI.add(resList.iterator());
194   - String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
195   - ee.excelReplace(listI, new Object[] { map }, path + "mould\\singledata.xls",
196   - path + "export\\路单数据" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  199 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  200 + ee.excelReplace(listI, new Object[] { map }, path + "mould/singledata.xls",
  201 + path + "export/路单数据" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
197 202 } catch (Exception e) {
198 203 e.printStackTrace();
199 204 }
... ... @@ -231,9 +236,9 @@ public class ExportController {
231 236  
232 237 try {
233 238 listI.add(resList.iterator());
234   - String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
235   - ee.excelReplace(listI, new Object[] { map }, path + "mould\\vehicleloading.xls",
236   - path + "export\\车辆加注" + sdfSimple.format(sdfMonth.parse(map.get("data").toString())) + ".xls");
  239 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  240 + ee.excelReplace(listI, new Object[] { map }, path + "mould/vehicleloading.xls",
  241 + path + "export/车辆加注" + sdfSimple.format(sdfMonth.parse(map.get("data").toString())) + ".xls");
237 242 } catch (Exception e) {
238 243 e.printStackTrace();
239 244 }
... ... @@ -264,8 +269,8 @@ public class ExportController {
264 269  
265 270 try {
266 271 listI.add(resList.iterator());
267   - String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
268   - ee.excelReplace(listI, new Object[] { map }, path + "mould\\operationservice.xls", path + "export\\运营服务阶段报表"
  272 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  273 + ee.excelReplace(listI, new Object[] { map }, path + "mould/operationservice.xls", path + "export/运营服务阶段报表"
269 274 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
270 275 } catch (Exception e) {
271 276 e.printStackTrace();
... ... @@ -303,8 +308,8 @@ public class ExportController {
303 308  
304 309 try {
305 310 listI.add(resList.iterator());
306   - String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
307   - ee.excelReplace(listI, new Object[] { map }, path + "mould\\changetochange.xls", path + "export\\换人换车情况日统计"
  311 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  312 + ee.excelReplace(listI, new Object[] { map }, path + "mould/changetochange.xls", path + "export/换人换车情况日统计"
308 313 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
309 314 } catch (Exception e) {
310 315 e.printStackTrace();
... ... @@ -383,8 +388,8 @@ public class ExportController {
383 388  
384 389 try {
385 390 listI.add(resList.iterator());
386   - String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
387   - ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\turnoutrate.xls", path + "export\\营运线路出车率统计表"
  391 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  392 + ee.excelReplace(listI, new Object[] { map1 }, path + "mould/turnoutrate.xls", path + "export/营运线路出车率统计表"
388 393 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
389 394 } catch (Exception e) {
390 395 e.printStackTrace();
... ... @@ -458,8 +463,8 @@ public class ExportController {
458 463  
459 464 try {
460 465 listI.add(resList.iterator());
461   - String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
462   - ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\executionrate.xls", path + "export\\班次执行率统计表"
  466 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  467 + ee.excelReplace(listI, new Object[] { map1 }, path + "mould/executionrate.xls", path + "export/班次执行率统计表"
463 468 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
464 469 } catch (Exception e) {
465 470 e.printStackTrace();
... ... @@ -527,8 +532,8 @@ public class ExportController {
527 532  
528 533 try {
529 534 listI.add(resList.iterator());
530   - String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
531   - ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\allline.xls", path + "export\\营运线路名称统计表"
  535 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  536 + ee.excelReplace(listI, new Object[] { map1 }, path + "mould/allline.xls", path + "export/营运线路名称统计表"
532 537 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
533 538 } catch (Exception e) {
534 539 e.printStackTrace();
... ... @@ -579,8 +584,8 @@ public class ExportController {
579 584 m.put("date", map.get("date").toString());
580 585 try {
581 586 listI.add(resList.iterator());
582   - String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
583   - ee.excelReplace(listI, new Object[] { m }, path + "mould\\daily.xls", path + "export\\班次日报表"
  587 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  588 + ee.excelReplace(listI, new Object[] { m }, path + "mould/daily.xls", path + "export/班次日报表"
584 589 + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
585 590 } catch (Exception e) {
586 591 e.printStackTrace();
... ...
src/main/java/com/bsth/service/forms/impl/ExportServiceImpl.java
... ... @@ -46,9 +46,9 @@ public class ExportServiceImpl implements ExportService{
46 46  
47 47 try {
48 48 listI.add(resList.iterator());
49   - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
50   - ee.excelReplace(listI, new Object[] { map }, path+"mould\\waybillday.xls",
51   - path+"export\\行车路单日报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
  49 + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
  50 + ee.excelReplace(listI, new Object[] { map }, path+"mould/waybillday.xls",
  51 + path+"export/行车路单日报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
52 52 } catch (Exception e) {
53 53 e.printStackTrace();
54 54 }
... ...