| | |
| | | import com.panzhihua.service_community.service.ComMngPopulationService; |
| | | import com.panzhihua.service_community.service.ComMngVillageService; |
| | | import com.panzhihua.service_community.service.EventResourceService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | /** |
| | | * 实有人口Service实现类 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComMngPopulationServiceImpl extends ServiceImpl<ComMngPopulationDAO, ComMngPopulationDO> implements ComMngPopulationService { |
| | | @Resource |
| | |
| | | ComMngVillageDO comMngVillageDO = comActVillageDAO.selectOne(new QueryWrapper<ComMngVillageDO>().eq("alley", vo.getRoad()).eq("house_num", vo.getDoorNo()).eq("community_id", communityId)); |
| | | if (comMngVillageDO == null) { |
| | | ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO(); |
| | | importErrorVO.setErrorMsg("街路巷或小区号不存在"); |
| | | importErrorVO.setErrorMsg("街路巷或小区号不存在,请先在“小区管理”中添加该小区"); |
| | | importErrorVO.setErrorPosition("街路巷:" + vo.getRoad() + ",小区号:" + vo.getDoorNo()); |
| | | populationImportErrorVOList.add(importErrorVO); |
| | | // index++; |
| | |
| | | populationHouseUserDO.setPopulId(populationDO.getId()); |
| | | populationHouseUserDO.setRelation(vo.getRelation()); |
| | | populationHouseUserDO.setRelationId(vo.getIsRent()); |
| | | populationHouseUserDO.setResidence(vo.getResidence()); |
| | | comMngPopulationHouseUserDAO.insert(populationHouseUserDO); |
| | | } |
| | | } |
| | |
| | | populationHouseUserDO.setRelation(houseEditDto.getRelation()); |
| | | if (houseEditDto.getIsResidence().equals(ComMngPopulationHouseEditDTO.isResidence.yes)) { |
| | | houseId = houseEditDto.getId();//居住地 |
| | | populationHouseUserDO.setResidence(ComMngPopulationHouseEditDTO.isResidence.yes); |
| | | }else { |
| | | populationHouseUserDO.setResidence(ComMngPopulationHouseEditDTO.isResidence.no); |
| | | } |
| | | populationHouseUserDOList.add(populationHouseUserDO); |
| | | |
| | |
| | | villageStatisticsList.forEach(village -> { |
| | | CivilVillageStatisticsVO villageStatisticsVO = this.baseMapper.getCivilScreenVillageStatistics(village.getVillageId()); |
| | | if(villageStatisticsVO != null){ |
| | | BeanUtils.copyProperties(villageStatisticsVO,village); |
| | | village.setPeopleNum(villageStatisticsVO.getPeopleNum()); |
| | | village.setHouseNum(villageStatisticsVO.getHouseNum()); |
| | | village.setRegisterNum(villageStatisticsVO.getRegisterNum()); |
| | | village.setFlowNum(villageStatisticsVO.getFlowNum()); |
| | | // BeanUtils.copyProperties(villageStatisticsVO,village); |
| | | } |
| | | }); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public R getGridPopulationAdminList(ComMngPopulationListDTO populationListDTO){ |
| | | if(StringUtils.isNotEmpty(populationListDTO.getKeyWord())){ |
| | | try { |
| | | populationListDTO.setCardNo(AESUtil.encrypt128(populationListDTO.getKeyWord(),aesKey)); |
| | | }catch (Exception e){ |
| | | log.error("转换身份证号码失败"); |
| | | } |
| | | } |
| | | |
| | | IPage<ComMngPopulationListVO> populationListIPage = this.baseMapper.getGridPopulationAdminList(new Page(populationListDTO.getPageNum(),populationListDTO.getPageSize()),populationListDTO); |
| | | if(!populationListIPage.getRecords().isEmpty()){ |
| | | populationListIPage.getRecords().forEach(population -> { |