Commit 5e75991dae3600c1773e6c8a625a5e84360e2597

Authored by 娄高锋
1 parent 6e357b38

统一导出的excel表名

src/main/java/com/bsth/controller/report/ReportController.java
... ... @@ -53,6 +53,7 @@ public class ReportController {
53 53 Map<String, Object> m = new HashMap<String, Object>();
54 54 m.put("i", i);
55 55 m.put("nbbm", a.getNbbm());
  56 + m.put("pzh", a.getPzh());
56 57 m.put("stopName", a.getStopName());
57 58 m.put("jzsj", a.getJzsj());
58 59 m.put("czsj", a.getCzsj());
... ... @@ -118,8 +119,7 @@ public class ReportController {
118 119 @RequestParam String zdlx,@RequestParam String fcsj,@RequestParam String ddsj){
119 120 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
120 121 ReportUtils ee = new ReportUtils();
121   -// List<ArrivalInfo> list=service.queryListClzd(line,zd,zdlx,fcsj,ddsj);
122   - List<ArrivalInfo> list = new ArrayList<ArrivalInfo>();
  122 + List<ArrivalInfo> list=service.queryListClzd(line,zd,zdlx,fcsj,ddsj);
123 123 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
124 124 int i=1;
125 125 for (ArrivalInfo a:list ) {
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -2226,10 +2226,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2226 2226 tempList.add(tempMap);
2227 2227 }
2228 2228 try {
  2229 + String dateTime = sdfSimple.format(sdfMonth.parse(date));
  2230 + String lineName = BasicData.lineCode2NameMap.get(line);
2229 2231 listI.add(tempList.iterator());
2230 2232 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
2231 2233 ee.excelReplace(listI, new Object[]{m}, path + "mould/correctForm.xls",
2232   - path + "export/修正报表" + date+ ".xls");
  2234 + path + "export/" + dateTime + "-" + lineName + "-修正报表.xls");
2233 2235 } catch (Exception e) {
2234 2236 // TODO: handle exception
2235 2237 e.printStackTrace();
... ...
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -229,7 +229,7 @@ public class ReportServiceImpl implements ReportService{
229 229  
230 230  
231 231 public List<ArrivalInfo> load2(String line,Long date1,Long date2,Date dates1,Date dates2,String zd,String zdlx,String fcsj){
232   - List<ArrivalInfo> list = null;
  232 + List<ArrivalInfo> list = new ArrayList<ArrivalInfo>();
233 233 Calendar cal = Calendar.getInstance();
234 234 cal.setTime(dates1);
235 235 //周数,表分区字段
... ...
src/main/resources/static/pages/forms/statement/correctForm.html
... ... @@ -249,9 +249,9 @@
249 249 /* var list_correctForm_statistics = template('list_correctForm_statistics',temp);
250 250 $('#forms .list_correctForm_statistics').html(list_correctForm_statistics); */
251 251  
252   - if(result.length == 0)
253   - $("#export").attr('disabled',"true");
254   - else
  252 +// if(result.length == 0)
  253 +// $("#export").attr('disabled',"true");
  254 +// else
255 255 $("#export").removeAttr("disabled");
256 256  
257 257 });
... ... @@ -260,7 +260,10 @@
260 260 $("#export").on("click",function(){
261 261 var type = "export";
262 262 $get('/realSchedule/correctForm',{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type,changType:changType},function(result){
263   - window.open("/downloadFile/download?fileName=修正报表"+date);
  263 +
  264 + window.open("/downloadFile/download?fileName="
  265 + +moment(date).format("YYYYMMDD")
  266 + +"-"+date+"-修正报表");
264 267 });
265 268 });
266 269  
... ...
src/main/resources/static/pages/report/inoutstation.html
... ... @@ -485,7 +485,7 @@
485 485 }else{
486 486 $get('/report/exportQueryListZdxx',{clzbh:nbbm,date:rq,line:line,fcsj:fcsj,ddsj:ddsj},function(result){
487 487 window.open("/downloadFile/download?fileName="
488   - +moment(date).format("YYYYMMDD")
  488 + +moment(rq).format("YYYYMMDD")
489 489 +"-"+pzh+"-班次到离站");
490 490 });
491 491 }
... ...