|
|
@ -5,26 +5,35 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.dto.result.OptionResultDTO; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.PidUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.dao.*; |
|
|
|
import com.epmet.dto.IcHouseDTO; |
|
|
|
import com.epmet.dto.IcResiCategoryStatsConfigDTO; |
|
|
|
import com.epmet.dto.IcResiUserDTO; |
|
|
|
import com.epmet.dto.ImportGeneralDTO; |
|
|
|
import com.epmet.commons.tools.utils.SpringContextUtils; |
|
|
|
import com.epmet.dao.*; |
|
|
|
import com.epmet.dto.*; |
|
|
|
import com.epmet.dto.form.CheckHouseInfoFormDTO; |
|
|
|
import com.epmet.dto.form.HouseCountPictureFormDTO; |
|
|
|
import com.epmet.dto.form.HouseFormDTO; |
|
|
|
import com.epmet.dto.form.lingshan.PartyCenterHousePageFormDTO; |
|
|
|
import com.epmet.dto.region.LogOperationResultDTO; |
|
|
|
import com.epmet.dto.result.*; |
|
|
|
import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; |
|
|
|
import com.epmet.entity.*; |
|
|
|
import com.epmet.entity.*; |
|
|
|
import com.epmet.enums.HousePurposeEnums; |
|
|
|
import com.epmet.enums.HouseRentFlagEnums; |
|
|
@ -34,6 +43,7 @@ import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
|
import com.epmet.feign.OperCustomizeOpenFeignClient; |
|
|
|
import com.epmet.redis.IcHouseRedis; |
|
|
|
import com.epmet.service.CustomerAgencyService; |
|
|
|
import com.epmet.service.CustomerGridService; |
|
|
|
import com.epmet.service.IcHouseService; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
@ -78,6 +88,9 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit |
|
|
|
private CustomerAgencyDao customerAgencyDao; |
|
|
|
@Autowired |
|
|
|
private CustomerGridDao customerGridDao; |
|
|
|
@Autowired |
|
|
|
private LingshanPartyCenterHouseLianhuDao partyCenterHouseLianhuDao; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public IcHouseDTO get(String id) { |
|
|
@ -562,4 +575,76 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit |
|
|
|
|
|
|
|
return new PageData<>(list,pageInfo.getTotal()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 灵山项目-联户绑定 |
|
|
|
* 该接口返回:党员中心户房屋列表;默认登录用户查询本组织及下级 |
|
|
|
* |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public PageData<PartyCenterHouseResultDTO> queryPartyCenterHouseList(PartyCenterHousePageFormDTO formDTO) { |
|
|
|
CustomerStaffInfoCacheResult staffInfoCacheResult= CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getStaffId()); |
|
|
|
PageHelper.startPage(formDTO.getPageNo(),formDTO.getPageSize()); |
|
|
|
List<PartyCenterHouseResultDTO> list=baseDao.selectListPartyCenterHouse(formDTO.getCustomerId(),staffInfoCacheResult.getAgencyId(), |
|
|
|
formDTO.getNeighborHoodName(),formDTO.getBuildingName()); |
|
|
|
list.forEach(item -> { |
|
|
|
item.setHouseTypeName(HouseTypeEnums.getTypeValue(item.getHouseType())); |
|
|
|
item.setPurposeName(HousePurposeEnums.getTypeValue(item.getPurpose())); |
|
|
|
}); |
|
|
|
PageInfo<PartyCenterHouseResultDTO> pageInfo = new PageInfo<>(list); |
|
|
|
return new PageData<>(list, pageInfo.getTotal(),formDTO.getPageSize()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 灵山项目-党员中心户,绑定联户 |
|
|
|
* |
|
|
|
* @param partyCenterHouseId |
|
|
|
* @param lianHuHouseIdList |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void bingLianHu(String partyCenterHouseId, List<String> lianHuHouseIdList) { |
|
|
|
IcHouseEntity partyCenterHouse=baseDao.selectById(partyCenterHouseId); |
|
|
|
IcNeighborHoodEntity neighborHoodEntity=icNeighborHoodDao.selectById(partyCenterHouse.getNeighborHoodId()); |
|
|
|
CustomerGridDTO gridDTO=SpringContextUtils.getBean(CustomerGridService.class).get(neighborHoodEntity.getGridId()); |
|
|
|
// 先删除
|
|
|
|
LambdaQueryWrapper<LingshanPartyCenterHouseLianhuEntity> queryWrapper=new LambdaQueryWrapper<>(); |
|
|
|
queryWrapper.eq(LingshanPartyCenterHouseLianhuEntity::getPartyCenterHouseId,partyCenterHouseId); |
|
|
|
partyCenterHouseLianhuDao.delete(queryWrapper); |
|
|
|
// 后插入
|
|
|
|
lianHuHouseIdList.forEach(lianHuHouseId->{ |
|
|
|
IcHouseEntity icHouseEntity=baseDao.selectById(lianHuHouseId); |
|
|
|
if(null!=icHouseEntity){ |
|
|
|
LingshanPartyCenterHouseLianhuEntity entity=new LingshanPartyCenterHouseLianhuEntity(); |
|
|
|
entity.setCustomerId(neighborHoodEntity.getCustomerId()); |
|
|
|
entity.setPartyCenterHouseId(partyCenterHouseId); |
|
|
|
entity.setAgencyId(neighborHoodEntity.getAgencyId()); |
|
|
|
entity.setGridId(neighborHoodEntity.getGridId()); |
|
|
|
entity.setGridIdPath(PidUtils.convertPid2OrgIdPath(gridDTO.getId(), gridDTO.getPids())); |
|
|
|
entity.setNeighborHoodId(icHouseEntity.getNeighborHoodId()); |
|
|
|
entity.setBuildingId(icHouseEntity.getBuildingId()); |
|
|
|
entity.setBuildingUnitId(icHouseEntity.getBuildingUnitId()); |
|
|
|
entity.setHouseId(lianHuHouseId); |
|
|
|
partyCenterHouseLianhuDao.insert(entity); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 灵山项目-查询联户房屋列表 |
|
|
|
* |
|
|
|
* @param partyCenterHouseId |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<String> queryLianHuHouseId(String partyCenterHouseId) { |
|
|
|
if(StringUtils.isBlank(partyCenterHouseId)){ |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
return partyCenterHouseLianhuDao.queryLianHuHouseId(partyCenterHouseId); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|