| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationHouseInsertAdminDTO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | return R.ok(this.comMngPopulationDAO.getSecondHouseAddress(cascadeHouseDTO.getCommunityId())); |
| | | } |
| | | |
| | | @Override |
| | | public R getSecondHouse(CascadeHouseDTO cascadeHouseDTO) { |
| | | return R.ok(this.comMngPopulationDAO.getSecondHouse(cascadeHouseDTO.getCommunityId())); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询房屋列表 |
| | | * |
| | |
| | | break; |
| | | case 2: |
| | | populationHouseAdminDTO.setRoad(houseDO.getAlley()); |
| | | populationHouseAdminDTO.setDoorNo(houseDO.getHouseNum()); |
| | | // populationHouseAdminDTO.setDoorNo(houseDO.getHouseNum()); |
| | | break; |
| | | case 3: |
| | | populationHouseAdminDTO.setRoad(houseDO.getAlley()); |
| | | populationHouseAdminDTO.setDoorNo(houseDO.getHouseNum()); |
| | | populationHouseAdminDTO.setFloor(houseDO.getFloor()); |
| | | // populationHouseAdminDTO.setFloor(houseDO.getFloor()); |
| | | break; |
| | | case 4: |
| | | populationHouseAdminDTO.setRoad(houseDO.getAlley()); |
| | | populationHouseAdminDTO.setDoorNo(houseDO.getHouseNum()); |
| | | populationHouseAdminDTO.setFloor(houseDO.getFloor()); |
| | | populationHouseAdminDTO.setUnitNo(houseDO.getUnitNo()); |
| | | // populationHouseAdminDTO.setUnitNo(houseDO.getUnitNo()); |
| | | break; |
| | | case 5: |
| | | populationHouseAdminDTO.setRoad(houseDO.getAlley()); |
| | | populationHouseAdminDTO.setDoorNo(houseDO.getHouseNum()); |
| | | populationHouseAdminDTO.setFloor(houseDO.getFloor()); |
| | | populationHouseAdminDTO.setUnitNo(houseDO.getUnitNo()); |
| | | populationHouseAdminDTO.setHouseNo(houseDO.getHouseNo()); |
| | | if(populationHouseAdminDTO.getLevelIsAll() == null){ |
| | | populationHouseAdminDTO.setHouseNo(houseDO.getHouseNo()); |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | } |
| | | // 查询该房屋的住户信息 |
| | | List<PopulationListVO> populationList = |
| | | this.baseMapper.getGridVillageBuildingPopulationList(buildingHouseDetailVO.getId(), null, 1); |
| | | this.baseMapper.getGridVillageBuildingPopulationList(buildingHouseDetailVO.getId(), null, null); |
| | | if (!populationList.isEmpty()) { |
| | | populationList.forEach(population -> { |
| | | try { |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public R insertHouse(ComMngPopulationHouseInsertAdminDTO houseEditAdminDTO) { |
| | | ComMngPopulationHouseDO houseDO=new ComMngPopulationHouseDO(); |
| | | BeanUtils.copyProperties(houseEditAdminDTO, houseDO); |
| | | houseDO.setCreateAt(new Date()); |
| | | if (this.baseMapper.insert(houseDO) > 0) { |
| | | ComMngPopulationHouseUserDO comMngPopulationHouseUserDO=new ComMngPopulationHouseUserDO(); |
| | | comMngPopulationHouseUserDO.setHouseId(houseDO.getId()); |
| | | comMngPopulationHouseUserDO.setPopulId(houseEditAdminDTO.getPopulationId()); |
| | | comMngPopulationHouseUserDAO.insert(comMngPopulationHouseUserDO); |
| | | return R.ok(); |
| | | } else { |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | } |