Commit 03a0129dbe0930fec880221d36277650a5f52161

Authored by 娄高锋
1 parent 1294cdc5

统一导出excel表名格式:日期-线路名-报表名.xls

Showing 55 changed files with 1125 additions and 533 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
@@ -46,7 +46,8 @@ public class ExportController { @@ -46,7 +46,8 @@ public class ExportController {
46 @RequestMapping(value = "/waybilldayExport", method = RequestMethod.POST) 46 @RequestMapping(value = "/waybilldayExport", method = RequestMethod.POST)
47 public List<Waybillday> waybilldayExport(@RequestParam Map<String, Object> map) { 47 public List<Waybillday> waybilldayExport(@RequestParam Map<String, Object> map) {
48 List<Waybillday> waybillday = formsService.waybillday(map); 48 List<Waybillday> waybillday = formsService.waybillday(map);
49 - exportService.waybillday(map.get("date").toString(), waybillday); 49 + exportService.waybillday(map.get("date").toString(),
  50 + map.get("lineName").toString(), waybillday);
50 return waybillday; 51 return waybillday;
51 } 52 }
52 53
@@ -85,7 +86,8 @@ public class ExportController { @@ -85,7 +86,8 @@ public class ExportController {
85 // 班次车辆人员日统计 86 // 班次车辆人员日统计
86 @RequestMapping(value = "/shifdayExport", method = RequestMethod.GET) 87 @RequestMapping(value = "/shifdayExport", method = RequestMethod.GET)
87 public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map) { 88 public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map) {
88 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); 89 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  90 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
89 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 91 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
90 Map<String, Object> map2 = new HashMap<String, Object>(); 92 Map<String, Object> map2 = new HashMap<String, Object>();
91 ReportUtils ee = new ReportUtils(); 93 ReportUtils ee = new ReportUtils();
@@ -117,10 +119,14 @@ public class ExportController { @@ -117,10 +119,14 @@ public class ExportController {
117 } 119 }
118 120
119 try { 121 try {
  122 + String lineName = "";
  123 + if(map.containsKey("lineName"))
  124 + lineName = map.get("lineName").toString();
120 listI.add(resList.iterator()); 125 listI.add(resList.iterator());
121 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 126 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
122 ee.excelReplace(listI, new Object[] { map2 }, path + "mould/shifday.xls", 127 ee.excelReplace(listI, new Object[] { map2 }, path + "mould/shifday.xls",
123 - path + "export/班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); 128 + path + "export/" + sdfSimple.format(sdfMonth.parse(map.get("date").toString()))
  129 + + "-" + lineName + "-班次车辆人员日报表.xls");
124 } catch (Exception e) { 130 } catch (Exception e) {
125 e.printStackTrace(); 131 e.printStackTrace();
126 } 132 }
@@ -130,7 +136,8 @@ public class ExportController { @@ -130,7 +136,8 @@ public class ExportController {
130 // 班次车辆人员月统计 136 // 班次车辆人员月统计
131 @RequestMapping(value = "/shiftuehiclemanthExport", method = RequestMethod.GET) 137 @RequestMapping(value = "/shiftuehiclemanthExport", method = RequestMethod.GET)
132 public List<Map<String, Object>> shiftuehiclemanthExport(@RequestParam Map<String, Object> map) { 138 public List<Map<String, Object>> shiftuehiclemanthExport(@RequestParam Map<String, Object> map) {
133 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); 139 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  140 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
134 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 141 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
135 ReportUtils ee = new ReportUtils(); 142 ReportUtils ee = new ReportUtils();
136 List<Shiftuehiclemanth> shiftuehiclemanth = formsService.shiftuehiclemanth(map); 143 List<Shiftuehiclemanth> shiftuehiclemanth = formsService.shiftuehiclemanth(map);
@@ -153,7 +160,20 @@ public class ExportController { @@ -153,7 +160,20 @@ public class ExportController {
153 } 160 }
154 161
155 try { 162 try {
156 - String mouldurl = null; 163 + String mouldurl = null, lineName = "", dateTime = ""
  164 + , startDate = "", endDate = "";
  165 + if(map.containsKey("lineName"))
  166 + lineName = map.get("lineName").toString();
  167 + if(map.containsKey("startDate"))
  168 + startDate = map.get("startDate").toString();
  169 + if(map.containsKey("endDate"))
  170 + endDate = map.get("endDate").toString();
  171 + if(startDate.equals(endDate)){
  172 + dateTime = sdfSimple.format(sdfMonth.parse(startDate));
  173 + } else {
  174 + dateTime = sdfSimple.format(sdfMonth.parse(startDate))
  175 + +"-"+sdfSimple.format(sdfMonth.parse(endDate));
  176 + }
157 if(map.get("empnames").equals("驾驶员")){ 177 if(map.get("empnames").equals("驾驶员")){
158 mouldurl="mould/shiftuehiclemanth.xls"; 178 mouldurl="mould/shiftuehiclemanth.xls";
159 }else if(map.get("empnames").equals("售票员")){ 179 }else if(map.get("empnames").equals("售票员")){
@@ -164,7 +184,7 @@ public class ExportController { @@ -164,7 +184,7 @@ public class ExportController {
164 listI.add(resList.iterator()); 184 listI.add(resList.iterator());
165 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 185 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
166 ee.excelReplace(listI, new Object[] { map }, path +mouldurl, 186 ee.excelReplace(listI, new Object[] { map }, path +mouldurl,
167 - path + "export/班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); 187 + path + "export/" + dateTime + "-" + lineName + "-班次车辆人员月报表.xls");
168 } catch (Exception e) { 188 } catch (Exception e) {
169 e.printStackTrace(); 189 e.printStackTrace();
170 } 190 }
@@ -304,7 +324,8 @@ public class ExportController { @@ -304,7 +324,8 @@ public class ExportController {
304 } 324 }
305 @RequestMapping(value = "/singledataExportTj", method = RequestMethod.GET) 325 @RequestMapping(value = "/singledataExportTj", method = RequestMethod.GET)
306 public List<Map<String, Object>> singledataExportTj(@RequestParam Map<String, Object> map) { 326 public List<Map<String, Object>> singledataExportTj(@RequestParam Map<String, Object> map) {
307 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); 327 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  328 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
308 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 329 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
309 ReportUtils ee = new ReportUtils(); 330 ReportUtils ee = new ReportUtils();
310 List<Singledata> singledata = formsService.singledatatj(map); 331 List<Singledata> singledata = formsService.singledatatj(map);
@@ -333,10 +354,16 @@ public class ExportController { @@ -333,10 +354,16 @@ public class ExportController {
333 } 354 }
334 355
335 try { 356 try {
  357 + String startDate = "", lineName = "";
  358 + if(map.containsKey("startDate"))
  359 + startDate = map.get("startDate").toString();
  360 + if(map.containsKey("lineName"))
  361 + lineName = map.get("lineName").toString();
336 listI.add(resList.iterator()); 362 listI.add(resList.iterator());
337 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 363 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
338 ee.excelReplace(listI, new Object[] { map }, path + "mould/singledata.xls", 364 ee.excelReplace(listI, new Object[] { map }, path + "mould/singledata.xls",
339 - path + "export/路单数据" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); 365 + path + "export/" + sdfSimple.format(sdfMonth.parse(startDate))
  366 + + "-" + lineName + "-路单数据.xls");
340 } catch (Exception e) { 367 } catch (Exception e) {
341 e.printStackTrace(); 368 e.printStackTrace();
342 } 369 }
@@ -388,7 +415,8 @@ public class ExportController { @@ -388,7 +415,8 @@ public class ExportController {
388 // 车辆加注 415 // 车辆加注
389 @RequestMapping(value = "/vehicleloadingExport", method = RequestMethod.GET) 416 @RequestMapping(value = "/vehicleloadingExport", method = RequestMethod.GET)
390 public List<Map<String, Object>> vehicleloadingExport(@RequestParam Map<String, Object> map) { 417 public List<Map<String, Object>> vehicleloadingExport(@RequestParam Map<String, Object> map) {
391 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); 418 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  419 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
392 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 420 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
393 ReportUtils ee = new ReportUtils(); 421 ReportUtils ee = new ReportUtils();
394 List<Vehicleloading> vehicleloading = formsService.vehicleloading(map.get("line").toString(), 422 List<Vehicleloading> vehicleloading = formsService.vehicleloading(map.get("line").toString(),
@@ -414,10 +442,15 @@ public class ExportController { @@ -414,10 +442,15 @@ public class ExportController {
414 } 442 }
415 443
416 try { 444 try {
  445 + String date = "", lineName = "";
  446 + if(map.containsKey("data"))
  447 + date = map.get("data").toString();
  448 + if(map.containsKey("lineName"))
  449 + lineName = map.get("lineName").toString();
417 listI.add(resList.iterator()); 450 listI.add(resList.iterator());
418 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 451 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
419 ee.excelReplace(listI, new Object[] { map }, path + "mould/vehicleloading.xls", 452 ee.excelReplace(listI, new Object[] { map }, path + "mould/vehicleloading.xls",
420 - path + "export/车辆加注" + sdfSimple.format(sdfMonth.parse(map.get("data").toString())) + ".xls"); 453 + path + "export/" + sdfSimple.format(sdfMonth.parse(date)) + "-" + lineName + "-车辆加注.xls");
421 } catch (Exception e) { 454 } catch (Exception e) {
422 e.printStackTrace(); 455 e.printStackTrace();
423 } 456 }
@@ -447,10 +480,23 @@ public class ExportController { @@ -447,10 +480,23 @@ public class ExportController {
447 } 480 }
448 481
449 try { 482 try {
  483 + String dateTime = "", startDate = "", endDate = "", lineName = "";
  484 + if(map.containsKey("startDate"))
  485 + startDate = map.get("startDate").toString();
  486 + if(map.containsKey("endDate"))
  487 + endDate = map.get("endDate").toString();
  488 + if(map.containsKey("lineName"))
  489 + lineName = map.get("lineName").toString();
  490 + if(startDate.equals(endDate)){
  491 + dateTime = sdfSimple.format(sdfMonth.parse(startDate));
  492 + } else {
  493 + dateTime = sdfSimple.format(sdfMonth.parse(startDate))
  494 + +"-"+sdfSimple.format(sdfMonth.parse(endDate));
  495 + }
450 listI.add(resList.iterator()); 496 listI.add(resList.iterator());
451 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 497 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
452 - ee.excelReplace(listI, new Object[] { map }, path + "mould/operationservice.xls", path + "export/运营服务阶段报表"  
453 - + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); 498 + ee.excelReplace(listI, new Object[] { map }, path + "mould/operationservice.xls", path + "export/"
  499 + + dateTime + "-" + lineName + "-运营服务阶段报表.xls");
454 } catch (Exception e) { 500 } catch (Exception e) {
455 e.printStackTrace(); 501 e.printStackTrace();
456 } 502 }
@@ -460,7 +506,8 @@ public class ExportController { @@ -460,7 +506,8 @@ public class ExportController {
460 // 换人换车情况日统计 506 // 换人换车情况日统计
461 @RequestMapping(value = "/changetochangeExport", method = RequestMethod.POST) 507 @RequestMapping(value = "/changetochangeExport", method = RequestMethod.POST)
462 public List<Map<String, Object>> changetochangeExport(@RequestParam Map<String, Object> map) { 508 public List<Map<String, Object>> changetochangeExport(@RequestParam Map<String, Object> map) {
463 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); 509 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  510 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
464 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 511 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
465 ReportUtils ee = new ReportUtils(); 512 ReportUtils ee = new ReportUtils();
466 List<Changetochange> changetochange = formsService.changetochange(map); 513 List<Changetochange> changetochange = formsService.changetochange(map);
@@ -484,10 +531,23 @@ public class ExportController { @@ -484,10 +531,23 @@ public class ExportController {
484 } 531 }
485 532
486 try { 533 try {
  534 + String dateTime = "", startDate = "", endDate = "", lineName = "";
  535 + if(map.containsKey("startDate"))
  536 + startDate = map.get("startDate").toString();
  537 + if(map.containsKey("endDate"))
  538 + endDate = map.get("endDate").toString();
  539 + if(map.containsKey("lineName"))
  540 + lineName = map.get("lineName").toString();
  541 + if(startDate.equals(endDate)){
  542 + dateTime = sdfSimple.format(sdfMonth.parse(startDate));
  543 + } else {
  544 + dateTime = sdfSimple.format(sdfMonth.parse(startDate))
  545 + +"-"+sdfSimple.format(sdfMonth.parse(endDate));
  546 + }
487 listI.add(resList.iterator()); 547 listI.add(resList.iterator());
488 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 548 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
489 - ee.excelReplace(listI, new Object[] { map }, path + "mould/changetochange.xls", path + "export/换人换车情况日统计"  
490 - + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); 549 + ee.excelReplace(listI, new Object[] { map }, path + "mould/changetochange.xls", path + "export/"
  550 + + dateTime + "-" + lineName + "-换人换车情况日统计.xls");
491 } catch (Exception e) { 551 } catch (Exception e) {
492 e.printStackTrace(); 552 e.printStackTrace();
493 } 553 }
@@ -497,7 +557,8 @@ public class ExportController { @@ -497,7 +557,8 @@ public class ExportController {
497 // 营运线路出车率统计表 557 // 营运线路出车率统计表
498 @RequestMapping(value = "/turnoutrateExport", method = RequestMethod.POST) 558 @RequestMapping(value = "/turnoutrateExport", method = RequestMethod.POST)
499 public List<Map<String, Object>> turnoutrateExport(@RequestParam Map<String, Object> map) { 559 public List<Map<String, Object>> turnoutrateExport(@RequestParam Map<String, Object> map) {
500 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); 560 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  561 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
501 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 562 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
502 ReportUtils ee = new ReportUtils(); 563 ReportUtils ee = new ReportUtils();
503 Map<String, Object> map1 = new HashMap<String, Object>(); 564 Map<String, Object> map1 = new HashMap<String, Object>();
@@ -517,10 +578,23 @@ public class ExportController { @@ -517,10 +578,23 @@ public class ExportController {
517 resList.remove(m); 578 resList.remove(m);
518 579
519 try { 580 try {
  581 + String dateTime = "", startDate = "", endDate = "", lineName = "";
  582 + if(map.containsKey("startDate"))
  583 + startDate = map.get("startDate").toString();
  584 + if(map.containsKey("endDate"))
  585 + endDate = map.get("endDate").toString();
  586 + if(map.containsKey("lineName"))
  587 + lineName = map.get("lineName").toString();
  588 + if(startDate.equals(endDate)){
  589 + dateTime = sdfSimple.format(sdfMonth.parse(startDate));
  590 + } else {
  591 + dateTime = sdfSimple.format(sdfMonth.parse(startDate))
  592 + +"-"+sdfSimple.format(sdfMonth.parse(endDate));
  593 + }
520 listI.add(resList.iterator()); 594 listI.add(resList.iterator());
521 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 595 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
522 - ee.excelReplace(listI, new Object[] { map1 }, path + "mould/turnoutrate.xls", path + "export/营运线路出车率统计表"  
523 - + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls"); 596 + ee.excelReplace(listI, new Object[] { map1 }, path + "mould/turnoutrate.xls", path + "export/"
  597 + + dateTime + "-" + lineName + "-营运线路出车率统计表.xls");
524 } catch (Exception e) { 598 } catch (Exception e) {
525 e.printStackTrace(); 599 e.printStackTrace();
526 } 600 }
@@ -713,10 +787,13 @@ public class ExportController { @@ -713,10 +787,13 @@ public class ExportController {
713 m.put("line", BasicData.lineCode2NameMap.get(map.get("line").toString())); 787 m.put("line", BasicData.lineCode2NameMap.get(map.get("line").toString()));
714 m.put("date", map.get("date").toString()); 788 m.put("date", map.get("date").toString());
715 try { 789 try {
  790 + String lineName = map.get("lineName").toString();
  791 + String date = map.get("date").toString();
716 listI.add(resList.iterator()); 792 listI.add(resList.iterator());
717 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 793 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
718 - ee.excelReplace(listI, new Object[] { m }, path + "mould/daily.xls", path + "export/班次日报表"  
719 - + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); 794 + ee.excelReplace(listI, new Object[] { m }, path + "mould/daily.xls",
  795 + path + "export/" + sdfSimple.format(sdfMonth.parse(date))
  796 + + "-" + lineName + "-班次日报表.xls");
720 } catch (Exception e) { 797 } catch (Exception e) {
721 e.printStackTrace(); 798 e.printStackTrace();
722 } 799 }
src/main/java/com/bsth/controller/report/ReportController.java
1 package com.bsth.controller.report; 1 package com.bsth.controller.report;
2 2
  3 +import java.text.SimpleDateFormat;
3 import java.util.ArrayList; 4 import java.util.ArrayList;
4 import java.util.HashMap; 5 import java.util.HashMap;
5 import java.util.Iterator; 6 import java.util.Iterator;
@@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController; @@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
15 16
16 import com.alibaba.fastjson.JSONArray; 17 import com.alibaba.fastjson.JSONArray;
17 import com.alibaba.fastjson.JSONObject; 18 import com.alibaba.fastjson.JSONObject;
  19 +import com.bsth.data.BasicData;
18 import com.bsth.entity.StationRoute; 20 import com.bsth.entity.StationRoute;
19 import com.bsth.entity.excep.ArrivalInfo; 21 import com.bsth.entity.excep.ArrivalInfo;
20 import com.bsth.entity.realcontrol.ScheduleRealInfo; 22 import com.bsth.entity.realcontrol.ScheduleRealInfo;
@@ -65,13 +67,15 @@ public class ReportController { @@ -65,13 +67,15 @@ public class ReportController {
65 resList.add(m); 67 resList.add(m);
66 i++; 68 i++;
67 } 69 }
68 -  
69 try { 70 try {
  71 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  72 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
70 Map<String, Object> map=new HashMap<String, Object>(); 73 Map<String, Object> map=new HashMap<String, Object>();
71 listI.add(resList.iterator()); 74 listI.add(resList.iterator());
72 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 75 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
73 ee.excelReplace(listI, new Object[] { map }, path + "mould/inoutstation.xls", 76 ee.excelReplace(listI, new Object[] { map }, path + "mould/inoutstation.xls",
74 - path + "export/班次到离站.xls"); 77 + path + "export/"+sdfSimple.format(sdfMonth.parse(date))
  78 + +"-"+clzbh+"-班次到离站.xls");
75 } catch (Exception e) { 79 } catch (Exception e) {
76 e.printStackTrace(); 80 e.printStackTrace();
77 } 81 }
@@ -114,7 +118,8 @@ public class ReportController { @@ -114,7 +118,8 @@ public class ReportController {
114 @RequestParam String zdlx,@RequestParam String fcsj,@RequestParam String ddsj){ 118 @RequestParam String zdlx,@RequestParam String fcsj,@RequestParam String ddsj){
115 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 119 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
116 ReportUtils ee = new ReportUtils(); 120 ReportUtils ee = new ReportUtils();
117 - List<ArrivalInfo> list=service.queryListClzd(line,zd,zdlx,fcsj,ddsj); 121 +// List<ArrivalInfo> list=service.queryListClzd(line,zd,zdlx,fcsj,ddsj);
  122 + List<ArrivalInfo> list = new ArrayList<ArrivalInfo>();
118 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 123 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
119 int i=1; 124 int i=1;
120 for (ArrivalInfo a:list ) { 125 for (ArrivalInfo a:list ) {
@@ -138,11 +143,23 @@ public class ReportController { @@ -138,11 +143,23 @@ public class ReportController {
138 } 143 }
139 144
140 try { 145 try {
  146 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  147 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  148 + String lineName = BasicData.lineCode2NameMap.get(line);
  149 + String dateTime = "", startDate = "", endDate = "";
  150 + startDate = fcsj.substring(0, 10);
  151 + endDate = ddsj.substring(0, 10);
  152 + if(startDate.equals(endDate)){
  153 + dateTime = sdfSimple.format(sdfMonth.parse(startDate));
  154 + } else {
  155 + dateTime = sdfSimple.format(sdfMonth.parse(startDate))
  156 + +"-"+sdfSimple.format(sdfMonth.parse(endDate));
  157 + }
141 Map<String, Object> map=new HashMap<String, Object>(); 158 Map<String, Object> map=new HashMap<String, Object>();
142 listI.add(resList.iterator()); 159 listI.add(resList.iterator());
143 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 160 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
144 ee.excelReplace(listI, new Object[] { map }, path + "mould/inoutstation.xls", 161 ee.excelReplace(listI, new Object[] { map }, path + "mould/inoutstation.xls",
145 - path + "export/班次到离站.xls"); 162 + path + "export/"+dateTime+"-"+lineName+"-班次到离站.xls");
146 } catch (Exception e) { 163 } catch (Exception e) {
147 e.printStackTrace(); 164 e.printStackTrace();
148 } 165 }
@@ -186,11 +203,14 @@ public class ReportController { @@ -186,11 +203,14 @@ public class ReportController {
186 lgqlList.add(newMap); 203 lgqlList.add(newMap);
187 } 204 }
188 try { 205 try {
  206 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  207 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
189 listI.add(fwqlList.iterator()); 208 listI.add(fwqlList.iterator());
190 listI.add(lgqlList.iterator()); 209 listI.add(lgqlList.iterator());
191 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 210 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
192 ee.excelReplace(listI, new Object[] { map }, path + "mould/jobSummary.xls", 211 ee.excelReplace(listI, new Object[] { map }, path + "mould/jobSummary.xls",
193 - path + "export/调度员工作汇总日报.xls"); 212 + path + "export/"+sdfSimple.format(sdfMonth.parse(date))
  213 + +"-"+lineName+"-调度员工作汇总日报.xls");
194 } catch (Exception e) { 214 } catch (Exception e) {
195 e.printStackTrace(); 215 e.printStackTrace();
196 } 216 }
src/main/java/com/bsth/service/calc/CalcWaybillService.java
@@ -25,7 +25,7 @@ public interface CalcWaybillService extends BaseService&lt;CalcWaybill, Integer&gt; { @@ -25,7 +25,7 @@ public interface CalcWaybillService extends BaseService&lt;CalcWaybill, Integer&gt; {
25 List<Map<String, Object>> statisticsDailyTj(String gsdm,String fgsdm, String line, String date, String date2, String xlName, String type); 25 List<Map<String, Object>> statisticsDailyTj(String gsdm,String fgsdm, String line, String date, String date2, String xlName, String type);
26 26
27 /** 27 /**
28 - * @param rq 格式如:2018-03-22(留空""默认当前日期前天) 28 + * @param rq 格式如:2018-03-22(留空""默认当前日期前天)
29 * @param line (留空""默认全部线路) 29 * @param line (留空""默认全部线路)
30 */ 30 */
31 String calcDaily(String rq, String line) throws Exception; 31 String calcDaily(String rq, String line) throws Exception;
src/main/java/com/bsth/service/calc/impl/CalcWaybillServiceImpl.java
@@ -477,10 +477,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -477,10 +477,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
477 m.put("date", date+"至"+date2); 477 m.put("date", date+"至"+date2);
478 ReportUtils ee = new ReportUtils(); 478 ReportUtils ee = new ReportUtils();
479 try { 479 try {
  480 + String dateTime = "";
  481 + if(date.equals(date2)){
  482 + dateTime = sdfSimple.format(sdfMonth.parse(date));
  483 + } else {
  484 + dateTime = sdfSimple.format(sdfMonth.parse(date))
  485 + +"-"+sdfSimple.format(sdfMonth.parse(date2));
  486 + }
480 listI.add(resList.iterator()); 487 listI.add(resList.iterator());
481 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 488 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
482 ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_.xls", 489 ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_.xls",
483 - path + "export/统计日报" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 490 + path + "export/" + dateTime + "-" + xlName + "-统计日报.xls");
484 } catch (Exception e) { 491 } catch (Exception e) {
485 // TODO: handle exception 492 // TODO: handle exception
486 //e.printStackTrace(); 493 //e.printStackTrace();
@@ -492,7 +499,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -492,7 +499,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
492 } 499 }
493 500
494 /** 501 /**
495 - * @param rq 格式如:2018-03-22(留空""默认当前日期前天) 502 + * @param rq 格式如:2018-03-22(留空""默认当前日期前天)
496 * @param line (留空""默认全部线路) 503 * @param line (留空""默认全部线路)
497 */ 504 */
498 @Transactional 505 @Transactional
@@ -506,7 +513,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -506,7 +513,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
506 Date dBefore = new Date(); 513 Date dBefore = new Date();
507 Calendar calendar = Calendar.getInstance(); //得到日历 514 Calendar calendar = Calendar.getInstance(); //得到日历
508 calendar.setTime(dNow);//把当前时间赋给日历 515 calendar.setTime(dNow);//把当前时间赋给日历
509 - calendar.add(Calendar.DAY_OF_MONTH, -2); //设置为前一天 516 + calendar.add(Calendar.DAY_OF_MONTH, -4); //设置为前一天
510 dBefore = calendar.getTime(); //得到前一天的时间 517 dBefore = calendar.getTime(); //得到前一天的时间
511 rq = sdf.format(dBefore); 518 rq = sdf.format(dBefore);
512 } else { 519 } else {
@@ -769,6 +776,52 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -769,6 +776,52 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
769 resList.add(temp); 776 resList.add(temp);
770 } 777 }
771 778
  779 + List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
  780 + for(CalcStatistics c : resList){
  781 + Map<String, Object> m = new HashMap<String, Object>();
  782 + m.put("xlName", c.getXlName());
  783 + m.put("jhzlc", c.getJhzlc());
  784 + m.put("jhlc", c.getJhyylc());
  785 + m.put("jcclc", c.getJhkslc());
  786 + m.put("sjzgl", c.getSjzlc());
  787 + m.put("sjgl", c.getSjyylc());
  788 + m.put("sjksgl", c.getSjkslc());
  789 + m.put("ssgl", c.getSslc());
  790 + m.put("ssbc", c.getSsbc());
  791 + m.put("ssgl_lz", c.getLzlc());
  792 + m.put("ssgl_dm", c.getDmlc());
  793 + m.put("ssgl_gz", c.getGzlc());
  794 + m.put("ssgl_jf", c.getJflc());
  795 + m.put("ssgl_zs", c.getZslc());
  796 + m.put("ssgl_qr", c.getQrlc());
  797 + m.put("ssgl_qc", c.getQclc());
  798 + m.put("ssgl_kx", c.getKxlc());
  799 + m.put("ssgl_qh", c.getQhlc());
  800 + m.put("ssgl_yw", c.getYwlc());
  801 + m.put("ssgl_other", c.getQtlc());
  802 + m.put("ljgl", c.getLjlc());
  803 + m.put("jhbc", c.getJhbcq());
  804 + m.put("jhbc_m", c.getJhbcz());
  805 + m.put("jhbc_a", c.getJhbcw());
  806 + m.put("sjbc", c.getSjbcq());
  807 + m.put("sjbc_m", c.getSjbcz());
  808 + m.put("sjbc_a", c.getSjbcw());
  809 + m.put("ljbc", c.getLjbcq());
  810 + m.put("ljbc_m", c.getLjbcz());
  811 + m.put("ljbc_a", c.getLjbcw());
  812 + m.put("fzbc", c.getFzbcq());
  813 + m.put("fzbc_m", c.getFzbcz());
  814 + m.put("fzbc_a", c.getFzbcw());
  815 + m.put("dtbc", c.getDtbcq());
  816 + m.put("dtbc_m", c.getDtbcz());
  817 + m.put("dtbc_a", c.getDtbcw());
  818 + m.put("djg", c.getDjgq());
  819 + m.put("djg_m", c.getDjgz());
  820 + m.put("djg_a", c.getDjgw());
  821 + m.put("djg_time", c.getDjgsj());
  822 + mapList.add(m);
  823 + }
  824 +
772 if (type != null && type.length() != 0 && type.equals("export")) { 825 if (type != null && type.length() != 0 && type.equals("export")) {
773 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 826 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
774 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 827 sdfSimple = new SimpleDateFormat("yyyyMMdd");
@@ -777,10 +830,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -777,10 +830,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
777 m.put("date", date+"至"+date2); 830 m.put("date", date+"至"+date2);
778 ReportUtils ee = new ReportUtils(); 831 ReportUtils ee = new ReportUtils();
779 try { 832 try {
780 - listI.add(resList.iterator()); 833 + String dateTime = "";
  834 + if(date.equals(date2)){
  835 + dateTime = sdfSimple.format(sdfMonth.parse(date));
  836 + } else {
  837 + dateTime = sdfSimple.format(sdfMonth.parse(date))
  838 + +"-"+sdfSimple.format(sdfMonth.parse(date2));
  839 + }
  840 + listI.add(mapList.iterator());
781 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 841 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
782 ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_.xls", 842 ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_.xls",
783 - path + "export/统计日报" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 843 + path + "export/" + dateTime + "-" + xlName + "-统计日报.xls");
784 } catch (Exception e) { 844 } catch (Exception e) {
785 // TODO: handle exception 845 // TODO: handle exception
786 //e.printStackTrace(); 846 //e.printStackTrace();
@@ -1167,6 +1227,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -1167,6 +1227,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1167 } 1227 }
1168 1228
1169 if(type.equals("export")){ 1229 if(type.equals("export")){
  1230 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  1231 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
1170 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 1232 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
1171 Map<String, Object> m = new HashMap<String, Object>(); 1233 Map<String, Object> m = new HashMap<String, Object>();
1172 m.put("date", date); 1234 m.put("date", date);
@@ -1180,10 +1242,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -1180,10 +1242,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1180 } 1242 }
1181 ReportUtils ee = new ReportUtils(); 1243 ReportUtils ee = new ReportUtils();
1182 try { 1244 try {
  1245 + String dateTime = "";
  1246 + if(date.equals(date2)){
  1247 + dateTime = sdfSimple.format(sdfMonth.parse(date));
  1248 + } else {
  1249 + dateTime = sdfSimple.format(sdfMonth.parse(date))
  1250 + +"-"+sdfSimple.format(sdfMonth.parse(date2));
  1251 + }
1183 listI.add(lMap.iterator()); 1252 listI.add(lMap.iterator());
1184 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 1253 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
1185 ee.excelReplace(listI, new Object[]{m}, path + "mould/"+xls, 1254 ee.excelReplace(listI, new Object[]{m}, path + "mould/"+xls,
1186 - path + "export/线路公里统计表.xls"); 1255 + path + "export/"+dateTime+"-"+xlName+"-线路公里统计表.xls");
1187 } catch (Exception e) { 1256 } catch (Exception e) {
1188 // TODO: handle exception 1257 // TODO: handle exception
1189 e.printStackTrace(); 1258 e.printStackTrace();
@@ -1314,6 +1383,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -1314,6 +1383,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1314 } 1383 }
1315 1384
1316 if(type.equals("export")){ 1385 if(type.equals("export")){
  1386 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  1387 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
1317 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 1388 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
1318 Map<String, Object> m = new HashMap<String, Object>(); 1389 Map<String, Object> m = new HashMap<String, Object>();
1319 m.put("date", date); 1390 m.put("date", date);
@@ -1337,10 +1408,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer @@ -1337,10 +1408,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1337 } 1408 }
1338 ReportUtils ee = new ReportUtils(); 1409 ReportUtils ee = new ReportUtils();
1339 try { 1410 try {
  1411 + String dateTime = "";
  1412 + if(date.equals(date2)){
  1413 + dateTime = sdfSimple.format(sdfMonth.parse(date));
  1414 + } else {
  1415 + dateTime = sdfSimple.format(sdfMonth.parse(date))
  1416 + +"-"+sdfSimple.format(sdfMonth.parse(date2));
  1417 + }
1340 listI.add(lMap.iterator()); 1418 listI.add(lMap.iterator());
1341 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 1419 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
1342 ee.excelReplace(listI, new Object[]{m}, path + "mould/"+xls, 1420 ee.excelReplace(listI, new Object[]{m}, path + "mould/"+xls,
1343 - path + "export/路单数据统计表.xls"); 1421 + path + "export/"+dateTime+"-"+xlName+"-路单数据统计表.xls");
1344 } catch (Exception e) { 1422 } catch (Exception e) {
1345 // TODO: handle exception 1423 // TODO: handle exception
1346 e.printStackTrace(); 1424 e.printStackTrace();
src/main/java/com/bsth/service/forms/ExportService.java
@@ -13,7 +13,7 @@ import com.bsth.entity.mcy_forms.Waybillday; @@ -13,7 +13,7 @@ import com.bsth.entity.mcy_forms.Waybillday;
13 13
14 public interface ExportService { 14 public interface ExportService {
15 15
16 - public void waybillday(String date, List<Waybillday> resList); 16 + public void waybillday(String date, String linaName, List<Waybillday> resList);
17 17
18 public void linepasswengerflow(String date,List<Linepasswengerflow> resList); 18 public void linepasswengerflow(String date,List<Linepasswengerflow> resList);
19 19
src/main/java/com/bsth/service/forms/impl/ExportServiceImpl.java
@@ -24,7 +24,7 @@ public class ExportServiceImpl implements ExportService{ @@ -24,7 +24,7 @@ public class ExportServiceImpl implements ExportService{
24 24
25 //行车路单日报表 25 //行车路单日报表
26 @Override 26 @Override
27 - public void waybillday(String date, List<Waybillday> list) { 27 + public void waybillday(String date, String lineName, List<Waybillday> list) {
28 28
29 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 29 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
30 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 30 sdfSimple = new SimpleDateFormat("yyyyMMdd");
@@ -50,7 +50,8 @@ public class ExportServiceImpl implements ExportService{ @@ -50,7 +50,8 @@ public class ExportServiceImpl implements ExportService{
50 listI.add(resList.iterator()); 50 listI.add(resList.iterator());
51 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 51 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
52 ee.excelReplace(listI, new Object[] { map }, path+"mould/waybillday.xls", 52 ee.excelReplace(listI, new Object[] { map }, path+"mould/waybillday.xls",
53 - path+"export/行车路单日报表.xls"); 53 + path+"export/"+sdfSimple.format(sdfMonth.parse(date))
  54 + +"-"+lineName+"-行车路单日报表.xls");
54 } catch (Exception e) { 55 } catch (Exception e) {
55 e.printStackTrace(); 56 e.printStackTrace();
56 } 57 }
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -703,17 +703,26 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -703,17 +703,26 @@ public class BusIntervalServiceImpl implements BusIntervalService {
703 } 703 }
704 704
705 if(type != null && type.length() != 0 && type.equals("export")){ 705 if(type != null && type.length() != 0 && type.equals("export")){
  706 + String lineName = "";
  707 + if(map.containsKey("lineName"))
  708 + lineName = map.get("lineName").toString();
706 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 709 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
707 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 710 sdfSimple = new SimpleDateFormat("yyyyMMdd");
708 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 711 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
709 Map<String, Object> m = new HashMap<String, Object>(); 712 Map<String, Object> m = new HashMap<String, Object>();
710 ReportUtils ee = new ReportUtils(); 713 ReportUtils ee = new ReportUtils();
711 try { 714 try {
  715 + String dateTime = "";
  716 + if(startDate.equals(endDate)){
  717 + dateTime = sdfSimple.format(sdfMonth.parse(startDate));
  718 + } else {
  719 + dateTime = sdfSimple.format(sdfMonth.parse(startDate))
  720 + + "-" + sdfSimple.format(sdfMonth.parse(endDate));
  721 + }
712 listI.add(resList.iterator()); 722 listI.add(resList.iterator());
713 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 723 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
714 ee.excelReplace(listI, new Object[] { m }, path+"mould/busInterval"+statu+".xls", 724 ee.excelReplace(listI, new Object[] { m }, path+"mould/busInterval"+statu+".xls",
715 - path+"export/班次间隔统计表" + sdfSimple.format(sdfMonth.parse(startDate))  
716 - + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls"); 725 + path+"export/" + dateTime + "-" + lineName + "-班次间隔统计表.xls");
717 } catch (Exception e) { 726 } catch (Exception e) {
718 // TODO: handle exception 727 // TODO: handle exception
719 e.printStackTrace(); 728 e.printStackTrace();
@@ -1441,6 +1450,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1441,6 +1450,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1441 } 1450 }
1442 1451
1443 if(type != null && type.length() != 0 && type.equals("export")){ 1452 if(type != null && type.length() != 0 && type.equals("export")){
  1453 + String lineName = "";
  1454 + if(map.containsKey("lineName"))
  1455 + lineName = map.get("lineName").toString();
1444 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 1456 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
1445 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 1457 sdfSimple = new SimpleDateFormat("yyyyMMdd");
1446 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 1458 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -1450,11 +1462,17 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1450,11 +1462,17 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1450 else if(statu.equals("1")) 1462 else if(statu.equals("1"))
1451 modelMap.put("lpType", "路牌名"); 1463 modelMap.put("lpType", "路牌名");
1452 try { 1464 try {
  1465 + String dateTime = "";
  1466 + if(startDate.equals(endDate)){
  1467 + dateTime = sdfSimple.format(sdfMonth.parse(startDate));
  1468 + } else {
  1469 + dateTime = sdfSimple.format(sdfMonth.parse(startDate))
  1470 + + "-" + sdfSimple.format(sdfMonth.parse(endDate));
  1471 + }
1453 listI.add(((List<Map<String, Object>>)modelMap.get("dataList")).iterator()); 1472 listI.add(((List<Map<String, Object>>)modelMap.get("dataList")).iterator());
1454 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 1473 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1455 ee.excelReplace(listI, new Object[] { modelMap }, path+"mould/timeAndSpeed.xls", 1474 ee.excelReplace(listI, new Object[] { modelMap }, path+"mould/timeAndSpeed.xls",
1456 - path+"export/行驶时间及车速统计表" + sdfSimple.format(sdfMonth.parse(startDate))  
1457 - + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls"); 1475 + path+"export/" + dateTime + "-" + lineName + "-行驶时间及车速统计表.xls");
1458 } catch (Exception e) { 1476 } catch (Exception e) {
1459 // TODO: handle exception 1477 // TODO: handle exception
1460 e.printStackTrace(); 1478 e.printStackTrace();
@@ -2006,6 +2024,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2006,6 +2024,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2006 } 2024 }
2007 2025
2008 if(type != null && type.length() != 0 && type.equals("export")){ 2026 if(type != null && type.length() != 0 && type.equals("export")){
  2027 + String lineName = "";
  2028 + if(map.containsKey("lineName"))
  2029 + lineName = map.get("lineName").toString();
2009 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 2030 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
2010 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 2031 sdfSimple = new SimpleDateFormat("yyyyMMdd");
2011 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 2032 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -2015,8 +2036,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2015,8 +2036,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2015 listI.add(resList.iterator()); 2036 listI.add(resList.iterator());
2016 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 2037 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
2017 ee.excelReplace(listI, new Object[] { m }, path+"mould/lbStatuAnaly.xls", 2038 ee.excelReplace(listI, new Object[] { m }, path+"mould/lbStatuAnaly.xls",
2018 - path+"export/烂班情况分析表" + sdfSimple.format(sdfMonth.parse(startDate))  
2019 - + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls"); 2039 + path+"export/" + sdfSimple.format(sdfMonth.parse(startDate))
  2040 + + "-" + sdfSimple.format(sdfMonth.parse(endDate))
  2041 + + "-" + lineName + "-烂班情况分析表.xls");
2020 } catch (Exception e) { 2042 } catch (Exception e) {
2021 // TODO: handle exception 2043 // TODO: handle exception
2022 e.printStackTrace(); 2044 e.printStackTrace();
@@ -2408,6 +2430,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2408,6 +2430,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2408 public Map<String, Object> exportWaybillMore(Map<String, Object> map) { 2430 public Map<String, Object> exportWaybillMore(Map<String, Object> map) {
2409 String date = map.get("date").toString(); 2431 String date = map.get("date").toString();
2410 String line = map.get("line").toString(); 2432 String line = map.get("line").toString();
  2433 + String lineName = map.get("lineName").toString();
2411 ReportUtils ee = new ReportUtils(); 2434 ReportUtils ee = new ReportUtils();
2412 List<List> strs = JSON.parseArray(map.get("strs").toString(), List.class); 2435 List<List> strs = JSON.parseArray(map.get("strs").toString(), List.class);
2413 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/export/"; 2436 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/export/";
@@ -2417,7 +2440,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2417,7 +2440,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2417 File file = null; 2440 File file = null;
2418 try { 2441 try {
2419 while (true) { 2442 while (true) {
2420 - String fileUrl = path + "行车路单" + sdfSimple.format(sdfMonth.parse(date)); 2443 + String fileUrl = path + sdfSimple.format(sdfMonth.parse(date))+"-"+lineName+"-行车路单";
2421 // file = new File(fileUrl + (num == 0 ? "/" : "(" + num + ")/")); //新建文件夹 2444 // file = new File(fileUrl + (num == 0 ? "/" : "(" + num + ")/")); //新建文件夹
2422 file = new File(fileUrl + (num == 0 ? ".xls" : "(" + num + ").xls")); //新建excel文件 2445 file = new File(fileUrl + (num == 0 ? ".xls" : "(" + num + ").xls")); //新建excel文件
2423 if (file.exists()) { //判断是否已存在重名 2446 if (file.exists()) { //判断是否已存在重名
@@ -3009,19 +3032,28 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -3009,19 +3032,28 @@ public class BusIntervalServiceImpl implements BusIntervalService {
3009 } 3032 }
3010 3033
3011 if(map.containsKey("type") && map.get("type").toString().equals("export")){ 3034 if(map.containsKey("type") && map.get("type").toString().equals("export")){
  3035 + String lineName = "";
  3036 + if(map.containsKey("lineName"))
  3037 + lineName = map.get("lineName").toString();
3012 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 3038 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
3013 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 3039 sdfSimple = new SimpleDateFormat("yyyyMMdd");
3014 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 3040 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
3015 Map<String,Object> m = new HashMap<String, Object>(); 3041 Map<String,Object> m = new HashMap<String, Object>();
3016 ReportUtils ee = new ReportUtils(); 3042 ReportUtils ee = new ReportUtils();
3017 try { 3043 try {
  3044 + String dateTime = "";
  3045 + if(startDate.equals(endDate)){
  3046 + dateTime = sdfSimple.format(sdfMonth.parse(startDate));
  3047 + } else {
  3048 + dateTime = sdfSimple.format(sdfMonth.parse(startDate))
  3049 + +"-"+sdfSimple.format(sdfMonth.parse(endDate));
  3050 + }
3018 listI.add(resList.iterator()); 3051 listI.add(resList.iterator());
3019 m.put("date1", startDate); 3052 m.put("date1", startDate);
3020 m.put("date2", endDate); 3053 m.put("date2", endDate);
3021 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 3054 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
3022 ee.excelReplace(listI, new Object[] { m }, path+"mould/onTime.xls", 3055 ee.excelReplace(listI, new Object[] { m }, path+"mould/onTime.xls",
3023 - path+"export/发车到站准点率" + sdfSimple.format(sdfMonth.parse(startDate)) +  
3024 - (startDate.equals(endDate)?"":"-"+sdfSimple.format(sdfMonth.parse(endDate))) + ".xls"); 3056 + path+"export/" + dateTime + "-" + lineName + "-发车到站准点率.xls");
3025 } catch (Exception e) { 3057 } catch (Exception e) {
3026 // TODO: handle exception 3058 // TODO: handle exception
3027 e.printStackTrace(); 3059 e.printStackTrace();
@@ -3058,18 +3090,28 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -3058,18 +3090,28 @@ public class BusIntervalServiceImpl implements BusIntervalService {
3058 } 3090 }
3059 3091
3060 if(map.containsKey("type") && map.get("type").toString().equals("export")){ 3092 if(map.containsKey("type") && map.get("type").toString().equals("export")){
  3093 + String lineName = "";
  3094 + if(map.containsKey("lineName"))
  3095 + lineName = map.get("lineName").toString();
3061 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 3096 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
3062 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 3097 sdfSimple = new SimpleDateFormat("yyyyMMdd");
3063 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 3098 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
3064 Map<String,Object> m = new HashMap<String, Object>(); 3099 Map<String,Object> m = new HashMap<String, Object>();
3065 ReportUtils ee = new ReportUtils(); 3100 ReportUtils ee = new ReportUtils();
3066 try { 3101 try {
  3102 + String dateTime = "";
  3103 + if(startDate.equals(endDate)){
  3104 + dateTime = sdfSimple.format(sdfMonth.parse(startDate));
  3105 + } else {
  3106 + dateTime = sdfSimple.format(sdfMonth.parse(startDate))
  3107 + +"-"+sdfSimple.format(sdfMonth.parse(endDate));
  3108 + }
3067 listI.add(resList.iterator()); 3109 listI.add(resList.iterator());
3068 m.put("date1", startDate); 3110 m.put("date1", startDate);
3069 m.put("date2", endDate); 3111 m.put("date2", endDate);
3070 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 3112 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
3071 ee.excelReplace(listI, new Object[] { m }, path+"mould/onTime1.xls", 3113 ee.excelReplace(listI, new Object[] { m }, path+"mould/onTime1.xls",
3072 - path+"export/发车到站准点率明细.xls"); 3114 + path+"export/"+dateTime+"-"+lineName+"-发车到站准点率明细.xls");
3073 } catch (Exception e) { 3115 } catch (Exception e) {
3074 // TODO: handle exception 3116 // TODO: handle exception
3075 e.printStackTrace(); 3117 e.printStackTrace();
@@ -3093,18 +3135,29 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -3093,18 +3135,29 @@ public class BusIntervalServiceImpl implements BusIntervalService {
3093 } 3135 }
3094 3136
3095 if(map.containsKey("type") && map.get("type").toString().equals("export")){ 3137 if(map.containsKey("type") && map.get("type").toString().equals("export")){
  3138 + String lineName = "";
  3139 + if(map.containsKey("lineName"))
  3140 + lineName = map.get("lineName").toString();
3096 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 3141 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
3097 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 3142 sdfSimple = new SimpleDateFormat("yyyyMMdd");
3098 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 3143 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
3099 Map<String,Object> m = new HashMap<String, Object>(); 3144 Map<String,Object> m = new HashMap<String, Object>();
3100 ReportUtils ee = new ReportUtils(); 3145 ReportUtils ee = new ReportUtils();
3101 try { 3146 try {
  3147 + String dateTime = "";
  3148 + if(startDate.equals(endDate)){
  3149 + dateTime = sdfSimple.format(sdfMonth.parse(startDate));
  3150 + } else {
  3151 + dateTime = sdfSimple.format(sdfMonth.parse(startDate))
  3152 + +"-"+sdfSimple.format(sdfMonth.parse(endDate));
  3153 + }
3102 listI.add(resList.iterator()); 3154 listI.add(resList.iterator());
3103 m.put("date", startDate); 3155 m.put("date", startDate);
3104 m.put("line", line); 3156 m.put("line", line);
3105 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 3157 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
3106 ee.excelReplace(listI, new Object[] { m }, path+"mould/onTime2.xls", 3158 ee.excelReplace(listI, new Object[] { m }, path+"mould/onTime2.xls",
3107 - path+"export/发车到站准点率详细"+sdfSimple.format(sdfMonth.parse(startDate))+".xls"); 3159 + path+"export/"+sdfSimple.format(sdfMonth.parse(startDate))
  3160 + +"-"+lineName+"-发车到站准点率详细.xls");
3108 } catch (Exception e) { 3161 } catch (Exception e) {
3109 // TODO: handle exception 3162 // TODO: handle exception
3110 e.printStackTrace(); 3163 e.printStackTrace();
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
@@ -1047,10 +1047,14 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -1047,10 +1047,14 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1047 m.put("fyyyhj", fyyyhj); 1047 m.put("fyyyhj", fyyyhj);
1048 ReportUtils ee = new ReportUtils(); 1048 ReportUtils ee = new ReportUtils();
1049 try { 1049 try {
  1050 + String lineName = "";
  1051 + if(map.containsKey("lineName"))
  1052 + lineName = map.get("lineName").toString();
1050 listI.add(mapList.iterator()); 1053 listI.add(mapList.iterator());
1051 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 1054 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1052 ee.excelReplace(listI, new Object[] { m }, path+"mould/oilListMonth.xls", 1055 ee.excelReplace(listI, new Object[] { m }, path+"mould/oilListMonth.xls",
1053 - path+"export/月存油报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 1056 + path+"export/" + sdfSimple.format(sdfMonth.parse(date))
  1057 + + "-" + lineName + "-月存油报表.xls");
1054 } catch (Exception e) { 1058 } catch (Exception e) {
1055 // TODO: handle exception 1059 // TODO: handle exception
1056 e.printStackTrace(); 1060 e.printStackTrace();
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -1232,6 +1232,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1232,6 +1232,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1232 } 1232 }
1233 1233
1234 if (type != null && type.length() != 0 && type.equals("export")) { 1234 if (type != null && type.length() != 0 && type.equals("export")) {
  1235 + String lineName = BasicData.lineCode2NameMap.get(line);
1235 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 1236 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
1236 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 1237 sdfSimple = new SimpleDateFormat("yyyyMMdd");
1237 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 1238 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -1253,7 +1254,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1253,7 +1254,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1253 listI.add(newList.iterator()); 1254 listI.add(newList.iterator());
1254 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 1255 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
1255 ee.excelReplace(listI, new Object[]{m}, path + "mould/historyMessage.xls", 1256 ee.excelReplace(listI, new Object[]{m}, path + "mould/historyMessage.xls",
1256 - path + "export/调度历史消息" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 1257 + path + "export/" + sdfSimple.format(sdfMonth.parse(date))
  1258 + + "-" + lineName + "-调度历史消息.xls");
1257 } catch (Exception e) { 1259 } catch (Exception e) {
1258 // TODO: handle exception 1260 // TODO: handle exception
1259 e.printStackTrace(); 1261 e.printStackTrace();
@@ -2086,7 +2088,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2086,7 +2088,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2086 listI.add(listMap.iterator()); 2088 listI.add(listMap.iterator());
2087 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 2089 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
2088 ee.excelReplace(listI, new Object[]{m}, path + "mould/account.xls", 2090 ee.excelReplace(listI, new Object[]{m}, path + "mould/account.xls",
2089 - path + "export/驾驶员请求台账" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 2091 + path + "export/" + sdfSimple.format(sdfMonth.parse(date))
  2092 + + "-" + xlName + "-驾驶员请求台账.xls");
2090 } catch (Exception e) { 2093 } catch (Exception e) {
2091 // TODO: handle exception 2094 // TODO: handle exception
2092 e.printStackTrace(); 2095 e.printStackTrace();
@@ -2853,10 +2856,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2853,10 +2856,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2853 m.put("date", date+"至"+date2); 2856 m.put("date", date+"至"+date2);
2854 ReportUtils ee = new ReportUtils(); 2857 ReportUtils ee = new ReportUtils();
2855 try { 2858 try {
  2859 + String dateTime = "";
  2860 + if(date.equals(date2)){
  2861 + dateTime = sdfSimple.format(sdfMonth.parse(date));
  2862 + } else {
  2863 + dateTime = sdfSimple.format(sdfMonth.parse(date))
  2864 + +"-"+sdfSimple.format(sdfMonth.parse(date2));
  2865 + }
2856 listI.add(lMap.iterator()); 2866 listI.add(lMap.iterator());
2857 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 2867 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
2858 ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_.xls", 2868 ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_.xls",
2859 - path + "export/统计日报" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 2869 + path + "export/" + dateTime + "-" + xlName + "-统计日报.xls");
2860 } catch (Exception e) { 2870 } catch (Exception e) {
2861 // TODO: handle exception 2871 // TODO: handle exception
2862 //e.printStackTrace(); 2872 //e.printStackTrace();
@@ -4639,7 +4649,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4639,7 +4649,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4639 sourcePath = path + "mould/scheduleDaily_m.xls"; 4649 sourcePath = path + "mould/scheduleDaily_m.xls";
4640 } 4650 }
4641 ee.excelReplace(listI, new Object[]{nMap}, sourcePath, 4651 ee.excelReplace(listI, new Object[]{nMap}, sourcePath,
4642 - path + "export/调度日报"+ lineName + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 4652 + path + "export/" + sdfSimple.format(sdfMonth.parse(date)) + lineName + "调度日报.xls");
4643 } catch (Exception e) { 4653 } catch (Exception e) {
4644 // TODO: handle exception 4654 // TODO: handle exception
4645 e.printStackTrace(); 4655 e.printStackTrace();
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
@@ -295,6 +295,7 @@ public class ReportServiceImpl implements ReportService{ @@ -295,6 +295,7 @@ public class ReportServiceImpl implements ReportService{
295 } 295 }
296 296
297 if (type != null && type.length() != 0 && type.equals("export_msg")) { 297 if (type != null && type.length() != 0 && type.equals("export_msg")) {
  298 + String lineName = BasicData.lineCode2NameMap.get(line);
298 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 299 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
299 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 300 sdfSimple = new SimpleDateFormat("yyyyMMdd");
300 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 301 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -316,7 +317,8 @@ public class ReportServiceImpl implements ReportService{ @@ -316,7 +317,8 @@ public class ReportServiceImpl implements ReportService{
316 listI.add(newList.iterator()); 317 listI.add(newList.iterator());
317 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 318 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
318 ee.excelReplace(listI, new Object[]{m}, path + "mould/message.xls", 319 ee.excelReplace(listI, new Object[]{m}, path + "mould/message.xls",
319 - path + "export/调度消息分析" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 320 + path + "export/" + sdfSimple.format(sdfMonth.parse(date))
  321 + + "-" + lineName + "-调度消息分析.xls");
320 } catch (Exception e) { 322 } catch (Exception e) {
321 // TODO: handle exception 323 // TODO: handle exception
322 e.printStackTrace(); 324 e.printStackTrace();
@@ -2482,6 +2484,8 @@ public class ReportServiceImpl implements ReportService{ @@ -2482,6 +2484,8 @@ public class ReportServiceImpl implements ReportService{
2482 lMap.add(newMap); 2484 lMap.add(newMap);
2483 } 2485 }
2484 if(type.equals("export")){ 2486 if(type.equals("export")){
  2487 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  2488 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
2485 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 2489 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
2486 Map<String, Object> m = new HashMap<String, Object>(); 2490 Map<String, Object> m = new HashMap<String, Object>();
2487 m.put("date", date); 2491 m.put("date", date);
@@ -2495,10 +2499,17 @@ public class ReportServiceImpl implements ReportService{ @@ -2495,10 +2499,17 @@ public class ReportServiceImpl implements ReportService{
2495 } 2499 }
2496 ReportUtils ee = new ReportUtils(); 2500 ReportUtils ee = new ReportUtils();
2497 try { 2501 try {
  2502 + String dateTime = "";
  2503 + if(date.equals(date2)){
  2504 + dateTime = sdfSimple.format(sdfMonth.parse(date));
  2505 + } else {
  2506 + dateTime = sdfSimple.format(sdfMonth.parse(date))
  2507 + +"-"+sdfSimple.format(sdfMonth.parse(date2));
  2508 + }
2498 listI.add(lMap.iterator()); 2509 listI.add(lMap.iterator());
2499 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 2510 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
2500 ee.excelReplace(listI, new Object[]{m}, path + "mould/"+xls, 2511 ee.excelReplace(listI, new Object[]{m}, path + "mould/"+xls,
2501 - path + "export/线路公里统计表.xls"); 2512 + path + "export/"+dateTime+"-"+xlName+"-线路公里统计表.xls");
2502 } catch (Exception e) { 2513 } catch (Exception e) {
2503 // TODO: handle exception 2514 // TODO: handle exception
2504 e.printStackTrace(); 2515 e.printStackTrace();
@@ -2962,6 +2973,8 @@ public class ReportServiceImpl implements ReportService{ @@ -2962,6 +2973,8 @@ public class ReportServiceImpl implements ReportService{
2962 2973
2963 } 2974 }
2964 if(type.equals("export")){ 2975 if(type.equals("export")){
  2976 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  2977 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
2965 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 2978 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
2966 Map<String, Object> m = new HashMap<String, Object>(); 2979 Map<String, Object> m = new HashMap<String, Object>();
2967 m.put("date", date); 2980 m.put("date", date);
@@ -2986,10 +2999,17 @@ public class ReportServiceImpl implements ReportService{ @@ -2986,10 +2999,17 @@ public class ReportServiceImpl implements ReportService{
2986 } 2999 }
2987 ReportUtils ee = new ReportUtils(); 3000 ReportUtils ee = new ReportUtils();
2988 try { 3001 try {
  3002 + String dateTime = "";
  3003 + if(date.equals(date2)){
  3004 + dateTime = sdfSimple.format(sdfMonth.parse(date));
  3005 + } else {
  3006 + dateTime = sdfSimple.format(sdfMonth.parse(date))
  3007 + +"-"+sdfSimple.format(sdfMonth.parse(date2));
  3008 + }
2989 listI.add(lMap.iterator()); 3009 listI.add(lMap.iterator());
2990 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 3010 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
2991 ee.excelReplace(listI, new Object[]{m}, path + "mould/"+xls, 3011 ee.excelReplace(listI, new Object[]{m}, path + "mould/"+xls,
2992 - path + "export/路单数据统计表.xls"); 3012 + path + "export/"+dateTime+"-"+xlName+"-路单数据统计表.xls");
2993 } catch (Exception e) { 3013 } catch (Exception e) {
2994 // TODO: handle exception 3014 // TODO: handle exception
2995 e.printStackTrace(); 3015 e.printStackTrace();
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
@@ -293,6 +293,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -293,6 +293,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
293 } 293 }
294 294
295 if(type.equals("export")){ 295 if(type.equals("export")){
  296 + String lineName = "";
  297 + if(map.containsKey("lineName"))
  298 + lineName = map.get("lineName").toString();
296 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 299 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
297 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 300 sdfSimple = new SimpleDateFormat("yyyyMMdd");
298 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 301 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -302,7 +305,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -302,7 +305,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
302 listI.add(resList.iterator()); 305 listI.add(resList.iterator());
303 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 306 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
304 ee.excelReplace(listI, new Object[] { m }, path+"mould/peoCarPlan.xls", 307 ee.excelReplace(listI, new Object[] { m }, path+"mould/peoCarPlan.xls",
305 - path+"export/计划车辆班次人员" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 308 + path+"export/" + sdfSimple.format(sdfMonth.parse(date))
  309 + +"-"+lineName+"-计划车辆班次人员.xls");
306 } catch (Exception e) { 310 } catch (Exception e) {
307 // TODO: handle exception 311 // TODO: handle exception
308 e.printStackTrace(); 312 e.printStackTrace();
@@ -323,7 +327,6 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -323,7 +327,6 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
323 String line = map.get("line").toString(); 327 String line = map.get("line").toString();
324 String date = map.get("date").toString(); 328 String date = map.get("date").toString();
325 String type = map.get("type").toString(); 329 String type = map.get("type").toString();
326 - String lineName = "";  
327 330
328 if(date.length() == 0){ 331 if(date.length() == 0){
329 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 332 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
@@ -333,13 +336,6 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -333,13 +336,6 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
333 336
334 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 337 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
335 for(ScheduleRealInfo schedule : list){ 338 for(ScheduleRealInfo schedule : list){
336 - if(lineName.length() == 0){  
337 - if(line.length() > 0 && schedule.getXlName()!=null){  
338 - lineName = schedule.getXlName();  
339 - } else if(schedule.getFgsName()!=null){  
340 - lineName = schedule.getFgsName();  
341 - }  
342 - }  
343 String key = schedule.getXlName(); 339 String key = schedule.getXlName();
344 if(key == null || key.trim().equals("") || lineSet.contains(key)) 340 if(key == null || key.trim().equals("") || lineSet.contains(key))
345 continue; 341 continue;
@@ -521,6 +517,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -521,6 +517,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
521 } 517 }
522 518
523 if(type.equals("export")){ 519 if(type.equals("export")){
  520 + String lineName = "";
  521 + if(map.containsKey("lineName"))
  522 + lineName = map.get("lineName").toString();
524 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 523 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
525 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 524 sdfSimple = new SimpleDateFormat("yyyyMMdd");
526 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 525 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -530,7 +529,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -530,7 +529,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
530 listI.add(resList.iterator()); 529 listI.add(resList.iterator());
531 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 530 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
532 ee.excelReplace(listI, new Object[] { m }, path+"mould/workDaily.xls", 531 ee.excelReplace(listI, new Object[] { m }, path+"mould/workDaily.xls",
533 - path+"export/营运服务日报表"+ sdfSimple.format(sdfMonth.parse(date))+".xls"); 532 + path+"export/"+ sdfSimple.format(sdfMonth.parse(date))+"-"+lineName
  533 + +"-营运服务日报表.xls");
534 } catch (Exception e) { 534 } catch (Exception e) {
535 // TODO: handle exception 535 // TODO: handle exception
536 e.printStackTrace(); 536 e.printStackTrace();
@@ -818,6 +818,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -818,6 +818,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
818 818
819 //导出 819 //导出
820 if(type.equals("export")){ 820 if(type.equals("export")){
  821 + String lineName = "";
  822 + if(map.containsKey("lineName"))
  823 + lineName = map.get("lineName").toString();
821 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 824 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
822 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 825 sdfSimple = new SimpleDateFormat("yyyyMMdd");
823 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 826 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -827,7 +830,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -827,7 +830,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
827 listI.add(resList.iterator()); 830 listI.add(resList.iterator());
828 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 831 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
829 ee.excelReplace(listI, new Object[] { m }, path+"mould/scheduleAnaly.xls", 832 ee.excelReplace(listI, new Object[] { m }, path+"mould/scheduleAnaly.xls",
830 - path+"export/时刻表分析" + sdfSimple.format(sdfMonth.parse(startDate)) + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls"); 833 + path+"export/"
  834 + + sdfSimple.format(sdfMonth.parse(startDate)) + "-"
  835 + + sdfSimple.format(sdfMonth.parse(endDate)) + "-"
  836 + +lineName+"-时刻表分析.xls");
831 } catch (Exception e) { 837 } catch (Exception e) {
832 // TODO: handle exception 838 // TODO: handle exception
833 e.printStackTrace(); 839 e.printStackTrace();
@@ -1118,16 +1124,26 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1118,16 +1124,26 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1118 1124
1119 //导出 1125 //导出
1120 if(type.equals("export")){ 1126 if(type.equals("export")){
  1127 + String lineName_ = "";
  1128 + if(map.containsKey("lineName"))
  1129 + lineName_ = map.get("lineName").toString();
1121 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 1130 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
1122 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 1131 sdfSimple = new SimpleDateFormat("yyyyMMdd");
1123 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 1132 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
1124 Map<String,Object> m = new HashMap<String, Object>(); 1133 Map<String,Object> m = new HashMap<String, Object>();
1125 ReportUtils ee = new ReportUtils(); 1134 ReportUtils ee = new ReportUtils();
1126 try { 1135 try {
  1136 + String dateTime = "";
  1137 + if(startDate.equals(endDate)){
  1138 + dateTime = sdfSimple.format(sdfMonth.parse(startDate));
  1139 + } else {
  1140 + dateTime = sdfSimple.format(sdfMonth.parse(startDate))
  1141 + +"-"+sdfSimple.format(sdfMonth.parse(endDate));
  1142 + }
1127 listI.add(tempList.iterator()); 1143 listI.add(tempList.iterator());
1128 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 1144 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1129 ee.excelReplace(listI, new Object[] { m }, path+"mould/scheduleAnaly_sum.xls", 1145 ee.excelReplace(listI, new Object[] { m }, path+"mould/scheduleAnaly_sum.xls",
1130 - path+"export/时刻表分析(汇总)" + sdfSimple.format(sdfMonth.parse(startDate)) + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls"); 1146 + path+"export/" + dateTime + "-" + lineName + "-时刻表分析(汇总).xls");
1131 } catch (Exception e) { 1147 } catch (Exception e) {
1132 // TODO: handle exception 1148 // TODO: handle exception
1133 e.printStackTrace(); 1149 e.printStackTrace();
@@ -1378,6 +1394,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1378,6 +1394,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1378 } 1394 }
1379 1395
1380 if(type.equals("export")){ 1396 if(type.equals("export")){
  1397 + String lineName = "";
  1398 + if(map.containsKey("lineName"))
  1399 + lineName = map.get("lineName").toString();
1381 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 1400 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
1382 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 1401 sdfSimple = new SimpleDateFormat("yyyyMMdd");
1383 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 1402 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -1387,7 +1406,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1387,7 +1406,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1387 listI.add(resList.iterator()); 1406 listI.add(resList.iterator());
1388 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 1407 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1389 ee.excelReplace(listI, new Object[] { m }, path+"mould/firstAndLastBus.xls", 1408 ee.excelReplace(listI, new Object[] { m }, path+"mould/firstAndLastBus.xls",
1390 - path+"export/线路首末班" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 1409 + path+"export/" + sdfSimple.format(sdfMonth.parse(date))
  1410 + + "-" + lineName + "-线路首末班.xls");
1391 } catch (Exception e) { 1411 } catch (Exception e) {
1392 // TODO: handle exception 1412 // TODO: handle exception
1393 e.printStackTrace(); 1413 e.printStackTrace();
@@ -1731,10 +1751,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1731,10 +1751,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1731 if(!type.equals("export")) 1751 if(!type.equals("export"))
1732 resList.add(tempMap); 1752 resList.add(tempMap);
1733 } 1753 }
1734 - 1754 +
  1755 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  1756 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  1757 + String dateTime = "", lineName = "";
  1758 + try {
  1759 + if(startDate.equals(endDate)){
  1760 + dateTime = sdfSimple.format(sdfMonth.parse(startDate));
  1761 + } else {
  1762 + dateTime = sdfSimple.format(sdfMonth.parse(startDate))
  1763 + +"-"+sdfSimple.format(sdfMonth.parse(endDate));
  1764 + }
  1765 + if(map.containsKey("lineName"))
  1766 + lineName = map.get("lineName").toString();
  1767 + } catch (Exception e) {
  1768 + // TODO: handle exception
  1769 + e.printStackTrace();
  1770 + }
1735 if(type.equals("export")){ 1771 if(type.equals("export")){
1736 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),  
1737 - sdfSimple = new SimpleDateFormat("yyyyMMdd");  
1738 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 1772 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
1739 Map<String,Object> m = new HashMap<String, Object>(); 1773 Map<String,Object> m = new HashMap<String, Object>();
1740 ReportUtils ee = new ReportUtils(); 1774 ReportUtils ee = new ReportUtils();
@@ -1742,8 +1776,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1742,8 +1776,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1742 listI.add(resList.iterator()); 1776 listI.add(resList.iterator());
1743 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 1777 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1744 ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_sum.xls", 1778 ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_sum.xls",
1745 - path+"export/线路首末班准点率" + sdfSimple.format(sdfMonth.parse(startDate)) +  
1746 - (startDate.equals(endDate)?"":"-"+sdfSimple.format(sdfMonth.parse(endDate))) + ".xls"); 1779 + path+"export/" + dateTime + "-" + lineName + "-线路首末班准点率.xls");
1747 } catch (Exception e) { 1780 } catch (Exception e) {
1748 // TODO: handle exception 1781 // TODO: handle exception
1749 e.printStackTrace(); 1782 e.printStackTrace();
@@ -1758,7 +1791,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1758,7 +1791,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1758 listI.add(resList.iterator()); 1791 listI.add(resList.iterator());
1759 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 1792 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1760 ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_map.xls", 1793 ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_map.xls",
1761 - path+"export/线路首末班明细.xls"); 1794 + path+"export/" + dateTime + "-" + lineName + "-线路首末班明细.xls");
1762 } catch (Exception e) { 1795 } catch (Exception e) {
1763 // TODO: handle exception 1796 // TODO: handle exception
1764 e.printStackTrace(); 1797 e.printStackTrace();
@@ -1773,7 +1806,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1773,7 +1806,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1773 listI.add(resList.iterator()); 1806 listI.add(resList.iterator());
1774 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 1807 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1775 ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_delay.xls", 1808 ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_delay.xls",
1776 - path+"export/首末班误点班次.xls"); 1809 + path+"export/" + dateTime + "-" + lineName + "-首末班误点班次.xls");
1777 } catch (Exception e) { 1810 } catch (Exception e) {
1778 // TODO: handle exception 1811 // TODO: handle exception
1779 e.printStackTrace(); 1812 e.printStackTrace();
@@ -2016,11 +2049,23 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2016,11 +2049,23 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2016 // TODO Auto-generated catch block 2049 // TODO Auto-generated catch block
2017 e.printStackTrace(); 2050 e.printStackTrace();
2018 } 2051 }
  2052 +
  2053 + long min = 0, max = 0;
  2054 + for(Map<String, Object> m : list){
  2055 + long l = Long.valueOf(m.get("id").toString());
  2056 + if(min == 0 || l < min){
  2057 + min = l;
  2058 + }
  2059 + if(l > max){
  2060 + max = l;
  2061 + }
  2062 + }
2019 2063
2020 sql="SELECT sch,TIMESTAMP,reply46,reply47,reply46time,reply47time" 2064 sql="SELECT sch,TIMESTAMP,reply46,reply47,reply46time,reply47time"
2021 + " FROM bsth_v_directive_60 WHERE is_dispatch = 1 AND sch is not null" 2065 + " FROM bsth_v_directive_60 WHERE is_dispatch = 1 AND sch is not null"
2022 + " AND TIMESTAMP >= "+(dateTime.getTime()) 2066 + " AND TIMESTAMP >= "+(dateTime.getTime())
2023 - + " AND TIMESTAMP < "+(dateTime.getTime() + 1000*60*60*24); 2067 + + " AND TIMESTAMP < "+(dateTime.getTime() + 1000*60*60*24)
  2068 + + " AND sch >= "+min+" AND sch <= "+max;
2024 2069
2025 List<Map<String, Object>> list2 = jdbcTemplate.query(sql, 2070 List<Map<String, Object>> list2 = jdbcTemplate.query(sql,
2026 new RowMapper<Map<String, Object>>(){ 2071 new RowMapper<Map<String, Object>>(){
@@ -2133,6 +2178,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2133,6 +2178,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2133 } 2178 }
2134 2179
2135 if(type.equals("export")){ 2180 if(type.equals("export")){
  2181 + String lineName = "";
  2182 + if(map.containsKey("lineName"))
  2183 + lineName = map.get("lineName").toString();
2136 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 2184 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
2137 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 2185 sdfSimple = new SimpleDateFormat("yyyyMMdd");
2138 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 2186 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -2142,7 +2190,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2142,7 +2190,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2142 listI.add(list_.iterator()); 2190 listI.add(list_.iterator());
2143 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 2191 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
2144 ee.excelReplace(listI, new Object[] { m }, path+"mould/commandState.xls", 2192 ee.excelReplace(listI, new Object[] { m }, path+"mould/commandState.xls",
2145 - path+"export/指令状态分析" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 2193 + path+"export/" + sdfSimple.format(sdfMonth.parse(date))
  2194 + + "-" + lineName + "-指令状态分析.xls");
2146 } catch (Exception e) { 2195 } catch (Exception e) {
2147 // TODO: handle exception 2196 // TODO: handle exception
2148 e.printStackTrace(); 2197 e.printStackTrace();
@@ -2195,11 +2244,23 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2195,11 +2244,23 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2195 // TODO Auto-generated catch block 2244 // TODO Auto-generated catch block
2196 e.printStackTrace(); 2245 e.printStackTrace();
2197 } 2246 }
  2247 +
  2248 + long min = 0, max = 0;
  2249 + for(Map<String, Object> m : list){
  2250 + long l = Long.valueOf(m.get("id").toString());
  2251 + if(min == 0 || l < min){
  2252 + min = l;
  2253 + }
  2254 + if(l > max){
  2255 + max = l;
  2256 + }
  2257 + }
2198 2258
2199 sql="SELECT sch,TIMESTAMP,reply46,reply47,reply46time,reply47time" 2259 sql="SELECT sch,TIMESTAMP,reply46,reply47,reply46time,reply47time"
2200 + " FROM bsth_v_directive_60 WHERE is_dispatch = 1 AND sch is not null" 2260 + " FROM bsth_v_directive_60 WHERE is_dispatch = 1 AND sch is not null"
2201 + " AND TIMESTAMP >= "+(dateTime.getTime()) 2261 + " AND TIMESTAMP >= "+(dateTime.getTime())
2202 - + " AND TIMESTAMP < "+(dateTime.getTime() + 1000*60*60*24); 2262 + + " AND TIMESTAMP < "+(dateTime.getTime() + 1000*60*60*24)
  2263 + + " AND sch >= "+min+" AND sch <= "+max;
2203 2264
2204 List<Map<String, Object>> list2 = jdbcTemplate.query(sql, 2265 List<Map<String, Object>> list2 = jdbcTemplate.query(sql,
2205 new RowMapper<Map<String, Object>>(){ 2266 new RowMapper<Map<String, Object>>(){
@@ -2317,6 +2378,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2317,6 +2378,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2317 2378
2318 2379
2319 if(type.equals("export")){ 2380 if(type.equals("export")){
  2381 + String lineName = "";
  2382 + if(map.containsKey("lineName"))
  2383 + lineName = map.get("lineName").toString();
2320 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 2384 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
2321 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 2385 sdfSimple = new SimpleDateFormat("yyyyMMdd");
2322 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 2386 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -2327,7 +2391,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2327,7 +2391,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2327 listI.add(list_.iterator()); 2391 listI.add(list_.iterator());
2328 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 2392 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
2329 ee.excelReplace(listI, new Object[] { m }, path+"mould/commandState1.xls", 2393 ee.excelReplace(listI, new Object[] { m }, path+"mould/commandState1.xls",
2330 - path+"export/线路指令状态分析" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 2394 + path+"export/" + sdfSimple.format(sdfMonth.parse(date))
  2395 + + "-" + lineName + "-线路指令状态分析.xls");
2331 } catch (Exception e) { 2396 } catch (Exception e) {
2332 // TODO: handle exception 2397 // TODO: handle exception
2333 e.printStackTrace(); 2398 e.printStackTrace();
@@ -2345,7 +2410,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2345,7 +2410,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2345 String date = map.get("date").toString(); 2410 String date = map.get("date").toString();
2346 String jgh = map.get("jgh").toString(); 2411 String jgh = map.get("jgh").toString();
2347 // String code = map.get("code").toString(); 2412 // String code = map.get("code").toString();
2348 - String type = map.get("type").toString(); 2413 + String type = "";
  2414 + if(map.containsKey("type"))
  2415 + type = map.get("type").toString().trim();
2349 2416
2350 String sql_="select * from bsth_c_s_sp_info_real " 2417 String sql_="select * from bsth_c_s_sp_info_real "
2351 + " WHERE schedule_date_str = '"+date+"' and j_gh = '"+jgh+"'"; 2418 + " WHERE schedule_date_str = '"+date+"' and j_gh = '"+jgh+"'";
@@ -2417,6 +2484,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2417,6 +2484,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2417 } 2484 }
2418 2485
2419 if(type.equals("export")){ 2486 if(type.equals("export")){
  2487 + String jName = map.get("jName").toString();
2420 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 2488 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
2421 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 2489 sdfSimple = new SimpleDateFormat("yyyyMMdd");
2422 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 2490 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
@@ -2426,7 +2494,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -2426,7 +2494,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2426 listI.add(list_.iterator()); 2494 listI.add(list_.iterator());
2427 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; 2495 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
2428 ee.excelReplace(listI, new Object[] { m }, path+"mould/commandState2.xls", 2496 ee.excelReplace(listI, new Object[] { m }, path+"mould/commandState2.xls",
2429 - path+"export/指令状态明细" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 2497 + path+"export/" + sdfSimple.format(sdfMonth.parse(date))
  2498 + + "-" + jName + "-指令状态明细.xls");
2430 } catch (Exception e) { 2499 } catch (Exception e) {
2431 // TODO: handle exception 2500 // TODO: handle exception
2432 e.printStackTrace(); 2501 e.printStackTrace();
src/main/resources/static/pages/calc/company/countBusMileage.html
@@ -208,12 +208,14 @@ @@ -208,12 +208,14 @@
208 return; 208 return;
209 } 209 }
210 line = $("#line").val(); 210 line = $("#line").val();
211 - xlName = $("#select2-line-container").html();  
212 date = $("#date").val(); 211 date = $("#date").val();
213 date2 =$("#date2").val(); 212 date2 =$("#date2").val();
214 gsdm =$("#gsdm").val(); 213 gsdm =$("#gsdm").val();
215 fgsdm=$("#fgsdm").val(); 214 fgsdm=$("#fgsdm").val();
216 zt=$("#zt").val(); 215 zt=$("#zt").val();
  216 + xlName = $("#select2-line-container").html();
  217 + if(xlName == "全部线路")
  218 + xlName = $('#fgsdm option:selected').text();
217 if(line=="请选择"){ 219 if(line=="请选择"){
218 line=""; 220 line="";
219 } 221 }
@@ -250,7 +252,7 @@ @@ -250,7 +252,7 @@
250 $("#export").on("click",function(){ 252 $("#export").on("click",function(){
251 var params = {}; 253 var params = {};
252 params['gsdm'] = gsdm; 254 params['gsdm'] = gsdm;
253 - params['fgsdm'] =fgsdm ; 255 + params['fgsdm'] =fgsdm;
254 params['line'] = line; 256 params['line'] = line;
255 params['date'] = date; 257 params['date'] = date;
256 params['date2'] = date2; 258 params['date2'] = date2;
@@ -258,8 +260,18 @@ @@ -258,8 +260,18 @@
258 params['zt']=zt; 260 params['zt']=zt;
259 params['type'] = "export"; 261 params['type'] = "export";
260 params['by']='gs'; 262 params['by']='gs';
  263 + var i = layer.load(2);
261 $get('/calcWaybill/getBusMileage',params,function(result){ 264 $get('/calcWaybill/getBusMileage',params,function(result){
262 - window.open("/downloadFile/download?fileName=路单数据统计表"); 265 + var dateTime = "";
  266 + if(date == date2){
  267 + dateTime = moment(date).format("YYYYMMDD");
  268 + } else {
  269 + dateTime = moment(date).format("YYYYMMDD")
  270 + +"-"+moment(date2).format("YYYYMMDD");
  271 + }
  272 + window.open("/downloadFile/download?fileName="
  273 + +dateTime+"-"+xlName+"-路单数据统计表");
  274 + layer.close(i);
263 }); 275 });
264 }); 276 });
265 277
src/main/resources/static/pages/calc/company/countLineMileage.html
@@ -244,11 +244,13 @@ @@ -244,11 +244,13 @@
244 return; 244 return;
245 } 245 }
246 line = $("#line").val(); 246 line = $("#line").val();
247 - xlName = $("#select2-line-container").html();  
248 date = $("#date").val(); 247 date = $("#date").val();
249 date2 =$("#date2").val(); 248 date2 =$("#date2").val();
250 gsdm =$("#gsdm").val(); 249 gsdm =$("#gsdm").val();
251 fgsdm=$("#fgsdm").val(); 250 fgsdm=$("#fgsdm").val();
  251 + xlName = $("#select2-line-container").html();
  252 + if(xlName == "全部线路")
  253 + xlName = $('#fgsdm option:selected').text();
252 if(line=="请选择"){ 254 if(line=="请选择"){
253 line=""; 255 line="";
254 } 256 }
@@ -284,15 +286,25 @@ @@ -284,15 +286,25 @@
284 $("#export").on("click",function(){ 286 $("#export").on("click",function(){
285 var params = {}; 287 var params = {};
286 params['gsdm'] = gsdm; 288 params['gsdm'] = gsdm;
287 - params['fgsdm'] =fgsdm ; 289 + params['fgsdm'] =fgsdm;
288 params['line'] = line; 290 params['line'] = line;
289 params['date'] = date; 291 params['date'] = date;
290 params['date2'] = date2; 292 params['date2'] = date2;
291 params['xlName'] = xlName; 293 params['xlName'] = xlName;
292 params['type'] = "export"; 294 params['type'] = "export";
293 params['by']='gs'; 295 params['by']='gs';
  296 + var i = layer.load(2);
294 $get('/calcWaybill/getLineMileage',params,function(result){ 297 $get('/calcWaybill/getLineMileage',params,function(result){
295 - window.open("/downloadFile/download?fileName=线路公里统计表"); 298 + var dateTime = "";
  299 + if(date == date2){
  300 + dateTime = moment(date).format("YYYYMMDD");
  301 + } else {
  302 + dateTime = moment(date).format("YYYYMMDD")
  303 + +"-"+moment(date2).format("YYYYMMDD");
  304 + }
  305 + window.open("/downloadFile/download?fileName="
  306 + +dateTime+"-"+xlName+"-线路公里统计表");
  307 + layer.close(i);
296 }); 308 });
297 }); 309 });
298 }); 310 });
src/main/resources/static/pages/calc/countBusMileage.html
@@ -92,8 +92,16 @@ @@ -92,8 +92,16 @@
92 if (!$('body').hasClass('page-sidebar-closed')) 92 if (!$('body').hasClass('page-sidebar-closed'))
93 $('.menu-toggler.sidebar-toggler').click(); 93 $('.menu-toggler.sidebar-toggler').click();
94 94
  95 + $("#date").datetimepicker({
  96 + format : 'YYYY-MM-DD',
  97 + locale : 'zh-cn'
  98 + });
  99 +
  100 + $("#date2").datetimepicker({
  101 + format : 'YYYY-MM-DD',
  102 + locale : 'zh-cn'
  103 + });
95 var d = new Date(); 104 var d = new Date();
96 - d.setTime(d.getTime() - 1*1000*60*60*24);  
97 var year = d.getFullYear(); 105 var year = d.getFullYear();
98 var month = d.getMonth() + 1; 106 var month = d.getMonth() + 1;
99 var day = d.getDate(); 107 var day = d.getDate();
@@ -101,19 +109,9 @@ @@ -101,19 +109,9 @@
101 month = "0" + month; 109 month = "0" + month;
102 if(day < 10) 110 if(day < 10)
103 day = "0" + day; 111 day = "0" + day;
104 - var dateTime = year + "-" + month + "-" + day;  
105 - $("#date").datetimepicker({  
106 - format : 'YYYY-MM-DD',  
107 - locale : 'zh-cn',  
108 - maxDate : dateTime  
109 - });  
110 - $("#date2").datetimepicker({  
111 - format : 'YYYY-MM-DD',  
112 - locale : 'zh-cn',  
113 - maxDate : dateTime  
114 - });  
115 - $("#date").val(dateTime);  
116 - $("#date2").val(dateTime); 112 + $("#date").val(year + "-" + month + "-" + day);
  113 +
  114 + $("#date2").val(year + "-" + month + "-" + day);
117 115
118 var fage=false; 116 var fage=false;
119 var obj = []; 117 var obj = [];
@@ -210,12 +208,14 @@ @@ -210,12 +208,14 @@
210 return; 208 return;
211 } 209 }
212 line = $("#line").val(); 210 line = $("#line").val();
213 - xlName = $("#select2-line-container").html();  
214 date = $("#date").val(); 211 date = $("#date").val();
215 date2 =$("#date2").val(); 212 date2 =$("#date2").val();
216 gsdm =$("#gsdm").val(); 213 gsdm =$("#gsdm").val();
217 fgsdm=$("#fgsdm").val(); 214 fgsdm=$("#fgsdm").val();
218 zt=$("#zt").val(); 215 zt=$("#zt").val();
  216 + xlName = $("#select2-line-container").html();
  217 + if(xlName == "全部线路")
  218 + xlName = $('#fgsdm option:selected').text();
219 if(line=="请选择"){ 219 if(line=="请选择"){
220 line=""; 220 line="";
221 } 221 }
@@ -252,7 +252,7 @@ @@ -252,7 +252,7 @@
252 $("#export").on("click",function(){ 252 $("#export").on("click",function(){
253 var params = {}; 253 var params = {};
254 params['gsdm'] = gsdm; 254 params['gsdm'] = gsdm;
255 - params['fgsdm'] =fgsdm ; 255 + params['fgsdm'] =fgsdm;
256 params['line'] = line; 256 params['line'] = line;
257 params['date'] = date; 257 params['date'] = date;
258 params['date2'] = date2; 258 params['date2'] = date2;
@@ -260,8 +260,18 @@ @@ -260,8 +260,18 @@
260 params['zt']=zt; 260 params['zt']=zt;
261 params['type'] = "export"; 261 params['type'] = "export";
262 params['by']='sj'; 262 params['by']='sj';
  263 + var i = layer.load(2);
263 $get('/calcWaybill/getBusMileage',params,function(result){ 264 $get('/calcWaybill/getBusMileage',params,function(result){
264 - window.open("/downloadFile/download?fileName=路单数据统计表"); 265 + var dateTime = "";
  266 + if(date == date2){
  267 + dateTime = moment(date).format("YYYYMMDD");
  268 + } else {
  269 + dateTime = moment(date).format("YYYYMMDD")
  270 + +"-"+moment(date2).format("YYYYMMDD");
  271 + }
  272 + window.open("/downloadFile/download?fileName="
  273 + +dateTime+"-"+xlName+"-路单数据统计表");
  274 + layer.close(i);
265 }); 275 });
266 }); 276 });
267 277
src/main/resources/static/pages/calc/countLineMileage.html
@@ -129,8 +129,16 @@ @@ -129,8 +129,16 @@
129 if (!$('body').hasClass('page-sidebar-closed')) 129 if (!$('body').hasClass('page-sidebar-closed'))
130 $('.menu-toggler.sidebar-toggler').click(); 130 $('.menu-toggler.sidebar-toggler').click();
131 131
  132 + $("#date").datetimepicker({
  133 + format : 'YYYY-MM-DD',
  134 + locale : 'zh-cn'
  135 + });
  136 +
  137 + $("#date2").datetimepicker({
  138 + format : 'YYYY-MM-DD',
  139 + locale : 'zh-cn'
  140 + });
132 var d = new Date(); 141 var d = new Date();
133 - d.setTime(d.getTime() - 1*1000*60*60*24);  
134 var year = d.getFullYear(); 142 var year = d.getFullYear();
135 var month = d.getMonth() + 1; 143 var month = d.getMonth() + 1;
136 var day = d.getDate(); 144 var day = d.getDate();
@@ -138,19 +146,9 @@ @@ -138,19 +146,9 @@
138 month = "0" + month; 146 month = "0" + month;
139 if(day < 10) 147 if(day < 10)
140 day = "0" + day; 148 day = "0" + day;
141 - var dateTime = year + "-" + month + "-" + day;  
142 - $("#date").datetimepicker({  
143 - format : 'YYYY-MM-DD',  
144 - locale : 'zh-cn',  
145 - maxDate : dateTime  
146 - });  
147 - $("#date2").datetimepicker({  
148 - format : 'YYYY-MM-DD',  
149 - locale : 'zh-cn',  
150 - maxDate : dateTime  
151 - });  
152 - $("#date").val(dateTime);  
153 - $("#date2").val(dateTime); 149 + $("#date").val(year + "-" + month + "-" + day);
  150 +
  151 + $("#date2").val(year + "-" + month + "-" + day);
154 152
155 var fage=false; 153 var fage=false;
156 var obj = []; 154 var obj = [];
@@ -245,11 +243,13 @@ @@ -245,11 +243,13 @@
245 return; 243 return;
246 } 244 }
247 line = $("#line").val(); 245 line = $("#line").val();
248 - xlName = $("#select2-line-container").html();  
249 date = $("#date").val(); 246 date = $("#date").val();
250 date2 =$("#date2").val(); 247 date2 =$("#date2").val();
251 gsdm =$("#gsdm").val(); 248 gsdm =$("#gsdm").val();
252 fgsdm=$("#fgsdm").val(); 249 fgsdm=$("#fgsdm").val();
  250 + xlName = $("#select2-line-container").html();
  251 + if(xlName == "全部线路")
  252 + xlName = $('#fgsdm option:selected').text();
253 if(line=="请选择"){ 253 if(line=="请选择"){
254 line=""; 254 line="";
255 } 255 }
@@ -293,7 +293,15 @@ @@ -293,7 +293,15 @@
293 params['type'] = "export"; 293 params['type'] = "export";
294 params['by']='sj'; 294 params['by']='sj';
295 $get('/calcWaybill/getLineMileage',params,function(result){ 295 $get('/calcWaybill/getLineMileage',params,function(result){
296 - window.open("/downloadFile/download?fileName=线路公里统计表"); 296 + var dateTime = "";
  297 + if(date == date2){
  298 + dateTime = moment(date).format("YYYYMMDD");
  299 + } else {
  300 + dateTime = moment(date).format("YYYYMMDD")
  301 + +"-"+moment(date2).format("YYYYMMDD");
  302 + }
  303 + window.open("/downloadFile/download?fileName="
  304 + +dateTime+"-"+xlName+"-线路公里统计表");
297 }); 305 });
298 }); 306 });
299 }); 307 });
src/main/resources/static/pages/forms/statement/account.html
@@ -224,7 +224,9 @@ @@ -224,7 +224,9 @@
224 $("#export").on("click",function(){ 224 $("#export").on("click",function(){
225 var type = "export"; 225 var type = "export";
226 $get('/realSchedule/account', {line:line,date:date,code:code,xlName:xlName,type:type}, function(result){ 226 $get('/realSchedule/account', {line:line,date:date,code:code,xlName:xlName,type:type}, function(result){
227 - window.open("/downloadFile/download?fileName=驾驶员请求台账"+moment(date).format("YYYYMMDD")); 227 + window.open("/downloadFile/download?fileName="
  228 + +moment(date).format("YYYYMMDD")
  229 + +"-"+xlName+"-驾驶员请求台账");
228 }); 230 });
229 }); 231 });
230 232
src/main/resources/static/pages/forms/statement/busInterval.html
@@ -137,49 +137,6 @@ @@ -137,49 +137,6 @@
137 $("#times1").attr("disabled", true); 137 $("#times1").attr("disabled", true);
138 $("#times2").attr("disabled", true); 138 $("#times2").attr("disabled", true);
139 139
140 -// var obj = [];  
141 -// $.get('/user/companyData', function(result){  
142 -// obj = result;  
143 -// var options = '';  
144 -// for(var i = 0; i < obj.length; i++){  
145 -// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
146 -// }  
147 -// if(obj.length == 1){  
148 -// $('#company1').hide();  
149 -// if(obj[0].children.length == 1)  
150 -// $('#subCompany1').hide();  
151 -// }  
152 -// $('#company').html(options);  
153 -// updateCompany();  
154 -// });  
155 -// $("#company").on("change",updateCompany);  
156 -// function updateCompany(){  
157 -// var company = $('#company').val();  
158 -// var options = '';  
159 -// for(var i = 0; i < obj.length; i++){  
160 -// if(obj[i].companyCode == company){  
161 -// var children = obj[i].children;  
162 -// for(var j = 0; j < children.length; j++){  
163 -// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';  
164 -// }  
165 -// }  
166 -// }  
167 -// $('#subCompany').html(options);  
168 -// }  
169 -  
170 -// $.get('/basic/lineCode2Name',function(result){  
171 -// var data=[];  
172 -// // data.push({id:" ", text:"全部线路"});  
173 -// for(var code in result){  
174 -// data.push({id: code, text: result[code]});  
175 -// }  
176 -// console.log(data);  
177 -// initPinYinSelect2('#line',data,'');  
178 -  
179 -// // line = "";  
180 -// line = data[0].id;  
181 -// updateModel();  
182 -// })  
183 var fage=false; 140 var fage=false;
184 var xlList; 141 var xlList;
185 var obj = []; 142 var obj = [];
@@ -276,6 +233,7 @@ @@ -276,6 +233,7 @@
276 var times2 = $("#times2").val(); 233 var times2 = $("#times2").val();
277 var company = $("#company").val(); 234 var company = $("#company").val();
278 var subCompany = $("#subCompany").val(); 235 var subCompany = $("#subCompany").val();
  236 + var lineName = $('#line option:selected').text();
279 function jsDoQuery(pagination){ 237 function jsDoQuery(pagination){
280 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){ 238 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
281 layer.msg("请选择日期"); 239 layer.msg("请选择日期");
@@ -294,6 +252,9 @@ @@ -294,6 +252,9 @@
294 times2 = $("#times2").val(); 252 times2 = $("#times2").val();
295 company = $("#company").val(); 253 company = $("#company").val();
296 subCompany = $("#subCompany").val(); 254 subCompany = $("#subCompany").val();
  255 + lineName = $('#line option:selected').text();
  256 + if(lineName == "全部线路")
  257 + lineName = $('#subCompany option:selected').text();
297 params['line'] = line; 258 params['line'] = line;
298 params['sfqr'] = sfqr; 259 params['sfqr'] = sfqr;
299 params['statu'] = statu; 260 params['statu'] = statu;
@@ -343,11 +304,18 @@ @@ -343,11 +304,18 @@
343 params['company'] = company; 304 params['company'] = company;
344 params['subCompany'] = subCompany; 305 params['subCompany'] = subCompany;
345 params['type'] = "export"; 306 params['type'] = "export";
  307 + params['lineName'] = lineName;
346 var i = layer.load(2); 308 var i = layer.load(2);
347 $get('/busInterval/interval', params, function(result){ 309 $get('/busInterval/interval', params, function(result){
348 - window.open("/downloadFile/download?fileName=班次间隔统计表"  
349 - +moment(startDate).format("YYYYMMDD")+"-"  
350 - +moment(endDate).format("YYYYMMDD")); 310 + var dateTime = "";
  311 + if(startDate == endDate){
  312 + dateTime = moment(startDate).format("YYYYMMDD");
  313 + } else {
  314 + dateTime = moment(startDate).format("YYYYMMDD")
  315 + +"-"+moment(endDate).format("YYYYMMDD");
  316 + }
  317 + window.open("/downloadFile/download?fileName="
  318 + +dateTime+"-"+lineName+"-班次间隔统计表");
351 layer.close(i); 319 layer.close(i);
352 }); 320 });
353 }); 321 });
src/main/resources/static/pages/forms/statement/commandState.html
@@ -266,6 +266,7 @@ @@ -266,6 +266,7 @@
266 var code = $("#code").val(); 266 var code = $("#code").val();
267 var company = $("#company").val(); 267 var company = $("#company").val();
268 var subCompany = $("#subCompany").val(); 268 var subCompany = $("#subCompany").val();
  269 + var lineName = $('#line option:selected').text();
269 function jsDoQuery(pagination){ 270 function jsDoQuery(pagination){
270 $("#export").removeAttr("disabled"); 271 $("#export").removeAttr("disabled");
271 if($("#date").val() == null || $("#date").val().trim().length == 0){ 272 if($("#date").val() == null || $("#date").val().trim().length == 0){
@@ -280,6 +281,9 @@ @@ -280,6 +281,9 @@
280 code = $("#code").val(); 281 code = $("#code").val();
281 company = $("#company").val(); 282 company = $("#company").val();
282 subCompany = $("#subCompany").val(); 283 subCompany = $("#subCompany").val();
  284 + lineName = $('#line option:selected').text();
  285 + if(lineName == "全部线路")
  286 + lineName = $('#subCompany option:selected').text();
283 params['line'] = line; 287 params['line'] = line;
284 params['date'] = date; 288 params['date'] = date;
285 params['code'] = code; 289 params['code'] = code;
@@ -287,31 +291,36 @@ @@ -287,31 +291,36 @@
287 params['company'] = company; 291 params['company'] = company;
288 params['subCompany'] = subCompany; 292 params['subCompany'] = subCompany;
289 $("#forms .hidden").removeClass("hidden"); 293 $("#forms .hidden").removeClass("hidden");
  294 + var i = layer.load(2);
290 $get('/pcpc/commandState', params, function(result){ 295 $get('/pcpc/commandState', params, function(result){
291 // 把数据填充到模版中 296 // 把数据填充到模版中
292 var tbodyHtml = template('list_commandState',{list:result}); 297 var tbodyHtml = template('list_commandState',{list:result});
293 // 把渲染好的模版html文本追加到表格中 298 // 把渲染好的模版html文本追加到表格中
294 $('#forms tbody').html(tbodyHtml); 299 $('#forms tbody').html(tbodyHtml);
  300 + layer.close(i);
295 301
296 $('.btn-command').on('click', openCommandByLine); 302 $('.btn-command').on('click', openCommandByLine);
297 303
298 }); 304 });
299 } 305 }
300 306
301 - var xlbm=""; 307 + var xlbm="", lineName1="";
302 function openCommandByLine(){ 308 function openCommandByLine(){
303 var id = $(this).data('id'); 309 var id = $(this).data('id');
304 date = $("#date").val(); 310 date = $("#date").val();
305 xlbm=id; 311 xlbm=id;
  312 + lineName1 = $(this).html();
306 var params = {}; 313 var params = {};
307 params['line'] = id; 314 params['line'] = id;
308 params['date'] = date; 315 params['date'] = date;
309 params['type'] = "query"; 316 params['type'] = "query";
310 $("#works .hidden").removeClass("hidden"); 317 $("#works .hidden").removeClass("hidden");
311 $("#works_hidden").removeClass("hidden"); 318 $("#works_hidden").removeClass("hidden");
  319 + var i = layer.load(2);
312 $get('/pcpc/commandByLineList',params,function(result){ 320 $get('/pcpc/commandByLineList',params,function(result){
313 var commandByLine = template('list_workList',{list:result}); 321 var commandByLine = template('list_workList',{list:result});
314 $('#works tbody').html(commandByLine); 322 $('#works tbody').html(commandByLine);
  323 + layer.close(i);
315 324
316 $('.btn-command-line').on('click', openCommand); 325 $('.btn-command-line').on('click', openCommand);
317 $("html,body").animate({scrollTop:$("#works").offset().top},1000); 326 $("html,body").animate({scrollTop:$("#works").offset().top},1000);
@@ -325,6 +334,8 @@ @@ -325,6 +334,8 @@
325 params['jgh'] = id; 334 params['jgh'] = id;
326 params['date'] = date; 335 params['date'] = date;
327 params['line'] =xlbm; 336 params['line'] =xlbm;
  337 + var jName = $(this).html();
  338 + params['jName'] = lineName1+"-"+jName.replace("/", "_");
328 $.get('/pages/forms/statement/commandStateByLine.html', function (content) { 339 $.get('/pages/forms/statement/commandStateByLine.html', function (content) {
329 layer.open({ 340 layer.open({
330 type: 1, 341 type: 1,
@@ -348,8 +359,13 @@ @@ -348,8 +359,13 @@
348 params['type'] = "export"; 359 params['type'] = "export";
349 params['company'] = company; 360 params['company'] = company;
350 params['subCompany'] = subCompany; 361 params['subCompany'] = subCompany;
  362 + params['lineName'] = lineName;
  363 + var i = layer.load(2);
351 $get('/pcpc/commandState', params, function(result){ 364 $get('/pcpc/commandState', params, function(result){
352 - window.open("/downloadFile/download?fileName=指令状态分析"+moment(date).format("YYYYMMDD")); 365 + window.open("/downloadFile/download?fileName="
  366 + +moment(date).format("YYYYMMDD")
  367 + +"-"+lineName+"-指令状态分析");
  368 + layer.close(i);
353 }); 369 });
354 }); 370 });
355 371
@@ -358,8 +374,13 @@ @@ -358,8 +374,13 @@
358 params['line'] = xlbm; 374 params['line'] = xlbm;
359 params['date'] = date; 375 params['date'] = date;
360 params['type'] = "export"; 376 params['type'] = "export";
  377 + params['lineName'] = lineName1;
  378 + var i = layer.load(2);
361 $get('/pcpc/commandByLineList', params, function(result){ 379 $get('/pcpc/commandByLineList', params, function(result){
362 - window.open("/downloadFile/download?fileName=线路指令状态分析"+moment(date).format("YYYYMMDD")); 380 + window.open("/downloadFile/download?fileName="
  381 + +moment(date).format("YYYYMMDD")
  382 + +"-"+lineName1+"-线路指令状态分析");
  383 + layer.close(i);
363 }); 384 });
364 }); 385 });
365 386
src/main/resources/static/pages/forms/statement/commandStateByLine.html
@@ -60,18 +60,21 @@ @@ -60,18 +60,21 @@
60 $('.menu-toggler.sidebar-toggler').click(); 60 $('.menu-toggler.sidebar-toggler').click();
61 var params_; 61 var params_;
62 $("#commandByLineList").on('init', function (e, params) { 62 $("#commandByLineList").on('init', function (e, params) {
63 - params['type']='export';  
64 params_=params; 63 params_=params;
65 - console.log(params.date);  
66 $get('/pcpc/commandByJghList',params,function(result){ 64 $get('/pcpc/commandByJghList',params,function(result){
67 var commandByLine = template('commandByLine',{list:result}); 65 var commandByLine = template('commandByLine',{list:result});
68 $('#forms_1 tbody').html(commandByLine); 66 $('#forms_1 tbody').html(commandByLine);
69 }); 67 });
70 }) 68 })
71 - $("#exportList").on('click',function(){  
72 - $get('/pcpc/commandByLineList', params_, function(result){  
73 - window.open("/downloadFile/download?fileName=指令状态明细"+moment(params_.date).format("YYYYMMDD"));  
74 - }); 69 + $("#exportList").on('click',function(){
  70 + var params;
  71 + params = params_;
  72 + params['type']='export';
  73 + $get('/pcpc/commandByJghList', params, function(result){
  74 + window.open("/downloadFile/download?fileName="
  75 + +moment(params.date).format("YYYYMMDD")
  76 + +"-"+params.jName+"-指令状态明细");
  77 + });
75 }); 78 });
76 79
77 80
src/main/resources/static/pages/forms/statement/correctForm.html
@@ -33,11 +33,11 @@ @@ -33,11 +33,11 @@
33 </div> 33 </div>
34 <div style="display: inline-block;margin-left: 15px;"> 34 <div style="display: inline-block;margin-left: 15px;">
35 <span class="item-label" style="width: 80px;">开始时间: </span> 35 <span class="item-label" style="width: 80px;">开始时间: </span>
36 - <input class="form-control" type="text" id="date" style="width: 160px;"/> 36 + <input class="form-control" type="text" id="date" style="width: 160px;" />
37 </div> 37 </div>
38 <div style="display: inline-block;margin-left: 15px;"> 38 <div style="display: inline-block;margin-left: 15px;">
39 <span class="item-label" style="width: 80px;">结束时间: </span> 39 <span class="item-label" style="width: 80px;">结束时间: </span>
40 - <input class="form-control" type="text" id="endDate" style="width: 160px;"/> 40 + <input class="form-control" type="text" id="endDate" style="width: 160px;" />
41 </div> 41 </div>
42 <div style="margin-top: 10px"></div> 42 <div style="margin-top: 10px"></div>
43 <div style="display: inline-block;"> 43 <div style="display: inline-block;">
@@ -97,20 +97,12 @@ @@ -97,20 +97,12 @@
97 $(function(){ 97 $(function(){
98 $("#export").attr('disabled',"true"); 98 $("#export").attr('disabled',"true");
99 99
100 -  
101 // 关闭左侧栏 100 // 关闭左侧栏
102 if (!$('body').hasClass('page-sidebar-closed')) 101 if (!$('body').hasClass('page-sidebar-closed'))
103 $('.menu-toggler.sidebar-toggler').click(); 102 $('.menu-toggler.sidebar-toggler').click();
104 -  
105 - $("#date").datetimepicker({  
106 - format : 'YYYY-MM-DD',  
107 - locale : 'zh-cn'  
108 - });  
109 - $("#endDate").datetimepicker({  
110 - format : 'YYYY-MM-DD',  
111 - locale : 'zh-cn'  
112 - }); 103 +
113 var d = new Date(); 104 var d = new Date();
  105 + d.setTime(d.getTime() - 1*1000*60*60*24);
114 var year = d.getFullYear(); 106 var year = d.getFullYear();
115 var month = d.getMonth() + 1; 107 var month = d.getMonth() + 1;
116 var day = d.getDate(); 108 var day = d.getDate();
@@ -118,8 +110,19 @@ @@ -118,8 +110,19 @@
118 month = "0" + month; 110 month = "0" + month;
119 if(day < 10) 111 if(day < 10)
120 day = "0" + day; 112 day = "0" + day;
121 - $("#date").val(year + "-" + month + "-" + day);  
122 - $("#endDate").val(year + "-" + month + "-" + day); 113 + var dateTime = year + "-" + month + "-" + day;
  114 + $("#date").datetimepicker({
  115 + format : 'YYYY-MM-DD',
  116 + locale : 'zh-cn',
  117 + maxDate : dateTime
  118 + });
  119 + $("#endDate").datetimepicker({
  120 + format : 'YYYY-MM-DD',
  121 + locale : 'zh-cn',
  122 + maxDate : dateTime
  123 + });
  124 + $("#date").val(dateTime);
  125 + $("#endDate").val(dateTime);
123 126
124 $.get('/report/lineList',function(xlList){ 127 $.get('/report/lineList',function(xlList){
125 var data = []; 128 var data = [];
src/main/resources/static/pages/forms/statement/daily.html
@@ -139,43 +139,8 @@ @@ -139,43 +139,8 @@
139 } 139 }
140 } 140 }
141 $('#fgsdmDaily').html(options); 141 $('#fgsdmDaily').html(options);
142 -// initXl();  
143 } 142 }
144 143
145 - /* $.get('/basic/lineCode2Name',function(result){  
146 - var data=[];  
147 -  
148 - for(var code in result){  
149 - data.push({id: code, text: result[code]});  
150 - }  
151 - initPinYinSelect2('#line',data,'');  
152 -  
153 - }) */  
154 -  
155 - /* $("#fgsdmDaily").on("change",initXl);  
156 - function initXl(){  
157 - var data=[];  
158 - if(fage){  
159 - $("#line").select2("destroy").html('');  
160 - }  
161 - var fgs=$('#fgsdmDaily').val();  
162 - var gs=$('#gsdmDaily').val();  
163 - for(var i=0;i<xlList.length;i++){  
164 - if(gs!=""){  
165 - if(fgs!=""){  
166 - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){  
167 - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});  
168 - }  
169 - }else{  
170 - if(xlList[i]["gsbm"]==gs){  
171 - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});  
172 - }  
173 - }  
174 - }  
175 - }  
176 - initPinYinSelect2('#line',data,'');  
177 - fage=true;  
178 - } */  
179 var tempData = {}; 144 var tempData = {};
180 $.get('/report/lineList',function(xlList){ 145 $.get('/report/lineList',function(xlList){
181 var data = []; 146 var data = [];
@@ -218,17 +183,18 @@ @@ -218,17 +183,18 @@
218 var date; 183 var date;
219 var gsdmDaily; 184 var gsdmDaily;
220 var fgsdmDaily; 185 var fgsdmDaily;
  186 + var lineName=$("#select2-line-container").html();
221 $("#query").on("click",function(){ 187 $("#query").on("click",function(){
222 if($("#date").val() == null || $("#date").val().trim().length == 0){ 188 if($("#date").val() == null || $("#date").val().trim().length == 0){
223 layer.msg("请选择时间"); 189 layer.msg("请选择时间");
224 return; 190 return;
225 } 191 }
226 line = $("#line").val(); 192 line = $("#line").val();
227 - var lineName=$("#select2-line-container").html();  
228 date = $("#date").val(); 193 date = $("#date").val();
229 gsdmDaily=$("#gsdmDaily").val(); 194 gsdmDaily=$("#gsdmDaily").val();
230 fgsdmDaily = $("#fgsdmDaily").val(); 195 fgsdmDaily = $("#fgsdmDaily").val();
231 - 196 + lineName=$("#select2-line-container").html();
  197 + var i = layer.load(2);
232 $get('/mcy_forms/daily',{gsdmDaily:gsdmDaily,fgsdmDaily:fgsdmDaily, line:line,date:date,type:'query'},function(result){ 198 $get('/mcy_forms/daily',{gsdmDaily:gsdmDaily,fgsdmDaily:fgsdmDaily, line:line,date:date,type:'query'},function(result){
233 $("#form_line").text(lineName); 199 $("#form_line").text(lineName);
234 $("#form_date").text(date); 200 $("#form_date").text(date);
@@ -236,8 +202,9 @@ @@ -236,8 +202,9 @@
236 var tbodyHtml = template('dailyInfo',{list:result}); 202 var tbodyHtml = template('dailyInfo',{list:result});
237 // 把渲染好的模版html文本追加到表格中 203 // 把渲染好的模版html文本追加到表格中
238 $('#tbody').html(tbodyHtml); 204 $('#tbody').html(tbodyHtml);
  205 + layer.close(i);
  206 +
239 line = $("#line").val(); 207 line = $("#line").val();
240 -  
241 startDate = $("#startDate").val(); 208 startDate = $("#startDate").val();
242 endDate = $("#endDate").val(); 209 endDate = $("#endDate").val();
243 $("#sDate").text(startDate); 210 $("#sDate").text(startDate);
@@ -272,12 +239,20 @@ @@ -272,12 +239,20 @@
272 }); 239 });
273 240
274 $("#export").on("click",function(){ 241 $("#export").on("click",function(){
  242 + if($("#date").val() == null || $("#date").val().trim().length == 0){
  243 + layer.msg("请选择时间");
  244 + return;
  245 + }
275 line = $("#line").val(); 246 line = $("#line").val();
276 date = $("#date").val(); 247 date = $("#date").val();
277 gsdmDaily=$("#gsdmDaily").val(); 248 gsdmDaily=$("#gsdmDaily").val();
278 fgsdmDaily = $("#fgsdmDaily").val(); 249 fgsdmDaily = $("#fgsdmDaily").val();
279 - $post('/mcy_export/dailyExport',{gsdmDaily:gsdmDaily,fgsdmDaily:fgsdmDaily,line:line,date:date,type:'export'},function(result){  
280 - window.open("/downloadFile/download?fileName=班次日报表"+moment(date).format("YYYYMMDD")); 250 + lineName=$("#select2-line-container").html();
  251 + var i = layer.load(2);
  252 + $post('/mcy_export/dailyExport',{gsdmDaily:gsdmDaily,fgsdmDaily:fgsdmDaily,line:line,date:date,type:'export',lineName:lineName},function(result){
  253 + window.open("/downloadFile/download?fileName="
  254 + +moment(date).format("YYYYMMDD")+"-"+lineName+"-班次日报表");
  255 + layer.close(i);
281 }); 256 });
282 }); 257 });
283 }); 258 });
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
@@ -229,6 +229,7 @@ @@ -229,6 +229,7 @@
229 var subCompany = $("#subCompany").val(); 229 var subCompany = $("#subCompany").val();
230 var line = $("#line").val(); 230 var line = $("#line").val();
231 var date = $("#date").val(); 231 var date = $("#date").val();
  232 + var lineName = $('#line option:selected').text();
232 function jsDoQuery(pagination){ 233 function jsDoQuery(pagination){
233 if($("#date").val() == null || $("#date").val().trim().length == 0){ 234 if($("#date").val() == null || $("#date").val().trim().length == 0){
234 layer.msg("请选择时间!"); 235 layer.msg("请选择时间!");
@@ -239,6 +240,9 @@ @@ -239,6 +240,9 @@
239 subCompany = $("#subCompany").val(); 240 subCompany = $("#subCompany").val();
240 line = $("#line").val(); 241 line = $("#line").val();
241 date = $("#date").val(); 242 date = $("#date").val();
  243 + lineName = $('#line option:selected').text();
  244 + if(lineName == "全部线路")
  245 + lineName = $('#subCompany option:selected').text();
242 if(line == " ") 246 if(line == " ")
243 line = ""; 247 line = "";
244 params['company'] = company; 248 params['company'] = company;
@@ -247,11 +251,13 @@ @@ -247,11 +251,13 @@
247 params['date'] = date; 251 params['date'] = date;
248 params['type'] = "query"; 252 params['type'] = "query";
249 $(".hidden").removeClass("hidden"); 253 $(".hidden").removeClass("hidden");
  254 + var i = layer.load(2);
250 $get('/pcpc/firstAndLastBus', params, function(result){ 255 $get('/pcpc/firstAndLastBus', params, function(result){
251 // 把数据填充到模版中 256 // 把数据填充到模版中
252 var tbodyHtml = template('list_firstAndLastBus',{list:result}); 257 var tbodyHtml = template('list_firstAndLastBus',{list:result});
253 // 把渲染好的模版html文本追加到表格中 258 // 把渲染好的模版html文本追加到表格中
254 $('#forms tbody').html(tbodyHtml); 259 $('#forms tbody').html(tbodyHtml);
  260 + layer.close(i);
255 261
256 if(result.length == 0) 262 if(result.length == 0)
257 $("#export").attr('disabled',"true"); 263 $("#export").attr('disabled',"true");
@@ -271,8 +277,13 @@ @@ -271,8 +277,13 @@
271 params['line'] = line; 277 params['line'] = line;
272 params['date'] = date; 278 params['date'] = date;
273 params['type'] = "export"; 279 params['type'] = "export";
  280 + params['lineName'] = lineName;
  281 + var i = layer.load(2);
274 $get('/pcpc/firstAndLastBus', params, function(result){ 282 $get('/pcpc/firstAndLastBus', params, function(result){
275 - window.open("/downloadFile/download?fileName=线路首末班"+moment(date).format("YYYYMMDD")); 283 + window.open("/downloadFile/download?fileName="
  284 + +moment(date).format("YYYYMMDD")
  285 + +"-"+lineName+"-线路首末班");
  286 + layer.close(i);
276 }); 287 });
277 }); 288 });
278 289
src/main/resources/static/pages/forms/statement/firstAndLastBus_delay.html
@@ -191,6 +191,7 @@ @@ -191,6 +191,7 @@
191 var line = $("#line").val(); 191 var line = $("#line").val();
192 var startDate = $("#startDate").val(); 192 var startDate = $("#startDate").val();
193 var endDate = $("#endDate").val(); 193 var endDate = $("#endDate").val();
  194 + var lineName = $('#line option:selected').text();
194 function jsDoQuery(pagination){ 195 function jsDoQuery(pagination){
195 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){ 196 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
196 layer.msg("请选择时间!"); 197 layer.msg("请选择时间!");
@@ -207,6 +208,9 @@ @@ -207,6 +208,9 @@
207 line = $("#line").val(); 208 line = $("#line").val();
208 startDate = $("#startDate").val(); 209 startDate = $("#startDate").val();
209 endDate = $("#endDate").val(); 210 endDate = $("#endDate").val();
  211 + lineName = $('#line option:selected').text();
  212 + if(lineName == "全部线路")
  213 + lineName = $('#subCompany option:selected').text();
210 if(line == " ") 214 if(line == " ")
211 line = ""; 215 line = "";
212 params['company'] = company; 216 params['company'] = company;
@@ -240,14 +244,6 @@ @@ -240,14 +244,6 @@
240 } 244 }
241 245
242 $("#export").on("click",function(){ 246 $("#export").on("click",function(){
243 -// $("#forms").table2excel({  
244 -// exclue: ".noExl",  
245 -// name: "Excel Document Name.xlsx",  
246 -// filename: "首末班误点班次",  
247 -// exclude_img: true,  
248 -// exclude_links: true,  
249 -// exclude_inputs: true  
250 -// });  
251 var i = layer.load(2); 247 var i = layer.load(2);
252 var params = {}; 248 var params = {};
253 company = $("#company").val(); 249 company = $("#company").val();
@@ -263,8 +259,17 @@ @@ -263,8 +259,17 @@
263 params['startDate'] = startDate; 259 params['startDate'] = startDate;
264 params['endDate'] = endDate; 260 params['endDate'] = endDate;
265 params['type'] = "delay_export"; 261 params['type'] = "delay_export";
  262 + params['lineName'] = lineName;
266 $get('/pcpc/firstAndLastBus_sum', params, function(result){ 263 $get('/pcpc/firstAndLastBus_sum', params, function(result){
267 - window.open("/downloadFile/download?fileName=首末班误点班次"); 264 + var dateTime = "";
  265 + if(startDate == endDate){
  266 + dateTime = moment(startDate).format("YYYYMMDD");
  267 + } else {
  268 + dateTime = moment(startDate).format("YYYYMMDD")
  269 + +"-"+moment(endDate).format("YYYYMMDD");
  270 + }
  271 + window.open("/downloadFile/download?fileName="
  272 + +dateTime+"-"+lineName+"-首末班误点班次");
268 layer.close(i); 273 layer.close(i);
269 }); 274 });
270 }); 275 });
src/main/resources/static/pages/forms/statement/firstAndLastBus_sum.html
@@ -240,12 +240,14 @@ @@ -240,12 +240,14 @@
240 240
241 var list; 241 var list;
242 var tempLine; 242 var tempLine;
  243 + var lineName1;
243 $("#forms tbody").on("click","a",function(){ 244 $("#forms tbody").on("click","a",function(){
244 var index = $(this).parent().parent().index(); 245 var index = $(this).parent().parent().index();
245 if(index < list.length - 1){ 246 if(index < list.length - 1){
246 $.each(list, function(i, g){ 247 $.each(list, function(i, g){
247 if(index == i){ 248 if(index == i){
248 tempLine = g.xlbm; 249 tempLine = g.xlbm;
  250 + lineName1 = g.line;
249 var tbodyHtml = template('list_maps',{list:g.map}); 251 var tbodyHtml = template('list_maps',{list:g.map});
250 $('#map tbody').html(tbodyHtml); 252 $('#map tbody').html(tbodyHtml);
251 $("#sumMap tr").addClass("hidden"); 253 $("#sumMap tr").addClass("hidden");
@@ -264,7 +266,8 @@ @@ -264,7 +266,8 @@
264 $("#map tr").addClass("hidden"); 266 $("#map tr").addClass("hidden");
265 $("#exportMap").addClass("hidden"); 267 $("#exportMap").addClass("hidden");
266 $("#sumMap .hidden").removeClass("hidden"); 268 $("#sumMap .hidden").removeClass("hidden");
267 - $("#exportSumMap").removeClass("hidden"); 269 + if(g.map.length > 0)
  270 + $("#exportSumMap").removeClass("hidden");
268 $("html,body").animate({scrollTop:$("#sumMap").offset().top},1000); 271 $("html,body").animate({scrollTop:$("#sumMap").offset().top},1000);
269 } 272 }
270 }); 273 });
@@ -278,6 +281,7 @@ @@ -278,6 +281,7 @@
278 var line = $("#line").val(); 281 var line = $("#line").val();
279 var startDate = $("#startDate").val(); 282 var startDate = $("#startDate").val();
280 var endDate = $("#endDate").val(); 283 var endDate = $("#endDate").val();
  284 + var lineName = $('#line option:selected').text();
281 function jsDoQuery(pagination){ 285 function jsDoQuery(pagination){
282 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){ 286 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
283 layer.msg("请选择时间!"); 287 layer.msg("请选择时间!");
@@ -293,6 +297,9 @@ @@ -293,6 +297,9 @@
293 line = $("#line").val(); 297 line = $("#line").val();
294 startDate = $("#startDate").val(); 298 startDate = $("#startDate").val();
295 endDate = $("#endDate").val(); 299 endDate = $("#endDate").val();
  300 + lineName = $('#line option:selected').text();
  301 + if(lineName == "全部线路")
  302 + lineName = $('#subCompany option:selected').text();
296 if(line == " ") 303 if(line == " ")
297 line = ""; 304 line = "";
298 params['company'] = company; 305 params['company'] = company;
@@ -331,22 +338,23 @@ @@ -331,22 +338,23 @@
331 params['startDate'] = startDate; 338 params['startDate'] = startDate;
332 params['endDate'] = endDate; 339 params['endDate'] = endDate;
333 params['type'] = "export"; 340 params['type'] = "export";
  341 + params['lineName'] = lineName;
334 var i = layer.load(2); 342 var i = layer.load(2);
335 $get('/pcpc/firstAndLastBus_sum', params, function(result){ 343 $get('/pcpc/firstAndLastBus_sum', params, function(result){
336 - window.open("/downloadFile/download?fileName=线路首末班准点率"+moment(startDate).format("YYYYMMDD")+(startDate==endDate?"":("-"+moment(endDate).format("YYYYMMDD")))); 344 + var dateTime = "";
  345 + if(startDate == endDate){
  346 + dateTime = moment(startDate).format("YYYYMMDD");
  347 + } else {
  348 + dateTime = moment(startDate).format("YYYYMMDD")
  349 + +"-"+moment(endDate).format("YYYYMMDD");
  350 + }
  351 + window.open("/downloadFile/download?fileName="
  352 + +dateTime+"-"+lineName+"-线路首末班准点率");
337 layer.close(i); 353 layer.close(i);
338 }); 354 });
339 }); 355 });
340 356
341 $("#exportMap").on("click",function(){ 357 $("#exportMap").on("click",function(){
342 -// $("#map").table2excel({  
343 -// exclue: ".noExl",  
344 -// name: "Excel Document Name.xlsx",  
345 -// filename: "线路首末班",  
346 -// exclude_img: true,  
347 -// exclude_links: true,  
348 -// exclude_inputs: true  
349 -// });  
350 var i = layer.load(2); 358 var i = layer.load(2);
351 var params = {}; 359 var params = {};
352 params['company'] = company; 360 params['company'] = company;
@@ -355,21 +363,22 @@ @@ -355,21 +363,22 @@
355 params['startDate'] = startDate; 363 params['startDate'] = startDate;
356 params['endDate'] = endDate; 364 params['endDate'] = endDate;
357 params['type'] = "exportMap"; 365 params['type'] = "exportMap";
  366 + params['lineName'] = lineName1;
358 $get('/pcpc/firstAndLastBus_sum', params, function(result){ 367 $get('/pcpc/firstAndLastBus_sum', params, function(result){
359 - window.open("/downloadFile/download?fileName=线路首末班明细"); 368 + var dateTime = "";
  369 + if(startDate == endDate){
  370 + dateTime = moment(startDate).format("YYYYMMDD");
  371 + } else {
  372 + dateTime = moment(startDate).format("YYYYMMDD")
  373 + +"-"+moment(endDate).format("YYYYMMDD");
  374 + }
  375 + window.open("/downloadFile/download?fileName="
  376 + +dateTime+"-"+lineName1+"-线路首末班明细");
360 layer.close(i); 377 layer.close(i);
361 }); 378 });
362 }); 379 });
363 380
364 $("#exportSumMap").on("click",function(){ 381 $("#exportSumMap").on("click",function(){
365 -// $("#sumMap").table2excel({  
366 -// exclue: ".noExl",  
367 -// name: "Excel Document Name.xlsx",  
368 -// filename: "首末班误点班次",  
369 -// exclude_img: true,  
370 -// exclude_links: true,  
371 -// exclude_inputs: true  
372 -// });  
373 var i = layer.load(2); 382 var i = layer.load(2);
374 var params = {}; 383 var params = {};
375 params['company'] = company; 384 params['company'] = company;
@@ -378,8 +387,17 @@ @@ -378,8 +387,17 @@
378 params['startDate'] = startDate; 387 params['startDate'] = startDate;
379 params['endDate'] = endDate; 388 params['endDate'] = endDate;
380 params['type'] = "delay_export"; 389 params['type'] = "delay_export";
  390 + params['lineName'] = lineName;
381 $get('/pcpc/firstAndLastBus_sum', params, function(result){ 391 $get('/pcpc/firstAndLastBus_sum', params, function(result){
382 - window.open("/downloadFile/download?fileName=首末班误点班次"); 392 + var dateTime = "";
  393 + if(startDate == endDate){
  394 + dateTime = moment(startDate).format("YYYYMMDD");
  395 + } else {
  396 + dateTime = moment(startDate).format("YYYYMMDD")
  397 + +"-"+moment(endDate).format("YYYYMMDD");
  398 + }
  399 + window.open("/downloadFile/download?fileName="
  400 + +dateTime+"-"+lineName+"-首末班误点班次");
383 layer.close(i); 401 layer.close(i);
384 }); 402 });
385 }); 403 });
src/main/resources/static/pages/forms/statement/historyMessage.html
@@ -21,20 +21,20 @@ @@ -21,20 +21,20 @@
21 <h1>调度历史消息</h1> 21 <h1>调度历史消息</h1>
22 </div> 22 </div>
23 </div> 23 </div>
24 -  
25 -<div class="row">  
26 - <div class="col-md-12">  
27 - <div class="portlet light porttlet-fit bordered">  
28 - <div class="portlet-title">  
29 - <form id="history" class="form-inline" action="">  
30 - <div style="display: inline-block;">  
31 - <span class="item-label" style="width: 80px;">线路: </span>  
32 - <select class="form-control" name="line" id="line" style="width: 180px;"></select>  
33 - </div> 24 +
  25 +<div class="row">
  26 + <div class="col-md-12">
  27 + <div class="portlet light porttlet-fit bordered">
  28 + <div class="portlet-title">
  29 + <form id="history" class="form-inline" action="">
  30 + <div style="display: inline-block;">
  31 + <span class="item-label" style="width: 80px;">线路: </span>
  32 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  33 + </div>
34 <div style="display: inline-block;margin-left: 15px;"> 34 <div style="display: inline-block;margin-left: 15px;">
35 <span class="item-label" style="width: 80px;">时间: </span> 35 <span class="item-label" style="width: 80px;">时间: </span>
36 <input class="form-control" type="text" id="date" style="width: 180px;"/> 36 <input class="form-control" type="text" id="date" style="width: 180px;"/>
37 - </div> 37 + </div>
38 <div style="display: inline-block;margin-left: 15px"> 38 <div style="display: inline-block;margin-left: 15px">
39 <span class="item-label" style="width: 140px;">内部编码: </span> 39 <span class="item-label" style="width: 140px;">内部编码: </span>
40 <select class="form-control" name="code" id="code" style="width: 180px;"></select> 40 <select class="form-control" name="code" id="code" style="width: 180px;"></select>
@@ -42,10 +42,10 @@ @@ -42,10 +42,10 @@
42 <div class="form-group"> 42 <div class="form-group">
43 <input class="btn btn-default" type="button" id="query" value="筛选"/> 43 <input class="btn btn-default" type="button" id="query" value="筛选"/>
44 <input class="btn btn-default" type="button" id="export" value="导出"/> 44 <input class="btn btn-default" type="button" id="export" value="导出"/>
45 - </div>  
46 - </form>  
47 - </div>  
48 - <div class="portlet-body"> 45 + </div>
  46 + </form>
  47 + </div>
  48 + <div class="portlet-body">
49 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px;"> 49 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px;">
50 <table class="table table-bordered table-hover table-checkable" id="forms"> 50 <table class="table table-bordered table-hover table-checkable" id="forms">
51 <thead> 51 <thead>
@@ -62,23 +62,23 @@ @@ -62,23 +62,23 @@
62 62
63 </tbody> 63 </tbody>
64 </table> 64 </table>
65 - </div>  
66 - </div>  
67 - </div>  
68 - </div>  
69 -</div>  
70 -  
71 -<script> 65 + </div>
  66 + </div>
  67 + </div>
  68 + </div>
  69 +</div>
  70 +
  71 +<script>
72 $(function(){ 72 $(function(){
73 $('#export').attr('disabled', "true"); 73 $('#export').attr('disabled', "true");
74 -  
75 - // 关闭左侧栏  
76 - if (!$('body').hasClass('page-sidebar-closed')) 74 +
  75 + // 关闭左侧栏
  76 + if (!$('body').hasClass('page-sidebar-closed'))
77 $('.menu-toggler.sidebar-toggler').click(); 77 $('.menu-toggler.sidebar-toggler').click();
78 -  
79 - $("#date").datetimepicker({  
80 - format : 'YYYY-MM-DD',  
81 - locale : 'zh-cn' 78 +
  79 + $("#date").datetimepicker({
  80 + format : 'YYYY-MM-DD',
  81 + locale : 'zh-cn'
82 }); 82 });
83 83
84 $.get('/report/lineList',function(xlList){ 84 $.get('/report/lineList',function(xlList){
@@ -146,6 +146,7 @@ @@ -146,6 +146,7 @@
146 var line = $("#line").val(); 146 var line = $("#line").val();
147 var date = $("#date").val(); 147 var date = $("#date").val();
148 var code = $("#code").val(); 148 var code = $("#code").val();
  149 + var lineName = $('#line option:selected').text();
149 $("#query").on("click",function(){ 150 $("#query").on("click",function(){
150 if($("#date").val() == null || $("#date").val().trim().length == 0){ 151 if($("#date").val() == null || $("#date").val().trim().length == 0){
151 layer.msg("请选择时间"); 152 layer.msg("请选择时间");
@@ -154,13 +155,16 @@ @@ -154,13 +155,16 @@
154 line = $("#line").val(); 155 line = $("#line").val();
155 date = $("#date").val(); 156 date = $("#date").val();
156 code = $("#code").val(); 157 code = $("#code").val();
  158 + lineName = $('#line option:selected').text();
157 var type = "query"; 159 var type = "query";
158 $(".hidden").removeClass("hidden"); 160 $(".hidden").removeClass("hidden");
  161 + var i = layer.load(2);
159 $get('/realSchedule/historyMessage',{line:line,date:date,code:code,type:type},function(result){ 162 $get('/realSchedule/historyMessage',{line:line,date:date,code:code,type:type},function(result){
160 // 把数据填充到模版中 163 // 把数据填充到模版中
161 var tbodyHtml = template('list_history',{list:result}); 164 var tbodyHtml = template('list_history',{list:result});
162 // 把渲染好的模版html文本追加到表格中 165 // 把渲染好的模版html文本追加到表格中
163 $('#forms tbody').html(tbodyHtml); 166 $('#forms tbody').html(tbodyHtml);
  167 + layer.close(i);
164 168
165 if(result.length == 0) 169 if(result.length == 0)
166 $("#export").attr('disabled',"true"); 170 $("#export").attr('disabled',"true");
@@ -172,27 +176,31 @@ @@ -172,27 +176,31 @@
172 176
173 $("#export").on("click",function(){ 177 $("#export").on("click",function(){
174 var type = "export"; 178 var type = "export";
  179 + var i = layer.load(2);
175 $get('/realSchedule/historyMessage', {line:line,date:date,code:code,type:type}, function(result){ 180 $get('/realSchedule/historyMessage', {line:line,date:date,code:code,type:type}, function(result){
176 - window.open("/downloadFile/download?fileName=调度历史消息"+moment(date).format("YYYYMMDD")); 181 + window.open("/downloadFile/download?fileName="
  182 + +moment(date).format("YYYYMMDD")
  183 + +"-"+lineName+"-调度历史消息");
  184 + layer.close(i);
177 }); 185 });
178 }); 186 });
179 -  
180 - });  
181 -</script>  
182 -<script type="text/html" id="list_history">  
183 - {{each list as obj i}}  
184 - <tr> 187 +
  188 + });
  189 +</script>
  190 +<script type="text/html" id="list_history">
  191 + {{each list as obj i}}
  192 + <tr>
185 <td>{{i+1}}</td> 193 <td>{{i+1}}</td>
186 <td>{{obj[4]}}</td> 194 <td>{{obj[4]}}</td>
187 <td>{{obj[0]}}</td> 195 <td>{{obj[0]}}</td>
188 <td>{{obj[1]}}</td> 196 <td>{{obj[1]}}</td>
189 <td>{{obj[3]}}</td> 197 <td>{{obj[3]}}</td>
190 <td>{{obj[2]}}</td> 198 <td>{{obj[2]}}</td>
191 - </tr> 199 + </tr>
192 {{/each}} 200 {{/each}}
193 {{if list.length == 0}} 201 {{if list.length == 0}}
194 <tr> 202 <tr>
195 <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td> 203 <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td>
196 </tr> 204 </tr>
197 - {{/if}} 205 + {{/if}}
198 </script> 206 </script>
199 \ No newline at end of file 207 \ No newline at end of file
src/main/resources/static/pages/forms/statement/jobSummary.html
@@ -254,6 +254,7 @@ @@ -254,6 +254,7 @@
254 }else{ 254 }else{
255 $("#xlid").html(lineName); 255 $("#xlid").html(lineName);
256 $("#dateid").html(date); 256 $("#dateid").html(date);
  257 + var i = layer.load(2);
257 $get('/report/jobFwqk',{line:line,date:date},function(result){ 258 $get('/report/jobFwqk',{line:line,date:date},function(result){
258 console.log(result); 259 console.log(result);
259 var list_lbqk = template('list_lbqk',{list:result}); 260 var list_lbqk = template('list_lbqk',{list:result});
@@ -263,6 +264,7 @@ @@ -263,6 +264,7 @@
263 $('#forms .list_lbqk').rowspan(1); 264 $('#forms .list_lbqk').rowspan(1);
264 $('#forms .list_lbqk').rowspan(2); 265 $('#forms .list_lbqk').rowspan(2);
265 $('#forms .list_lbqk').rowspan(3); 266 $('#forms .list_lbqk').rowspan(3);
  267 + layer.close(i);
266 268
267 }) 269 })
268 270
@@ -270,6 +272,7 @@ @@ -270,6 +272,7 @@
270 var list_ljqk = template('list_ljqk',{list:result}); 272 var list_ljqk = template('list_ljqk',{list:result});
271 // 把渲染好的模版html文本追加到表格中 273 // 把渲染好的模版html文本追加到表格中
272 $('#forms .list_ljqk').html(list_ljqk); 274 $('#forms .list_ljqk').html(list_ljqk);
  275 + layer.close(i);
273 }) 276 })
274 277
275 $get('/report/jobHzxx',{line:line,date:date},function(result){ 278 $get('/report/jobHzxx',{line:line,date:date},function(result){
@@ -282,6 +285,7 @@ @@ -282,6 +285,7 @@
282 $("#lbgls").html(result.lbgl) 285 $("#lbgls").html(result.lbgl)
283 var list_xxsj=template('list_xxsj',result); 286 var list_xxsj=template('list_xxsj',result);
284 $('#forms .list_xxsj').html(list_xxsj); 287 $('#forms .list_xxsj').html(list_xxsj);
  288 + layer.close(i);
285 289
286 }) 290 })
287 291
@@ -298,8 +302,12 @@ @@ -298,8 +302,12 @@
298 }else if(date==""||date==null){ 302 }else if(date==""||date==null){
299 layer.msg('请选择日期.'); 303 layer.msg('请选择日期.');
300 }else{ 304 }else{
  305 + var i = layer.load(2);
301 $get('/report/jobSummaryExport',{line:line,date:date,lineName:lineName},function(result){ 306 $get('/report/jobSummaryExport',{line:line,date:date,lineName:lineName},function(result){
302 - window.open("/downloadFile/download?fileName=调度员工作汇总日报"); 307 + window.open("/downloadFile/download?fileName="
  308 + +moment(date).format("YYYYMMDD")
  309 + +"-"+lineName+"-调度员工作汇总日报");
  310 + layer.close(i);
303 }); 311 });
304 } 312 }
305 }); 313 });
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
@@ -119,14 +119,6 @@ @@ -119,14 +119,6 @@
119 if (!$('body').hasClass('page-sidebar-closed')) 119 if (!$('body').hasClass('page-sidebar-closed'))
120 $('.menu-toggler.sidebar-toggler').click(); 120 $('.menu-toggler.sidebar-toggler').click();
121 121
122 - $("#startDate").datetimepicker({  
123 - format : 'YYYY-MM-DD',  
124 - locale : 'zh-cn'  
125 - });  
126 - $("#endDate").datetimepicker({  
127 - format : 'YYYY-MM-DD',  
128 - locale : 'zh-cn'  
129 - });  
130 $("#times1").datetimepicker({ 122 $("#times1").datetimepicker({
131 format : 'HH:mm', 123 format : 'HH:mm',
132 locale : 'zh-cn' 124 locale : 'zh-cn'
@@ -137,6 +129,7 @@ @@ -137,6 +129,7 @@
137 }); 129 });
138 130
139 var d = new Date(); 131 var d = new Date();
  132 + d.setTime(d.getTime() - 1*1000*60*60*24);
140 var year = d.getFullYear(); 133 var year = d.getFullYear();
141 var month = d.getMonth() + 1; 134 var month = d.getMonth() + 1;
142 var day = d.getDate(); 135 var day = d.getDate();
@@ -144,8 +137,19 @@ @@ -144,8 +137,19 @@
144 month = "0" + month; 137 month = "0" + month;
145 if(day < 10) 138 if(day < 10)
146 day = "0" + day; 139 day = "0" + day;
147 - $("#startDate").val(year + "-" + month + "-" + day);  
148 - $("#endDate").val(year + "-" + month + "-" + day); 140 + var dateTime = year + "-" + month + "-" + day;
  141 + $("#startDate").datetimepicker({
  142 + format : 'YYYY-MM-DD',
  143 + locale : 'zh-cn',
  144 + maxDate : dateTime
  145 + });
  146 + $("#endDate").datetimepicker({
  147 + format : 'YYYY-MM-DD',
  148 + locale : 'zh-cn',
  149 + maxDate : dateTime
  150 + });
  151 + $("#startDate").val(dateTime);
  152 + $("#endDate").val(dateTime);
149 153
150 $("#times1").val("05:00"); 154 $("#times1").val("05:00");
151 $("#times2").val("23:00"); 155 $("#times2").val("23:00");
@@ -308,6 +312,7 @@ @@ -308,6 +312,7 @@
308 var times = $("#times1").val() + "-" + $("#times2").val(); 312 var times = $("#times1").val() + "-" + $("#times2").val();
309 var company = $("#company").val(); 313 var company = $("#company").val();
310 var subCompany = $("#subCompany").val(); 314 var subCompany = $("#subCompany").val();
  315 + var lineName = $('#line option:selected').text();
311 function jsDoQuery(pagination){ 316 function jsDoQuery(pagination){
312 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){ 317 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
313 layer.msg("请选择日期"); 318 layer.msg("请选择日期");
@@ -337,12 +342,18 @@ @@ -337,12 +342,18 @@
337 params['company'] = company; 342 params['company'] = company;
338 params['subCompany'] = subCompany; 343 params['subCompany'] = subCompany;
339 params['type'] = "query"; 344 params['type'] = "query";
  345 + lineName = $('#line option:selected').text();
  346 + if(lineName == "全部线路")
  347 + lineName = $('#subCompany option:selected').text();
  348 + var i = layer.load(2);
340 // $(".hidden").removeClass("hidden"); 349 // $(".hidden").removeClass("hidden");
341 $get('/busInterval/lbStatuAnaly', params, function(result){ 350 $get('/busInterval/lbStatuAnaly', params, function(result){
342 // 把数据填充到模版中 351 // 把数据填充到模版中
343 var tbodyHtml = template('list_lbAnaly',{list:result, reason:reason, lb:lb}); 352 var tbodyHtml = template('list_lbAnaly',{list:result, reason:reason, lb:lb});
344 // 把渲染好的模版html文本追加到表格中 353 // 把渲染好的模版html文本追加到表格中
345 $('#forms').html(tbodyHtml); 354 $('#forms').html(tbodyHtml);
  355 + layer.close(i);
  356 +
346 _w_table_rowspan("#forms", 1); 357 _w_table_rowspan("#forms", 1);
347 _w_table_rowspan("#forms", 2); 358 _w_table_rowspan("#forms", 2);
348 _w_table_rowspan("#forms", 3); 359 _w_table_rowspan("#forms", 3);
@@ -381,10 +392,14 @@ @@ -381,10 +392,14 @@
381 params['company'] = company; 392 params['company'] = company;
382 params['subCompany'] = subCompany; 393 params['subCompany'] = subCompany;
383 params['type'] = "export"; 394 params['type'] = "export";
  395 + params['lineName'] = lineName;
  396 + var i = layer.load(2);
384 $get('/busInterval/lbStatuAnaly', params, function(result){ 397 $get('/busInterval/lbStatuAnaly', params, function(result){
385 - window.open("/downloadFile/download?fileName=烂班情况分析表" 398 + window.open("/downloadFile/download?fileName="
386 + moment(startDate).format("YYYYMMDD") 399 + moment(startDate).format("YYYYMMDD")
387 - +"-"+ moment(endDate).format("YYYYMMDD")); 400 + +"-"+ moment(endDate).format("YYYYMMDD")
  401 + +"-"+lineName+"-烂班情况分析表");
  402 + layer.close(i);
388 }); 403 });
389 }); 404 });
390 405
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
@@ -206,60 +206,6 @@ @@ -206,60 +206,6 @@
206 $("#times1").val("05:00"); 206 $("#times1").val("05:00");
207 $("#times2").val("23:00"); 207 $("#times2").val("23:00");
208 208
209 -// var obj = [];  
210 -// $.get('/user/companyData', function(result){  
211 -// obj = result;  
212 -// var options = '';  
213 -// for(var i = 0; i < obj.length; i++){  
214 -// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
215 -// }  
216 -// if(obj.length == 1){  
217 -// $('#company1').hide();  
218 -// if(obj[0].children.length == 1)  
219 -// $('#subCompany1').hide();  
220 -// }  
221 -// $('#company').html(options);  
222 -// updateCompany();  
223 -// });  
224 -// $("#company").on("change",updateCompany);  
225 -// function updateCompany(){  
226 -// var company = $('#company').val();  
227 -// var options = '';  
228 -// for(var i = 0; i < obj.length; i++){  
229 -// if(obj[i].companyCode == company){  
230 -// var children = obj[i].children;  
231 -// for(var j = 0; j < children.length; j++){  
232 -// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';  
233 -// }  
234 -// }  
235 -// }  
236 -// $('#subCompany').html(options);  
237 -// }  
238 -  
239 -// $.get('/basic/lineCode2Name',function(result){  
240 -// var data=[];  
241 -  
242 -// data.push({id: " ", text:"全部路线"});  
243 -// for(var code in result){  
244 -// data.push({id: code, text: result[code]});  
245 -// }  
246 -// console.log(data);  
247 -// initPinYinSelect2('#line',data,'');  
248 -  
249 -// line = "";  
250 -// updateModel();  
251 -  
252 -// var params = {};  
253 -// params['line'] = line;  
254 -// $get('/busInterval/getDir', params, function(result){  
255 -// dirData = createTreeData(result);  
256 -// var options = '<option value="">全部方向</option>';  
257 -// $.each(dirData, function(i, g){  
258 -// options += '<option value="'+g.name+'">'+g.name+'</option>';  
259 -// });  
260 -// $('#upDown').html(options);  
261 -// });  
262 -// });  
263 var fage=false; 209 var fage=false;
264 var xlList; 210 var xlList;
265 var obj = []; 211 var obj = [];
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
@@ -183,6 +183,7 @@ @@ -183,6 +183,7 @@
183 var date = $("#date").val(); 183 var date = $("#date").val();
184 var company = $("#company").val(); 184 var company = $("#company").val();
185 var subCompany = $("#subCompany").val(); 185 var subCompany = $("#subCompany").val();
  186 + var lineName = $('#line option:selected').text();
186 function jsDoQuery(pagination){ 187 function jsDoQuery(pagination){
187 if($("#date").val() == null || $("#date").val().trim().length == 0){ 188 if($("#date").val() == null || $("#date").val().trim().length == 0){
188 layer.msg("请选择时间"); 189 layer.msg("请选择时间");
@@ -193,6 +194,9 @@ @@ -193,6 +194,9 @@
193 subCompany = $("#subCompany").val(); 194 subCompany = $("#subCompany").val();
194 line = $("#line").val(); 195 line = $("#line").val();
195 date = $("#date").val(); 196 date = $("#date").val();
  197 + lineName = $('#line option:selected').text();
  198 + if(lineName == "全部线路")
  199 + lineName = $('#subCompany option:selected').text();
196 if(line == " ") 200 if(line == " ")
197 line = ""; 201 line = "";
198 params['company'] = company; 202 params['company'] = company;
@@ -221,8 +225,11 @@ @@ -221,8 +225,11 @@
221 params['line'] = line; 225 params['line'] = line;
222 params['date'] = date; 226 params['date'] = date;
223 params['type'] = "export"; 227 params['type'] = "export";
  228 + params['lineName'] = lineName;
224 $get('/pcpc/queryPeopleCar', params, function(result){ 229 $get('/pcpc/queryPeopleCar', params, function(result){
225 - window.open("/downloadFile/download?fileName=计划车辆班次人员"+moment(date).format("YYYYMMDD")); 230 + window.open("/downloadFile/download?fileName="
  231 + +moment(date).format("YYYYMMDD")
  232 + +"-"+lineName+"-计划车辆班次人员");
226 }); 233 });
227 }); 234 });
228 235
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
@@ -226,6 +226,7 @@ @@ -226,6 +226,7 @@
226 var bcType = $('#bcType').val(); 226 var bcType = $('#bcType').val();
227 var company = $("#company").val(); 227 var company = $("#company").val();
228 var subCompany = $("#subCompany").val(); 228 var subCompany = $("#subCompany").val();
  229 + var lineName = $('#line option:selected').text();
229 function jsDoQuery(pagination){ 230 function jsDoQuery(pagination){
230 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){ 231 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
231 layer.msg("请选择时间范围!"); 232 layer.msg("请选择时间范围!");
@@ -243,6 +244,9 @@ @@ -243,6 +244,9 @@
243 bcType = $("#bcType").val(); 244 bcType = $("#bcType").val();
244 company = $("#company").val(); 245 company = $("#company").val();
245 subCompany = $("#subCompany").val(); 246 subCompany = $("#subCompany").val();
  247 + lineName = $('#line option:selected').text();
  248 + if(lineName == "全部线路")
  249 + lineName = $('#subCompany option:selected').text();
246 params['page'] = page; 250 params['page'] = page;
247 params['line'] = line; 251 params['line'] = line;
248 params['startDate'] = startDate; 252 params['startDate'] = startDate;
@@ -298,9 +302,13 @@ @@ -298,9 +302,13 @@
298 params['subCompany'] = subCompany; 302 params['subCompany'] = subCompany;
299 params['bcType'] = bcType; 303 params['bcType'] = bcType;
300 params['type'] = "export"; 304 params['type'] = "export";
  305 + params['lineName'] = lineName;
301 var i = layer.load(2); 306 var i = layer.load(2);
302 $get('/pcpc/scheduleAnaly', params, function(result){ 307 $get('/pcpc/scheduleAnaly', params, function(result){
303 - window.open("/downloadFile/download?fileName=时刻表分析"+moment(startDate).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")); 308 + window.open("/downloadFile/download?fileName="
  309 + +moment(startDate).format("YYYYMMDD")+
  310 + "-"+moment(endDate).format("YYYYMMDD")
  311 + +"-"+lineName+"-时刻表分析");
304 layer.close(i); 312 layer.close(i);
305 }); 313 });
306 }); 314 });
src/main/resources/static/pages/forms/statement/scheduleAnaly_sum.html
@@ -113,17 +113,9 @@ @@ -113,17 +113,9 @@
113 if (!$('body').hasClass('page-sidebar-closed')) 113 if (!$('body').hasClass('page-sidebar-closed'))
114 $('.menu-toggler.sidebar-toggler').click(); 114 $('.menu-toggler.sidebar-toggler').click();
115 115
116 - $("#startDate").datetimepicker({  
117 - format : 'YYYY-MM-DD',  
118 - locale : 'zh-cn'  
119 - });  
120 -  
121 - $("#endDate").datetimepicker({  
122 - format : 'YYYY-MM-DD',  
123 - locale : 'zh-cn'  
124 - });  
125 116
126 var d = new Date(); 117 var d = new Date();
  118 + d.setTime(d.getTime() - 1*1000*60*60*24);
127 var year = d.getFullYear(); 119 var year = d.getFullYear();
128 var month = d.getMonth() + 1; 120 var month = d.getMonth() + 1;
129 var day = d.getDate(); 121 var day = d.getDate();
@@ -131,8 +123,19 @@ @@ -131,8 +123,19 @@
131 month = "0" + month; 123 month = "0" + month;
132 if(day < 10) 124 if(day < 10)
133 day = "0" + day; 125 day = "0" + day;
134 - $("#startDate").val(year + "-" + month + "-" + day);  
135 - $("#endDate").val(year + "-" + month + "-" + day); 126 + var dateTime = year + "-" + month + "-" + day;
  127 + $("#startDate").datetimepicker({
  128 + format : 'YYYY-MM-DD',
  129 + locale : 'zh-cn',
  130 + maxDate : dateTime
  131 + });
  132 + $("#endDate").datetimepicker({
  133 + format : 'YYYY-MM-DD',
  134 + locale : 'zh-cn',
  135 + maxDate : dateTime
  136 + });
  137 + $("#startDate").val(dateTime);
  138 + $("#endDate").val(dateTime);
136 139
137 var fage=false; 140 var fage=false;
138 var xlList; 141 var xlList;
@@ -226,6 +229,7 @@ @@ -226,6 +229,7 @@
226 var nbbm = ""; 229 var nbbm = "";
227 var company = $("#company").val(); 230 var company = $("#company").val();
228 var subCompany = $("#subCompany").val(); 231 var subCompany = $("#subCompany").val();
  232 + var lineName = $('#line option:selected').text();
229 function jsDoQuery(pagination){ 233 function jsDoQuery(pagination){
230 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){ 234 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
231 layer.msg("请选择时间范围!"); 235 layer.msg("请选择时间范围!");
@@ -244,6 +248,9 @@ @@ -244,6 +248,9 @@
244 nbbm = $("#nbbm").val()!=null?$("#nbbm").val():""; 248 nbbm = $("#nbbm").val()!=null?$("#nbbm").val():"";
245 company = $("#company").val(); 249 company = $("#company").val();
246 subCompany = $("#subCompany").val(); 250 subCompany = $("#subCompany").val();
  251 + lineName = $('#line option:selected').text();
  252 + if(lineName == "全部线路")
  253 + lineName = $('#subCompany option:selected').text();
247 params['page'] = page; 254 params['page'] = page;
248 params['line'] = line; 255 params['line'] = line;
249 params['startDate'] = startDate; 256 params['startDate'] = startDate;
@@ -255,11 +262,13 @@ @@ -255,11 +262,13 @@
255 params['nbbm'] = nbbm; 262 params['nbbm'] = nbbm;
256 params['type'] = "query"; 263 params['type'] = "query";
257 $(".hidden").removeClass("hidden"); 264 $(".hidden").removeClass("hidden");
  265 + var i = layer.load(2);
258 $get('/pcpc/scheduleAnaly_sum', params, function(result){ 266 $get('/pcpc/scheduleAnaly_sum', params, function(result){
259 // 把数据填充到模版中 267 // 把数据填充到模版中
260 var tbodyHtml = template('list_scheduleAnaly_sum',{list:result.dataList, companyName:companyName, subCompanyName:subCompanyName}); 268 var tbodyHtml = template('list_scheduleAnaly_sum',{list:result.dataList, companyName:companyName, subCompanyName:subCompanyName});
261 // 把渲染好的模版html文本追加到表格中 269 // 把渲染好的模版html文本追加到表格中
262 $('#forms tbody').html(tbodyHtml); 270 $('#forms tbody').html(tbodyHtml);
  271 + layer.close(i);
263 272
264 if(result.dataList.length == 0) 273 if(result.dataList.length == 0)
265 $("#export").attr('disabled',"true"); 274 $("#export").attr('disabled',"true");
@@ -289,8 +298,19 @@ @@ -289,8 +298,19 @@
289 params['subCompany'] = subCompany; 298 params['subCompany'] = subCompany;
290 params['nbbm'] = nbbm; 299 params['nbbm'] = nbbm;
291 params['type'] = "export"; 300 params['type'] = "export";
  301 + params['lineName'] = lineName;
  302 + var i = layer.load(2);
292 $get('/pcpc/scheduleAnaly_sum', params, function(result){ 303 $get('/pcpc/scheduleAnaly_sum', params, function(result){
293 - window.open("/downloadFile/download?fileName=时刻表分析(汇总)"+moment(startDate).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")); 304 + var dateTime = "";
  305 + if(startDate == endDate){
  306 + dateTime = moment(startDate).format("YYYYMMDD");
  307 + } else {
  308 + dateTime = moment(startDate).format("YYYYMMDD")
  309 + +"-"+moment(endDate).format("YYYYMMDD");
  310 + }
  311 + window.open("/downloadFile/download?fileName="
  312 + +dateTime+"-"+lineName+"-时刻表分析(汇总)");
  313 + layer.close(i);
294 }); 314 });
295 }); 315 });
296 316
src/main/resources/static/pages/forms/statement/scheduleDaily.html
@@ -431,6 +431,7 @@ @@ -431,6 +431,7 @@
431 // $("#ddrbBody").height($(window).height()-300); 431 // $("#ddrbBody").height($(window).height()-300);
432 $("c").html("全日"); 432 $("c").html("全日");
433 $("#export").removeAttr("disabled"); 433 $("#export").removeAttr("disabled");
  434 + var i = layer.load(2);
434 $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){ 435 $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){
435 var scheduleDaily_1 = template('scheduleDaily_1',{list:result}); 436 var scheduleDaily_1 = template('scheduleDaily_1',{list:result});
436 $("#jls").html(result[0].jls); 437 $("#jls").html(result[0].jls);
@@ -452,6 +453,7 @@ @@ -452,6 +453,7 @@
452 divFrom1 = window.document.getElementById('forms'); 453 divFrom1 = window.document.getElementById('forms');
453 divFrom3 = window.document.getElementById('forms_2'); 454 divFrom3 = window.document.getElementById('forms_2');
454 divFrom3.style.width=divFrom1.offsetWidth+"px"; 455 divFrom3.style.width=divFrom1.offsetWidth+"px";
  456 + layer.close(i);
455 }); 457 });
456 458
457 }); 459 });
@@ -492,9 +494,9 @@ @@ -492,9 +494,9 @@
492 params['state'] = '2'; 494 params['state'] = '2';
493 $get('/realSchedule/scheduleDailyExport', params, function(result){ 495 $get('/realSchedule/scheduleDailyExport', params, function(result){
494 if(date.length == 10) 496 if(date.length == 10)
495 - window.open("/downloadFile/download?fileName=调度日报-"+lineName+"-"+moment(date).format("YYYYMMDD")); 497 + window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+lineName+"-调度日报");
496 else 498 else
497 - window.open("/downloadFile/download?fileName=调度日报"+moment(date).format("YYYYMM")); 499 + window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMM")+"-"+lineName+"-调度日报");
498 }); 500 });
499 }); 501 });
500 502
src/main/resources/static/pages/forms/statement/statisticsDaily.html
@@ -148,17 +148,9 @@ @@ -148,17 +148,9 @@
148 // 关闭左侧栏 148 // 关闭左侧栏
149 if (!$('body').hasClass('page-sidebar-closed')) 149 if (!$('body').hasClass('page-sidebar-closed'))
150 $('.menu-toggler.sidebar-toggler').click(); 150 $('.menu-toggler.sidebar-toggler').click();
151 -  
152 - $("#date").datetimepicker({  
153 - format : 'YYYY-MM-DD',  
154 - locale : 'zh-cn'  
155 - });  
156 -  
157 - $("#date2").datetimepicker({  
158 - format : 'YYYY-MM-DD',  
159 - locale : 'zh-cn'  
160 - }); 151 +
161 var d = new Date(); 152 var d = new Date();
  153 + d.setTime(d.getTime() - 1*1000*60*60*24);
162 var year = d.getFullYear(); 154 var year = d.getFullYear();
163 var month = d.getMonth() + 1; 155 var month = d.getMonth() + 1;
164 var day = d.getDate(); 156 var day = d.getDate();
@@ -166,9 +158,20 @@ @@ -166,9 +158,20 @@
166 month = "0" + month; 158 month = "0" + month;
167 if(day < 10) 159 if(day < 10)
168 day = "0" + day; 160 day = "0" + day;
169 - $("#date").val(year + "-" + month + "-" + day); 161 + var dateTime = year + "-" + month + "-" + day;
  162 + $("#date").datetimepicker({
  163 + format : 'YYYY-MM-DD',
  164 + locale : 'zh-cn',
  165 + maxDate : dateTime
  166 + });
  167 + $("#date2").datetimepicker({
  168 + format : 'YYYY-MM-DD',
  169 + locale : 'zh-cn',
  170 + maxDate : dateTime
  171 + });
  172 + $("#date").val(dateTime);
  173 + $("#date2").val(dateTime);
170 174
171 - $("#date2").val(year + "-" + month + "-" + day);  
172 175
173 var fage=false; 176 var fage=false;
174 var obj = []; 177 var obj = [];
@@ -264,11 +267,13 @@ @@ -264,11 +267,13 @@
264 } 267 }
265 // $("#tjrbBody").height($(window).height()-100); 268 // $("#tjrbBody").height($(window).height()-100);
266 line = $("#line").val(); 269 line = $("#line").val();
267 - xlName = $("#select2-line-container").html();  
268 date = $("#date").val(); 270 date = $("#date").val();
269 date2 =$("#date2").val(); 271 date2 =$("#date2").val();
270 gsdm =$("#gsdm").val(); 272 gsdm =$("#gsdm").val();
271 fgsdm=$("#fgsdm").val(); 273 fgsdm=$("#fgsdm").val();
  274 + xlName = $("#select2-line-container").html();
  275 + if(xlName == "全部线路")
  276 + xlName = $('#fgsdm option:selected').text();
272 if(line=="请选择"){ 277 if(line=="请选择"){
273 line=""; 278 line="";
274 } 279 }
@@ -284,11 +289,13 @@ @@ -284,11 +289,13 @@
284 params['date2'] = date2; 289 params['date2'] = date2;
285 params['xlName'] = xlName; 290 params['xlName'] = xlName;
286 params['type'] = "query"; 291 params['type'] = "query";
  292 + var i = layer.load(2);
287 $get('/realSchedule/statisticsDailyTj',params,function(result){ 293 $get('/realSchedule/statisticsDailyTj',params,function(result){
288 // 把数据填充到模版中 294 // 把数据填充到模版中
289 var tbodyHtml = template('statisticsDaily',{list:result}); 295 var tbodyHtml = template('statisticsDaily',{list:result});
290 // 把渲染好的模版html文本追加到表格中 296 // 把渲染好的模版html文本追加到表格中
291 $('#forms .statisticsDaily').html(tbodyHtml); 297 $('#forms .statisticsDaily').html(tbodyHtml);
  298 + layer.close(i);
292 299
293 if(result.length == 0) 300 if(result.length == 0)
294 $("#export").attr('disabled',"true"); 301 $("#export").attr('disabled',"true");
@@ -302,14 +309,24 @@ @@ -302,14 +309,24 @@
302 $("#export").on("click",function(){ 309 $("#export").on("click",function(){
303 var params = {}; 310 var params = {};
304 params['gsdm'] = gsdm; 311 params['gsdm'] = gsdm;
305 - params['fgsdm'] =fgsdm ; 312 + params['fgsdm'] =fgsdm;
306 params['line'] = line; 313 params['line'] = line;
307 params['date'] = date; 314 params['date'] = date;
308 params['date2'] = date2; 315 params['date2'] = date2;
309 params['xlName'] = xlName; 316 params['xlName'] = xlName;
310 params['type'] = "export"; 317 params['type'] = "export";
  318 + var i = layer.load(2);
311 $get('/realSchedule/statisticsDailyTj',params,function(result){ 319 $get('/realSchedule/statisticsDailyTj',params,function(result){
312 - window.open("/downloadFile/download?fileName=统计日报"+moment(date).format("YYYYMMDD")); 320 + var dateTime = "";
  321 + if(date == date2){
  322 + dateTime = moment(date).format("YYYYMMDD");
  323 + } else {
  324 + dateTime = moment(date).format("YYYYMMDD")
  325 + +"-"+moment(date2).format("YYYYMMDD");
  326 + }
  327 + window.open("/downloadFile/download?fileName="
  328 + +dateTime+"-"+xlName+"-统计日报");
  329 + layer.close(i);
313 }); 330 });
314 }); 331 });
315 332
@@ -358,7 +375,7 @@ @@ -358,7 +375,7 @@
358 <td>{{obj.djg_m}}</td> 375 <td>{{obj.djg_m}}</td>
359 <td>{{obj.djg_a}}</td> 376 <td>{{obj.djg_a}}</td>
360 <td>{{obj.djg_time}}</td> 377 <td>{{obj.djg_time}}</td>
361 - <td>&nbsp;</td> 378 + <td>&nbsp;</td>
362 </tr> 379 </tr>
363 {{/each}} 380 {{/each}}
364 {{if list.length == 0}} 381 {{if list.length == 0}}
src/main/resources/static/pages/forms/statement/statisticsDailyCalc.html
@@ -267,11 +267,13 @@ @@ -267,11 +267,13 @@
267 } 267 }
268 // $("#tjrbBody").height($(window).height()-100); 268 // $("#tjrbBody").height($(window).height()-100);
269 line = $("#line").val(); 269 line = $("#line").val();
270 - xlName = $("#select2-line-container").html();  
271 date = $("#date").val(); 270 date = $("#date").val();
272 date2 =$("#date2").val(); 271 date2 =$("#date2").val();
273 gsdm =$("#gsdm").val(); 272 gsdm =$("#gsdm").val();
274 fgsdm=$("#fgsdm").val(); 273 fgsdm=$("#fgsdm").val();
  274 + xlName = $("#select2-line-container").html();
  275 + if(xlName == "全部线路")
  276 + xlName = $('#fgsdm option:selected').text();
275 if(line=="请选择"){ 277 if(line=="请选择"){
276 line=""; 278 line="";
277 } 279 }
@@ -314,9 +316,19 @@ @@ -314,9 +316,19 @@
314 params['date2'] = date2; 316 params['date2'] = date2;
315 params['xlName'] = xlName; 317 params['xlName'] = xlName;
316 params['type'] = "export"; 318 params['type'] = "export";
  319 + var i = layer.load(2);
317 // $get('/realSchedule/statisticsDailyTj',params,function(result){ 320 // $get('/realSchedule/statisticsDailyTj',params,function(result){
318 $get('/calcWaybill/statisticsDailyTj',params,function(result){ 321 $get('/calcWaybill/statisticsDailyTj',params,function(result){
319 - window.open("/downloadFile/download?fileName=统计日报"+moment(date).format("YYYYMMDD")); 322 + var dateTime = "";
  323 + if(date == date2){
  324 + dateTime = moment(date).format("YYYYMMDD");
  325 + } else {
  326 + dateTime = moment(date).format("YYYYMMDD")
  327 + +"-"+moment(date2).format("YYYYMMDD");
  328 + }
  329 + window.open("/downloadFile/download?fileName="
  330 + +dateTime+"-"+xlName+"-统计日报");
  331 + layer.close(i);
320 }); 332 });
321 }); 333 });
322 334
src/main/resources/static/pages/forms/statement/statisticsDailyCalc2.html
@@ -267,11 +267,13 @@ @@ -267,11 +267,13 @@
267 } 267 }
268 // $("#tjrbBody").height($(window).height()-100); 268 // $("#tjrbBody").height($(window).height()-100);
269 line = $("#line").val(); 269 line = $("#line").val();
270 - xlName = $("#select2-line-container").html();  
271 date = $("#date").val(); 270 date = $("#date").val();
272 date2 =$("#date2").val(); 271 date2 =$("#date2").val();
273 gsdm =$("#gsdm").val(); 272 gsdm =$("#gsdm").val();
274 fgsdm=$("#fgsdm").val(); 273 fgsdm=$("#fgsdm").val();
  274 + xlName = $("#select2-line-container").html();
  275 + if(xlName == "全部线路")
  276 + xlName = $('#fgsdm option:selected').text();
275 if(line=="请选择"){ 277 if(line=="请选择"){
276 line=""; 278 line="";
277 } 279 }
@@ -314,9 +316,19 @@ @@ -314,9 +316,19 @@
314 params['date2'] = date2; 316 params['date2'] = date2;
315 params['xlName'] = xlName; 317 params['xlName'] = xlName;
316 params['type'] = "export"; 318 params['type'] = "export";
  319 + var i = layer.load(2);
317 // $get('/realSchedule/statisticsDailyTj',params,function(result){ 320 // $get('/realSchedule/statisticsDailyTj',params,function(result){
318 $get('/calcWaybill/calcStatisticsDaily',params,function(result){ 321 $get('/calcWaybill/calcStatisticsDaily',params,function(result){
319 - window.open("/downloadFile/download?fileName=统计日报"+moment(date).format("YYYYMMDD")); 322 + var dateTime = "";
  323 + if(date == date2){
  324 + dateTime = moment(date).format("YYYYMMDD");
  325 + } else {
  326 + dateTime = moment(date).format("YYYYMMDD")
  327 + +"-"+moment(date2).format("YYYYMMDD");
  328 + }
  329 + window.open("/downloadFile/download?fileName="
  330 + +dateTime+"-"+xlName+"-统计日报");
  331 + layer.close(i);
320 }); 332 });
321 }); 333 });
322 334
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
@@ -159,49 +159,6 @@ @@ -159,49 +159,6 @@
159 $("#times1").attr("disabled", true); 159 $("#times1").attr("disabled", true);
160 $("#times2").attr("disabled", true); 160 $("#times2").attr("disabled", true);
161 161
162 -// var obj = [];  
163 -// $.get('/user/companyData', function(result){  
164 -// obj = result;  
165 -// var options = '';  
166 -// for(var i = 0; i < obj.length; i++){  
167 -// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';  
168 -// }  
169 -// if(obj.length == 1){  
170 -// $('#company1').hide();  
171 -// if(obj[0].children.length == 1)  
172 -// $('#subCompany1').hide();  
173 -// }  
174 -// $('#company').html(options);  
175 -// updateCompany();  
176 -// });  
177 -// $("#company").on("change",updateCompany);  
178 -// function updateCompany(){  
179 -// var company = $('#company').val();  
180 -// var options = '';  
181 -// for(var i = 0; i < obj.length; i++){  
182 -// if(obj[i].companyCode == company){  
183 -// var children = obj[i].children;  
184 -// for(var j = 0; j < children.length; j++){  
185 -// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';  
186 -// }  
187 -// }  
188 -// }  
189 -// $('#subCompany').html(options);  
190 -// }  
191 -  
192 -// $.get('/basic/lineCode2Name',function(result){  
193 -// var data=[];  
194 -  
195 -// for(var code in result){  
196 -// data.push({id: code, text: result[code]});  
197 -// }  
198 -// initPinYinSelect2('#line',data,'');  
199 -  
200 -// line = data[0].id;  
201 -  
202 -// updateModel();  
203 -// updateLp("");  
204 -// })  
205 var fage=false; 162 var fage=false;
206 var xlList; 163 var xlList;
207 var obj = []; 164 var obj = [];
@@ -301,6 +258,7 @@ @@ -301,6 +258,7 @@
301 var company = $("#company").val(); 258 var company = $("#company").val();
302 var subCompany = $("#subCompany").val(); 259 var subCompany = $("#subCompany").val();
303 var lp = $("#lp").val(); 260 var lp = $("#lp").val();
  261 + var lineName = $('#line option:selected').text();
304 function jsDoQuery(pagination){ 262 function jsDoQuery(pagination){
305 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){ 263 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
306 layer.msg("请选择日期"); 264 layer.msg("请选择日期");
@@ -320,6 +278,9 @@ @@ -320,6 +278,9 @@
320 company = $("#company").val(); 278 company = $("#company").val();
321 subCompany = $("#subCompany").val(); 279 subCompany = $("#subCompany").val();
322 lp = $("#lp").val(); 280 lp = $("#lp").val();
  281 + lineName = $('#line option:selected').text();
  282 + if(lineName == "全部线路")
  283 + lineName = $('#subCompany option:selected').text();
323 params['lp'] = lp; 284 params['lp'] = lp;
324 params['line'] = line; 285 params['line'] = line;
325 params['sfqr'] = sfqr; 286 params['sfqr'] = sfqr;
@@ -394,11 +355,17 @@ @@ -394,11 +355,17 @@
394 params['company'] = company; 355 params['company'] = company;
395 params['subCompany'] = subCompany; 356 params['subCompany'] = subCompany;
396 params['type'] = "export"; 357 params['type'] = "export";
  358 + params['lineName'] = lineName;
397 var i = layer.load(2); 359 var i = layer.load(2);
398 $get('/busInterval/timeAndSpeed', params, function(result){ 360 $get('/busInterval/timeAndSpeed', params, function(result){
399 - window.open("/downloadFile/download?fileName=行驶时间及车速统计表"  
400 - +moment(startDate).format("YYYYMMDD")+"-"  
401 - +moment(endDate).format("YYYYMMDD")); 361 + var dateTime = "";
  362 + if(startDate == endDate){
  363 + dateTime = moment(startDate).format("YYYYMMDD");
  364 + } else {
  365 + dateTime = moment(startDate).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD");
  366 + }
  367 + window.open("/downloadFile/download?fileName="
  368 + +dateTime+"-"+lineName+"-行驶时间及车速统计表");
402 layer.close(i); 369 layer.close(i);
403 }); 370 });
404 }); 371 });
src/main/resources/static/pages/forms/statement/waybill.html
@@ -227,10 +227,12 @@ @@ -227,10 +227,12 @@
227 }); 227 });
228 var date = ''; 228 var date = '';
229 var line = ''; 229 var line = '';
  230 + var lineName;
230 $("#query").on("click",function(){ 231 $("#query").on("click",function(){
231 $("#left_height").height($(window).height()-100); 232 $("#left_height").height($(window).height()-100);
232 line = $("#line").val(); 233 line = $("#line").val();
233 date = $("#date").val(); 234 date = $("#date").val();
  235 + lineName = $('#line option:selected').text();
234 $(".hidden").removeClass("hidden"); 236 $(".hidden").removeClass("hidden");
235 $get('/realSchedule/queryUserInfo',{line:line,date:date,state:2},function(result){ 237 $get('/realSchedule/queryUserInfo',{line:line,date:date,state:2},function(result){
236 // 把数据填充到模版中 238 // 把数据填充到模版中
@@ -363,7 +365,7 @@ @@ -363,7 +365,7 @@
363 }); 365 });
364 // $get('/realSchedule/exportWaybillMore',{date:date,line:line,strs:JSON.stringify(param)},function(result){ 366 // $get('/realSchedule/exportWaybillMore',{date:date,line:line,strs:JSON.stringify(param)},function(result){
365 // window.open("/downloadFile/downloadList?fileName="+result.fileName); //下载压缩包 367 // window.open("/downloadFile/downloadList?fileName="+result.fileName); //下载压缩包
366 - $get('/busInterval/exportWaybillMore',{date:date,line:line,strs:JSON.stringify(param)},function(result){ 368 + $get('/busInterval/exportWaybillMore',{date:date,line:line,lineName:lineName,strs:JSON.stringify(param)},function(result){
367 window.open("/downloadFile/download?fileName="+result.fileName); 369 window.open("/downloadFile/download?fileName="+result.fileName);
368 layer.close(i); 370 layer.close(i);
369 }); 371 });
src/main/resources/static/pages/forms/statement/workDaily.html
@@ -116,7 +116,7 @@ @@ -116,7 +116,7 @@
116 var xlList; 116 var xlList;
117 var obj = []; 117 var obj = [];
118 118
119 - 119 +
120 $.get('/report/lineList',function(result){ 120 $.get('/report/lineList',function(result){
121 xlList=result; 121 xlList=result;
122 $.get('/user/companyData', function(result){ 122 $.get('/user/companyData', function(result){
@@ -198,6 +198,7 @@ @@ -198,6 +198,7 @@
198 var date = $("#date").val(); 198 var date = $("#date").val();
199 var company = $("#company").val(); 199 var company = $("#company").val();
200 var subCompany = $("#subCompany").val(); 200 var subCompany = $("#subCompany").val();
  201 + var lineName = $('#line option:selected').text();
201 function jsDoQuery(pagination){ 202 function jsDoQuery(pagination){
202 if($("#date").val() == null || $("#date").val().trim().length == 0){ 203 if($("#date").val() == null || $("#date").val().trim().length == 0){
203 layer.msg("请选择时间"); 204 layer.msg("请选择时间");
@@ -208,6 +209,9 @@ @@ -208,6 +209,9 @@
208 date = $("#date").val(); 209 date = $("#date").val();
209 company = $("#company").val(); 210 company = $("#company").val();
210 subCompany = $("#subCompany").val(); 211 subCompany = $("#subCompany").val();
  212 + lineName = $('#line option:selected').text();
  213 + if(lineName == "全部线路")
  214 + lineName = $('#subCompany option:selected').text();
211 if(line == " ") 215 if(line == " ")
212 line = ""; 216 line = "";
213 params['line'] = line; 217 params['line'] = line;
@@ -216,11 +220,13 @@ @@ -216,11 +220,13 @@
216 params['company'] = company; 220 params['company'] = company;
217 params['subCompany'] = subCompany; 221 params['subCompany'] = subCompany;
218 $(".hidden").removeClass("hidden"); 222 $(".hidden").removeClass("hidden");
  223 + var i = layer.load(2);
219 $get('/pcpc/workDaily', params, function(result){ 224 $get('/pcpc/workDaily', params, function(result){
220 // 把数据填充到模版中 225 // 把数据填充到模版中
221 var tbodyHtml = template('list_workDaily',{list:result}); 226 var tbodyHtml = template('list_workDaily',{list:result});
222 // 把渲染好的模版html文本追加到表格中 227 // 把渲染好的模版html文本追加到表格中
223 $('#forms tbody').html(tbodyHtml); 228 $('#forms tbody').html(tbodyHtml);
  229 + layer.close(i);
224 230
225 if(result.length == 0) 231 if(result.length == 0)
226 $("#export").attr('disabled',"true"); 232 $("#export").attr('disabled',"true");
@@ -236,8 +242,11 @@ @@ -236,8 +242,11 @@
236 params['type'] = "export"; 242 params['type'] = "export";
237 params['company'] = company; 243 params['company'] = company;
238 params['subCompany'] = subCompany; 244 params['subCompany'] = subCompany;
  245 + params['lineName'] = lineName;
239 $get('/pcpc/workDaily', params, function(result){ 246 $get('/pcpc/workDaily', params, function(result){
240 - window.open("/downloadFile/download?fileName=营运服务日报表"+moment(date).format("YYYYMMDD")); 247 + window.open("/downloadFile/download?fileName="
  248 + +moment(date).format("YYYYMMDD")
  249 + +"-"+lineName+"-营运服务日报表");
241 }); 250 });
242 }); 251 });
243 252
src/main/resources/static/pages/mforms/changetochanges/changetochange.html
@@ -137,10 +137,22 @@ @@ -137,10 +137,22 @@
137 if (!$('body').hasClass('page-sidebar-closed')) 137 if (!$('body').hasClass('page-sidebar-closed'))
138 $('.menu-toggler.sidebar-toggler').click(); 138 $('.menu-toggler.sidebar-toggler').click();
139 139
  140 + var d = new Date();
  141 + d.setTime(d.getTime() - 1*1000*60*60*24);
  142 + var year = d.getFullYear();
  143 + var month = d.getMonth() + 1;
  144 + var day = d.getDate();
  145 + if(month < 10)
  146 + month = "0" + month;
  147 + if(day < 10)
  148 + day = "0" + day;
  149 + var dateTime = year + "-" + month + "-" + day;
140 $("#startDate,#endDate").datetimepicker({ 150 $("#startDate,#endDate").datetimepicker({
141 format : 'YYYY-MM-DD', 151 format : 'YYYY-MM-DD',
142 - locale : 'zh-cn' 152 + locale : 'zh-cn',
  153 + maxDate : dateTime
143 }); 154 });
  155 + $("#startDate,#endDate").val(dateTime);
144 156
145 var fage=false; 157 var fage=false;
146 var xlList; 158 var xlList;
@@ -233,6 +245,7 @@ @@ -233,6 +245,7 @@
233 var gsdmChange= $("#gsdmChange").val(); 245 var gsdmChange= $("#gsdmChange").val();
234 var fgsdmChange= $("#fgsdmChange").val(); 246 var fgsdmChange= $("#fgsdmChange").val();
235 if (startDate1 != '' && endDate1 != '') { 247 if (startDate1 != '' && endDate1 != '') {
  248 + var i = layer.load(2);
236 $get('/mcy_forms/changetochange', { 249 $get('/mcy_forms/changetochange', {
237 sel : sel, 250 sel : sel,
238 line : line, 251 line : line,
@@ -248,6 +261,7 @@ @@ -248,6 +261,7 @@
248 }); 261 });
249 // 把渲染好的模版html文本追加到表格中 262 // 把渲染好的模版html文本追加到表格中
250 $('#forms tbody').html(tbodyHtml); 263 $('#forms tbody').html(tbodyHtml);
  264 + layer.close(i);
251 }) 265 })
252 266
253 } else { 267 } else {
@@ -258,12 +272,17 @@ @@ -258,12 +272,17 @@
258 $("#export").on( 272 $("#export").on(
259 "click", 273 "click",
260 function() { 274 function() {
  275 + line = $("#line").val();
261 var sel = $("#sel").val(); 276 var sel = $("#sel").val();
262 var startDate = $("#startDate").val(); 277 var startDate = $("#startDate").val();
263 var endDate = $("#endDate").val(); 278 var endDate = $("#endDate").val();
264 var lpName = $("#lpName").val(); 279 var lpName = $("#lpName").val();
265 var gsdmChange= $("#gsdmChange").val(); 280 var gsdmChange= $("#gsdmChange").val();
266 var fgsdmChange= $("#fgsdmChange").val(); 281 var fgsdmChange= $("#fgsdmChange").val();
  282 + var lineName = $('#line option:selected').text();
  283 + if(lineName == "全部线路")
  284 + lineName = $('#fgsdmChange option:selected').text();
  285 + var i = layer.load(2);
267 $post('/mcy_export/changetochangeExport', { 286 $post('/mcy_export/changetochangeExport', {
268 sel:sel, 287 sel:sel,
269 line:line, 288 line:line,
@@ -271,10 +290,19 @@ @@ -271,10 +290,19 @@
271 fgsdmChange:fgsdmChange, 290 fgsdmChange:fgsdmChange,
272 startDate : startDate, 291 startDate : startDate,
273 endDate : endDate, 292 endDate : endDate,
274 - type : 'export' 293 + type : 'export',
  294 + lineName : lineName
275 }, function(result) { 295 }, function(result) {
276 - window.open("/downloadFile/download?fileName=换人换车情况日统计"  
277 - + moment(startDate).format("YYYYMMDD")); 296 + var dateTime = "";
  297 + if(startDate == endDate){
  298 + dateTime = moment(startDate).format("YYYYMMDD");
  299 + } else {
  300 + dateTime = moment(startDate).format("YYYYMMDD")
  301 + +"-"+moment(endDate).format("YYYYMMDD");
  302 + }
  303 + window.open("/downloadFile/download?fileName="
  304 + +dateTime+"-"+lineName+"-换人换车情况日统计");
  305 + layer.close(i);
278 }); 306 });
279 }); 307 });
280 }); 308 });
src/main/resources/static/pages/mforms/operationservices/operationservice.html
@@ -202,6 +202,7 @@ @@ -202,6 +202,7 @@
202 var lpName = $("#lpName").val(); 202 var lpName = $("#lpName").val();
203 var gsdmOperat = $("#gsdmOperat").val(); 203 var gsdmOperat = $("#gsdmOperat").val();
204 var fgsdmOperat = $("#fgsdmOperat").val(); 204 var fgsdmOperat = $("#fgsdmOperat").val();
  205 + var i = layer.load(2);
205 $get("/mcy_forms/operationservice", { 206 $get("/mcy_forms/operationservice", {
206 gsdmOperat : gsdmOperat, 207 gsdmOperat : gsdmOperat,
207 fgsdmOperat : fgsdmOperat, 208 fgsdmOperat : fgsdmOperat,
@@ -230,6 +231,7 @@ @@ -230,6 +231,7 @@
230 }); 231 });
231 // 把渲染好的模版html文本追加到表格中 232 // 把渲染好的模版html文本追加到表格中
232 $('#forms tbody').html(operationservice); 233 $('#forms tbody').html(operationservice);
  234 + layer.close(i);
233 235
234 }); 236 });
235 }); 237 });
@@ -239,30 +241,43 @@ @@ -239,30 +241,43 @@
239 endDate=$("#endDate").val(); 241 endDate=$("#endDate").val();
240 gsdmOperat=$("#gsdmOperat").val(); 242 gsdmOperat=$("#gsdmOperat").val();
241 fgsdmOperat=$("#fgsdmOperat").val(); 243 fgsdmOperat=$("#fgsdmOperat").val();
242 - $get('/mcy_export/operationserviceExport',{gsdmOperat:gsdmOperat,fgsdmOperat:fgsdmOperat,line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){  
243 - window.open("/downloadFile/download?fileName=运营服务阶段报表"+moment(startDate).format("YYYYMMDD")); 244 + var lineName = $('#line option:selected').text();
  245 + if(lineName == "全部线路")
  246 + lineName = $('#fgsdmOperat option:selected').text();
  247 + var i = layer.load(2);
  248 + $get('/mcy_export/operationserviceExport',{gsdmOperat:gsdmOperat,fgsdmOperat:fgsdmOperat,line:line,startDate:startDate,endDate:endDate,type:'export',lineName:lineName},function(result){
  249 + var dateTime = "";
  250 + if(startDate == endDate){
  251 + dateTime = moment(startDate).format("YYYYMMDD");
  252 + } else {
  253 + dateTime = moment(startDate).format("YYYYMMDD")
  254 + +"-"+moment(endDate).format("YYYYMMDD");
  255 + }
  256 + window.open("/downloadFile/download?fileName="
  257 + +dateTime+"-"+lineName+"-运营服务阶段报表");
  258 + layer.close(i);
244 }); 259 });
245 }); 260 });
246 261
247 262
248 }); 263 });
249 </script> 264 </script>
250 -<script type="text/html" id="operationservice">  
251 - {{each list as obj i}} 265 +<script type="text/html" id="operationservice">
  266 + {{each list as obj i}}
252 <tr> 267 <tr>
253 - <td>{{i+1}}</td> 268 + <td>{{i+1}}</td>
254 <td>{{obj.xlName}}</td> 269 <td>{{obj.xlName}}</td>
255 <td>{{obj.jzl}}</td> 270 <td>{{obj.jzl}}</td>
256 <td>{{obj.xhl}}</td> 271 <td>{{obj.xhl}}</td>
257 <td>{{obj.xsgl}}</td> 272 <td>{{obj.xsgl}}</td>
258 <td>{{obj.emptMileage}}</td> 273 <td>{{obj.emptMileage}}</td>
259 <td>{{obj.sjbc}}</td> 274 <td>{{obj.sjbc}}</td>
260 - </tr> 275 + </tr>
261 {{/each}} 276 {{/each}}
262 {{if list.length == 0}} 277 {{if list.length == 0}}
263 <tr> 278 <tr>
264 <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> 279 <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
265 </tr> 280 </tr>
266 - {{/if}} 281 + {{/if}}
267 </script> 282 </script>
268 </script> 283 </script>
269 \ No newline at end of file 284 \ No newline at end of file
src/main/resources/static/pages/mforms/shifdays/shifday.html
@@ -218,6 +218,7 @@ $(function(){ @@ -218,6 +218,7 @@ $(function(){
218 if(date=="" || date ==null){ 218 if(date=="" || date ==null){
219 layer.msg('请选择日期.'); 219 layer.msg('请选择日期.');
220 }else{ 220 }else{
  221 + var i = layer.load(2);
221 $get('/mcy_forms/shifday',params,function(result){ 222 $get('/mcy_forms/shifday',params,function(result){
222 if(type=="desc"){ 223 if(type=="desc"){
223 type ="asc"; 224 type ="asc";
@@ -231,6 +232,7 @@ $(function(){ @@ -231,6 +232,7 @@ $(function(){
231 var tbodyHtml = template('shifday',{list:result}); 232 var tbodyHtml = template('shifday',{list:result});
232 // 把渲染好的模版html文本追加到表格中 233 // 把渲染好的模版html文本追加到表格中
233 $('#forms tbody').html(tbodyHtml); 234 $('#forms tbody').html(tbodyHtml);
  235 + layer.close(i);
234 }); 236 });
235 } 237 }
236 }) 238 })
@@ -250,6 +252,7 @@ $(function(){ @@ -250,6 +252,7 @@ $(function(){
250 if(date=="" || date ==null){ 252 if(date=="" || date ==null){
251 layer.msg('请选择日期.'); 253 layer.msg('请选择日期.');
252 }else{ 254 }else{
  255 + var i = layer.load(2);
253 $get('/mcy_forms/shifday',params,function(result){ 256 $get('/mcy_forms/shifday',params,function(result){
254 if(type=="desc"){ 257 if(type=="desc"){
255 type ="asc"; 258 type ="asc";
@@ -263,6 +266,7 @@ $(function(){ @@ -263,6 +266,7 @@ $(function(){
263 var tbodyHtml = template('shifday',{list:result}); 266 var tbodyHtml = template('shifday',{list:result});
264 // 把渲染好的模版html文本追加到表格中 267 // 把渲染好的模版html文本追加到表格中
265 $('#forms tbody').html(tbodyHtml); 268 $('#forms tbody').html(tbodyHtml);
  269 + layer.close(i);
266 }); 270 });
267 } 271 }
268 }) 272 })
@@ -282,6 +286,7 @@ $(function(){ @@ -282,6 +286,7 @@ $(function(){
282 if(date=="" || date ==null){ 286 if(date=="" || date ==null){
283 layer.msg('请选择日期.'); 287 layer.msg('请选择日期.');
284 }else{ 288 }else{
  289 + var i = layer.load(2);
285 $get('/mcy_forms/shifday',params,function(result){ 290 $get('/mcy_forms/shifday',params,function(result){
286 type ='asc'; 291 type ='asc';
287 $.each(result, function(i, obj) { 292 $.each(result, function(i, obj) {
@@ -291,6 +296,7 @@ $(function(){ @@ -291,6 +296,7 @@ $(function(){
291 var tbodyHtml = template('shifday',{list:result}); 296 var tbodyHtml = template('shifday',{list:result});
292 // 把渲染好的模版html文本追加到表格中 297 // 把渲染好的模版html文本追加到表格中
293 $('#forms tbody').html(tbodyHtml); 298 $('#forms tbody').html(tbodyHtml);
  299 + layer.close(i);
294 }); 300 });
295 } 301 }
296 }); 302 });
@@ -299,15 +305,19 @@ $(function(){ @@ -299,15 +305,19 @@ $(function(){
299 var line = $("#line").val(); 305 var line = $("#line").val();
300 var date = $("#date").val(); 306 var date = $("#date").val();
301 var gsdmShif = $("#gsdmShif").val(); 307 var gsdmShif = $("#gsdmShif").val();
302 - var fgsdmShif = $("#fgsdmShif").val(); 308 + var fgsdmShif = $("#fgsdmShif").val();
  309 + var lineName = $('#line option:selected').text();
303 var params = {}; 310 var params = {};
304 params.fgsdmShif =fgsdmShif; 311 params.fgsdmShif =fgsdmShif;
305 params.date =date; 312 params.date =date;
306 params.gsdmShif =gsdmShif; 313 params.gsdmShif =gsdmShif;
307 params.line =line; 314 params.line =line;
308 params.type='export'; 315 params.type='export';
  316 + params.lineName =lineName;
309 $get('/mcy_export/shifdayExport',params,function(result){ 317 $get('/mcy_export/shifdayExport',params,function(result){
310 - window.open("/downloadFile/download?fileName=班次车辆人员日报表"+moment(date).format("YYYYMMDD")); 318 + window.open("/downloadFile/download?fileName="
  319 + +moment(date).format("YYYYMMDD")+
  320 + "-"+lineName+"-班次车辆人员日报表");
311 }); 321 });
312 }); 322 });
313 }); 323 });
src/main/resources/static/pages/mforms/shiftuehiclemanths/shiftuehiclemanth.html
@@ -99,11 +99,8 @@ @@ -99,11 +99,8 @@
99 if (!$('body').hasClass('page-sidebar-closed')) 99 if (!$('body').hasClass('page-sidebar-closed'))
100 $('.menu-toggler.sidebar-toggler').click(); 100 $('.menu-toggler.sidebar-toggler').click();
101 101
102 - $("#startDate,#endDate").datetimepicker({  
103 - format : 'YYYY-MM-DD',  
104 - locale : 'zh-cn'  
105 - });  
106 var d = new Date(); 102 var d = new Date();
  103 + d.setTime(d.getTime() - 1*1000*60*60*24);
107 var year = d.getFullYear(); 104 var year = d.getFullYear();
108 var month = d.getMonth() + 1; 105 var month = d.getMonth() + 1;
109 var day = d.getDate(); 106 var day = d.getDate();
@@ -111,6 +108,12 @@ @@ -111,6 +108,12 @@
111 month = "0" + month; 108 month = "0" + month;
112 if(day < 10) 109 if(day < 10)
113 day = "0" + day; 110 day = "0" + day;
  111 + var dateTime = year + "-" + month + "-" + day;
  112 + $("#startDate,#endDate").datetimepicker({
  113 + format : 'YYYY-MM-DD',
  114 + locale : 'zh-cn',
  115 + maxDate : dateTime
  116 + });
114 $("#startDate,#endDate").val(year + "-" + month + "-" + day); 117 $("#startDate,#endDate").val(year + "-" + month + "-" + day);
115 118
116 var fage=false; 119 var fage=false;
@@ -207,6 +210,7 @@ @@ -207,6 +210,7 @@
207 params.lpName = $("#lpName").val(); 210 params.lpName = $("#lpName").val();
208 params.gsdmManth= $("#gsdmManth").val(); 211 params.gsdmManth= $("#gsdmManth").val();
209 params.fgsdmManth= $("#fgsdmManth").val(); 212 params.fgsdmManth= $("#fgsdmManth").val();
  213 + var i = layer.load(2);
210 $get("/mcy_forms/shiftuehiclemanth",params,function(result){ 214 $get("/mcy_forms/shiftuehiclemanth",params,function(result){
211 $("#sDate").text(startDate); 215 $("#sDate").text(startDate);
212 $("#eDate").text(endDate); 216 $("#eDate").text(endDate);
@@ -223,11 +227,15 @@ @@ -223,11 +227,15 @@
223 var list_shiftuehiclemanth = template('list_shiftuehiclemanth',{list:result}); 227 var list_shiftuehiclemanth = template('list_shiftuehiclemanth',{list:result});
224 // 把渲染好的模版html文本追加到表格中 228 // 把渲染好的模版html文本追加到表格中
225 $('#forms tbody').html(list_shiftuehiclemanth); 229 $('#forms tbody').html(list_shiftuehiclemanth);
  230 + layer.close(i);
226 231
227 }); 232 });
228 }); 233 });
229 234
230 $("#export").on("click",function(){ 235 $("#export").on("click",function(){
  236 + var lineName = $('#line option:selected').text();
  237 + var startDate = $("#startDate").val();
  238 + var endDate = $("#endDate").val();
231 var params={}; 239 var params={};
232 params.empnames=$("#empnames").val(); 240 params.empnames=$("#empnames").val();
233 params.line = $("#line").val(); 241 params.line = $("#line").val();
@@ -236,9 +244,20 @@ @@ -236,9 +244,20 @@
236 params.lpName = $("#lpName").val(); 244 params.lpName = $("#lpName").val();
237 params.gsdmManth= $("#gsdmManth").val(); 245 params.gsdmManth= $("#gsdmManth").val();
238 params.fgsdmManth= $("#fgsdmManth").val(); 246 params.fgsdmManth= $("#fgsdmManth").val();
  247 + params.lineName = lineName;
239 params.type='export'; 248 params.type='export';
  249 + var i = layer.load(2);
240 $get('/mcy_export/shiftuehiclemanthExport',params,function(result){ 250 $get('/mcy_export/shiftuehiclemanthExport',params,function(result){
241 - window.open("/downloadFile/download?fileName=班次车辆人员月报表"+moment($("#startDate").val()).format("YYYYMMDD")); 251 + var dateTime = "";
  252 + if(startDate == endDate){
  253 + dateTime = moment(startDate).format("YYYYMMDD");
  254 + } else {
  255 + dateTime = moment(startDate).format("YYYYMMDD")
  256 + +"-"+moment(endDate).format("YYYYMMDD");
  257 + }
  258 + window.open("/downloadFile/download?fileName="
  259 + +dateTime+"-"+lineName+"-班次车辆人员月报表");
  260 + layer.close(i);
242 }); 261 });
243 }); 262 });
244 263
src/main/resources/static/pages/mforms/singledatas/singledata.html
@@ -226,9 +226,16 @@ @@ -226,9 +226,16 @@
226 var gsdmSing = $("#gsdmSing").val(); 226 var gsdmSing = $("#gsdmSing").val();
227 var fgsdmSing = $("#fgsdmSing").val(); 227 var fgsdmSing = $("#fgsdmSing").val();
228 var tjtype=$("#tjtype").val(); 228 var tjtype=$("#tjtype").val();
  229 + var lineName = $('#line option:selected').text();
  230 + if(lineName == "全部线路")
  231 + lineName = $('#fgsdmSing option:selected').text();
  232 + var i = layer.load(2);
229 // if(tjtype=='jsy'){ 233 // if(tjtype=='jsy'){
230 - $get('/mcy_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export'},function(result){  
231 - window.open("/downloadFile/download?fileName=路单数据"+moment(startDate).format("YYYYMMDD")); 234 + $get('/mcy_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export',lineName:lineName},function(result){
  235 + window.open("/downloadFile/download?fileName="
  236 + +moment(startDate).format("YYYYMMDD")
  237 + +"-"+lineName+"-路单数据");
  238 + layer.close(i);
232 }); 239 });
233 // }else{ 240 // }else{
234 // $get('/mcy_export/singledataExport',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export'},function(result){ 241 // $get('/mcy_export/singledataExport',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export'},function(result){
src/main/resources/static/pages/mforms/turnoutrates/turnoutrate.html
@@ -119,12 +119,9 @@ @@ -119,12 +119,9 @@
119 if (!$('body').hasClass('page-sidebar-closed')) 119 if (!$('body').hasClass('page-sidebar-closed'))
120 $('.menu-toggler.sidebar-toggler').click(); 120 $('.menu-toggler.sidebar-toggler').click();
121 121
122 - $("#startDate,#endDate").datetimepicker({  
123 - format : 'YYYY-MM-DD',  
124 - locale : 'zh-cn'  
125 - });  
126 122
127 var d = new Date(); 123 var d = new Date();
  124 + d.setTime(d.getTime() - 1*1000*60*60*24);
128 var year = d.getFullYear(); 125 var year = d.getFullYear();
129 var month = d.getMonth() + 1; 126 var month = d.getMonth() + 1;
130 var day = d.getDate(); 127 var day = d.getDate();
@@ -132,8 +129,14 @@ @@ -132,8 +129,14 @@
132 month = "0" + month; 129 month = "0" + month;
133 if(day < 10) 130 if(day < 10)
134 day = "0" + day; 131 day = "0" + day;
135 - $("#startDate").val(year + "-" + month + "-" + day);  
136 - $("#endDate").val(year + "-" + month + "-" + day); 132 + var dateTime = year + "-" + month + "-" + day;
  133 + $("#startDate,#endDate").datetimepicker({
  134 + format : 'YYYY-MM-DD',
  135 + locale : 'zh-cn',
  136 + maxDate : dateTime
  137 + });
  138 + $("#startDate").val(dateTime);
  139 + $("#endDate").val(dateTime);
137 140
138 var fage=false; 141 var fage=false;
139 var xlList; 142 var xlList;
@@ -224,6 +227,7 @@ @@ -224,6 +227,7 @@
224 gsdmTurn=$("#gsdmTurn").val(); 227 gsdmTurn=$("#gsdmTurn").val();
225 fgsdmTurn=$("#fgsdmTurn").val(); 228 fgsdmTurn=$("#fgsdmTurn").val();
226 if(startDate!=''&&endDate!=''){ 229 if(startDate!=''&&endDate!=''){
  230 + var i = layer.load(2);
227 $post('/mcy_forms/turnoutrate', 231 $post('/mcy_forms/turnoutrate',
228 { gsdmTurn:gsdmTurn,fgsdmTurn:fgsdmTurn, line:line,startDate:startDate,endDate:endDate,type:'query'},function(result){ 232 { gsdmTurn:gsdmTurn,fgsdmTurn:fgsdmTurn, line:line,startDate:startDate,endDate:endDate,type:'query'},function(result){
229 // var result=[]; 233 // var result=[];
@@ -231,6 +235,8 @@ @@ -231,6 +235,8 @@
231 var tbodyHtml = template('turnoutrate',{list:result}); 235 var tbodyHtml = template('turnoutrate',{list:result});
232 // 把渲染好的模版html文本追加到表格中 236 // 把渲染好的模版html文本追加到表格中
233 $('#tbody').html(tbodyHtml); 237 $('#tbody').html(tbodyHtml);
  238 + layer.close(i);
  239 +
234 line = $("#line").val(); 240 line = $("#line").val();
235 startDate = $("#startDate").val(); 241 startDate = $("#startDate").val();
236 endDate = $("#endDate").val(); 242 endDate = $("#endDate").val();
@@ -291,8 +297,21 @@ @@ -291,8 +297,21 @@
291 endDate=$("#endDate").val(); 297 endDate=$("#endDate").val();
292 gsdmTurn=$("#gsdmTurn").val(); 298 gsdmTurn=$("#gsdmTurn").val();
293 fgsdmTurn=$("#fgsdmTurn").val(); 299 fgsdmTurn=$("#fgsdmTurn").val();
294 - $post('/mcy_export/turnoutrateExport',{gsdmTurn:gsdmTurn,fgsdmTurn:fgsdmTurn,line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){  
295 - window.open("/downloadFile/download?fileName=营运线路出车率统计表"+moment(startDate).format("YYYYMMDD")); 300 + var lineName = $('#line option:selected').text();
  301 + if(lineName == "全部线路")
  302 + lineName = $('#fgsdmTurn option:selected').text();
  303 + var i = layer.load(2);
  304 + $post('/mcy_export/turnoutrateExport',{gsdmTurn:gsdmTurn,fgsdmTurn:fgsdmTurn,line:line,startDate:startDate,endDate:endDate,type:'export',lineName:lineName},function(result){
  305 + var dateTime = "";
  306 + if(startDate == endDate){
  307 + dateTime = moment(startDate).format("YYYYMMDD");
  308 + } else {
  309 + dateTime = moment(startDate).format("YYYYMMDD")
  310 + +"-"+moment(endDate).format("YYYYMMDD");
  311 + }
  312 + window.open("/downloadFile/download?fileName="
  313 + +dateTime+"-"+lineName+"-营运线路出车率统计表");
  314 + layer.close(i);
296 }); 315 });
297 }); 316 });
298 }); 317 });
src/main/resources/static/pages/mforms/vehicleloadings/vehicleloading.html
@@ -178,11 +178,13 @@ @@ -178,11 +178,13 @@
178 date = $("#date").val(); 178 date = $("#date").val();
179 // gsdmVehic = $("#gsdmVehic").val(); 179 // gsdmVehic = $("#gsdmVehic").val();
180 // fgsdmVehic = $("#fgsdmVehic").val(); 180 // fgsdmVehic = $("#fgsdmVehic").val();
  181 + var i = layer.load(2);
181 $get('/mcy_forms/vehicleloading',{line:line,data:date},function(result){ 182 $get('/mcy_forms/vehicleloading',{line:line,data:date},function(result){
182 // 把数据填充到模版中 183 // 把数据填充到模版中
183 var tbodyHtml = template('vehicleloading',{list:result}); 184 var tbodyHtml = template('vehicleloading',{list:result});
184 // 把渲染好的模版html文本追加到表格中 185 // 把渲染好的模版html文本追加到表格中
185 $('#forms tbody').html(tbodyHtml); 186 $('#forms tbody').html(tbodyHtml);
  187 + layer.close(i);
186 }); 188 });
187 }); 189 });
188 190
@@ -191,8 +193,13 @@ @@ -191,8 +193,13 @@
191 date = $("#date").val(); 193 date = $("#date").val();
192 gsdmVehic = $("#gsdmVehic").val(); 194 gsdmVehic = $("#gsdmVehic").val();
193 fgsdmVehic = $("#fgsdmVehic").val(); 195 fgsdmVehic = $("#fgsdmVehic").val();
194 - $get('/mcy_export/vehicleloadingExport',{line:line,data:date,gsdmVehic: gsdmVehic,fgsdmVehic:fgsdmVehic,type:'export'},function(result){  
195 - window.open("/downloadFile/download?fileName=车辆加注"+moment(date).format("YYYYMMDD")); 196 + var lineName = $('#line option:selected').text();
  197 + var i = layer.load(2);
  198 + $get('/mcy_export/vehicleloadingExport',{line:line,data:date,gsdmVehic: gsdmVehic,fgsdmVehic:fgsdmVehic,type:'export',lineName:lineName},function(result){
  199 + window.open("/downloadFile/download?fileName="
  200 + +moment(date).format("YYYYMMDD")
  201 + +"-"+lineName+"-车辆加注");
  202 + layer.close(i);
196 }); 203 });
197 }); 204 });
198 }); 205 });
src/main/resources/static/pages/mforms/waybilldays/waybillday.html
@@ -183,6 +183,7 @@ @@ -183,6 +183,7 @@
183 if(date=="" || date ==null){ 183 if(date=="" || date ==null){
184 layer.msg('请选择日期.'); 184 layer.msg('请选择日期.');
185 }else{ 185 }else{
  186 + var i = layer.load(2);
186 $post('/mcy_forms/waybillday',{line:line,date:date,type:'query'},function(result){ 187 $post('/mcy_forms/waybillday',{line:line,date:date,type:'query'},function(result){
187 $.each(result, function(i, obj) { 188 $.each(result, function(i, obj) {
188 obj.requestType = reqCodeMap[obj.requestType]; 189 obj.requestType = reqCodeMap[obj.requestType];
@@ -191,6 +192,7 @@ @@ -191,6 +192,7 @@
191 var tbodyHtml = template('waybillday',{list:result}); 192 var tbodyHtml = template('waybillday',{list:result});
192 // 把渲染好的模版html文本追加到表格中 193 // 把渲染好的模版html文本追加到表格中
193 $('#forms tbody').html(tbodyHtml); 194 $('#forms tbody').html(tbodyHtml);
  195 + layer.close(i);
194 }); 196 });
195 } 197 }
196 }); 198 });
@@ -198,10 +200,13 @@ @@ -198,10 +200,13 @@
198 $("#export").on("click",function(){ 200 $("#export").on("click",function(){
199 line = $("#line").val(); 201 line = $("#line").val();
200 date = $("#date").val(); 202 date = $("#date").val();
  203 + lineName = $('#line option:selected').text();
201 gsdmWaybillday=$("#gsdmWaybillday").val(); 204 gsdmWaybillday=$("#gsdmWaybillday").val();
202 fgsdmWaybillday = $("#fgsdmWaybillday").val(); 205 fgsdmWaybillday = $("#fgsdmWaybillday").val();
203 - $post('/mcy_export/waybilldayExport',{gsdmWaybillday:gsdmWaybillday,fgsdmWaybillday:fgsdmWaybillday,line:line,date:date,type:'export'},function(result){  
204 - window.open("/downloadFile/download?fileName=行车路单日报表"); 206 + $post('/mcy_export/waybilldayExport',{gsdmWaybillday:gsdmWaybillday,fgsdmWaybillday:fgsdmWaybillday,line:line,date:date,lineName:lineName,type:'export'},function(result){
  207 + window.open("/downloadFile/download?fileName="
  208 + +moment(date).format("YYYYMMDD")
  209 + +"-"+lineName+"-行车路单日报表");
205 }); 210 });
206 }); 211 });
207 }); 212 });
src/main/resources/static/pages/punctual/list.html
@@ -75,21 +75,14 @@ @@ -75,21 +75,14 @@
75 }); 75 });
76 }); 76 });
77 $("#exportList").on('click',function(){ 77 $("#exportList").on('click',function(){
78 -// $("#forms_2").table2excel({  
79 -// // 不被导出的表格行的CSS class类  
80 -// exclude: ".noExl",  
81 -// // 导出的Excel文档的名称,(没看到作用)  
82 -// name: "Excel Document Name.xlsx",  
83 -// // Excel文件的名称  
84 -// filename: "发车到站准点率"  
85 -// });  
86 var date = no.split("_")[0]; 78 var date = no.split("_")[0];
87 var endDate = date; 79 var endDate = date;
88 var line = no.split("_")[1]; 80 var line = no.split("_")[1];
89 var fgs=$('#fgsdm').val(); 81 var fgs=$('#fgsdm').val();
90 var gs=$('#gsdm').val(); 82 var gs=$('#gsdm').val();
91 - $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:2,type:"export"},function(result){  
92 - window.open("/downloadFile/download?fileName=发车到站准点率详细"+moment(date).format("YYYYMMDD")); 83 + $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:2,type:"export",lineName:no.split("_")[2]},function(result){
  84 + window.open("/downloadFile/download?fileName="
  85 + +moment(date).format("YYYYMMDD")+"-"+no.split("_")[2]+"-发车到站准点率详细");
93 }); 86 });
94 87
95 }); 88 });
src/main/resources/static/pages/punctual/onTime.html
@@ -262,6 +262,9 @@ @@ -262,6 +262,9 @@
262 var endDate = $("#endDate").val(); 262 var endDate = $("#endDate").val();
263 var fgs=$('#fgsdm').val(); 263 var fgs=$('#fgsdm').val();
264 var gs=$('#gsdm').val(); 264 var gs=$('#gsdm').val();
  265 + var lineName = $('#line option:selected').text();
  266 + if(lineName == "全部线路")
  267 + lineName = $('#subCompany option:selected').text();
265 var i = layer.load(2); 268 var i = layer.load(2);
266 $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs},function(result){ 269 $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs},function(result){
267 var onTime = template('onTime',{list:result}); 270 var onTime = template('onTime',{list:result});
@@ -277,9 +280,12 @@ @@ -277,9 +280,12 @@
277 $("#export").removeAttr("disabled"); 280 $("#export").removeAttr("disabled");
278 }); 281 });
279 }); 282 });
  283 +
280 var line1; 284 var line1;
  285 + var lineName1;
281 function showSheetList(){ 286 function showSheetList(){
282 line1 = $(this).data('id'); 287 line1 = $(this).data('id');
  288 + lineName1 = $(this).parent().parent().children()[2].innerHTML;
283 var date = $("#date").val(); 289 var date = $("#date").val();
284 var endDate = $("#endDate").val(); 290 var endDate = $("#endDate").val();
285 var fgs=$('#fgsdm').val(); 291 var fgs=$('#fgsdm').val();
@@ -320,44 +326,45 @@ @@ -320,44 +326,45 @@
320 }); 326 });
321 } 327 }
322 $("#export").on("click",function(){ 328 $("#export").on("click",function(){
323 -// $("#forms_h").table2excel({  
324 -// // 不被导出的表格行的CSS class类  
325 -// exclude: ".noExl",  
326 -// // 导出的Excel文档的名称,(没看到作用)  
327 -// name: "Excel Document Name.xlsx",  
328 -// // Excel文件的名称  
329 -// filename: date+"-"+endDate+"发车到站准点率"  
330 -// });  
331 var line = $("#line").val(); 329 var line = $("#line").val();
332 var date = $("#date").val(); 330 var date = $("#date").val();
333 var endDate = $("#endDate").val(); 331 var endDate = $("#endDate").val();
334 var fgs=$('#fgsdm').val(); 332 var fgs=$('#fgsdm').val();
335 var gs=$('#gsdm').val(); 333 var gs=$('#gsdm').val();
  334 + var lineName = $('#line option:selected').text();
  335 + if(lineName == "全部线路")
  336 + lineName = $('#fgsdm option:selected').text();
336 var i = layer.load(2); 337 var i = layer.load(2);
337 - $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,type:"export"},function(result){  
338 - window.open("/downloadFile/download?fileName=发车到站准点率"+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")); 338 + $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,type:"export",lineName:lineName},function(result){
  339 + var dateTime = "";
  340 + if(date == endDate){
  341 + dateTime = moment(date).format("YYYYMMDD");
  342 + } else {
  343 + dateTime = moment(date).format("YYYYMMDD")+"-"+
  344 + moment(endDate).format("YYYYMMDD");
  345 + }
  346 + window.open("/downloadFile/download?fileName="
  347 + +dateTime+"-"+lineName+"-发车到站准点率");
339 layer.close(i); 348 layer.close(i);
340 }); 349 });
341 }) 350 })
342 351
343 $("#export_1").on("click",function(){ 352 $("#export_1").on("click",function(){
344 -// var date = $("#date").val();  
345 -// var endDate = $("#endDate").val();  
346 -// $("#forms_1_h").table2excel({  
347 -// // 不被导出的表格行的CSS class类  
348 -// exclude: ".noExl",  
349 -// // 导出的Excel文档的名称,(没看到作用)  
350 -// name: "Excel Document Name.xlsx",  
351 -// // Excel文件的名称  
352 -// filename: date+"-"+endDate+"发车到站准点率"  
353 -// });  
354 var date = $("#date").val(); 353 var date = $("#date").val();
355 var endDate = $("#endDate").val(); 354 var endDate = $("#endDate").val();
356 var fgs=$('#fgsdm').val(); 355 var fgs=$('#fgsdm').val();
357 var gs=$('#gsdm').val(); 356 var gs=$('#gsdm').val();
358 var i = layer.load(2); 357 var i = layer.load(2);
359 - $get('/busInterval/onTime',{line:line1,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:1,type:"export"},function(result){  
360 - window.open("/downloadFile/download?fileName=发车到站准点率明细"); 358 + $get('/busInterval/onTime',{line:line1,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:1,type:"export",lineName:lineName1},function(result){
  359 + var dateTime = "";
  360 + if(date == endDate){
  361 + dateTime = moment(date).format("YYYYMMDD");
  362 + } else {
  363 + dateTime = moment(date).format("YYYYMMDD")+"-"+
  364 + moment(endDate).format("YYYYMMDD");
  365 + }
  366 + window.open("/downloadFile/download?fileName="
  367 + +dateTime+"-"+lineName1+"-发车到站准点率明细");
361 layer.close(i); 368 layer.close(i);
362 }); 369 });
363 }); 370 });
src/main/resources/static/pages/report/countMileage/countBus/company/countBusMileage.html
@@ -208,12 +208,14 @@ @@ -208,12 +208,14 @@
208 return; 208 return;
209 } 209 }
210 line = $("#line").val(); 210 line = $("#line").val();
211 - xlName = $("#select2-line-container").html();  
212 date = $("#date").val(); 211 date = $("#date").val();
213 date2 =$("#date2").val(); 212 date2 =$("#date2").val();
214 gsdm =$("#gsdm").val(); 213 gsdm =$("#gsdm").val();
215 fgsdm=$("#fgsdm").val(); 214 fgsdm=$("#fgsdm").val();
216 zt=$("#zt").val(); 215 zt=$("#zt").val();
  216 + xlName = $("#select2-line-container").html();
  217 + if(xlName == "全部线路")
  218 + xlName = $('#fgsdm option:selected').text();
217 if(line=="请选择"){ 219 if(line=="请选择"){
218 line=""; 220 line="";
219 } 221 }
@@ -250,7 +252,7 @@ @@ -250,7 +252,7 @@
250 $("#export").on("click",function(){ 252 $("#export").on("click",function(){
251 var params = {}; 253 var params = {};
252 params['gsdm'] = gsdm; 254 params['gsdm'] = gsdm;
253 - params['fgsdm'] =fgsdm ; 255 + params['fgsdm'] =fgsdm;
254 params['line'] = line; 256 params['line'] = line;
255 params['date'] = date; 257 params['date'] = date;
256 params['date2'] = date2; 258 params['date2'] = date2;
@@ -259,7 +261,15 @@ @@ -259,7 +261,15 @@
259 params['type'] = "export"; 261 params['type'] = "export";
260 params['by']='gs'; 262 params['by']='gs';
261 $get('/report/countBusMileage',params,function(result){ 263 $get('/report/countBusMileage',params,function(result){
262 - window.open("/downloadFile/download?fileName=路单数据统计表"); 264 + var dateTime = "";
  265 + if(date == date2){
  266 + dateTime = moment(date).format("YYYYMMDD");
  267 + } else {
  268 + dateTime = moment(date).format("YYYYMMDD")
  269 + +"-"+moment(date2).format("YYYYMMDD");
  270 + }
  271 + window.open("/downloadFile/download?fileName="
  272 + +dateTime+"-"+xlName+"-路单数据统计表");
263 }); 273 });
264 }); 274 });
265 275
src/main/resources/static/pages/report/countMileage/countBus/countBusMileage.html
@@ -208,12 +208,14 @@ @@ -208,12 +208,14 @@
208 return; 208 return;
209 } 209 }
210 line = $("#line").val(); 210 line = $("#line").val();
211 - xlName = $("#select2-line-container").html();  
212 date = $("#date").val(); 211 date = $("#date").val();
213 date2 =$("#date2").val(); 212 date2 =$("#date2").val();
214 gsdm =$("#gsdm").val(); 213 gsdm =$("#gsdm").val();
215 fgsdm=$("#fgsdm").val(); 214 fgsdm=$("#fgsdm").val();
216 zt=$("#zt").val(); 215 zt=$("#zt").val();
  216 + xlName = $("#select2-line-container").html();
  217 + if(xlName == "全部线路")
  218 + xlName = $('#fgsdm option:selected').text();
217 if(line=="请选择"){ 219 if(line=="请选择"){
218 line=""; 220 line="";
219 } 221 }
@@ -222,7 +224,7 @@ @@ -222,7 +224,7 @@
222 }else{ 224 }else{
223 var params = {}; 225 var params = {};
224 params['gsdm'] = gsdm; 226 params['gsdm'] = gsdm;
225 - params['fgsdm'] =fgsdm ; 227 + params['fgsdm'] =fgsdm;
226 params['line'] = line; 228 params['line'] = line;
227 params['date'] = date; 229 params['date'] = date;
228 params['date2'] = date2; 230 params['date2'] = date2;
@@ -250,7 +252,7 @@ @@ -250,7 +252,7 @@
250 $("#export").on("click",function(){ 252 $("#export").on("click",function(){
251 var params = {}; 253 var params = {};
252 params['gsdm'] = gsdm; 254 params['gsdm'] = gsdm;
253 - params['fgsdm'] =fgsdm ; 255 + params['fgsdm'] =fgsdm;
254 params['line'] = line; 256 params['line'] = line;
255 params['date'] = date; 257 params['date'] = date;
256 params['date2'] = date2; 258 params['date2'] = date2;
@@ -258,8 +260,18 @@ @@ -258,8 +260,18 @@
258 params['zt']=zt; 260 params['zt']=zt;
259 params['type'] = "export"; 261 params['type'] = "export";
260 params['by']='sj'; 262 params['by']='sj';
  263 + var i = layer.load(2);
261 $get('/report/countBusMileage',params,function(result){ 264 $get('/report/countBusMileage',params,function(result){
262 - window.open("/downloadFile/download?fileName=路单数据统计表"); 265 + var dateTime = "";
  266 + if(date == date2){
  267 + dateTime = moment(date).format("YYYYMMDD");
  268 + } else {
  269 + dateTime = moment(date).format("YYYYMMDD")
  270 + +"-"+moment(date2).format("YYYYMMDD");
  271 + }
  272 + window.open("/downloadFile/download?fileName="
  273 + +dateTime+"-"+xlName+"-路单数据统计表");
  274 + layer.close(i);
263 }); 275 });
264 }); 276 });
265 277
src/main/resources/static/pages/report/countMileage/countLine/company/countLineMileage.html
@@ -244,11 +244,13 @@ @@ -244,11 +244,13 @@
244 return; 244 return;
245 } 245 }
246 line = $("#line").val(); 246 line = $("#line").val();
247 - xlName = $("#select2-line-container").html();  
248 date = $("#date").val(); 247 date = $("#date").val();
249 date2 =$("#date2").val(); 248 date2 =$("#date2").val();
250 gsdm =$("#gsdm").val(); 249 gsdm =$("#gsdm").val();
251 fgsdm=$("#fgsdm").val(); 250 fgsdm=$("#fgsdm").val();
  251 + xlName = $("#select2-line-container").html();
  252 + if(xlName == "全部线路")
  253 + xlName = $('#fgsdm option:selected').text();
252 if(line=="请选择"){ 254 if(line=="请选择"){
253 line=""; 255 line="";
254 } 256 }
@@ -257,7 +259,7 @@ @@ -257,7 +259,7 @@
257 }else{ 259 }else{
258 var params = {}; 260 var params = {};
259 params['gsdm'] = gsdm; 261 params['gsdm'] = gsdm;
260 - params['fgsdm'] =fgsdm ; 262 + params['fgsdm'] =fgsdm;
261 params['line'] = line; 263 params['line'] = line;
262 params['date'] = date; 264 params['date'] = date;
263 params['date2'] = date2; 265 params['date2'] = date2;
@@ -291,8 +293,18 @@ @@ -291,8 +293,18 @@
291 params['xlName'] = xlName; 293 params['xlName'] = xlName;
292 params['type'] = "export"; 294 params['type'] = "export";
293 params['by']='gs'; 295 params['by']='gs';
  296 + var i = layer.load(2);
294 $get('/report/countLineMileage',params,function(result){ 297 $get('/report/countLineMileage',params,function(result){
295 - window.open("/downloadFile/download?fileName=线路公里统计表"); 298 + var dateTime = "";
  299 + if(date == date2){
  300 + dateTime = moment(date).format("YYYYMMDD");
  301 + } else {
  302 + dateTime = moment(date).format("YYYYMMDD")
  303 + +"-"+moment(date2).format("YYYYMMDD");
  304 + }
  305 + window.open("/downloadFile/download?fileName="
  306 + +dateTime+"-"+xlName+"-线路公里统计表");
  307 + layer.close(i);
296 }); 308 });
297 }); 309 });
298 }); 310 });
src/main/resources/static/pages/report/countMileage/countLine/countLineMileage.html
@@ -243,11 +243,13 @@ @@ -243,11 +243,13 @@
243 return; 243 return;
244 } 244 }
245 line = $("#line").val(); 245 line = $("#line").val();
246 - xlName = $("#select2-line-container").html();  
247 date = $("#date").val(); 246 date = $("#date").val();
248 date2 =$("#date2").val(); 247 date2 =$("#date2").val();
249 gsdm =$("#gsdm").val(); 248 gsdm =$("#gsdm").val();
250 fgsdm=$("#fgsdm").val(); 249 fgsdm=$("#fgsdm").val();
  250 + xlName = $("#select2-line-container").html();
  251 + if(xlName == "全部线路")
  252 + xlName = $('#fgsdm option:selected').text();
251 if(line=="请选择"){ 253 if(line=="请选择"){
252 line=""; 254 line="";
253 } 255 }
@@ -264,8 +266,8 @@ @@ -264,8 +266,8 @@
264 params['type'] = "query"; 266 params['type'] = "query";
265 var i = layer.load(2); 267 var i = layer.load(2);
266 $get('/report/countLineMileage',params,function(result){ 268 $get('/report/countLineMileage',params,function(result){
267 - $("#datetodate").html(date+"至"+date2);  
268 layer.close(i); 269 layer.close(i);
  270 + $("#datetodate").html(date+"至"+date2);
269 // 把数据填充到模版中 271 // 把数据填充到模版中
270 var tbodyHtml = template('countLineListSj',{list:result}); 272 var tbodyHtml = template('countLineListSj',{list:result});
271 // 把渲染好的模版html文本追加到表格中 273 // 把渲染好的模版html文本追加到表格中
@@ -290,8 +292,18 @@ @@ -290,8 +292,18 @@
290 params['xlName'] = xlName; 292 params['xlName'] = xlName;
291 params['type'] = "export"; 293 params['type'] = "export";
292 params['by']='sj'; 294 params['by']='sj';
  295 + var i = layer.load(2);
293 $get('/report/countLineMileage',params,function(result){ 296 $get('/report/countLineMileage',params,function(result){
294 - window.open("/downloadFile/download?fileName=线路公里统计表"); 297 + var dateTime = "";
  298 + if(date == date2){
  299 + dateTime = moment(date).format("YYYYMMDD");
  300 + } else {
  301 + dateTime = moment(date).format("YYYYMMDD")
  302 + +"-"+moment(date2).format("YYYYMMDD");
  303 + }
  304 + window.open("/downloadFile/download?fileName="
  305 + +dateTime+"-"+xlName+"-线路公里统计表");
  306 + layer.close(i);
295 }); 307 });
296 }); 308 });
297 }); 309 });
src/main/resources/static/pages/report/inoutstation.html
@@ -479,11 +479,14 @@ @@ -479,11 +479,14 @@
479 var nbbm=$("#nbbm").val(); 479 var nbbm=$("#nbbm").val();
480 var fcsj=$("#fcsj_xx").val(); 480 var fcsj=$("#fcsj_xx").val();
481 var ddsj=$("#ddsj_xx").val(); 481 var ddsj=$("#ddsj_xx").val();
  482 + var pzh=$('#nbbm option:selected').text();
482 if(fcsj==""){ 483 if(fcsj==""){
483 layer.msg("没数据"); 484 layer.msg("没数据");
484 }else{ 485 }else{
485 $get('/report/exportQueryListZdxx',{clzbh:nbbm,date:rq,line:line,fcsj:fcsj,ddsj:ddsj},function(result){ 486 $get('/report/exportQueryListZdxx',{clzbh:nbbm,date:rq,line:line,fcsj:fcsj,ddsj:ddsj},function(result){
486 - window.open("/downloadFile/download?fileName=班次到离站"); 487 + window.open("/downloadFile/download?fileName="
  488 + +moment(date).format("YYYYMMDD")
  489 + +"-"+pzh+"-班次到离站");
487 }); 490 });
488 } 491 }
489 492
@@ -495,6 +498,7 @@ @@ -495,6 +498,7 @@
495 var line=$("#line").val(); 498 var line=$("#line").val();
496 var zdlx=$("#zdlx").val(); 499 var zdlx=$("#zdlx").val();
497 var zd=$("#zd").val(); 500 var zd=$("#zd").val();
  501 + var lineName = $('#line option:selected').text();
498 if(date1=="" || date1==null){ 502 if(date1=="" || date1==null){
499 layer.msg("请选择时间"); 503 layer.msg("请选择时间");
500 }else if( line=="" || line==null){ 504 }else if( line=="" || line==null){
@@ -505,7 +509,16 @@ @@ -505,7 +509,16 @@
505 layer.msg("请选择方向"); 509 layer.msg("请选择方向");
506 }else{ 510 }else{
507 $get('/report/exportQueryListClzd',{zd:zd,zdlx:zdlx,line:line,fcsj:date1,ddsj:date2},function(result){ 511 $get('/report/exportQueryListClzd',{zd:zd,zdlx:zdlx,line:line,fcsj:date1,ddsj:date2},function(result){
508 - window.open("/downloadFile/download?fileName=班次到离站"); 512 + var startDate = moment(date1).format("YYYYMMDD");
  513 + var endDate = moment(date2).format("YYYYMMDD");
  514 + var dateTime = "";
  515 + if(startDate == endDate){
  516 + dateTime = startDate;
  517 + } else {
  518 + dateTime = startDate + "-" + endDate;
  519 + }
  520 + window.open("/downloadFile/download?fileName="
  521 + +dateTime+"-"+lineName+"-班次到离站");
509 }); 522 });
510 } 523 }
511 }); 524 });
src/main/resources/static/pages/report/message/message.html
@@ -179,7 +179,8 @@ @@ -179,7 +179,8 @@
179 }); 179 });
180 180
181 var date = ''; 181 var date = '';
182 - var line = $("#line").val(); 182 + var line = $("#line").val();
  183 + var lineName = $('#line option:selected').text();
183 $("#query").on("click",function(){ 184 $("#query").on("click",function(){
184 if($("#date").val() == null || $("#date").val().trim().length == 0){ 185 if($("#date").val() == null || $("#date").val().trim().length == 0){
185 layer.msg("请选择时间!"); 186 layer.msg("请选择时间!");
@@ -216,6 +217,7 @@ @@ -216,6 +217,7 @@
216 jName = params[1]; 217 jName = params[1];
217 line = $("#line").val(); 218 line = $("#line").val();
218 date = $("#date").val(); 219 date = $("#date").val();
  220 + lineName = $('#line option:selected').text();
219 var obj = $(this); 221 var obj = $(this);
220 $get('/report/historyMessageList',{line:line,date:date,code:jName,type:"query"},function(result){ 222 $get('/report/historyMessageList',{line:line,date:date,code:jName,type:"query"},function(result){
221 var list_history_msg = template('list_history_msg',{list:result}); 223 var list_history_msg = template('list_history_msg',{list:result});
@@ -238,7 +240,8 @@ @@ -238,7 +240,8 @@
238 240
239 $("#export").on("click",function(){ 241 $("#export").on("click",function(){
240 $get('/report/historyMessageList',{line:line,date:date,code:jName,type:"export_msg"},function(result){ 242 $get('/report/historyMessageList',{line:line,date:date,code:jName,type:"export_msg"},function(result){
241 - window.open("/downloadFile/download?fileName=调度消息分析"+moment(date).format("YYYYMMDD")); 243 + window.open("/downloadFile/download?fileName="
  244 + +moment(date).format("YYYYMMDD")+"-"+lineName+"-调度消息分析");
242 }); 245 });
243 }); 246 });
244 247
src/main/resources/static/pages/report/oil/oilListMonth.html
@@ -214,9 +214,11 @@ @@ -214,9 +214,11 @@
214 var date = $("#date").val(); 214 var date = $("#date").val();
215 var gsdm = $("#gsdm").val(); 215 var gsdm = $("#gsdm").val();
216 var fgsdm = $("#fgsdm").val(); 216 var fgsdm = $("#fgsdm").val();
  217 + var i = layer.load(2);
217 $get('/ylb/oilListMonth',{line:line,date:date,gsdm:gsdm,fgsdm,fgsdm,type:'query'},function(result){ 218 $get('/ylb/oilListMonth',{line:line,date:date,gsdm:gsdm,fgsdm,fgsdm,type:'query'},function(result){
218 var oilListMonth = template('oilListMonth',{list:result}); 219 var oilListMonth = template('oilListMonth',{list:result});
219 $('#forms tbody').html(oilListMonth); 220 $('#forms tbody').html(oilListMonth);
  221 + layer.close(i);
220 }); 222 });
221 }); 223 });
222 224
@@ -230,8 +232,13 @@ @@ -230,8 +232,13 @@
230 var date = $("#date").val(); 232 var date = $("#date").val();
231 var gsdm = $("#gsdm").val(); 233 var gsdm = $("#gsdm").val();
232 var fgsdm = $("#fgsdm").val(); 234 var fgsdm = $("#fgsdm").val();
233 - $get('/ylb/oilListMonth', {line:line,date:date,gsdm:gsdm,fgsdm,fgsdm,type:'export'}, function(result){  
234 - window.open("/downloadFile/download?fileName=月存油报表"+moment(date).format("YYYYMMDD")); 235 + var lineName = $('#line option:selected').text();
  236 + if(lineName == "全部线路")
  237 + lineName = $('#fgsdm option:selected').text();
  238 + $get('/ylb/oilListMonth', {line:line,date:date,gsdm:gsdm,fgsdm,fgsdm,type:'export',lineName:lineName}, function(result){
  239 + window.open("/downloadFile/download?fileName="
  240 + +moment(date).format("YYYYMMDD")
  241 + +"-"+lineName+"-月存油报表");
235 }); 242 });
236 }); 243 });
237 }); 244 });