|
|
@ -10,6 +10,8 @@ import com.epmet.commons.tools.enums.IcResiUserSubStatusEnum; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; |
|
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
@ -32,10 +34,7 @@ import com.epmet.entity.ChangeRelocationEntity; |
|
|
|
import com.epmet.entity.IcResiUserEntity; |
|
|
|
import com.epmet.feign.EpmetMessageOpenFeignClient; |
|
|
|
import com.epmet.redis.ChangeRelocationRedis; |
|
|
|
import com.epmet.service.ChangeRelocationService; |
|
|
|
import com.epmet.service.ChangeWelfareService; |
|
|
|
import com.epmet.service.IcResiUserService; |
|
|
|
import com.epmet.service.IcUserTransferRecordService; |
|
|
|
import com.epmet.service.*; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -77,6 +76,8 @@ public class ChangeRelocationServiceImpl extends BaseServiceImpl<ChangeRelocatio |
|
|
|
private IcResiUserService icResiUserService; |
|
|
|
@Resource |
|
|
|
private IcUserTransferRecordService icUserTransferRecordService; |
|
|
|
@Resource |
|
|
|
private IcResiUserConfirmService icResiUserConfirmService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<ChangeRelocationDTO> page(Map<String, Object> params) { |
|
|
@ -324,6 +325,15 @@ public class ChangeRelocationServiceImpl extends BaseServiceImpl<ChangeRelocatio |
|
|
|
icResiUserService.updateById(uerEntity); |
|
|
|
} else { |
|
|
|
//不需要迁至其他房屋,直接变游离状态
|
|
|
|
IcResiUserEntity userEntity = icResiUserService.selectById(dto.getIcUserId()); |
|
|
|
//获取房屋信息
|
|
|
|
HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(dto.getCustomerId(), userEntity.getHomeId()); |
|
|
|
if (null == houseInfo) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取房屋信息失败", "获取房屋信息失败"); |
|
|
|
} |
|
|
|
dto.setOldDept(houseInfo.getGridName()); |
|
|
|
dto.setOldAddress(houseInfo.getAllName()); |
|
|
|
dto.setOldHome(houseInfo.getDoorName()); |
|
|
|
dto.setType("out"); |
|
|
|
dto.setOutOfTime(new Date()); |
|
|
|
dto.setAddress("其他"); |
|
|
|