| | |
| | | for (TApplyChargingPile tApplyChargingPile : list) { |
| | | TApplyChargingPileExportDto applyChargingPileExportDto = new TApplyChargingPileExportDto(); |
| | | BeanUtils.copyProperties(tApplyChargingPile,applyChargingPileExportDto); |
| | | applyChargingPileExportDto.setImage(new URL("https://img-blog.csdnimg.cn/direct/c11088e1790049a5b84a0fda21a271b1.png")); |
| | | applyChargingPileExportDto.setLandlordFrontIdCard(new URL(tApplyChargingPile.getLandlordFrontIdCard())); |
| | | applyChargingPileExportDto.setLandlordBackIdCard(new URL(tApplyChargingPile.getLandlordBackIdCard())); |
| | | applyChargingPileExportDto.setAgentBackIdCard(new URL(tApplyChargingPile.getAgentBackIdCard())); |
| | | applyChargingPileExportDto.setAgentFrontIdCard(new URL(tApplyChargingPile.getAgentFrontIdCard())); |
| | | List<URL> urls = new ArrayList<>(); |
| | | urls.add(new URL("https://img-blog.csdnimg.cn/direct/c11088e1790049a5b84a0fda21a271b1.png")); |
| | | urls.add(new URL("https://img-blog.csdnimg.cn/direct/c11088e1790049a5b84a0fda21a271b1.png")); |
| | | urls.add(new URL("https://img-blog.csdnimg.cn/direct/c11088e1790049a5b84a0fda21a271b1.png")); |
| | | applyChargingPileExportDto.setUrls(urls); |
| | | exportDtos.add(applyChargingPileExportDto); |
| | | |
| | | } |
| | |
| | | // 自动释放资源 |
| | | try (ExcelWriter excelWriter = excelWriterBuilder.withTemplate(stream).build()) { |
| | | WriteSheet writeSheet = EasyExcelFactory.writerSheet().build(); |
| | | excelWriter.fill(list, writeSheet); |
| | | excelWriter.fill(exportDtos, writeSheet); |
| | | excelWriter.finish(); |
| | | } catch (Exception e) { |
| | | return R.fail("excel导出失败!"); |