| | |
| | | List<InputUserInfoVO> populList = JSON.parseArray( |
| | | JSON.toJSONString(communityService.specialInputUserExport(pageInputUserDTO).getData()), |
| | | InputUserInfoVO.class); |
| | | List<ComMngPopulationExcelVo> populationExcelVoList = new ArrayList<>(); |
| | | List<ComMngPopulationSpecialExcelVo> populationExcelVoList = new ArrayList<>(); |
| | | if (populList != null && populList.size() > 0) { |
| | | for (InputUserInfoVO popul : populList) { |
| | | if (popul.getTags() == null) { |
| | | continue; |
| | | } |
| | | ComMngPopulationExcelVo populationExcelVo = new ComMngPopulationExcelVo(); |
| | | ComMngPopulationSpecialExcelVo populationExcelVo = new ComMngPopulationSpecialExcelVo(); |
| | | BeanUtils.copyProperties(popul, populationExcelVo); |
| | | // 设置性别 |
| | | populationExcelVo.setSex(PopulSexEnum.getCnDescByName(popul.getSex())); |
| | | // 设置政治面貌 |
| | | populationExcelVo.setPoliticalOutlook( |
| | | PopulPoliticalOutlookEnum.getCnDescByName(popul.getPoliticalOutlook())); |
| | | // 设置是否租住 |
| | | // populationExcelVo.setIsRent(PopulIsOkEnum.getCnDescByName(popul.getIsRent())); |
| | | populationExcelVoList.add(populationExcelVo); |
| | | } |
| | | } |
| | | |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationExcelVo.class) |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationSpecialExcelVo.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("特殊群体导出数据").build(); |