|
|
|
@ -178,13 +178,13 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj |
|
|
|
|
//2.加载模板流数据
|
|
|
|
|
// org.springframework.core.io.Resource resource = new ClassPathResource("excel-template/虚拟仿真实验报告导出模板.xlsx");
|
|
|
|
|
// FileInputStream fis = new FileInputStream(resource.getFile());
|
|
|
|
|
ClassPathResource resource = new ClassPathResource("excel-template/虚拟仿真实验报告导出模板.xlsx"); |
|
|
|
|
ClassPathResource resource = new ClassPathResource("excel-template/练习记录模板.xlsx"); |
|
|
|
|
InputStream inputStream = resource.getInputStream(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//3、通过工具类下载文件
|
|
|
|
|
new ExcelExportUtil(ProjectRecordImportRequest.class, Constant.ROW_INDEX, Constant.STYLE_INDEX). |
|
|
|
|
export(response, inputStream, importRequests, "虚拟仿真实验报告.xlsx"); |
|
|
|
|
export(response, inputStream, importRequests, "练习记录.xlsx"); |
|
|
|
|
// new ExcelExportUtil(ProjectRecordImportRequest.class, Constant.ROW_INDEX, Constant.STYLE_INDEX).
|
|
|
|
|
// export(response, fis, importRequests, "实验报告导出.xlsx");
|
|
|
|
|
} |
|
|
|
@ -206,13 +206,13 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj |
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
//2.加载模板流数据
|
|
|
|
|
ClassPathResource resource = new ClassPathResource("excel-template/教学实验报告导出模板.xlsx"); |
|
|
|
|
ClassPathResource resource = new ClassPathResource("excel-template/考核记录模板.xlsx"); |
|
|
|
|
InputStream inputStream = resource.getInputStream(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//3、通过工具类下载文件
|
|
|
|
|
new ExcelExportUtil(ExperimentProjectRecordImportRequest.class, Constant.ROW_INDEX, Constant.STYLE_INDEX). |
|
|
|
|
export(response, inputStream, importRequests, "教学实验报告.xlsx"); |
|
|
|
|
export(response, inputStream, importRequests, "考核记录.xlsx"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|