|
@ -48,6 +48,7 @@ import com.epmet.dataaggre.dto.resigroup.result.OrgInfoCommonDTO; |
|
|
import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity; |
|
|
import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity; |
|
|
import com.epmet.dataaggre.entity.govorg.CustomerGridEntity; |
|
|
import com.epmet.dataaggre.entity.govorg.CustomerGridEntity; |
|
|
import com.epmet.dataaggre.entity.govorg.CustomerStaffGridEntity; |
|
|
import com.epmet.dataaggre.entity.govorg.CustomerStaffGridEntity; |
|
|
|
|
|
import com.epmet.dataaggre.entity.govorg.IcHouseEntity; |
|
|
import com.epmet.dataaggre.excel.GridLivelyDetailExcel; |
|
|
import com.epmet.dataaggre.excel.GridLivelyDetailExcel; |
|
|
import com.epmet.dataaggre.excel.GridLivelyExcel; |
|
|
import com.epmet.dataaggre.excel.GridLivelyExcel; |
|
|
import com.epmet.dataaggre.service.commonservice.AreaCodeService; |
|
|
import com.epmet.dataaggre.service.commonservice.AreaCodeService; |
|
@ -1580,18 +1581,36 @@ public class GovOrgServiceImpl implements GovOrgService { |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
public PageData<LingShanLianHuResiUserResultDTO> lianHuResi(Integer pageNo, Integer pageSize, String partyCenterHouseId) { |
|
|
public PageData<LingShanLianHuResiUserResultDTO> lianHuResi(Integer pageNo, Integer pageSize, String partyCenterHouseId) { |
|
|
// 先查询关联的房屋id
|
|
|
IcHouseEntity partyHouseInfo=houseDao.selectById(partyCenterHouseId); |
|
|
PageHelper.startPage(pageNo, pageSize); |
|
|
|
|
|
List<LingShanLianHuResiUserResultDTO> houseList = houseDao.selectListLianHuHouse(partyCenterHouseId); |
|
|
List<LingShanLianHuResiUserResultDTO> houseList = houseDao.selectListLianHuHouse(partyCenterHouseId); |
|
|
if (CollectionUtils.isEmpty(houseList)) { |
|
|
if (CollectionUtils.isEmpty(houseList)) { |
|
|
return new PageData<>(); |
|
|
return new PageData<>(); |
|
|
} |
|
|
} |
|
|
houseList.forEach(lianHuHouse -> { |
|
|
List<String> houseIds = houseList.stream().map(o -> o.getHouseId()).collect(Collectors.toList()); |
|
|
List<IcResiUserResultDTO> resiList = epmetUserService.listIcResiUserByHouseId(lianHuHouse.getHouseId()); |
|
|
// 先查询关联的房屋id
|
|
|
lianHuHouse.setResiList(resiList); |
|
|
PageData<IcResiUserResultDTO> resiPage = epmetUserService.listIcResiUserByHouseId(pageNo, pageSize, houseIds); |
|
|
|
|
|
if (CollectionUtils.isEmpty(resiPage.getList())) { |
|
|
|
|
|
return new PageData<>(); |
|
|
|
|
|
} |
|
|
|
|
|
Map<String,LingShanLianHuResiUserResultDTO> lianHouseMap=houseList.stream().collect(Collectors.toMap(LingShanLianHuResiUserResultDTO :: getHouseId, v -> v, (v1, v2) -> v1)); |
|
|
|
|
|
List<LingShanLianHuResiUserResultDTO> resList=new ArrayList(); |
|
|
|
|
|
resiPage.getList().forEach(dto->{ |
|
|
|
|
|
LingShanLianHuResiUserResultDTO resultDTO=ConvertUtils.sourceToTarget(dto,LingShanLianHuResiUserResultDTO.class); |
|
|
|
|
|
|
|
|
|
|
|
LingShanLianHuResiUserResultDTO houseInfo = lianHouseMap.get(dto.getHomeId()); |
|
|
|
|
|
resultDTO.setPartyCenterHouseId(houseInfo.getPartyCenterHouseId()); |
|
|
|
|
|
resultDTO.setNeighborHoodId(houseInfo.getNeighborHoodId()); |
|
|
|
|
|
resultDTO.setNeighborHoodName(houseInfo.getNeighborHoodName()); |
|
|
|
|
|
resultDTO.setBuildingId(houseInfo.getBuildingId()); |
|
|
|
|
|
resultDTO.setBuildingName(houseInfo.getBuildingName()); |
|
|
|
|
|
resultDTO.setBuildingUnitId(houseInfo.getBuildingUnitId()); |
|
|
|
|
|
resultDTO.setUnitName(houseInfo.getUnitName()); |
|
|
|
|
|
resultDTO.setDoorName(houseInfo.getDoorName()); |
|
|
|
|
|
resultDTO.setHouseId(houseInfo.getHouseId()); |
|
|
|
|
|
resultDTO.setPartyCenterHouseId(partyHouseInfo.getOwnerName()); |
|
|
|
|
|
resList.add(resultDTO); |
|
|
}); |
|
|
}); |
|
|
PageInfo<LingShanLianHuResiUserResultDTO> pageInfo = new PageInfo<>(houseList); |
|
|
return new PageData<>(resList, resiPage.getTotal(),pageSize); |
|
|
return new PageData<>(houseList, pageInfo.getTotal(), pageSize); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|