| | |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.FTP.FtpUtil; |
| | | import org.springblade.modules.accreditation.excel.ExportSecurityBookPaperExcel; |
| | | import org.springblade.modules.accreditation.excel.ExportSecurityPaperExcel; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.accreditation.entity.AccreditationRecords; |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出证书制证信息 |
| | | */ |
| | | @GetMapping("export-security-book-paper") |
| | | public void exportSecurityBookPaper(AccreditationRecordsVo accreditationRecords, HttpServletResponse response) throws IOException { |
| | | //按条件查询成绩数据 |
| | | List<ExportSecurityBookPaperExcel> excels = accreditationRecordsService.exportSecurityBookPaper(accreditationRecords); |
| | | String fileName = null; |
| | | try { |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding(org.apache.commons.codec.Charsets.UTF_8.name()); |
| | | fileName = URLEncoder.encode("证书制证数据"+ DateUtil.time(), Charsets.UTF_8.name()); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | //修改单元格格式为文本格式 |
| | | EasyExcel.write(response.getOutputStream(), ExportSecurityBookPaperExcel.class) |
| | | .sheet("证书制证数据表") |
| | | .doWrite(excels); |
| | | } catch (Throwable var6) { |
| | | throw var6; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |