练习导出模板更改

考核导出模板更改
实验报告接口返回考核名称字段
hehai
jiakun.lin 4 years ago
parent ab8ef68d51
commit 29af2bb66d
  1. 5
      src/main/java/com/msdw/tms/entity/vo/ProjectRecordVo.java
  2. 8
      src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java
  3. BIN
      src/main/resources/excel-template/教学实验报告导出模板.xlsx
  4. BIN
      src/main/resources/excel-template/虚拟仿真实验报告导出模板.xlsx
  5. 1
      src/main/resources/mapper/tms/ProjectRecordDao.xml

@ -98,7 +98,10 @@ public class ProjectRecordVo extends ProjectRecordEntity implements Serializable
* 实验班级名
*/
private String experimentalClassName;
/**
* 实验名称
*/
private String experimentalName;
/**
* 封装多个项目id
*/

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

@ -80,6 +80,7 @@
endTime,
recordState,
tet.experimental_class_name as experimentalClassName,
tet.experimental_name as experimentalName,
systemId
FROM tms_project_record tpr
LEFT JOIN hr_project_management tp ON tpr.projectId = tp.projectId

Loading…
Cancel
Save