diff --git a/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java b/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java index b8a3da2..96c042b 100644 --- a/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java +++ b/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java @@ -462,8 +462,6 @@ public class PopulationServiceImpl extends AbstractService implements IPopulatio } } - // 一次性获取所有的人口信息 - List populationInfoDTOs = populationInfoService.getBatch(populationInfoIds); // 一次性获取所有的房屋信息 List houseDTOs = houseService.getBatch(houseIds); @@ -493,14 +491,8 @@ public class PopulationServiceImpl extends AbstractService implements IPopulatio e.printStackTrace(); } - Map populationInfoMap = null; Map houseMap = null; Map baseMap = null; - if (!CollectionUtils.isEmpty(populationInfoDTOs)) { - populationInfoMap = populationInfoDTOs.stream() - .collect(Collectors.toMap(PopulationInfoDTO::getPopulationInfoId, - populationInfoDTO -> populationInfoDTO)); - } if (!CollectionUtils.isEmpty(houseDTOs)) { houseMap = houseDTOs.stream() @@ -523,7 +515,7 @@ public class PopulationServiceImpl extends AbstractService implements IPopulatio } else { populationInfoBaseDTO = setPopulationBaseInfo(populationDTO); } - // populationInfoService.getTuoMin(populationInfoBaseDTO); + populationInfoService.getTuoMin(populationInfoBaseDTO); populationDTO.setPopulationInfoBaseDTO(populationInfoBaseDTO); } else { PopulationInfoBaseDTO populationInfoBaseDTO = setPopulationBaseInfo(populationDTO); @@ -536,28 +528,6 @@ public class PopulationServiceImpl extends AbstractService implements IPopulatio } } - // 获取人口详情 - /*for (PopulationDTO populationDTO : overList) { - if (StringUtils.isNotEmpty(populationDTO.getPopulationInfoId())) { - PopulationInfoDTO populationInfoDTO = populationInfoService.get(populationDTO.getPopulationInfoId()); - PopulationInfoHouseDTO populationInfoHouseDTO = new PopulationInfoHouseDTO(); - BeanUtils.copyProperties(populationInfoDTO, populationInfoHouseDTO); - - // 获取人员 - PopulationInfoBaseDTO base = populationInfoService.getBase(populationDTO.getPopulationInfoId()); - // populationInfoService.getTuoMin(base); - populationInfoHouseDTO.setPopulationInfoBaseDTO(base); - - populationDTO.setPopulationInfoHouseDTO(populationInfoHouseDTO); - } - - // 获取房屋详情 - HouseDTO houseDTO = houseService.get(populationDTO.getHouseId()); - if (null != houseDTO) { - populationDTO.setHouseDTO(houseDTO); - } - }*/ - PageInfo pageInfo = new PageInfo<>(overList); return new SuccessResultList<>(overList, pageInfo.getPageNum(), pageInfo.getTotal()); } @@ -582,22 +552,4 @@ public class PopulationServiceImpl extends AbstractService implements IPopulatio return new SuccessResultList<>(populationDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); } - public class getBase implements Runnable { - private List dataList; - private List baseDTOList; - - public getBase(List dataList, List baseDTOList) { - this.dataList = dataList; - this.baseDTOList = baseDTOList; - } - - @Override - public void run() { - for (String s : dataList) { - PopulationInfoBaseDTO base = populationInfoService.getBase(s); - baseDTOList.add(base); - } - } - } - } \ No newline at end of file