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 46 @RequestMapping(value = "/waybilldayExport", method = RequestMethod.POST)
47 47 public List<Waybillday> waybilldayExport(@RequestParam Map<String, Object> map) {
48 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 51 return waybillday;
51 52 }
52 53  
... ... @@ -85,7 +86,8 @@ public class ExportController {
85 86 // 班次车辆人员日统计
86 87 @RequestMapping(value = "/shifdayExport", method = RequestMethod.GET)
87 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 91 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
90 92 Map<String, Object> map2 = new HashMap<String, Object>();
91 93 ReportUtils ee = new ReportUtils();
... ... @@ -117,10 +119,14 @@ public class ExportController {
117 119 }
118 120  
119 121 try {
  122 + String lineName = "";
  123 + if(map.containsKey("lineName"))
  124 + lineName = map.get("lineName").toString();
120 125 listI.add(resList.iterator());
121 126 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
122 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 130 } catch (Exception e) {
125 131 e.printStackTrace();
126 132 }
... ... @@ -130,7 +136,8 @@ public class ExportController {
130 136 // 班次车辆人员月统计
131 137 @RequestMapping(value = "/shiftuehiclemanthExport", method = RequestMethod.GET)
132 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 141 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
135 142 ReportUtils ee = new ReportUtils();
136 143 List<Shiftuehiclemanth> shiftuehiclemanth = formsService.shiftuehiclemanth(map);
... ... @@ -153,7 +160,20 @@ public class ExportController {
153 160 }
154 161  
155 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 177 if(map.get("empnames").equals("驾驶员")){
158 178 mouldurl="mould/shiftuehiclemanth.xls";
159 179 }else if(map.get("empnames").equals("售票员")){
... ... @@ -164,7 +184,7 @@ public class ExportController {
164 184 listI.add(resList.iterator());
165 185 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
166 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 188 } catch (Exception e) {
169 189 e.printStackTrace();
170 190 }
... ... @@ -304,7 +324,8 @@ public class ExportController {
304 324 }
305 325 @RequestMapping(value = "/singledataExportTj", method = RequestMethod.GET)
306 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 329 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
309 330 ReportUtils ee = new ReportUtils();
310 331 List<Singledata> singledata = formsService.singledatatj(map);
... ... @@ -333,10 +354,16 @@ public class ExportController {
333 354 }
334 355  
335 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 362 listI.add(resList.iterator());
337 363 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
338 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 367 } catch (Exception e) {
341 368 e.printStackTrace();
342 369 }
... ... @@ -388,7 +415,8 @@ public class ExportController {
388 415 // 车辆加注
389 416 @RequestMapping(value = "/vehicleloadingExport", method = RequestMethod.GET)
390 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 420 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
393 421 ReportUtils ee = new ReportUtils();
394 422 List<Vehicleloading> vehicleloading = formsService.vehicleloading(map.get("line").toString(),
... ... @@ -414,10 +442,15 @@ public class ExportController {
414 442 }
415 443  
416 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 450 listI.add(resList.iterator());
418 451 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
419 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 454 } catch (Exception e) {
422 455 e.printStackTrace();
423 456 }
... ... @@ -447,10 +480,23 @@ public class ExportController {
447 480 }
448 481  
449 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 496 listI.add(resList.iterator());
451 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 500 } catch (Exception e) {
455 501 e.printStackTrace();
456 502 }
... ... @@ -460,7 +506,8 @@ public class ExportController {
460 506 // 换人换车情况日统计
461 507 @RequestMapping(value = "/changetochangeExport", method = RequestMethod.POST)
462 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 511 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
465 512 ReportUtils ee = new ReportUtils();
466 513 List<Changetochange> changetochange = formsService.changetochange(map);
... ... @@ -484,10 +531,23 @@ public class ExportController {
484 531 }
485 532  
486 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 547 listI.add(resList.iterator());
488 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 551 } catch (Exception e) {
492 552 e.printStackTrace();
493 553 }
... ... @@ -497,7 +557,8 @@ public class ExportController {
497 557 // 营运线路出车率统计表
498 558 @RequestMapping(value = "/turnoutrateExport", method = RequestMethod.POST)
499 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 562 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
502 563 ReportUtils ee = new ReportUtils();
503 564 Map<String, Object> map1 = new HashMap<String, Object>();
... ... @@ -517,10 +578,23 @@ public class ExportController {
517 578 resList.remove(m);
518 579  
519 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 594 listI.add(resList.iterator());
521 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 598 } catch (Exception e) {
525 599 e.printStackTrace();
526 600 }
... ... @@ -713,10 +787,13 @@ public class ExportController {
713 787 m.put("line", BasicData.lineCode2NameMap.get(map.get("line").toString()));
714 788 m.put("date", map.get("date").toString());
715 789 try {
  790 + String lineName = map.get("lineName").toString();
  791 + String date = map.get("date").toString();
716 792 listI.add(resList.iterator());
717 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 797 } catch (Exception e) {
721 798 e.printStackTrace();
722 799 }
... ...
src/main/java/com/bsth/controller/report/ReportController.java
1 1 package com.bsth.controller.report;
2 2  
  3 +import java.text.SimpleDateFormat;
3 4 import java.util.ArrayList;
4 5 import java.util.HashMap;
5 6 import java.util.Iterator;
... ... @@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
15 16  
16 17 import com.alibaba.fastjson.JSONArray;
17 18 import com.alibaba.fastjson.JSONObject;
  19 +import com.bsth.data.BasicData;
18 20 import com.bsth.entity.StationRoute;
19 21 import com.bsth.entity.excep.ArrivalInfo;
20 22 import com.bsth.entity.realcontrol.ScheduleRealInfo;
... ... @@ -65,13 +67,15 @@ public class ReportController {
65 67 resList.add(m);
66 68 i++;
67 69 }
68   -
69 70 try {
  71 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  72 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
70 73 Map<String, Object> map=new HashMap<String, Object>();
71 74 listI.add(resList.iterator());
72 75 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
73 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 79 } catch (Exception e) {
76 80 e.printStackTrace();
77 81 }
... ... @@ -114,7 +118,8 @@ public class ReportController {
114 118 @RequestParam String zdlx,@RequestParam String fcsj,@RequestParam String ddsj){
115 119 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
116 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 123 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
119 124 int i=1;
120 125 for (ArrivalInfo a:list ) {
... ... @@ -138,11 +143,23 @@ public class ReportController {
138 143 }
139 144  
140 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 158 Map<String, Object> map=new HashMap<String, Object>();
142 159 listI.add(resList.iterator());
143 160 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
144 161 ee.excelReplace(listI, new Object[] { map }, path + "mould/inoutstation.xls",
145   - path + "export/班次到离站.xls");
  162 + path + "export/"+dateTime+"-"+lineName+"-班次到离站.xls");
146 163 } catch (Exception e) {
147 164 e.printStackTrace();
148 165 }
... ... @@ -186,11 +203,14 @@ public class ReportController {
186 203 lgqlList.add(newMap);
187 204 }
188 205 try {
  206 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  207 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
189 208 listI.add(fwqlList.iterator());
190 209 listI.add(lgqlList.iterator());
191 210 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
192 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 214 } catch (Exception e) {
195 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 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 29 * @param line (留空""默认全部线路)
30 30 */
31 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 477 m.put("date", date+"至"+date2);
478 478 ReportUtils ee = new ReportUtils();
479 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 487 listI.add(resList.iterator());
481 488 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
482 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 491 } catch (Exception e) {
485 492 // TODO: handle exception
486 493 //e.printStackTrace();
... ... @@ -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 503 * @param line (留空""默认全部线路)
497 504 */
498 505 @Transactional
... ... @@ -506,7 +513,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
506 513 Date dBefore = new Date();
507 514 Calendar calendar = Calendar.getInstance(); //得到日历
508 515 calendar.setTime(dNow);//把当前时间赋给日历
509   - calendar.add(Calendar.DAY_OF_MONTH, -2); //设置为前一天
  516 + calendar.add(Calendar.DAY_OF_MONTH, -4); //设置为前一天
510 517 dBefore = calendar.getTime(); //得到前一天的时间
511 518 rq = sdf.format(dBefore);
512 519 } else {
... ... @@ -769,6 +776,52 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
769 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 825 if (type != null && type.length() != 0 && type.equals("export")) {
773 826 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
774 827 sdfSimple = new SimpleDateFormat("yyyyMMdd");
... ... @@ -777,10 +830,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
777 830 m.put("date", date+"至"+date2);
778 831 ReportUtils ee = new ReportUtils();
779 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 841 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
782 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 844 } catch (Exception e) {
785 845 // TODO: handle exception
786 846 //e.printStackTrace();
... ... @@ -1167,6 +1227,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1167 1227 }
1168 1228  
1169 1229 if(type.equals("export")){
  1230 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  1231 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
1170 1232 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
1171 1233 Map<String, Object> m = new HashMap<String, Object>();
1172 1234 m.put("date", date);
... ... @@ -1180,10 +1242,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1180 1242 }
1181 1243 ReportUtils ee = new ReportUtils();
1182 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 1252 listI.add(lMap.iterator());
1184 1253 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
1185 1254 ee.excelReplace(listI, new Object[]{m}, path + "mould/"+xls,
1186   - path + "export/线路公里统计表.xls");
  1255 + path + "export/"+dateTime+"-"+xlName+"-线路公里统计表.xls");
1187 1256 } catch (Exception e) {
1188 1257 // TODO: handle exception
1189 1258 e.printStackTrace();
... ... @@ -1314,6 +1383,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1314 1383 }
1315 1384  
1316 1385 if(type.equals("export")){
  1386 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  1387 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
1317 1388 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
1318 1389 Map<String, Object> m = new HashMap<String, Object>();
1319 1390 m.put("date", date);
... ... @@ -1337,10 +1408,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
1337 1408 }
1338 1409 ReportUtils ee = new ReportUtils();
1339 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 1418 listI.add(lMap.iterator());
1341 1419 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
1342 1420 ee.excelReplace(listI, new Object[]{m}, path + "mould/"+xls,
1343   - path + "export/路单数据统计表.xls");
  1421 + path + "export/"+dateTime+"-"+xlName+"-路单数据统计表.xls");
1344 1422 } catch (Exception e) {
1345 1423 // TODO: handle exception
1346 1424 e.printStackTrace();
... ...
src/main/java/com/bsth/service/forms/ExportService.java
... ... @@ -13,7 +13,7 @@ import com.bsth.entity.mcy_forms.Waybillday;
13 13  
14 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 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 24  
25 25 //行车路单日报表
26 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 29 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
30 30 sdfSimple = new SimpleDateFormat("yyyyMMdd");
... ... @@ -50,7 +50,8 @@ public class ExportServiceImpl implements ExportService{
50 50 listI.add(resList.iterator());
51 51 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
52 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 55 } catch (Exception e) {
55 56 e.printStackTrace();
56 57 }
... ...
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
... ... @@ -703,17 +703,26 @@ public class BusIntervalServiceImpl implements BusIntervalService {
703 703 }
704 704  
705 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 709 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
707 710 sdfSimple = new SimpleDateFormat("yyyyMMdd");
708 711 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
709 712 Map<String, Object> m = new HashMap<String, Object>();
710 713 ReportUtils ee = new ReportUtils();
711 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 722 listI.add(resList.iterator());
713 723 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
714 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 726 } catch (Exception e) {
718 727 // TODO: handle exception
719 728 e.printStackTrace();
... ... @@ -1441,6 +1450,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1441 1450 }
1442 1451  
1443 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 1456 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
1445 1457 sdfSimple = new SimpleDateFormat("yyyyMMdd");
1446 1458 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -1450,11 +1462,17 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1450 1462 else if(statu.equals("1"))
1451 1463 modelMap.put("lpType", "路牌名");
1452 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 1472 listI.add(((List<Map<String, Object>>)modelMap.get("dataList")).iterator());
1454 1473 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1455 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 1476 } catch (Exception e) {
1459 1477 // TODO: handle exception
1460 1478 e.printStackTrace();
... ... @@ -2006,6 +2024,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2006 2024 }
2007 2025  
2008 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 2030 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
2010 2031 sdfSimple = new SimpleDateFormat("yyyyMMdd");
2011 2032 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -2015,8 +2036,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2015 2036 listI.add(resList.iterator());
2016 2037 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
2017 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 2042 } catch (Exception e) {
2021 2043 // TODO: handle exception
2022 2044 e.printStackTrace();
... ... @@ -2408,6 +2430,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2408 2430 public Map<String, Object> exportWaybillMore(Map<String, Object> map) {
2409 2431 String date = map.get("date").toString();
2410 2432 String line = map.get("line").toString();
  2433 + String lineName = map.get("lineName").toString();
2411 2434 ReportUtils ee = new ReportUtils();
2412 2435 List<List> strs = JSON.parseArray(map.get("strs").toString(), List.class);
2413 2436 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/export/";
... ... @@ -2417,7 +2440,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2417 2440 File file = null;
2418 2441 try {
2419 2442 while (true) {
2420   - String fileUrl = path + "行车路单" + sdfSimple.format(sdfMonth.parse(date));
  2443 + String fileUrl = path + sdfSimple.format(sdfMonth.parse(date))+"-"+lineName+"-行车路单";
2421 2444 // file = new File(fileUrl + (num == 0 ? "/" : "(" + num + ")/")); //新建文件夹
2422 2445 file = new File(fileUrl + (num == 0 ? ".xls" : "(" + num + ").xls")); //新建excel文件
2423 2446 if (file.exists()) { //判断是否已存在重名
... ... @@ -3009,19 +3032,28 @@ public class BusIntervalServiceImpl implements BusIntervalService {
3009 3032 }
3010 3033  
3011 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 3038 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
3013 3039 sdfSimple = new SimpleDateFormat("yyyyMMdd");
3014 3040 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
3015 3041 Map<String,Object> m = new HashMap<String, Object>();
3016 3042 ReportUtils ee = new ReportUtils();
3017 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 3051 listI.add(resList.iterator());
3019 3052 m.put("date1", startDate);
3020 3053 m.put("date2", endDate);
3021 3054 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
3022 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 3057 } catch (Exception e) {
3026 3058 // TODO: handle exception
3027 3059 e.printStackTrace();
... ... @@ -3058,18 +3090,28 @@ public class BusIntervalServiceImpl implements BusIntervalService {
3058 3090 }
3059 3091  
3060 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 3096 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
3062 3097 sdfSimple = new SimpleDateFormat("yyyyMMdd");
3063 3098 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
3064 3099 Map<String,Object> m = new HashMap<String, Object>();
3065 3100 ReportUtils ee = new ReportUtils();
3066 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 3109 listI.add(resList.iterator());
3068 3110 m.put("date1", startDate);
3069 3111 m.put("date2", endDate);
3070 3112 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
3071 3113 ee.excelReplace(listI, new Object[] { m }, path+"mould/onTime1.xls",
3072   - path+"export/发车到站准点率明细.xls");
  3114 + path+"export/"+dateTime+"-"+lineName+"-发车到站准点率明细.xls");
3073 3115 } catch (Exception e) {
3074 3116 // TODO: handle exception
3075 3117 e.printStackTrace();
... ... @@ -3093,18 +3135,29 @@ public class BusIntervalServiceImpl implements BusIntervalService {
3093 3135 }
3094 3136  
3095 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 3141 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
3097 3142 sdfSimple = new SimpleDateFormat("yyyyMMdd");
3098 3143 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
3099 3144 Map<String,Object> m = new HashMap<String, Object>();
3100 3145 ReportUtils ee = new ReportUtils();
3101 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 3154 listI.add(resList.iterator());
3103 3155 m.put("date", startDate);
3104 3156 m.put("line", line);
3105 3157 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
3106 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 3161 } catch (Exception e) {
3109 3162 // TODO: handle exception
3110 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 1047 m.put("fyyyhj", fyyyhj);
1048 1048 ReportUtils ee = new ReportUtils();
1049 1049 try {
  1050 + String lineName = "";
  1051 + if(map.containsKey("lineName"))
  1052 + lineName = map.get("lineName").toString();
1050 1053 listI.add(mapList.iterator());
1051 1054 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1052 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 1058 } catch (Exception e) {
1055 1059 // TODO: handle exception
1056 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 1232 }
1233 1233  
1234 1234 if (type != null && type.length() != 0 && type.equals("export")) {
  1235 + String lineName = BasicData.lineCode2NameMap.get(line);
1235 1236 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
1236 1237 sdfSimple = new SimpleDateFormat("yyyyMMdd");
1237 1238 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -1253,7 +1254,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1253 1254 listI.add(newList.iterator());
1254 1255 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
1255 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 1259 } catch (Exception e) {
1258 1260 // TODO: handle exception
1259 1261 e.printStackTrace();
... ... @@ -2086,7 +2088,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2086 2088 listI.add(listMap.iterator());
2087 2089 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
2088 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 2093 } catch (Exception e) {
2091 2094 // TODO: handle exception
2092 2095 e.printStackTrace();
... ... @@ -2853,10 +2856,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2853 2856 m.put("date", date+"至"+date2);
2854 2857 ReportUtils ee = new ReportUtils();
2855 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 2866 listI.add(lMap.iterator());
2857 2867 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
2858 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 2870 } catch (Exception e) {
2861 2871 // TODO: handle exception
2862 2872 //e.printStackTrace();
... ... @@ -4639,7 +4649,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4639 4649 sourcePath = path + "mould/scheduleDaily_m.xls";
4640 4650 }
4641 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 4653 } catch (Exception e) {
4644 4654 // TODO: handle exception
4645 4655 e.printStackTrace();
... ...
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -295,6 +295,7 @@ public class ReportServiceImpl implements ReportService{
295 295 }
296 296  
297 297 if (type != null && type.length() != 0 && type.equals("export_msg")) {
  298 + String lineName = BasicData.lineCode2NameMap.get(line);
298 299 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
299 300 sdfSimple = new SimpleDateFormat("yyyyMMdd");
300 301 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -316,7 +317,8 @@ public class ReportServiceImpl implements ReportService{
316 317 listI.add(newList.iterator());
317 318 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
318 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 322 } catch (Exception e) {
321 323 // TODO: handle exception
322 324 e.printStackTrace();
... ... @@ -2482,6 +2484,8 @@ public class ReportServiceImpl implements ReportService{
2482 2484 lMap.add(newMap);
2483 2485 }
2484 2486 if(type.equals("export")){
  2487 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  2488 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
2485 2489 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
2486 2490 Map<String, Object> m = new HashMap<String, Object>();
2487 2491 m.put("date", date);
... ... @@ -2495,10 +2499,17 @@ public class ReportServiceImpl implements ReportService{
2495 2499 }
2496 2500 ReportUtils ee = new ReportUtils();
2497 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 2509 listI.add(lMap.iterator());
2499 2510 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
2500 2511 ee.excelReplace(listI, new Object[]{m}, path + "mould/"+xls,
2501   - path + "export/线路公里统计表.xls");
  2512 + path + "export/"+dateTime+"-"+xlName+"-线路公里统计表.xls");
2502 2513 } catch (Exception e) {
2503 2514 // TODO: handle exception
2504 2515 e.printStackTrace();
... ... @@ -2962,6 +2973,8 @@ public class ReportServiceImpl implements ReportService{
2962 2973  
2963 2974 }
2964 2975 if(type.equals("export")){
  2976 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  2977 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
2965 2978 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
2966 2979 Map<String, Object> m = new HashMap<String, Object>();
2967 2980 m.put("date", date);
... ... @@ -2986,10 +2999,17 @@ public class ReportServiceImpl implements ReportService{
2986 2999 }
2987 3000 ReportUtils ee = new ReportUtils();
2988 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 3009 listI.add(lMap.iterator());
2990 3010 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
2991 3011 ee.excelReplace(listI, new Object[]{m}, path + "mould/"+xls,
2992   - path + "export/路单数据统计表.xls");
  3012 + path + "export/"+dateTime+"-"+xlName+"-路单数据统计表.xls");
2993 3013 } catch (Exception e) {
2994 3014 // TODO: handle exception
2995 3015 e.printStackTrace();
... ...
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
... ... @@ -293,6 +293,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
293 293 }
294 294  
295 295 if(type.equals("export")){
  296 + String lineName = "";
  297 + if(map.containsKey("lineName"))
  298 + lineName = map.get("lineName").toString();
296 299 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
297 300 sdfSimple = new SimpleDateFormat("yyyyMMdd");
298 301 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -302,7 +305,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
302 305 listI.add(resList.iterator());
303 306 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
304 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 310 } catch (Exception e) {
307 311 // TODO: handle exception
308 312 e.printStackTrace();
... ... @@ -323,7 +327,6 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
323 327 String line = map.get("line").toString();
324 328 String date = map.get("date").toString();
325 329 String type = map.get("type").toString();
326   - String lineName = "";
327 330  
328 331 if(date.length() == 0){
329 332 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
... ... @@ -333,13 +336,6 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
333 336  
334 337 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
335 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 339 String key = schedule.getXlName();
344 340 if(key == null || key.trim().equals("") || lineSet.contains(key))
345 341 continue;
... ... @@ -521,6 +517,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
521 517 }
522 518  
523 519 if(type.equals("export")){
  520 + String lineName = "";
  521 + if(map.containsKey("lineName"))
  522 + lineName = map.get("lineName").toString();
524 523 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
525 524 sdfSimple = new SimpleDateFormat("yyyyMMdd");
526 525 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -530,7 +529,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
530 529 listI.add(resList.iterator());
531 530 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
532 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 534 } catch (Exception e) {
535 535 // TODO: handle exception
536 536 e.printStackTrace();
... ... @@ -818,6 +818,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
818 818  
819 819 //导出
820 820 if(type.equals("export")){
  821 + String lineName = "";
  822 + if(map.containsKey("lineName"))
  823 + lineName = map.get("lineName").toString();
821 824 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
822 825 sdfSimple = new SimpleDateFormat("yyyyMMdd");
823 826 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -827,7 +830,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
827 830 listI.add(resList.iterator());
828 831 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
829 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 837 } catch (Exception e) {
832 838 // TODO: handle exception
833 839 e.printStackTrace();
... ... @@ -1118,16 +1124,26 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1118 1124  
1119 1125 //导出
1120 1126 if(type.equals("export")){
  1127 + String lineName_ = "";
  1128 + if(map.containsKey("lineName"))
  1129 + lineName_ = map.get("lineName").toString();
1121 1130 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
1122 1131 sdfSimple = new SimpleDateFormat("yyyyMMdd");
1123 1132 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
1124 1133 Map<String,Object> m = new HashMap<String, Object>();
1125 1134 ReportUtils ee = new ReportUtils();
1126 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 1143 listI.add(tempList.iterator());
1128 1144 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1129 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 1147 } catch (Exception e) {
1132 1148 // TODO: handle exception
1133 1149 e.printStackTrace();
... ... @@ -1378,6 +1394,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1378 1394 }
1379 1395  
1380 1396 if(type.equals("export")){
  1397 + String lineName = "";
  1398 + if(map.containsKey("lineName"))
  1399 + lineName = map.get("lineName").toString();
1381 1400 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
1382 1401 sdfSimple = new SimpleDateFormat("yyyyMMdd");
1383 1402 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -1387,7 +1406,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1387 1406 listI.add(resList.iterator());
1388 1407 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1389 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 1411 } catch (Exception e) {
1392 1412 // TODO: handle exception
1393 1413 e.printStackTrace();
... ... @@ -1731,10 +1751,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1731 1751 if(!type.equals("export"))
1732 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 1771 if(type.equals("export")){
1736   - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
1737   - sdfSimple = new SimpleDateFormat("yyyyMMdd");
1738 1772 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
1739 1773 Map<String,Object> m = new HashMap<String, Object>();
1740 1774 ReportUtils ee = new ReportUtils();
... ... @@ -1742,8 +1776,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1742 1776 listI.add(resList.iterator());
1743 1777 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1744 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 1780 } catch (Exception e) {
1748 1781 // TODO: handle exception
1749 1782 e.printStackTrace();
... ... @@ -1758,7 +1791,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1758 1791 listI.add(resList.iterator());
1759 1792 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1760 1793 ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_map.xls",
1761   - path+"export/线路首末班明细.xls");
  1794 + path+"export/" + dateTime + "-" + lineName + "-线路首末班明细.xls");
1762 1795 } catch (Exception e) {
1763 1796 // TODO: handle exception
1764 1797 e.printStackTrace();
... ... @@ -1773,7 +1806,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1773 1806 listI.add(resList.iterator());
1774 1807 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1775 1808 ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_delay.xls",
1776   - path+"export/首末班误点班次.xls");
  1809 + path+"export/" + dateTime + "-" + lineName + "-首末班误点班次.xls");
1777 1810 } catch (Exception e) {
1778 1811 // TODO: handle exception
1779 1812 e.printStackTrace();
... ... @@ -2016,11 +2049,23 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2016 2049 // TODO Auto-generated catch block
2017 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 2064 sql="SELECT sch,TIMESTAMP,reply46,reply47,reply46time,reply47time"
2021 2065 + " FROM bsth_v_directive_60 WHERE is_dispatch = 1 AND sch is not null"
2022 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 2070 List<Map<String, Object>> list2 = jdbcTemplate.query(sql,
2026 2071 new RowMapper<Map<String, Object>>(){
... ... @@ -2133,6 +2178,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2133 2178 }
2134 2179  
2135 2180 if(type.equals("export")){
  2181 + String lineName = "";
  2182 + if(map.containsKey("lineName"))
  2183 + lineName = map.get("lineName").toString();
2136 2184 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
2137 2185 sdfSimple = new SimpleDateFormat("yyyyMMdd");
2138 2186 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -2142,7 +2190,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2142 2190 listI.add(list_.iterator());
2143 2191 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
2144 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 2195 } catch (Exception e) {
2147 2196 // TODO: handle exception
2148 2197 e.printStackTrace();
... ... @@ -2195,11 +2244,23 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2195 2244 // TODO Auto-generated catch block
2196 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 2259 sql="SELECT sch,TIMESTAMP,reply46,reply47,reply46time,reply47time"
2200 2260 + " FROM bsth_v_directive_60 WHERE is_dispatch = 1 AND sch is not null"
2201 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 2265 List<Map<String, Object>> list2 = jdbcTemplate.query(sql,
2205 2266 new RowMapper<Map<String, Object>>(){
... ... @@ -2317,6 +2378,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2317 2378  
2318 2379  
2319 2380 if(type.equals("export")){
  2381 + String lineName = "";
  2382 + if(map.containsKey("lineName"))
  2383 + lineName = map.get("lineName").toString();
2320 2384 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
2321 2385 sdfSimple = new SimpleDateFormat("yyyyMMdd");
2322 2386 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -2327,7 +2391,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2327 2391 listI.add(list_.iterator());
2328 2392 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
2329 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 2396 } catch (Exception e) {
2332 2397 // TODO: handle exception
2333 2398 e.printStackTrace();
... ... @@ -2345,7 +2410,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2345 2410 String date = map.get("date").toString();
2346 2411 String jgh = map.get("jgh").toString();
2347 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 2417 String sql_="select * from bsth_c_s_sp_info_real "
2351 2418 + " WHERE schedule_date_str = '"+date+"' and j_gh = '"+jgh+"'";
... ... @@ -2417,6 +2484,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2417 2484 }
2418 2485  
2419 2486 if(type.equals("export")){
  2487 + String jName = map.get("jName").toString();
2420 2488 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
2421 2489 sdfSimple = new SimpleDateFormat("yyyyMMdd");
2422 2490 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -2426,7 +2494,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
2426 2494 listI.add(list_.iterator());
2427 2495 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
2428 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 2499 } catch (Exception e) {
2431 2500 // TODO: handle exception
2432 2501 e.printStackTrace();
... ...
src/main/resources/static/pages/calc/company/countBusMileage.html
... ... @@ -208,12 +208,14 @@
208 208 return;
209 209 }
210 210 line = $("#line").val();
211   - xlName = $("#select2-line-container").html();
212 211 date = $("#date").val();
213 212 date2 =$("#date2").val();
214 213 gsdm =$("#gsdm").val();
215 214 fgsdm=$("#fgsdm").val();
216 215 zt=$("#zt").val();
  216 + xlName = $("#select2-line-container").html();
  217 + if(xlName == "全部线路")
  218 + xlName = $('#fgsdm option:selected').text();
217 219 if(line=="请选择"){
218 220 line="";
219 221 }
... ... @@ -250,7 +252,7 @@
250 252 $("#export").on("click",function(){
251 253 var params = {};
252 254 params['gsdm'] = gsdm;
253   - params['fgsdm'] =fgsdm ;
  255 + params['fgsdm'] =fgsdm;
254 256 params['line'] = line;
255 257 params['date'] = date;
256 258 params['date2'] = date2;
... ... @@ -258,8 +260,18 @@
258 260 params['zt']=zt;
259 261 params['type'] = "export";
260 262 params['by']='gs';
  263 + var i = layer.load(2);
261 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 244 return;
245 245 }
246 246 line = $("#line").val();
247   - xlName = $("#select2-line-container").html();
248 247 date = $("#date").val();
249 248 date2 =$("#date2").val();
250 249 gsdm =$("#gsdm").val();
251 250 fgsdm=$("#fgsdm").val();
  251 + xlName = $("#select2-line-container").html();
  252 + if(xlName == "全部线路")
  253 + xlName = $('#fgsdm option:selected').text();
252 254 if(line=="请选择"){
253 255 line="";
254 256 }
... ... @@ -284,15 +286,25 @@
284 286 $("#export").on("click",function(){
285 287 var params = {};
286 288 params['gsdm'] = gsdm;
287   - params['fgsdm'] =fgsdm ;
  289 + params['fgsdm'] =fgsdm;
288 290 params['line'] = line;
289 291 params['date'] = date;
290 292 params['date2'] = date2;
291 293 params['xlName'] = xlName;
292 294 params['type'] = "export";
293 295 params['by']='gs';
  296 + var i = layer.load(2);
294 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 92 if (!$('body').hasClass('page-sidebar-closed'))
93 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 104 var d = new Date();
96   - d.setTime(d.getTime() - 1*1000*60*60*24);
97 105 var year = d.getFullYear();
98 106 var month = d.getMonth() + 1;
99 107 var day = d.getDate();
... ... @@ -101,19 +109,9 @@
101 109 month = "0" + month;
102 110 if(day < 10)
103 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 116 var fage=false;
119 117 var obj = [];
... ... @@ -210,12 +208,14 @@
210 208 return;
211 209 }
212 210 line = $("#line").val();
213   - xlName = $("#select2-line-container").html();
214 211 date = $("#date").val();
215 212 date2 =$("#date2").val();
216 213 gsdm =$("#gsdm").val();
217 214 fgsdm=$("#fgsdm").val();
218 215 zt=$("#zt").val();
  216 + xlName = $("#select2-line-container").html();
  217 + if(xlName == "全部线路")
  218 + xlName = $('#fgsdm option:selected').text();
219 219 if(line=="请选择"){
220 220 line="";
221 221 }
... ... @@ -252,7 +252,7 @@
252 252 $("#export").on("click",function(){
253 253 var params = {};
254 254 params['gsdm'] = gsdm;
255   - params['fgsdm'] =fgsdm ;
  255 + params['fgsdm'] =fgsdm;
256 256 params['line'] = line;
257 257 params['date'] = date;
258 258 params['date2'] = date2;
... ... @@ -260,8 +260,18 @@
260 260 params['zt']=zt;
261 261 params['type'] = "export";
262 262 params['by']='sj';
  263 + var i = layer.load(2);
263 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 129 if (!$('body').hasClass('page-sidebar-closed'))
130 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 141 var d = new Date();
133   - d.setTime(d.getTime() - 1*1000*60*60*24);
134 142 var year = d.getFullYear();
135 143 var month = d.getMonth() + 1;
136 144 var day = d.getDate();
... ... @@ -138,19 +146,9 @@
138 146 month = "0" + month;
139 147 if(day < 10)
140 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 153 var fage=false;
156 154 var obj = [];
... ... @@ -245,11 +243,13 @@
245 243 return;
246 244 }
247 245 line = $("#line").val();
248   - xlName = $("#select2-line-container").html();
249 246 date = $("#date").val();
250 247 date2 =$("#date2").val();
251 248 gsdm =$("#gsdm").val();
252 249 fgsdm=$("#fgsdm").val();
  250 + xlName = $("#select2-line-container").html();
  251 + if(xlName == "全部线路")
  252 + xlName = $('#fgsdm option:selected').text();
253 253 if(line=="请选择"){
254 254 line="";
255 255 }
... ... @@ -293,7 +293,15 @@
293 293 params['type'] = "export";
294 294 params['by']='sj';
295 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 224 $("#export").on("click",function(){
225 225 var type = "export";
226 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 137 $("#times1").attr("disabled", true);
138 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 140 var fage=false;
184 141 var xlList;
185 142 var obj = [];
... ... @@ -276,6 +233,7 @@
276 233 var times2 = $("#times2").val();
277 234 var company = $("#company").val();
278 235 var subCompany = $("#subCompany").val();
  236 + var lineName = $('#line option:selected').text();
279 237 function jsDoQuery(pagination){
280 238 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
281 239 layer.msg("请选择日期");
... ... @@ -294,6 +252,9 @@
294 252 times2 = $("#times2").val();
295 253 company = $("#company").val();
296 254 subCompany = $("#subCompany").val();
  255 + lineName = $('#line option:selected').text();
  256 + if(lineName == "全部线路")
  257 + lineName = $('#subCompany option:selected').text();
297 258 params['line'] = line;
298 259 params['sfqr'] = sfqr;
299 260 params['statu'] = statu;
... ... @@ -343,11 +304,18 @@
343 304 params['company'] = company;
344 305 params['subCompany'] = subCompany;
345 306 params['type'] = "export";
  307 + params['lineName'] = lineName;
346 308 var i = layer.load(2);
347 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 319 layer.close(i);
352 320 });
353 321 });
... ...
src/main/resources/static/pages/forms/statement/commandState.html
... ... @@ -266,6 +266,7 @@
266 266 var code = $("#code").val();
267 267 var company = $("#company").val();
268 268 var subCompany = $("#subCompany").val();
  269 + var lineName = $('#line option:selected').text();
269 270 function jsDoQuery(pagination){
270 271 $("#export").removeAttr("disabled");
271 272 if($("#date").val() == null || $("#date").val().trim().length == 0){
... ... @@ -280,6 +281,9 @@
280 281 code = $("#code").val();
281 282 company = $("#company").val();
282 283 subCompany = $("#subCompany").val();
  284 + lineName = $('#line option:selected').text();
  285 + if(lineName == "全部线路")
  286 + lineName = $('#subCompany option:selected').text();
283 287 params['line'] = line;
284 288 params['date'] = date;
285 289 params['code'] = code;
... ... @@ -287,31 +291,36 @@
287 291 params['company'] = company;
288 292 params['subCompany'] = subCompany;
289 293 $("#forms .hidden").removeClass("hidden");
  294 + var i = layer.load(2);
290 295 $get('/pcpc/commandState', params, function(result){
291 296 // 把数据填充到模版中
292 297 var tbodyHtml = template('list_commandState',{list:result});
293 298 // 把渲染好的模版html文本追加到表格中
294 299 $('#forms tbody').html(tbodyHtml);
  300 + layer.close(i);
295 301  
296 302 $('.btn-command').on('click', openCommandByLine);
297 303  
298 304 });
299 305 }
300 306  
301   - var xlbm="";
  307 + var xlbm="", lineName1="";
302 308 function openCommandByLine(){
303 309 var id = $(this).data('id');
304 310 date = $("#date").val();
305 311 xlbm=id;
  312 + lineName1 = $(this).html();
306 313 var params = {};
307 314 params['line'] = id;
308 315 params['date'] = date;
309 316 params['type'] = "query";
310 317 $("#works .hidden").removeClass("hidden");
311 318 $("#works_hidden").removeClass("hidden");
  319 + var i = layer.load(2);
312 320 $get('/pcpc/commandByLineList',params,function(result){
313 321 var commandByLine = template('list_workList',{list:result});
314 322 $('#works tbody').html(commandByLine);
  323 + layer.close(i);
315 324  
316 325 $('.btn-command-line').on('click', openCommand);
317 326 $("html,body").animate({scrollTop:$("#works").offset().top},1000);
... ... @@ -325,6 +334,8 @@
325 334 params['jgh'] = id;
326 335 params['date'] = date;
327 336 params['line'] =xlbm;
  337 + var jName = $(this).html();
  338 + params['jName'] = lineName1+"-"+jName.replace("/", "_");
328 339 $.get('/pages/forms/statement/commandStateByLine.html', function (content) {
329 340 layer.open({
330 341 type: 1,
... ... @@ -348,8 +359,13 @@
348 359 params['type'] = "export";
349 360 params['company'] = company;
350 361 params['subCompany'] = subCompany;
  362 + params['lineName'] = lineName;
  363 + var i = layer.load(2);
351 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 374 params['line'] = xlbm;
359 375 params['date'] = date;
360 376 params['type'] = "export";
  377 + params['lineName'] = lineName1;
  378 + var i = layer.load(2);
361 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 60 $('.menu-toggler.sidebar-toggler').click();
61 61 var params_;
62 62 $("#commandByLineList").on('init', function (e, params) {
63   - params['type']='export';
64 63 params_=params;
65   - console.log(params.date);
66 64 $get('/pcpc/commandByJghList',params,function(result){
67 65 var commandByLine = template('commandByLine',{list:result});
68 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 33 </div>
34 34 <div style="display: inline-block;margin-left: 15px;">
35 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 37 </div>
38 38 <div style="display: inline-block;margin-left: 15px;">
39 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 41 </div>
42 42 <div style="margin-top: 10px"></div>
43 43 <div style="display: inline-block;">
... ... @@ -97,20 +97,12 @@
97 97 $(function(){
98 98 $("#export").attr('disabled',"true");
99 99  
100   -
101 100 // 关闭左侧栏
102 101 if (!$('body').hasClass('page-sidebar-closed'))
103 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 104 var d = new Date();
  105 + d.setTime(d.getTime() - 1*1000*60*60*24);
114 106 var year = d.getFullYear();
115 107 var month = d.getMonth() + 1;
116 108 var day = d.getDate();
... ... @@ -118,8 +110,19 @@
118 110 month = "0" + month;
119 111 if(day < 10)
120 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 127 $.get('/report/lineList',function(xlList){
125 128 var data = [];
... ...
src/main/resources/static/pages/forms/statement/daily.html
... ... @@ -139,43 +139,8 @@
139 139 }
140 140 }
141 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 144 var tempData = {};
180 145 $.get('/report/lineList',function(xlList){
181 146 var data = [];
... ... @@ -218,17 +183,18 @@
218 183 var date;
219 184 var gsdmDaily;
220 185 var fgsdmDaily;
  186 + var lineName=$("#select2-line-container").html();
221 187 $("#query").on("click",function(){
222 188 if($("#date").val() == null || $("#date").val().trim().length == 0){
223 189 layer.msg("请选择时间");
224 190 return;
225 191 }
226 192 line = $("#line").val();
227   - var lineName=$("#select2-line-container").html();
228 193 date = $("#date").val();
229 194 gsdmDaily=$("#gsdmDaily").val();
230 195 fgsdmDaily = $("#fgsdmDaily").val();
231   -
  196 + lineName=$("#select2-line-container").html();
  197 + var i = layer.load(2);
232 198 $get('/mcy_forms/daily',{gsdmDaily:gsdmDaily,fgsdmDaily:fgsdmDaily, line:line,date:date,type:'query'},function(result){
233 199 $("#form_line").text(lineName);
234 200 $("#form_date").text(date);
... ... @@ -236,8 +202,9 @@
236 202 var tbodyHtml = template('dailyInfo',{list:result});
237 203 // 把渲染好的模版html文本追加到表格中
238 204 $('#tbody').html(tbodyHtml);
  205 + layer.close(i);
  206 +
239 207 line = $("#line").val();
240   -
241 208 startDate = $("#startDate").val();
242 209 endDate = $("#endDate").val();
243 210 $("#sDate").text(startDate);
... ... @@ -272,12 +239,20 @@
272 239 });
273 240  
274 241 $("#export").on("click",function(){
  242 + if($("#date").val() == null || $("#date").val().trim().length == 0){
  243 + layer.msg("请选择时间");
  244 + return;
  245 + }
275 246 line = $("#line").val();
276 247 date = $("#date").val();
277 248 gsdmDaily=$("#gsdmDaily").val();
278 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 229 var subCompany = $("#subCompany").val();
230 230 var line = $("#line").val();
231 231 var date = $("#date").val();
  232 + var lineName = $('#line option:selected').text();
232 233 function jsDoQuery(pagination){
233 234 if($("#date").val() == null || $("#date").val().trim().length == 0){
234 235 layer.msg("请选择时间!");
... ... @@ -239,6 +240,9 @@
239 240 subCompany = $("#subCompany").val();
240 241 line = $("#line").val();
241 242 date = $("#date").val();
  243 + lineName = $('#line option:selected').text();
  244 + if(lineName == "全部线路")
  245 + lineName = $('#subCompany option:selected').text();
242 246 if(line == " ")
243 247 line = "";
244 248 params['company'] = company;
... ... @@ -247,11 +251,13 @@
247 251 params['date'] = date;
248 252 params['type'] = "query";
249 253 $(".hidden").removeClass("hidden");
  254 + var i = layer.load(2);
250 255 $get('/pcpc/firstAndLastBus', params, function(result){
251 256 // 把数据填充到模版中
252 257 var tbodyHtml = template('list_firstAndLastBus',{list:result});
253 258 // 把渲染好的模版html文本追加到表格中
254 259 $('#forms tbody').html(tbodyHtml);
  260 + layer.close(i);
255 261  
256 262 if(result.length == 0)
257 263 $("#export").attr('disabled',"true");
... ... @@ -271,8 +277,13 @@
271 277 params['line'] = line;
272 278 params['date'] = date;
273 279 params['type'] = "export";
  280 + params['lineName'] = lineName;
  281 + var i = layer.load(2);
274 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 191 var line = $("#line").val();
192 192 var startDate = $("#startDate").val();
193 193 var endDate = $("#endDate").val();
  194 + var lineName = $('#line option:selected').text();
194 195 function jsDoQuery(pagination){
195 196 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
196 197 layer.msg("请选择时间!");
... ... @@ -207,6 +208,9 @@
207 208 line = $("#line").val();
208 209 startDate = $("#startDate").val();
209 210 endDate = $("#endDate").val();
  211 + lineName = $('#line option:selected').text();
  212 + if(lineName == "全部线路")
  213 + lineName = $('#subCompany option:selected').text();
210 214 if(line == " ")
211 215 line = "";
212 216 params['company'] = company;
... ... @@ -240,14 +244,6 @@
240 244 }
241 245  
242 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 247 var i = layer.load(2);
252 248 var params = {};
253 249 company = $("#company").val();
... ... @@ -263,8 +259,17 @@
263 259 params['startDate'] = startDate;
264 260 params['endDate'] = endDate;
265 261 params['type'] = "delay_export";
  262 + params['lineName'] = lineName;
266 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 273 layer.close(i);
269 274 });
270 275 });
... ...
src/main/resources/static/pages/forms/statement/firstAndLastBus_sum.html
... ... @@ -240,12 +240,14 @@
240 240  
241 241 var list;
242 242 var tempLine;
  243 + var lineName1;
243 244 $("#forms tbody").on("click","a",function(){
244 245 var index = $(this).parent().parent().index();
245 246 if(index < list.length - 1){
246 247 $.each(list, function(i, g){
247 248 if(index == i){
248 249 tempLine = g.xlbm;
  250 + lineName1 = g.line;
249 251 var tbodyHtml = template('list_maps',{list:g.map});
250 252 $('#map tbody').html(tbodyHtml);
251 253 $("#sumMap tr").addClass("hidden");
... ... @@ -264,7 +266,8 @@
264 266 $("#map tr").addClass("hidden");
265 267 $("#exportMap").addClass("hidden");
266 268 $("#sumMap .hidden").removeClass("hidden");
267   - $("#exportSumMap").removeClass("hidden");
  269 + if(g.map.length > 0)
  270 + $("#exportSumMap").removeClass("hidden");
268 271 $("html,body").animate({scrollTop:$("#sumMap").offset().top},1000);
269 272 }
270 273 });
... ... @@ -278,6 +281,7 @@
278 281 var line = $("#line").val();
279 282 var startDate = $("#startDate").val();
280 283 var endDate = $("#endDate").val();
  284 + var lineName = $('#line option:selected').text();
281 285 function jsDoQuery(pagination){
282 286 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
283 287 layer.msg("请选择时间!");
... ... @@ -293,6 +297,9 @@
293 297 line = $("#line").val();
294 298 startDate = $("#startDate").val();
295 299 endDate = $("#endDate").val();
  300 + lineName = $('#line option:selected').text();
  301 + if(lineName == "全部线路")
  302 + lineName = $('#subCompany option:selected').text();
296 303 if(line == " ")
297 304 line = "";
298 305 params['company'] = company;
... ... @@ -331,22 +338,23 @@
331 338 params['startDate'] = startDate;
332 339 params['endDate'] = endDate;
333 340 params['type'] = "export";
  341 + params['lineName'] = lineName;
334 342 var i = layer.load(2);
335 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 353 layer.close(i);
338 354 });
339 355 });
340 356  
341 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 358 var i = layer.load(2);
351 359 var params = {};
352 360 params['company'] = company;
... ... @@ -355,21 +363,22 @@
355 363 params['startDate'] = startDate;
356 364 params['endDate'] = endDate;
357 365 params['type'] = "exportMap";
  366 + params['lineName'] = lineName1;
358 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 377 layer.close(i);
361 378 });
362 379 });
363 380  
364 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 382 var i = layer.load(2);
374 383 var params = {};
375 384 params['company'] = company;
... ... @@ -378,8 +387,17 @@
378 387 params['startDate'] = startDate;
379 388 params['endDate'] = endDate;
380 389 params['type'] = "delay_export";
  390 + params['lineName'] = lineName;
381 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 401 layer.close(i);
384 402 });
385 403 });
... ...
src/main/resources/static/pages/forms/statement/historyMessage.html
... ... @@ -21,20 +21,20 @@
21 21 <h1>调度历史消息</h1>
22 22 </div>
23 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 34 <div style="display: inline-block;margin-left: 15px;">
35 35 <span class="item-label" style="width: 80px;">时间: </span>
36 36 <input class="form-control" type="text" id="date" style="width: 180px;"/>
37   - </div>
  37 + </div>
38 38 <div style="display: inline-block;margin-left: 15px">
39 39 <span class="item-label" style="width: 140px;">内部编码: </span>
40 40 <select class="form-control" name="code" id="code" style="width: 180px;"></select>
... ... @@ -42,10 +42,10 @@
42 42 <div class="form-group">
43 43 <input class="btn btn-default" type="button" id="query" value="筛选"/>
44 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 49 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px;">
50 50 <table class="table table-bordered table-hover table-checkable" id="forms">
51 51 <thead>
... ... @@ -62,23 +62,23 @@
62 62  
63 63 </tbody>
64 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 72 $(function(){
73 73 $('#export').attr('disabled', "true");
74   -
75   - // 关闭左侧栏
76   - if (!$('body').hasClass('page-sidebar-closed'))
  74 +
  75 + // 关闭左侧栏
  76 + if (!$('body').hasClass('page-sidebar-closed'))
77 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 84 $.get('/report/lineList',function(xlList){
... ... @@ -146,6 +146,7 @@
146 146 var line = $("#line").val();
147 147 var date = $("#date").val();
148 148 var code = $("#code").val();
  149 + var lineName = $('#line option:selected').text();
149 150 $("#query").on("click",function(){
150 151 if($("#date").val() == null || $("#date").val().trim().length == 0){
151 152 layer.msg("请选择时间");
... ... @@ -154,13 +155,16 @@
154 155 line = $("#line").val();
155 156 date = $("#date").val();
156 157 code = $("#code").val();
  158 + lineName = $('#line option:selected').text();
157 159 var type = "query";
158 160 $(".hidden").removeClass("hidden");
  161 + var i = layer.load(2);
159 162 $get('/realSchedule/historyMessage',{line:line,date:date,code:code,type:type},function(result){
160 163 // 把数据填充到模版中
161 164 var tbodyHtml = template('list_history',{list:result});
162 165 // 把渲染好的模版html文本追加到表格中
163 166 $('#forms tbody').html(tbodyHtml);
  167 + layer.close(i);
164 168  
165 169 if(result.length == 0)
166 170 $("#export").attr('disabled',"true");
... ... @@ -172,27 +176,31 @@
172 176  
173 177 $("#export").on("click",function(){
174 178 var type = "export";
  179 + var i = layer.load(2);
175 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 193 <td>{{i+1}}</td>
186 194 <td>{{obj[4]}}</td>
187 195 <td>{{obj[0]}}</td>
188 196 <td>{{obj[1]}}</td>
189 197 <td>{{obj[3]}}</td>
190 198 <td>{{obj[2]}}</td>
191   - </tr>
  199 + </tr>
192 200 {{/each}}
193 201 {{if list.length == 0}}
194 202 <tr>
195 203 <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td>
196 204 </tr>
197   - {{/if}}
  205 + {{/if}}
198 206 </script>
199 207 \ No newline at end of file
... ...
src/main/resources/static/pages/forms/statement/jobSummary.html
... ... @@ -254,6 +254,7 @@
254 254 }else{
255 255 $("#xlid").html(lineName);
256 256 $("#dateid").html(date);
  257 + var i = layer.load(2);
257 258 $get('/report/jobFwqk',{line:line,date:date},function(result){
258 259 console.log(result);
259 260 var list_lbqk = template('list_lbqk',{list:result});
... ... @@ -263,6 +264,7 @@
263 264 $('#forms .list_lbqk').rowspan(1);
264 265 $('#forms .list_lbqk').rowspan(2);
265 266 $('#forms .list_lbqk').rowspan(3);
  267 + layer.close(i);
266 268  
267 269 })
268 270  
... ... @@ -270,6 +272,7 @@
270 272 var list_ljqk = template('list_ljqk',{list:result});
271 273 // 把渲染好的模版html文本追加到表格中
272 274 $('#forms .list_ljqk').html(list_ljqk);
  275 + layer.close(i);
273 276 })
274 277  
275 278 $get('/report/jobHzxx',{line:line,date:date},function(result){
... ... @@ -282,6 +285,7 @@
282 285 $("#lbgls").html(result.lbgl)
283 286 var list_xxsj=template('list_xxsj',result);
284 287 $('#forms .list_xxsj').html(list_xxsj);
  288 + layer.close(i);
285 289  
286 290 })
287 291  
... ... @@ -298,8 +302,12 @@
298 302 }else if(date==""||date==null){
299 303 layer.msg('请选择日期.');
300 304 }else{
  305 + var i = layer.load(2);
301 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 119 if (!$('body').hasClass('page-sidebar-closed'))
120 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 122 $("#times1").datetimepicker({
131 123 format : 'HH:mm',
132 124 locale : 'zh-cn'
... ... @@ -137,6 +129,7 @@
137 129 });
138 130  
139 131 var d = new Date();
  132 + d.setTime(d.getTime() - 1*1000*60*60*24);
140 133 var year = d.getFullYear();
141 134 var month = d.getMonth() + 1;
142 135 var day = d.getDate();
... ... @@ -144,8 +137,19 @@
144 137 month = "0" + month;
145 138 if(day < 10)
146 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 154 $("#times1").val("05:00");
151 155 $("#times2").val("23:00");
... ... @@ -308,6 +312,7 @@
308 312 var times = $("#times1").val() + "-" + $("#times2").val();
309 313 var company = $("#company").val();
310 314 var subCompany = $("#subCompany").val();
  315 + var lineName = $('#line option:selected').text();
311 316 function jsDoQuery(pagination){
312 317 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
313 318 layer.msg("请选择日期");
... ... @@ -337,12 +342,18 @@
337 342 params['company'] = company;
338 343 params['subCompany'] = subCompany;
339 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 349 // $(".hidden").removeClass("hidden");
341 350 $get('/busInterval/lbStatuAnaly', params, function(result){
342 351 // 把数据填充到模版中
343 352 var tbodyHtml = template('list_lbAnaly',{list:result, reason:reason, lb:lb});
344 353 // 把渲染好的模版html文本追加到表格中
345 354 $('#forms').html(tbodyHtml);
  355 + layer.close(i);
  356 +
346 357 _w_table_rowspan("#forms", 1);
347 358 _w_table_rowspan("#forms", 2);
348 359 _w_table_rowspan("#forms", 3);
... ... @@ -381,10 +392,14 @@
381 392 params['company'] = company;
382 393 params['subCompany'] = subCompany;
383 394 params['type'] = "export";
  395 + params['lineName'] = lineName;
  396 + var i = layer.load(2);
384 397 $get('/busInterval/lbStatuAnaly', params, function(result){
385   - window.open("/downloadFile/download?fileName=烂班情况分析表"
  398 + window.open("/downloadFile/download?fileName="
386 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 206 $("#times1").val("05:00");
207 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 209 var fage=false;
264 210 var xlList;
265 211 var obj = [];
... ...
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
... ... @@ -183,6 +183,7 @@
183 183 var date = $("#date").val();
184 184 var company = $("#company").val();
185 185 var subCompany = $("#subCompany").val();
  186 + var lineName = $('#line option:selected').text();
186 187 function jsDoQuery(pagination){
187 188 if($("#date").val() == null || $("#date").val().trim().length == 0){
188 189 layer.msg("请选择时间");
... ... @@ -193,6 +194,9 @@
193 194 subCompany = $("#subCompany").val();
194 195 line = $("#line").val();
195 196 date = $("#date").val();
  197 + lineName = $('#line option:selected').text();
  198 + if(lineName == "全部线路")
  199 + lineName = $('#subCompany option:selected').text();
196 200 if(line == " ")
197 201 line = "";
198 202 params['company'] = company;
... ... @@ -221,8 +225,11 @@
221 225 params['line'] = line;
222 226 params['date'] = date;
223 227 params['type'] = "export";
  228 + params['lineName'] = lineName;
224 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 226 var bcType = $('#bcType').val();
227 227 var company = $("#company").val();
228 228 var subCompany = $("#subCompany").val();
  229 + var lineName = $('#line option:selected').text();
229 230 function jsDoQuery(pagination){
230 231 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
231 232 layer.msg("请选择时间范围!");
... ... @@ -243,6 +244,9 @@
243 244 bcType = $("#bcType").val();
244 245 company = $("#company").val();
245 246 subCompany = $("#subCompany").val();
  247 + lineName = $('#line option:selected').text();
  248 + if(lineName == "全部线路")
  249 + lineName = $('#subCompany option:selected').text();
246 250 params['page'] = page;
247 251 params['line'] = line;
248 252 params['startDate'] = startDate;
... ... @@ -298,9 +302,13 @@
298 302 params['subCompany'] = subCompany;
299 303 params['bcType'] = bcType;
300 304 params['type'] = "export";
  305 + params['lineName'] = lineName;
301 306 var i = layer.load(2);
302 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 312 layer.close(i);
305 313 });
306 314 });
... ...
src/main/resources/static/pages/forms/statement/scheduleAnaly_sum.html
... ... @@ -113,17 +113,9 @@
113 113 if (!$('body').hasClass('page-sidebar-closed'))
114 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 117 var d = new Date();
  118 + d.setTime(d.getTime() - 1*1000*60*60*24);
127 119 var year = d.getFullYear();
128 120 var month = d.getMonth() + 1;
129 121 var day = d.getDate();
... ... @@ -131,8 +123,19 @@
131 123 month = "0" + month;
132 124 if(day < 10)
133 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 140 var fage=false;
138 141 var xlList;
... ... @@ -226,6 +229,7 @@
226 229 var nbbm = "";
227 230 var company = $("#company").val();
228 231 var subCompany = $("#subCompany").val();
  232 + var lineName = $('#line option:selected').text();
229 233 function jsDoQuery(pagination){
230 234 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
231 235 layer.msg("请选择时间范围!");
... ... @@ -244,6 +248,9 @@
244 248 nbbm = $("#nbbm").val()!=null?$("#nbbm").val():"";
245 249 company = $("#company").val();
246 250 subCompany = $("#subCompany").val();
  251 + lineName = $('#line option:selected').text();
  252 + if(lineName == "全部线路")
  253 + lineName = $('#subCompany option:selected').text();
247 254 params['page'] = page;
248 255 params['line'] = line;
249 256 params['startDate'] = startDate;
... ... @@ -255,11 +262,13 @@
255 262 params['nbbm'] = nbbm;
256 263 params['type'] = "query";
257 264 $(".hidden").removeClass("hidden");
  265 + var i = layer.load(2);
258 266 $get('/pcpc/scheduleAnaly_sum', params, function(result){
259 267 // 把数据填充到模版中
260 268 var tbodyHtml = template('list_scheduleAnaly_sum',{list:result.dataList, companyName:companyName, subCompanyName:subCompanyName});
261 269 // 把渲染好的模版html文本追加到表格中
262 270 $('#forms tbody').html(tbodyHtml);
  271 + layer.close(i);
263 272  
264 273 if(result.dataList.length == 0)
265 274 $("#export").attr('disabled',"true");
... ... @@ -289,8 +298,19 @@
289 298 params['subCompany'] = subCompany;
290 299 params['nbbm'] = nbbm;
291 300 params['type'] = "export";
  301 + params['lineName'] = lineName;
  302 + var i = layer.load(2);
292 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 431 // $("#ddrbBody").height($(window).height()-300);
432 432 $("c").html("全日");
433 433 $("#export").removeAttr("disabled");
  434 + var i = layer.load(2);
434 435 $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"query"},function(result){
435 436 var scheduleDaily_1 = template('scheduleDaily_1',{list:result});
436 437 $("#jls").html(result[0].jls);
... ... @@ -452,6 +453,7 @@
452 453 divFrom1 = window.document.getElementById('forms');
453 454 divFrom3 = window.document.getElementById('forms_2');
454 455 divFrom3.style.width=divFrom1.offsetWidth+"px";
  456 + layer.close(i);
455 457 });
456 458  
457 459 });
... ... @@ -492,9 +494,9 @@
492 494 params['state'] = '2';
493 495 $get('/realSchedule/scheduleDailyExport', params, function(result){
494 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 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 148 // 关闭左侧栏
149 149 if (!$('body').hasClass('page-sidebar-closed'))
150 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 152 var d = new Date();
  153 + d.setTime(d.getTime() - 1*1000*60*60*24);
162 154 var year = d.getFullYear();
163 155 var month = d.getMonth() + 1;
164 156 var day = d.getDate();
... ... @@ -166,9 +158,20 @@
166 158 month = "0" + month;
167 159 if(day < 10)
168 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 176 var fage=false;
174 177 var obj = [];
... ... @@ -264,11 +267,13 @@
264 267 }
265 268 // $("#tjrbBody").height($(window).height()-100);
266 269 line = $("#line").val();
267   - xlName = $("#select2-line-container").html();
268 270 date = $("#date").val();
269 271 date2 =$("#date2").val();
270 272 gsdm =$("#gsdm").val();
271 273 fgsdm=$("#fgsdm").val();
  274 + xlName = $("#select2-line-container").html();
  275 + if(xlName == "全部线路")
  276 + xlName = $('#fgsdm option:selected').text();
272 277 if(line=="请选择"){
273 278 line="";
274 279 }
... ... @@ -284,11 +289,13 @@
284 289 params['date2'] = date2;
285 290 params['xlName'] = xlName;
286 291 params['type'] = "query";
  292 + var i = layer.load(2);
287 293 $get('/realSchedule/statisticsDailyTj',params,function(result){
288 294 // 把数据填充到模版中
289 295 var tbodyHtml = template('statisticsDaily',{list:result});
290 296 // 把渲染好的模版html文本追加到表格中
291 297 $('#forms .statisticsDaily').html(tbodyHtml);
  298 + layer.close(i);
292 299  
293 300 if(result.length == 0)
294 301 $("#export").attr('disabled',"true");
... ... @@ -302,14 +309,24 @@
302 309 $("#export").on("click",function(){
303 310 var params = {};
304 311 params['gsdm'] = gsdm;
305   - params['fgsdm'] =fgsdm ;
  312 + params['fgsdm'] =fgsdm;
306 313 params['line'] = line;
307 314 params['date'] = date;
308 315 params['date2'] = date2;
309 316 params['xlName'] = xlName;
310 317 params['type'] = "export";
  318 + var i = layer.load(2);
311 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 375 <td>{{obj.djg_m}}</td>
359 376 <td>{{obj.djg_a}}</td>
360 377 <td>{{obj.djg_time}}</td>
361   - <td>&nbsp;</td>
  378 + <td>&nbsp;</td>
362 379 </tr>
363 380 {{/each}}
364 381 {{if list.length == 0}}
... ...
src/main/resources/static/pages/forms/statement/statisticsDailyCalc.html
... ... @@ -267,11 +267,13 @@
267 267 }
268 268 // $("#tjrbBody").height($(window).height()-100);
269 269 line = $("#line").val();
270   - xlName = $("#select2-line-container").html();
271 270 date = $("#date").val();
272 271 date2 =$("#date2").val();
273 272 gsdm =$("#gsdm").val();
274 273 fgsdm=$("#fgsdm").val();
  274 + xlName = $("#select2-line-container").html();
  275 + if(xlName == "全部线路")
  276 + xlName = $('#fgsdm option:selected').text();
275 277 if(line=="请选择"){
276 278 line="";
277 279 }
... ... @@ -314,9 +316,19 @@
314 316 params['date2'] = date2;
315 317 params['xlName'] = xlName;
316 318 params['type'] = "export";
  319 + var i = layer.load(2);
317 320 // $get('/realSchedule/statisticsDailyTj',params,function(result){
318 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 267 }
268 268 // $("#tjrbBody").height($(window).height()-100);
269 269 line = $("#line").val();
270   - xlName = $("#select2-line-container").html();
271 270 date = $("#date").val();
272 271 date2 =$("#date2").val();
273 272 gsdm =$("#gsdm").val();
274 273 fgsdm=$("#fgsdm").val();
  274 + xlName = $("#select2-line-container").html();
  275 + if(xlName == "全部线路")
  276 + xlName = $('#fgsdm option:selected').text();
275 277 if(line=="请选择"){
276 278 line="";
277 279 }
... ... @@ -314,9 +316,19 @@
314 316 params['date2'] = date2;
315 317 params['xlName'] = xlName;
316 318 params['type'] = "export";
  319 + var i = layer.load(2);
317 320 // $get('/realSchedule/statisticsDailyTj',params,function(result){
318 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 159 $("#times1").attr("disabled", true);
160 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 162 var fage=false;
206 163 var xlList;
207 164 var obj = [];
... ... @@ -301,6 +258,7 @@
301 258 var company = $("#company").val();
302 259 var subCompany = $("#subCompany").val();
303 260 var lp = $("#lp").val();
  261 + var lineName = $('#line option:selected').text();
304 262 function jsDoQuery(pagination){
305 263 if($("#startDate").val().trim().length == 0 || $("#endDate").val().trim().length == 0){
306 264 layer.msg("请选择日期");
... ... @@ -320,6 +278,9 @@
320 278 company = $("#company").val();
321 279 subCompany = $("#subCompany").val();
322 280 lp = $("#lp").val();
  281 + lineName = $('#line option:selected').text();
  282 + if(lineName == "全部线路")
  283 + lineName = $('#subCompany option:selected').text();
323 284 params['lp'] = lp;
324 285 params['line'] = line;
325 286 params['sfqr'] = sfqr;
... ... @@ -394,11 +355,17 @@
394 355 params['company'] = company;
395 356 params['subCompany'] = subCompany;
396 357 params['type'] = "export";
  358 + params['lineName'] = lineName;
397 359 var i = layer.load(2);
398 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 369 layer.close(i);
403 370 });
404 371 });
... ...
src/main/resources/static/pages/forms/statement/waybill.html
... ... @@ -227,10 +227,12 @@
227 227 });
228 228 var date = '';
229 229 var line = '';
  230 + var lineName;
230 231 $("#query").on("click",function(){
231 232 $("#left_height").height($(window).height()-100);
232 233 line = $("#line").val();
233 234 date = $("#date").val();
  235 + lineName = $('#line option:selected').text();
234 236 $(".hidden").removeClass("hidden");
235 237 $get('/realSchedule/queryUserInfo',{line:line,date:date,state:2},function(result){
236 238 // 把数据填充到模版中
... ... @@ -363,7 +365,7 @@
363 365 });
364 366 // $get('/realSchedule/exportWaybillMore',{date:date,line:line,strs:JSON.stringify(param)},function(result){
365 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 369 window.open("/downloadFile/download?fileName="+result.fileName);
368 370 layer.close(i);
369 371 });
... ...
src/main/resources/static/pages/forms/statement/workDaily.html
... ... @@ -116,7 +116,7 @@
116 116 var xlList;
117 117 var obj = [];
118 118  
119   -
  119 +
120 120 $.get('/report/lineList',function(result){
121 121 xlList=result;
122 122 $.get('/user/companyData', function(result){
... ... @@ -198,6 +198,7 @@
198 198 var date = $("#date").val();
199 199 var company = $("#company").val();
200 200 var subCompany = $("#subCompany").val();
  201 + var lineName = $('#line option:selected').text();
201 202 function jsDoQuery(pagination){
202 203 if($("#date").val() == null || $("#date").val().trim().length == 0){
203 204 layer.msg("请选择时间");
... ... @@ -208,6 +209,9 @@
208 209 date = $("#date").val();
209 210 company = $("#company").val();
210 211 subCompany = $("#subCompany").val();
  212 + lineName = $('#line option:selected').text();
  213 + if(lineName == "全部线路")
  214 + lineName = $('#subCompany option:selected').text();
211 215 if(line == " ")
212 216 line = "";
213 217 params['line'] = line;
... ... @@ -216,11 +220,13 @@
216 220 params['company'] = company;
217 221 params['subCompany'] = subCompany;
218 222 $(".hidden").removeClass("hidden");
  223 + var i = layer.load(2);
219 224 $get('/pcpc/workDaily', params, function(result){
220 225 // 把数据填充到模版中
221 226 var tbodyHtml = template('list_workDaily',{list:result});
222 227 // 把渲染好的模版html文本追加到表格中
223 228 $('#forms tbody').html(tbodyHtml);
  229 + layer.close(i);
224 230  
225 231 if(result.length == 0)
226 232 $("#export").attr('disabled',"true");
... ... @@ -236,8 +242,11 @@
236 242 params['type'] = "export";
237 243 params['company'] = company;
238 244 params['subCompany'] = subCompany;
  245 + params['lineName'] = lineName;
239 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 137 if (!$('body').hasClass('page-sidebar-closed'))
138 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 150 $("#startDate,#endDate").datetimepicker({
141 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 157 var fage=false;
146 158 var xlList;
... ... @@ -233,6 +245,7 @@
233 245 var gsdmChange= $("#gsdmChange").val();
234 246 var fgsdmChange= $("#fgsdmChange").val();
235 247 if (startDate1 != '' && endDate1 != '') {
  248 + var i = layer.load(2);
236 249 $get('/mcy_forms/changetochange', {
237 250 sel : sel,
238 251 line : line,
... ... @@ -248,6 +261,7 @@
248 261 });
249 262 // 把渲染好的模版html文本追加到表格中
250 263 $('#forms tbody').html(tbodyHtml);
  264 + layer.close(i);
251 265 })
252 266  
253 267 } else {
... ... @@ -258,12 +272,17 @@
258 272 $("#export").on(
259 273 "click",
260 274 function() {
  275 + line = $("#line").val();
261 276 var sel = $("#sel").val();
262 277 var startDate = $("#startDate").val();
263 278 var endDate = $("#endDate").val();
264 279 var lpName = $("#lpName").val();
265 280 var gsdmChange= $("#gsdmChange").val();
266 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 286 $post('/mcy_export/changetochangeExport', {
268 287 sel:sel,
269 288 line:line,
... ... @@ -271,10 +290,19 @@
271 290 fgsdmChange:fgsdmChange,
272 291 startDate : startDate,
273 292 endDate : endDate,
274   - type : 'export'
  293 + type : 'export',
  294 + lineName : lineName
275 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 202 var lpName = $("#lpName").val();
203 203 var gsdmOperat = $("#gsdmOperat").val();
204 204 var fgsdmOperat = $("#fgsdmOperat").val();
  205 + var i = layer.load(2);
205 206 $get("/mcy_forms/operationservice", {
206 207 gsdmOperat : gsdmOperat,
207 208 fgsdmOperat : fgsdmOperat,
... ... @@ -230,6 +231,7 @@
230 231 });
231 232 // 把渲染好的模版html文本追加到表格中
232 233 $('#forms tbody').html(operationservice);
  234 + layer.close(i);
233 235  
234 236 });
235 237 });
... ... @@ -239,30 +241,43 @@
239 241 endDate=$("#endDate").val();
240 242 gsdmOperat=$("#gsdmOperat").val();
241 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 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 267 <tr>
253   - <td>{{i+1}}</td>
  268 + <td>{{i+1}}</td>
254 269 <td>{{obj.xlName}}</td>
255 270 <td>{{obj.jzl}}</td>
256 271 <td>{{obj.xhl}}</td>
257 272 <td>{{obj.xsgl}}</td>
258 273 <td>{{obj.emptMileage}}</td>
259 274 <td>{{obj.sjbc}}</td>
260   - </tr>
  275 + </tr>
261 276 {{/each}}
262 277 {{if list.length == 0}}
263 278 <tr>
264 279 <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
265 280 </tr>
266   - {{/if}}
  281 + {{/if}}
267 282 </script>
268 283 </script>
269 284 \ No newline at end of file
... ...
src/main/resources/static/pages/mforms/shifdays/shifday.html
... ... @@ -218,6 +218,7 @@ $(function(){
218 218 if(date=="" || date ==null){
219 219 layer.msg('请选择日期.');
220 220 }else{
  221 + var i = layer.load(2);
221 222 $get('/mcy_forms/shifday',params,function(result){
222 223 if(type=="desc"){
223 224 type ="asc";
... ... @@ -231,6 +232,7 @@ $(function(){
231 232 var tbodyHtml = template('shifday',{list:result});
232 233 // 把渲染好的模版html文本追加到表格中
233 234 $('#forms tbody').html(tbodyHtml);
  235 + layer.close(i);
234 236 });
235 237 }
236 238 })
... ... @@ -250,6 +252,7 @@ $(function(){
250 252 if(date=="" || date ==null){
251 253 layer.msg('请选择日期.');
252 254 }else{
  255 + var i = layer.load(2);
253 256 $get('/mcy_forms/shifday',params,function(result){
254 257 if(type=="desc"){
255 258 type ="asc";
... ... @@ -263,6 +266,7 @@ $(function(){
263 266 var tbodyHtml = template('shifday',{list:result});
264 267 // 把渲染好的模版html文本追加到表格中
265 268 $('#forms tbody').html(tbodyHtml);
  269 + layer.close(i);
266 270 });
267 271 }
268 272 })
... ... @@ -282,6 +286,7 @@ $(function(){
282 286 if(date=="" || date ==null){
283 287 layer.msg('请选择日期.');
284 288 }else{
  289 + var i = layer.load(2);
285 290 $get('/mcy_forms/shifday',params,function(result){
286 291 type ='asc';
287 292 $.each(result, function(i, obj) {
... ... @@ -291,6 +296,7 @@ $(function(){
291 296 var tbodyHtml = template('shifday',{list:result});
292 297 // 把渲染好的模版html文本追加到表格中
293 298 $('#forms tbody').html(tbodyHtml);
  299 + layer.close(i);
294 300 });
295 301 }
296 302 });
... ... @@ -299,15 +305,19 @@ $(function(){
299 305 var line = $("#line").val();
300 306 var date = $("#date").val();
301 307 var gsdmShif = $("#gsdmShif").val();
302   - var fgsdmShif = $("#fgsdmShif").val();
  308 + var fgsdmShif = $("#fgsdmShif").val();
  309 + var lineName = $('#line option:selected').text();
303 310 var params = {};
304 311 params.fgsdmShif =fgsdmShif;
305 312 params.date =date;
306 313 params.gsdmShif =gsdmShif;
307 314 params.line =line;
308 315 params.type='export';
  316 + params.lineName =lineName;
309 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 99 if (!$('body').hasClass('page-sidebar-closed'))
100 100 $('.menu-toggler.sidebar-toggler').click();
101 101  
102   - $("#startDate,#endDate").datetimepicker({
103   - format : 'YYYY-MM-DD',
104   - locale : 'zh-cn'
105   - });
106 102 var d = new Date();
  103 + d.setTime(d.getTime() - 1*1000*60*60*24);
107 104 var year = d.getFullYear();
108 105 var month = d.getMonth() + 1;
109 106 var day = d.getDate();
... ... @@ -111,6 +108,12 @@
111 108 month = "0" + month;
112 109 if(day < 10)
113 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 117 $("#startDate,#endDate").val(year + "-" + month + "-" + day);
115 118  
116 119 var fage=false;
... ... @@ -207,6 +210,7 @@
207 210 params.lpName = $("#lpName").val();
208 211 params.gsdmManth= $("#gsdmManth").val();
209 212 params.fgsdmManth= $("#fgsdmManth").val();
  213 + var i = layer.load(2);
210 214 $get("/mcy_forms/shiftuehiclemanth",params,function(result){
211 215 $("#sDate").text(startDate);
212 216 $("#eDate").text(endDate);
... ... @@ -223,11 +227,15 @@
223 227 var list_shiftuehiclemanth = template('list_shiftuehiclemanth',{list:result});
224 228 // 把渲染好的模版html文本追加到表格中
225 229 $('#forms tbody').html(list_shiftuehiclemanth);
  230 + layer.close(i);
226 231  
227 232 });
228 233 });
229 234  
230 235 $("#export").on("click",function(){
  236 + var lineName = $('#line option:selected').text();
  237 + var startDate = $("#startDate").val();
  238 + var endDate = $("#endDate").val();
231 239 var params={};
232 240 params.empnames=$("#empnames").val();
233 241 params.line = $("#line").val();
... ... @@ -236,9 +244,20 @@
236 244 params.lpName = $("#lpName").val();
237 245 params.gsdmManth= $("#gsdmManth").val();
238 246 params.fgsdmManth= $("#fgsdmManth").val();
  247 + params.lineName = lineName;
239 248 params.type='export';
  249 + var i = layer.load(2);
240 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 226 var gsdmSing = $("#gsdmSing").val();
227 227 var fgsdmSing = $("#fgsdmSing").val();
228 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 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 240 // }else{
234 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 119 if (!$('body').hasClass('page-sidebar-closed'))
120 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 123 var d = new Date();
  124 + d.setTime(d.getTime() - 1*1000*60*60*24);
128 125 var year = d.getFullYear();
129 126 var month = d.getMonth() + 1;
130 127 var day = d.getDate();
... ... @@ -132,8 +129,14 @@
132 129 month = "0" + month;
133 130 if(day < 10)
134 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 141 var fage=false;
139 142 var xlList;
... ... @@ -224,6 +227,7 @@
224 227 gsdmTurn=$("#gsdmTurn").val();
225 228 fgsdmTurn=$("#fgsdmTurn").val();
226 229 if(startDate!=''&&endDate!=''){
  230 + var i = layer.load(2);
227 231 $post('/mcy_forms/turnoutrate',
228 232 { gsdmTurn:gsdmTurn,fgsdmTurn:fgsdmTurn, line:line,startDate:startDate,endDate:endDate,type:'query'},function(result){
229 233 // var result=[];
... ... @@ -231,6 +235,8 @@
231 235 var tbodyHtml = template('turnoutrate',{list:result});
232 236 // 把渲染好的模版html文本追加到表格中
233 237 $('#tbody').html(tbodyHtml);
  238 + layer.close(i);
  239 +
234 240 line = $("#line").val();
235 241 startDate = $("#startDate").val();
236 242 endDate = $("#endDate").val();
... ... @@ -291,8 +297,21 @@
291 297 endDate=$("#endDate").val();
292 298 gsdmTurn=$("#gsdmTurn").val();
293 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 178 date = $("#date").val();
179 179 // gsdmVehic = $("#gsdmVehic").val();
180 180 // fgsdmVehic = $("#fgsdmVehic").val();
  181 + var i = layer.load(2);
181 182 $get('/mcy_forms/vehicleloading',{line:line,data:date},function(result){
182 183 // 把数据填充到模版中
183 184 var tbodyHtml = template('vehicleloading',{list:result});
184 185 // 把渲染好的模版html文本追加到表格中
185 186 $('#forms tbody').html(tbodyHtml);
  187 + layer.close(i);
186 188 });
187 189 });
188 190  
... ... @@ -191,8 +193,13 @@
191 193 date = $("#date").val();
192 194 gsdmVehic = $("#gsdmVehic").val();
193 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 183 if(date=="" || date ==null){
184 184 layer.msg('请选择日期.');
185 185 }else{
  186 + var i = layer.load(2);
186 187 $post('/mcy_forms/waybillday',{line:line,date:date,type:'query'},function(result){
187 188 $.each(result, function(i, obj) {
188 189 obj.requestType = reqCodeMap[obj.requestType];
... ... @@ -191,6 +192,7 @@
191 192 var tbodyHtml = template('waybillday',{list:result});
192 193 // 把渲染好的模版html文本追加到表格中
193 194 $('#forms tbody').html(tbodyHtml);
  195 + layer.close(i);
194 196 });
195 197 }
196 198 });
... ... @@ -198,10 +200,13 @@
198 200 $("#export").on("click",function(){
199 201 line = $("#line").val();
200 202 date = $("#date").val();
  203 + lineName = $('#line option:selected').text();
201 204 gsdmWaybillday=$("#gsdmWaybillday").val();
202 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 75 });
76 76 });
77 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 78 var date = no.split("_")[0];
87 79 var endDate = date;
88 80 var line = no.split("_")[1];
89 81 var fgs=$('#fgsdm').val();
90 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 262 var endDate = $("#endDate").val();
263 263 var fgs=$('#fgsdm').val();
264 264 var gs=$('#gsdm').val();
  265 + var lineName = $('#line option:selected').text();
  266 + if(lineName == "全部线路")
  267 + lineName = $('#subCompany option:selected').text();
265 268 var i = layer.load(2);
266 269 $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs},function(result){
267 270 var onTime = template('onTime',{list:result});
... ... @@ -277,9 +280,12 @@
277 280 $("#export").removeAttr("disabled");
278 281 });
279 282 });
  283 +
280 284 var line1;
  285 + var lineName1;
281 286 function showSheetList(){
282 287 line1 = $(this).data('id');
  288 + lineName1 = $(this).parent().parent().children()[2].innerHTML;
283 289 var date = $("#date").val();
284 290 var endDate = $("#endDate").val();
285 291 var fgs=$('#fgsdm').val();
... ... @@ -320,44 +326,45 @@
320 326 });
321 327 }
322 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 329 var line = $("#line").val();
332 330 var date = $("#date").val();
333 331 var endDate = $("#endDate").val();
334 332 var fgs=$('#fgsdm').val();
335 333 var gs=$('#gsdm').val();
  334 + var lineName = $('#line option:selected').text();
  335 + if(lineName == "全部线路")
  336 + lineName = $('#fgsdm option:selected').text();
336 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 348 layer.close(i);
340 349 });
341 350 })
342 351  
343 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 353 var date = $("#date").val();
355 354 var endDate = $("#endDate").val();
356 355 var fgs=$('#fgsdm').val();
357 356 var gs=$('#gsdm').val();
358 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 368 layer.close(i);
362 369 });
363 370 });
... ...
src/main/resources/static/pages/report/countMileage/countBus/company/countBusMileage.html
... ... @@ -208,12 +208,14 @@
208 208 return;
209 209 }
210 210 line = $("#line").val();
211   - xlName = $("#select2-line-container").html();
212 211 date = $("#date").val();
213 212 date2 =$("#date2").val();
214 213 gsdm =$("#gsdm").val();
215 214 fgsdm=$("#fgsdm").val();
216 215 zt=$("#zt").val();
  216 + xlName = $("#select2-line-container").html();
  217 + if(xlName == "全部线路")
  218 + xlName = $('#fgsdm option:selected').text();
217 219 if(line=="请选择"){
218 220 line="";
219 221 }
... ... @@ -250,7 +252,7 @@
250 252 $("#export").on("click",function(){
251 253 var params = {};
252 254 params['gsdm'] = gsdm;
253   - params['fgsdm'] =fgsdm ;
  255 + params['fgsdm'] =fgsdm;
254 256 params['line'] = line;
255 257 params['date'] = date;
256 258 params['date2'] = date2;
... ... @@ -259,7 +261,15 @@
259 261 params['type'] = "export";
260 262 params['by']='gs';
261 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 208 return;
209 209 }
210 210 line = $("#line").val();
211   - xlName = $("#select2-line-container").html();
212 211 date = $("#date").val();
213 212 date2 =$("#date2").val();
214 213 gsdm =$("#gsdm").val();
215 214 fgsdm=$("#fgsdm").val();
216 215 zt=$("#zt").val();
  216 + xlName = $("#select2-line-container").html();
  217 + if(xlName == "全部线路")
  218 + xlName = $('#fgsdm option:selected').text();
217 219 if(line=="请选择"){
218 220 line="";
219 221 }
... ... @@ -222,7 +224,7 @@
222 224 }else{
223 225 var params = {};
224 226 params['gsdm'] = gsdm;
225   - params['fgsdm'] =fgsdm ;
  227 + params['fgsdm'] =fgsdm;
226 228 params['line'] = line;
227 229 params['date'] = date;
228 230 params['date2'] = date2;
... ... @@ -250,7 +252,7 @@
250 252 $("#export").on("click",function(){
251 253 var params = {};
252 254 params['gsdm'] = gsdm;
253   - params['fgsdm'] =fgsdm ;
  255 + params['fgsdm'] =fgsdm;
254 256 params['line'] = line;
255 257 params['date'] = date;
256 258 params['date2'] = date2;
... ... @@ -258,8 +260,18 @@
258 260 params['zt']=zt;
259 261 params['type'] = "export";
260 262 params['by']='sj';
  263 + var i = layer.load(2);
261 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 244 return;
245 245 }
246 246 line = $("#line").val();
247   - xlName = $("#select2-line-container").html();
248 247 date = $("#date").val();
249 248 date2 =$("#date2").val();
250 249 gsdm =$("#gsdm").val();
251 250 fgsdm=$("#fgsdm").val();
  251 + xlName = $("#select2-line-container").html();
  252 + if(xlName == "全部线路")
  253 + xlName = $('#fgsdm option:selected').text();
252 254 if(line=="请选择"){
253 255 line="";
254 256 }
... ... @@ -257,7 +259,7 @@
257 259 }else{
258 260 var params = {};
259 261 params['gsdm'] = gsdm;
260   - params['fgsdm'] =fgsdm ;
  262 + params['fgsdm'] =fgsdm;
261 263 params['line'] = line;
262 264 params['date'] = date;
263 265 params['date2'] = date2;
... ... @@ -291,8 +293,18 @@
291 293 params['xlName'] = xlName;
292 294 params['type'] = "export";
293 295 params['by']='gs';
  296 + var i = layer.load(2);
294 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 243 return;
244 244 }
245 245 line = $("#line").val();
246   - xlName = $("#select2-line-container").html();
247 246 date = $("#date").val();
248 247 date2 =$("#date2").val();
249 248 gsdm =$("#gsdm").val();
250 249 fgsdm=$("#fgsdm").val();
  250 + xlName = $("#select2-line-container").html();
  251 + if(xlName == "全部线路")
  252 + xlName = $('#fgsdm option:selected').text();
251 253 if(line=="请选择"){
252 254 line="";
253 255 }
... ... @@ -264,8 +266,8 @@
264 266 params['type'] = "query";
265 267 var i = layer.load(2);
266 268 $get('/report/countLineMileage',params,function(result){
267   - $("#datetodate").html(date+"至"+date2);
268 269 layer.close(i);
  270 + $("#datetodate").html(date+"至"+date2);
269 271 // 把数据填充到模版中
270 272 var tbodyHtml = template('countLineListSj',{list:result});
271 273 // 把渲染好的模版html文本追加到表格中
... ... @@ -290,8 +292,18 @@
290 292 params['xlName'] = xlName;
291 293 params['type'] = "export";
292 294 params['by']='sj';
  295 + var i = layer.load(2);
293 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 479 var nbbm=$("#nbbm").val();
480 480 var fcsj=$("#fcsj_xx").val();
481 481 var ddsj=$("#ddsj_xx").val();
  482 + var pzh=$('#nbbm option:selected').text();
482 483 if(fcsj==""){
483 484 layer.msg("没数据");
484 485 }else{
485 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 498 var line=$("#line").val();
496 499 var zdlx=$("#zdlx").val();
497 500 var zd=$("#zd").val();
  501 + var lineName = $('#line option:selected').text();
498 502 if(date1=="" || date1==null){
499 503 layer.msg("请选择时间");
500 504 }else if( line=="" || line==null){
... ... @@ -505,7 +509,16 @@
505 509 layer.msg("请选择方向");
506 510 }else{
507 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 179 });
180 180  
181 181 var date = '';
182   - var line = $("#line").val();
  182 + var line = $("#line").val();
  183 + var lineName = $('#line option:selected').text();
183 184 $("#query").on("click",function(){
184 185 if($("#date").val() == null || $("#date").val().trim().length == 0){
185 186 layer.msg("请选择时间!");
... ... @@ -216,6 +217,7 @@
216 217 jName = params[1];
217 218 line = $("#line").val();
218 219 date = $("#date").val();
  220 + lineName = $('#line option:selected').text();
219 221 var obj = $(this);
220 222 $get('/report/historyMessageList',{line:line,date:date,code:jName,type:"query"},function(result){
221 223 var list_history_msg = template('list_history_msg',{list:result});
... ... @@ -238,7 +240,8 @@
238 240  
239 241 $("#export").on("click",function(){
240 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 214 var date = $("#date").val();
215 215 var gsdm = $("#gsdm").val();
216 216 var fgsdm = $("#fgsdm").val();
  217 + var i = layer.load(2);
217 218 $get('/ylb/oilListMonth',{line:line,date:date,gsdm:gsdm,fgsdm,fgsdm,type:'query'},function(result){
218 219 var oilListMonth = template('oilListMonth',{list:result});
219 220 $('#forms tbody').html(oilListMonth);
  221 + layer.close(i);
220 222 });
221 223 });
222 224  
... ... @@ -230,8 +232,13 @@
230 232 var date = $("#date").val();
231 233 var gsdm = $("#gsdm").val();
232 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 });
... ...