소스 검색

生产文件路径修改

yue 5 년 전
부모
커밋
78dc37608c
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/main/java/com/jeeplus/modules/sg/information/web/InformationController.java

+ 3 - 2
src/main/java/com/jeeplus/modules/sg/information/web/InformationController.java

@@ -219,7 +219,8 @@ public class InformationController extends BaseController {
 			}
 			List<Information> listBy = informationService.findListBy(infor);
 		try {
-			File temp =new File("C:\\Users\\lem\\AppData\\Local\\Temp\\information");
+			File path = new File(this.getClass().getResource("/").getPath()+"/freemarker");
+			File temp =new File(path+"\\information");
 			/**
 			 * 在临时文件中写入内容
 			 */
@@ -583,7 +584,7 @@ public class InformationController extends BaseController {
 			}
 		}
 		data.put("mb",stringBuilder);
-		File docFile = new File("D:/甲供物资超欠供说明.doc");
+		File docFile = new File(path+"\\甲供物资超欠供说明.doc");
 		FreemarkerUtil.generateFile(data,template,docFile);
 		ResponseUtil.docResponse("甲供物资超欠供说明.doc",docFile,response);
 	}