diff --git a/platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java b/platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java index 85bfa76..7c92ccb 100644 --- a/platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java +++ b/platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java @@ -287,7 +287,7 @@ public class ExcelUtil } - public static void writeWhSieveExclFile(String filePath,OutputStream out,List> values,String date) { + public static void writeWhSieveExclFile(String filePath,OutputStream out,List> values,String titleName) { File file = new File(filePath); InputStream in = null; Workbook wb = null; @@ -305,7 +305,7 @@ public class ExcelUtil contentFormt.setVerticalAlignment(VerticalAlignment.CENTRE); - Label label = new Label(0, 0, "ssss",contentFormt); + Label label = new Label(0, 0, titleName,contentFormt); ws.addCell(label); int arrayIndex = 0; diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java index 2fc51f5..b68cddd 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java @@ -1584,14 +1584,16 @@ public class SieveFacade { List currentUserHospPermissions = areaCountFacade.getCurrentUserHospPermissions(userId, cqSieveQueryRequest.getProvinceId(), cqSieveQueryRequest.getCityId(), cqSieveQueryRequest.getAreaId()); String[] dates = null; + String titleName = "孕妇产前筛查和诊断情况月报表"; if (StringUtils.isNotEmpty(cqSieveQueryRequest.getTime())) { dates = cqSieveQueryRequest.getTime().split(" - "); + titleName+=cqSieveQueryRequest.getTime(); } List> list = getSieveDatas(currentUserHospPermissions,dates,cqSieveQueryRequest.getCityId()); response.setContentType("application/force-download"); response.setHeader("Content-Disposition", "attachment;filename=" + new String(("孕妇产前筛查和诊断情况月报表.xls").getBytes("UTF-8"), "ISO-8859-1")); String path = this.getClass().getResource("/").getPath()+ "whfy_sieve.xls"; - ExcelUtil.writeWhSieveExclFile(path, response.getOutputStream(), list,cqSieveQueryRequest.getTime()); + ExcelUtil.writeWhSieveExclFile(path, response.getOutputStream(), list,titleName); } catch (Exception e) { ExceptionUtils.catchException(e, "exportSieveReportExcl error");