Index: ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java =================================================================== diff -u -r33105 -r33106 --- ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 33105) +++ ssts-reports/src/main/java/com/forgon/disinfectsystem/jasperreports/action/JasperreportsAction.java (.../JasperreportsAction.java) (revision 33106) @@ -303,7 +303,9 @@ setRightPadding(jasperPrintForPrint, reportName); session.setAttribute("jasperPrintForPrint", jasperPrintForPrint); String fileName = (String) (parametMap.get("title")==null?"未命名":parametMap.get("title")); - session.setAttribute("fileName", fileName); + String appointFileName = (String) (parametMap.get("appointFileName")==null?"":parametMap.get("appointFileName")); + session.setAttribute("fileName", fileName); + session.setAttribute("appointFileName", appointFileName); } catch (Exception e) { e.printStackTrace(); } @@ -1958,7 +1960,7 @@ String endDate = StrutsParamUtils.getPraramValue("endTimeSearch", null); String tousseBarcode = StrutsParamUtils.getPraramValue("tousseBarcode", null); // 任务组 - String taskGroups = StrutsParamUtils.getPraramValue("taskGroups", null); + String taskGroups = StrutsParamUtils.getPraramValue("taskGroups", ""); // 器械包类型 String tousseTypes = StrutsParamUtils.getPraramValue("tousseTypes", null); // 器械包分组 @@ -1994,11 +1996,15 @@ paramObj.put("startDate", startDate); paramObj.put("endDate", endDate); String taskGroupTitle = ""; + String appointFileName = ""; if(StringUtils.isNotBlank(taskGroups)){ taskGroupTitle = "(" + taskGroups +")"; + String taskGroupsStr = taskGroups.replaceAll(",", "、"); + appointFileName = String.format("装配记录("+ taskGroupsStr +",%s)", titleDate); }else{ - + appointFileName = String.format("装配记录(%s)", titleDate); } + parametMap.put("appointFileName", appointFileName); parametMap.put("title", "装配记录" + taskGroupTitle); parametMap.put("titleDate", titleDate); List resultList = jasperReportManager.packingRecordReportDate(paramObj); Index: ssts-web/src/main/webapp/jasperRtp/exportReport.jsp =================================================================== diff -u -r32414 -r33106 --- ssts-web/src/main/webapp/jasperRtp/exportReport.jsp (.../exportReport.jsp) (revision 32414) +++ ssts-web/src/main/webapp/jasperRtp/exportReport.jsp (.../exportReport.jsp) (revision 33106) @@ -24,7 +24,16 @@ outputStream = response.getOutputStream(); response.setContentType("application/x-download"); response.setCharacterEncoding("UTF-8"); - response.setHeader("Content-Disposition", "attachment;filename="+URLEncoder.encode(session.getAttribute("fileName")+".xlsx", "UTF-8")); + String appointFileName = (String)session.getAttribute("appointFileName"); + if(appointFileName == null){ + appointFileName = ""; + } + if(appointFileName == ""){ + response.setHeader("Content-Disposition", "attachment;filename="+URLEncoder.encode(session.getAttribute("fileName") + appointFileName +".xlsx", "UTF-8")); + }else{ + response.setHeader("Content-Disposition", "attachment;filename="+URLEncoder.encode(appointFileName +".xlsx", "UTF-8")); + } + }catch (IOException e) { //e.printStackTrace(); }catch(IllegalStateException e){