导出修改

This commit is contained in:
zhangheng 2025-01-06 17:05:34 +08:00
parent 19ac309ff5
commit b484a5de01

View File

@ -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)) {