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,6 +34,7 @@ import com.bsth.util.ReportUtils;
34 @RequestMapping("mcy_export") 34 @RequestMapping("mcy_export")
35 public class ExportController { 35 public class ExportController {
36 36
  37 +
37 @Autowired 38 @Autowired
38 FormsService formsService; 39 FormsService formsService;
39 40
@@ -71,9 +72,9 @@ public class ExportController { @@ -71,9 +72,9 @@ public class ExportController {
71 72
72 try { 73 try {
73 listI.add(resList.iterator()); 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 } catch (Exception e) { 78 } catch (Exception e) {
78 e.printStackTrace(); 79 e.printStackTrace();
79 } 80 }
@@ -111,9 +112,9 @@ public class ExportController { @@ -111,9 +112,9 @@ public class ExportController {
111 112
112 try { 113 try {
113 listI.add(resList.iterator()); 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 } catch (Exception e) { 118 } catch (Exception e) {
118 e.printStackTrace(); 119 e.printStackTrace();
119 } 120 }
@@ -148,9 +149,9 @@ public class ExportController { @@ -148,9 +149,9 @@ public class ExportController {
148 try { 149 try {
149 listI.add(resList.iterator()); 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 } catch (Exception e) { 156 } catch (Exception e) {
156 e.printStackTrace(); 157 e.printStackTrace();
@@ -177,6 +178,9 @@ public class ExportController { @@ -177,6 +178,9 @@ public class ExportController {
177 m.put("clzbh", l.getClzbh()); 178 m.put("clzbh", l.getClzbh());
178 m.put("jsy", l.getJsy()); 179 m.put("jsy", l.getJsy());
179 m.put("jName", l.getjName()); 180 m.put("jName", l.getjName());
  181 +
  182 +
  183 +
180 m.put("sgh", l.getSgh()); 184 m.put("sgh", l.getSgh());
181 m.put("sName", l.getsName()); 185 m.put("sName", l.getsName());
182 m.put("jhlc", l.getJhlc()); 186 m.put("jhlc", l.getJhlc());
@@ -186,14 +190,15 @@ public class ExportController { @@ -186,14 +190,15 @@ public class ExportController {
186 m.put("unyyyl", l.getUnyyyl()); 190 m.put("unyyyl", l.getUnyyyl());
187 m.put("jhjl", l.getJhjl()); 191 m.put("jhjl", l.getJhjl());
188 resList.add(m); 192 resList.add(m);
  193 +
189 i++; 194 i++;
190 } 195 }
191 196
192 try { 197 try {
193 listI.add(resList.iterator()); 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 } catch (Exception e) { 202 } catch (Exception e) {
198 e.printStackTrace(); 203 e.printStackTrace();
199 } 204 }
@@ -231,9 +236,9 @@ public class ExportController { @@ -231,9 +236,9 @@ public class ExportController {
231 236
232 try { 237 try {
233 listI.add(resList.iterator()); 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 } catch (Exception e) { 242 } catch (Exception e) {
238 e.printStackTrace(); 243 e.printStackTrace();
239 } 244 }
@@ -264,8 +269,8 @@ public class ExportController { @@ -264,8 +269,8 @@ public class ExportController {
264 269
265 try { 270 try {
266 listI.add(resList.iterator()); 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 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); 274 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
270 } catch (Exception e) { 275 } catch (Exception e) {
271 e.printStackTrace(); 276 e.printStackTrace();
@@ -303,8 +308,8 @@ public class ExportController { @@ -303,8 +308,8 @@ public class ExportController {
303 308
304 try { 309 try {
305 listI.add(resList.iterator()); 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 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); 313 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
309 } catch (Exception e) { 314 } catch (Exception e) {
310 e.printStackTrace(); 315 e.printStackTrace();
@@ -383,8 +388,8 @@ public class ExportController { @@ -383,8 +388,8 @@ public class ExportController {
383 388
384 try { 389 try {
385 listI.add(resList.iterator()); 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 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); 393 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
389 } catch (Exception e) { 394 } catch (Exception e) {
390 e.printStackTrace(); 395 e.printStackTrace();
@@ -458,8 +463,8 @@ public class ExportController { @@ -458,8 +463,8 @@ public class ExportController {
458 463
459 try { 464 try {
460 listI.add(resList.iterator()); 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 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); 468 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
464 } catch (Exception e) { 469 } catch (Exception e) {
465 e.printStackTrace(); 470 e.printStackTrace();
@@ -527,8 +532,8 @@ public class ExportController { @@ -527,8 +532,8 @@ public class ExportController {
527 532
528 try { 533 try {
529 listI.add(resList.iterator()); 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 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); 537 + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
533 } catch (Exception e) { 538 } catch (Exception e) {
534 e.printStackTrace(); 539 e.printStackTrace();
@@ -579,8 +584,8 @@ public class ExportController { @@ -579,8 +584,8 @@ public class ExportController {
579 m.put("date", map.get("date").toString()); 584 m.put("date", map.get("date").toString());
580 try { 585 try {
581 listI.add(resList.iterator()); 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 + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); 589 + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
585 } catch (Exception e) { 590 } catch (Exception e) {
586 e.printStackTrace(); 591 e.printStackTrace();
src/main/java/com/bsth/service/forms/impl/ExportServiceImpl.java
@@ -46,9 +46,9 @@ public class ExportServiceImpl implements ExportService{ @@ -46,9 +46,9 @@ public class ExportServiceImpl implements ExportService{
46 46
47 try { 47 try {
48 listI.add(resList.iterator()); 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 } catch (Exception e) { 52 } catch (Exception e) {
53 e.printStackTrace(); 53 e.printStackTrace();
54 } 54 }