From b484a5de01ae93adbdd09d62694f8bc8a508d013 Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Mon, 6 Jan 2025 17:05:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../importdownload/ImportDownloadController.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/importdownload/ImportDownloadController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/importdownload/ImportDownloadController.java index 84c5aa67..e6c2388c 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/importdownload/ImportDownloadController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/importdownload/ImportDownloadController.java @@ -65,13 +65,13 @@ public class ImportDownloadController { break; case Constants.PATIENT_INFO_IMPORT: // 门诊患者 //本地服务 - file = ResourceUtils.getFile("classpath:template/OutpatientFollowUpRecords.xlsx"); + //file = ResourceUtils.getFile("classpath:template/OutpatientFollowUpRecords.xlsx"); //线上服务 -// Resource resource = new ClassPathResource("classpath:template/OutpatientFollowUpRecords.xlsx"); -// String filePath= this.getClass().getClassLoader().getResource("classpath:template/OutpatientFollowUpRecords.xlsx").getFile(); -// file= new File(filePath); -// // 通过流讲文件复制到file中 -// FileUtils.copyToFile(resource.getInputStream(), file); + Resource resource = new ClassPathResource("classpath:template/OutpatientFollowUpRecords.xlsx"); + String filePath= this.getClass().getClassLoader().getResource("classpath:template/OutpatientFollowUpRecords.xlsx").getFile(); + file= new File(filePath); + // 通过流讲文件复制到file中 + FileUtils.copyToFile(resource.getInputStream(), file); break; } if (Objects.isNull(file)) {