| 
						
						
							
								
							
						
						
					 | 
					@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.baomidou.mybatisplus.core.metadata.IPage; | 
					 | 
					 | 
					import com.baomidou.mybatisplus.core.metadata.IPage; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
					 | 
					 | 
					import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.constant.FieldConstant; | 
					 | 
					 | 
					import com.epmet.commons.tools.constant.FieldConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.commons.tools.enums.IcResiUserSubStatusEnum; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.page.PageData; | 
					 | 
					 | 
					import com.epmet.commons.tools.page.PageData; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.security.user.LoginUserUtil; | 
					 | 
					 | 
					import com.epmet.commons.tools.security.user.LoginUserUtil; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -141,22 +143,26 @@ public class ChangeDeathServiceImpl extends BaseServiceImpl<ChangeDeathDao, Chan | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //更新epmet用户状态
 | 
					 | 
					 | 
					        //更新epmet用户状态
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        IcResiUserEntity userEntity = new IcResiUserEntity(); | 
					 | 
					 | 
					        IcResiUserEntity userEntity = new IcResiUserEntity(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        userEntity.setId(dto.getUserId()); | 
					 | 
					 | 
					        userEntity.setId(dto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        userEntity.setStatus("2");//死亡
 | 
					 | 
					 | 
					        // 用户状态【0:正常;1:迁出;2:注销】
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        userEntity.setSubStatus("21");//死亡
 | 
					 | 
					 | 
					        userEntity.setStatus(NumConstant.TWO_STR); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        userEntity.setSubStatus(IcResiUserSubStatusEnum.DIED.getSubStatus());//死亡
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        icResiUserService.updateById(userEntity); | 
					 | 
					 | 
					        icResiUserService.updateById(userEntity); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //变更主表、变更明细表
 | 
					 | 
					 | 
					        //变更主表、变更明细表
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        IcResiUserTransferFormDTO icResiUserTransferFormDTO=new IcResiUserTransferFormDTO(); | 
					 | 
					 | 
					        IcResiUserTransferFormDTO icResiUserTransferFormDTO=new IcResiUserTransferFormDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        icResiUserTransferFormDTO.setIcUserId(dto.getUserId()); | 
					 | 
					 | 
					        icResiUserTransferFormDTO.setIcUserId(dto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        //死亡相当于迁出至客户外,赋值out
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        icResiUserTransferFormDTO.setType("out"); | 
					 | 
					 | 
					        icResiUserTransferFormDTO.setType("out"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        icResiUserTransferFormDTO.setCustomerId(loginUserUtil.getLoginUserCustomerId()); | 
					 | 
					 | 
					        icResiUserTransferFormDTO.setCustomerId(loginUserUtil.getLoginUserCustomerId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        icResiUserTransferFormDTO.setStaffId(dto.getStaffId()); | 
					 | 
					 | 
					        icResiUserTransferFormDTO.setStaffId(dto.getStaffId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        //死亡日期即为取当前时间,视作变更时间 todo 待确认
 | 
					 | 
					 | 
					        //死亡日期
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        icResiUserTransferFormDTO.setTransferTime(dto.getDeathDate()); | 
					 | 
					 | 
					        icResiUserTransferFormDTO.setTransferTime(dto.getDeathDate()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        // icResiUserTransferFormDTO.setMoveType(IcResiUserConstant.DIED);
 | 
					 | 
					 | 
					        //死亡
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        icResiUserTransferFormDTO.setOrigin(IcResiUserConstant.DIED); | 
					 | 
					 | 
					        icResiUserTransferFormDTO.setOrigin(IcResiUserConstant.DIED); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //死亡原因
 | 
					 | 
					 | 
					        //死亡原因
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        icResiUserTransferFormDTO.setReason(dto.getJoinReason()); | 
					 | 
					 | 
					        icResiUserTransferFormDTO.setReason(StringUtils.isNotBlank(dto.getJoinReason()) ? dto.getJoinReason() : "死亡登记"); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        SpringContextUtils.getBean(IcUserTransferRecordService.class).moveResi(icResiUserTransferFormDTO); | 
					 | 
					 | 
					        SpringContextUtils.getBean(IcUserTransferRecordService.class).moveResi(icResiUserTransferFormDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //推送MQ事件
 | 
					 | 
					 | 
					        //推送MQ事件
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        changeRelocationServiceImpl.editResiMq(formDTO.getCustomerId(), dto.getUserId()); | 
					 | 
					 | 
					        changeRelocationServiceImpl.editResiMq(formDTO.getCustomerId(), dto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return new Result(); | 
					 | 
					 | 
					        return new Result(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |