| | |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | |
| | | if(comMngPopulationVO.getHouseId() != null){ |
| | | ComMngPopulationHouseDO houseDO = comMngPopulationHouseDAO.selectById(comMngPopulationVO.getHouseId()); |
| | | if(houseDO != null){ |
| | | switch (comMngPopulationVO.getLevel()){ |
| | | case 1: |
| | | comMngPopulationVO.setRoad(houseDO.getAlley()); |
| | | break; |
| | | case 2: |
| | | comMngPopulationVO.setRoad(houseDO.getAlley()); |
| | | comMngPopulationVO.setDoorNo(houseDO.getHouseNum()); |
| | | break; |
| | | case 3: |
| | | comMngPopulationVO.setRoad(houseDO.getAlley()); |
| | | comMngPopulationVO.setDoorNo(houseDO.getHouseNum()); |
| | | comMngPopulationVO.setFloor(houseDO.getFloor()); |
| | | break; |
| | | case 4: |
| | | comMngPopulationVO.setRoad(houseDO.getAlley()); |
| | | comMngPopulationVO.setDoorNo(houseDO.getHouseNum()); |
| | | comMngPopulationVO.setFloor(houseDO.getFloor()); |
| | | comMngPopulationVO.setUnitNo(houseDO.getUnitNo()); |
| | | break; |
| | | case 5: |
| | | comMngPopulationVO.setRoad(houseDO.getAlley()); |
| | | comMngPopulationVO.setDoorNo(houseDO.getHouseNum()); |
| | | comMngPopulationVO.setFloor(houseDO.getFloor()); |
| | | comMngPopulationVO.setUnitNo(houseDO.getUnitNo()); |
| | | comMngPopulationVO.setHouseNo(houseDO.getHouseNo()); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | IPage<ComMngPopulationVO> iPage = populationDAO.pagePopulation(page, comMngPopulationVO); |
| | | if(!iPage.getRecords().isEmpty()){ |
| | | iPage.getRecords().forEach(populDO -> { |
| | |
| | | populationHouseDO.setUnitNo(vo.getUnitNo()); |
| | | populationHouseDO.setHouseNo(vo.getHouseNo()); |
| | | populationHouseDO.setAddress(address); |
| | | populationHouseDO.setUpdateAt(new Date()); |
| | | if(StringUtils.isEmpty(vo.getName()) && StringUtils.isEmpty(vo.getCardNo())){ |
| | | populationHouseDO.setIsEmpty(PopulIsOksEnum.YES.getCode()); |
| | | } |
| | |
| | | return R.fail(); |
| | | } |
| | | BeanUtils.copyProperties(vo,populationDO); |
| | | if(StringUtils.isEmpty(vo.getLabel())){ |
| | | populationDO.setLabel(null); |
| | | } |
| | | if(StringUtils.isEmpty(vo.getRemark())){ |
| | | populationDO.setRemark(null); |
| | | } |
| | | populationDO.setCardNo(null); |
| | | populationDO.setPhone(AESUtil.encrypt128(vo.getPhone(), aesKey)); |
| | | |