Commit 7c9978b258ef8fba4efb7467b1a17d1aeaa4f361
Merge branch 'minhang' of http://222.66.0.204:8090//panzhaov5/bsth_control into minhang
Showing
2 changed files
with
7 additions
and
4 deletions
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -4197,6 +4197,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 4197 | 4197 | |
| 4198 | 4198 | |
| 4199 | 4199 | if (type.equals("export")) { |
| 4200 | + String lineName = map.get("lineName").toString(); | |
| 4200 | 4201 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 4201 | 4202 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| 4202 | 4203 | Map<String, Object> m = new HashMap<String, Object>(); |
| ... | ... | @@ -4214,7 +4215,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 4214 | 4215 | sourcePath = path + "mould/scheduleDaily_m.xls"; |
| 4215 | 4216 | } |
| 4216 | 4217 | ee.excelReplace(listI, new Object[]{nMap}, sourcePath, |
| 4217 | - path + "export/调度日报" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | |
| 4218 | + path + "export/调度日报-"+ lineName + "-" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | |
| 4218 | 4219 | } catch (Exception e) { |
| 4219 | 4220 | // TODO: handle exception |
| 4220 | 4221 | e.printStackTrace(); | ... | ... |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| ... | ... | @@ -47,8 +47,8 @@ |
| 47 | 47 | <span class="item-label" style="width: 80px;margin-left: 33px;">线路: </span> |
| 48 | 48 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 49 | 49 | </div> |
| 50 | - <div style="display: inline-block;margin-left: 24px;"> | |
| 51 | - <span class="item-label" style="width: 80px;"> 时间: </span> | |
| 50 | + <div style="display: inline-block;margin-left: 38px;"> | |
| 51 | + <span class="item-label" style="width: 80px;">时间: </span> | |
| 52 | 52 | <input class="form-control" type="text" id="date" style="width: 180px;"/> |
| 53 | 53 | </div> |
| 54 | 54 | <div class="form-group"> |
| ... | ... | @@ -481,14 +481,16 @@ |
| 481 | 481 | layer.msg("请选择时间"); |
| 482 | 482 | return; |
| 483 | 483 | } |
| 484 | + var lineName = $('#line option:selected').text(); | |
| 484 | 485 | params['line'] = line; |
| 486 | + params['lineName'] = lineName; | |
| 485 | 487 | params['date'] = date; |
| 486 | 488 | params['xlName'] = xlName; |
| 487 | 489 | params['type'] = "export"; |
| 488 | 490 | params['state'] = '2'; |
| 489 | 491 | $get('/realSchedule/scheduleDailyExport', params, function(result){ |
| 490 | 492 | if(date.length == 10) |
| 491 | - window.open("/downloadFile/download?fileName=调度日报"+moment(date).format("YYYYMMDD")); | |
| 493 | + window.open("/downloadFile/download?fileName=调度日报-"+lineName+"-"+moment(date).format("YYYYMMDD")); | |
| 492 | 494 | else |
| 493 | 495 | window.open("/downloadFile/download?fileName=调度日报"+moment(date).format("YYYYMM")); |
| 494 | 496 | }); | ... | ... |