Commit 5bfe7ebdd112fd07abadb59c21e71c401f350694
1 parent
3a8d00c6
修复 修正报表 选择区间日期后导出报错的问题
Showing
2 changed files
with
8 additions
and
5 deletions
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -2234,6 +2234,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2234 | 2234 | } |
| 2235 | 2235 | try { |
| 2236 | 2236 | String dateTime = sdfSimple.format(sdfMonth.parse(date)); |
| 2237 | + if(!endDate.equals(date)){ | |
| 2238 | + dateTime += "-" + sdfSimple.format(sdfMonth.parse(endDate)); | |
| 2239 | + } | |
| 2237 | 2240 | String lineName = BasicData.lineCode2NameMap.get(line); |
| 2238 | 2241 | listI.add(tempList.iterator()); |
| 2239 | 2242 | String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ... | ... |
src/main/resources/static/pages/forms/statement/correctForm.html
| ... | ... | @@ -265,12 +265,12 @@ |
| 265 | 265 | var type = "export"; |
| 266 | 266 | $get('/realSchedule/correctForm',{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type,changType:changType},function(result){ |
| 267 | 267 | var dateTime = ""; |
| 268 | -// if(date == endDate){ | |
| 268 | + if(date == endDate){ | |
| 269 | 269 | dateTime = moment(date).format("YYYYMMDD"); |
| 270 | -// } else { | |
| 271 | -// dateTime = moment(date).format("YYYYMMDD")+"-"+ | |
| 272 | -// moment(endDate).format("YYYYMMDD"); | |
| 273 | -// } | |
| 270 | + } else { | |
| 271 | + dateTime = moment(date).format("YYYYMMDD")+"-"+ | |
| 272 | + moment(endDate).format("YYYYMMDD"); | |
| 273 | + } | |
| 274 | 274 | window.open("/downloadFile/download?fileName=" |
| 275 | 275 | +dateTime+"-"+lineName+"-修正报表"); |
| 276 | 276 | }); | ... | ... |