Commit c991b060f9f2b7e0466a29c70e0731a2a24d51c9

Authored by 娄高锋
1 parent d29c6740

update

src/main/java/com/bsth/controller/forms/ExportController.java
@@ -87,6 +87,7 @@ public class ExportController { @@ -87,6 +87,7 @@ public class ExportController {
87 public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map) { 87 public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map) {
88 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); 88 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
89 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 89 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  90 + Map<String, Object> map2 = new HashMap<String, Object>();
90 ReportUtils ee = new ReportUtils(); 91 ReportUtils ee = new ReportUtils();
91 List<Shifday> shifday = formsService.shifday(map); 92 List<Shifday> shifday = formsService.shifday(map);
92 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 93 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
@@ -110,11 +111,15 @@ public class ExportController { @@ -110,11 +111,15 @@ public class ExportController {
110 m.put("sjbc", l.getSjbc()); 111 m.put("sjbc", l.getSjbc());
111 resList.add(m); 112 resList.add(m);
112 } 113 }
  114 + if(resList.size() > 0){
  115 + map2 = resList.get(resList.size() - 1);
  116 + resList.remove(map2);
  117 + }
113 118
114 try { 119 try {
115 listI.add(resList.iterator()); 120 listI.add(resList.iterator());
116 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; 121 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
117 - ee.excelReplace(listI, new Object[] { map }, path + "mould/shifday.xls", 122 + ee.excelReplace(listI, new Object[] { map2 }, path + "mould/shifday.xls",
118 path + "export/班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls"); 123 path + "export/班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
119 } catch (Exception e) { 124 } catch (Exception e) {
120 e.printStackTrace(); 125 e.printStackTrace();
src/main/resources/static/pages/forms/mould/shifday.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
@@ -309,9 +309,6 @@ @@ -309,9 +309,6 @@
309 layer.msg("请选择时间"); 309 layer.msg("请选择时间");
310 return; 310 return;
311 } 311 }
312 - if($("#table").height() > $(window).height() - 110){  
313 - $("#table").height($(window).height()-110);  
314 - }  
315 var reason = $("input[name='reason']"); 312 var reason = $("input[name='reason']");
316 var params = {}; 313 var params = {};
317 if(line == " ") 314 if(line == " ")
@@ -348,7 +345,12 @@ @@ -348,7 +345,12 @@
348 $('#export').attr('disabled', "true"); 345 $('#export').attr('disabled', "true");
349 else 346 else
350 $("#export").removeAttr("disabled"); 347 $("#export").removeAttr("disabled");
351 - 348 +
  349 + if($("#forms").height()+70 > $(window).height()-110){
  350 + $("#table").height($(window).height()-110);
  351 + } else {
  352 + $("#table").height($("#forms").height()+70);
  353 + }
352 }); 354 });
353 } 355 }
354 356