|
@ -129,6 +129,9 @@ public class HousingInformationController { |
|
|
} |
|
|
} |
|
|
List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS = listResult.getData(); |
|
|
List<SysPopulationSimpleDictDTO> sysPopulationSimpleDictDTOS = listResult.getData(); |
|
|
for (BasePopulationInformationExportDto basePopulationInformationExportDto : basePopulationInformationExcelList) { |
|
|
for (BasePopulationInformationExportDto basePopulationInformationExportDto : basePopulationInformationExcelList) { |
|
|
|
|
|
if(StringUtils.isBlank(basePopulationInformationExportDto.getId())){ |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
String educationLevel = basePopulationInformationExportDto.getEducationLevel(); |
|
|
String educationLevel = basePopulationInformationExportDto.getEducationLevel(); |
|
|
String politicsStatus = basePopulationInformationExportDto.getPoliticsStatus(); |
|
|
String politicsStatus = basePopulationInformationExportDto.getPoliticsStatus(); |
|
|
String bodyStatus = basePopulationInformationExportDto.getBodyStatus(); |
|
|
String bodyStatus = basePopulationInformationExportDto.getBodyStatus(); |
|
@ -167,10 +170,27 @@ public class HousingInformationController { |
|
|
basePopulationInformationExportDto.setMotorVehicleCategory(motorVehicleCategoryEnd.substring(0,motorVehicleCategoryEnd.lastIndexOf(","))); |
|
|
basePopulationInformationExportDto.setMotorVehicleCategory(motorVehicleCategoryEnd.substring(0,motorVehicleCategoryEnd.lastIndexOf(","))); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
//没有户主信息的房屋,转换excel时,替换是否时会出现null,此时将对应null值替换成空字符
|
|
|
|
|
|
basePopulationInformationExcelList.forEach(basePopulationInformationExportDto ->{ |
|
|
|
|
|
basePopulationInformationExportDto.setResidentsSex(""); |
|
|
|
|
|
basePopulationInformationExportDto.setMilitaryService(""); |
|
|
|
|
|
basePopulationInformationExportDto.setReemploymentPermit(""); |
|
|
|
|
|
basePopulationInformationExportDto.setUnemploymentRegister(""); |
|
|
|
|
|
basePopulationInformationExportDto.setDogStatus(""); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
//根据获取的户主ID查询居住人信息
|
|
|
//根据获取的户主ID查询居住人信息
|
|
|
Map<String,List<BasePopulationInformationExportDto>> baseMap = basePopulationInformationExcelList.stream().collect(Collectors.groupingBy(BasePopulationInformationExportDto::getId)); |
|
|
List<BasePopulationInformationExportDto> basePopulationInformationExcelListWithHouseHead = new ArrayList<>(); |
|
|
|
|
|
basePopulationInformationExcelListWithHouseHead.addAll(basePopulationInformationExcelList); |
|
|
|
|
|
//先去除没有户主的房屋
|
|
|
|
|
|
for(Iterator<BasePopulationInformationExportDto> car = basePopulationInformationExcelListWithHouseHead.iterator();car.hasNext();){ |
|
|
|
|
|
BasePopulationInformationExportDto basePopulationInformationExportDto = car.next(); |
|
|
|
|
|
if(StringUtils.isBlank(basePopulationInformationExportDto.getId())){ |
|
|
|
|
|
car.remove(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
Map<String,List<BasePopulationInformationExportDto>> baseMap = basePopulationInformationExcelListWithHouseHead.stream().collect(Collectors.groupingBy(BasePopulationInformationExportDto::getId)); |
|
|
//获取所有的户主ID
|
|
|
//获取所有的户主ID
|
|
|
Set<String> houseHeadIds = baseMap.keySet(); |
|
|
Set<String> houseHeadIds = baseMap.keySet(); |
|
|
List<BaseResidentInformationExportDto> baseResidentInformationExportDtoList = housingInformationService.selectBaseResidentInformationExcelList(houseHeadIds); |
|
|
List<BaseResidentInformationExportDto> baseResidentInformationExportDtoList = housingInformationService.selectBaseResidentInformationExcelList(houseHeadIds); |
|
|