|
@ -5,30 +5,28 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
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.dto.result.OptionResultDTO; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
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.CustomerIcHouseRedis; |
|
|
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; |
|
|
import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
|
|
import com.epmet.commons.tools.utils.PidUtils; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.dao.IcBuildingDao; |
|
|
import com.epmet.commons.tools.utils.SpringContextUtils; |
|
|
import com.epmet.dao.IcBuildingUnitDao; |
|
|
import com.epmet.dao.*; |
|
|
import com.epmet.dao.IcHouseDao; |
|
|
import com.epmet.dto.*; |
|
|
import com.epmet.dao.IcNeighborHoodDao; |
|
|
|
|
|
import com.epmet.dto.IcHouseDTO; |
|
|
|
|
|
import com.epmet.dto.IcResiCategoryStatsConfigDTO; |
|
|
|
|
|
import com.epmet.dto.IcResiUserDTO; |
|
|
|
|
|
import com.epmet.dto.ImportGeneralDTO; |
|
|
|
|
|
import com.epmet.dto.form.CheckHouseInfoFormDTO; |
|
|
import com.epmet.dto.form.CheckHouseInfoFormDTO; |
|
|
import com.epmet.dto.form.HouseFormDTO; |
|
|
import com.epmet.dto.form.HouseFormDTO; |
|
|
|
|
|
import com.epmet.dto.form.lingshan.PartyCenterHousePageFormDTO; |
|
|
import com.epmet.dto.result.*; |
|
|
import com.epmet.dto.result.*; |
|
|
import com.epmet.entity.IcBuildingEntity; |
|
|
import com.epmet.dto.result.lingshan.PartyCenterHouseResultDTO; |
|
|
import com.epmet.entity.IcBuildingUnitEntity; |
|
|
import com.epmet.entity.*; |
|
|
import com.epmet.entity.IcHouseEntity; |
|
|
|
|
|
import com.epmet.entity.IcNeighborHoodEntity; |
|
|
|
|
|
import com.epmet.enums.HousePurposeEnums; |
|
|
import com.epmet.enums.HousePurposeEnums; |
|
|
import com.epmet.enums.HouseRentFlagEnums; |
|
|
import com.epmet.enums.HouseRentFlagEnums; |
|
|
import com.epmet.enums.HouseTypeEnums; |
|
|
import com.epmet.enums.HouseTypeEnums; |
|
@ -36,7 +34,10 @@ import com.epmet.feign.EpmetMessageOpenFeignClient; |
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
import com.epmet.feign.OperCustomizeOpenFeignClient; |
|
|
import com.epmet.feign.OperCustomizeOpenFeignClient; |
|
|
import com.epmet.redis.IcHouseRedis; |
|
|
import com.epmet.redis.IcHouseRedis; |
|
|
|
|
|
import com.epmet.service.CustomerGridService; |
|
|
import com.epmet.service.IcHouseService; |
|
|
import com.epmet.service.IcHouseService; |
|
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
@ -73,6 +74,9 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit |
|
|
private IcBuildingUnitDao buildingUnitDao; |
|
|
private IcBuildingUnitDao buildingUnitDao; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; |
|
|
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private LingshanPartyCenterHouseLianhuDao partyCenterHouseLianhuDao; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public IcHouseDTO get(String id) { |
|
|
public IcHouseDTO get(String id) { |
|
@ -405,4 +409,76 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit |
|
|
|
|
|
|
|
|
return new Result<CheckHomeInfoResultInfo>().ok(checkHomeInfoResultInfo); |
|
|
return new Result<CheckHomeInfoResultInfo>().ok(checkHomeInfoResultInfo); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 灵山项目-联户绑定 |
|
|
|
|
|
* 该接口返回:党员中心户房屋列表;默认登录用户查询本组织及下级 |
|
|
|
|
|
* |
|
|
|
|
|
* @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); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|