Преглед изворни кода

不同的报表所产生的文件存放在不同的文件夹下

sunyj пре 9 година
родитељ
комит
10afb16bdd
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/main/java/com/uas/report/controller/PrintController.java

+ 2 - 2
src/main/java/com/uas/report/controller/PrintController.java

@@ -119,7 +119,7 @@ public class PrintController {
 
 		byte[] data = null;
 
-		String filePath = ReportConstants.GENERATED_FILES_PATH
+		String filePath = ReportConstants.GENERATED_FILES_PATH + reportName + "/"
 				+ printService.generateFileName(userName, reportName, whereCondition, otherParameters);
 		if (exportFileType.equals("xls_with_only_data")) {
 			filePath += ".xls";
@@ -201,7 +201,7 @@ public class PrintController {
 		Map<String, Object> result = null;
 
 		// 相对路径,返回给前端
-		String pdfPath = ReportConstants.GENERATED_FILES_PATH
+		String pdfPath = ReportConstants.GENERATED_FILES_PATH + reportName + "/"
 				+ printService.generateFileName(userName, reportName, whereCondition, otherParameters) + ".pdf";
 		File file = new File(PathUtils.getAppPath() + pdfPath);
 		// 文件无效(不存在或过期),重新创建pdf文件