|  |  | @ -2,7 +2,6 @@ package com.epmet.service.impl; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 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.exception.EpmetErrorCode; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.EpmetException; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.RenException; | 
			
		
	
	
		
			
				
					|  |  | @ -26,13 +25,17 @@ import com.epmet.service.IcResiUserService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.UserBaseInfoService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.UserService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.util.ModuleConstant; | 
			
		
	
		
			
				
					|  |  |  | import org.apache.commons.collections4.CollectionUtils; | 
			
		
	
		
			
				
					|  |  |  | import org.apache.commons.lang3.StringUtils; | 
			
		
	
		
			
				
					|  |  |  | import org.slf4j.Logger; | 
			
		
	
		
			
				
					|  |  |  | import org.slf4j.LoggerFactory; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | import java.util.ArrayList; | 
			
		
	
		
			
				
					|  |  |  | import java.util.Date; | 
			
		
	
		
			
				
					|  |  |  | import java.util.List; | 
			
		
	
		
			
				
					|  |  |  | import java.util.stream.Collectors; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | /** | 
			
		
	
	
		
			
				
					|  |  | @ -370,15 +373,13 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         ResiUserResDTO resiUserResDTO = ConvertUtils.sourceToTarget(formDTO, ResiUserResDTO.class); | 
			
		
	
		
			
				
					|  |  |  |         if (StringUtils.isNotBlank(formDTO.getIdNum())) { | 
			
		
	
		
			
				
					|  |  |  |             UserBaseInfoDTO userBaseInfoDTO = userBaseInfoService.getUserIdByIdNum(formDTO.getCustomerId(), | 
			
		
	
		
			
				
					|  |  |  |                     formDTO.getIdNum(), null); | 
			
		
	
		
			
				
					|  |  |  |             if (null == userBaseInfoDTO || StringUtils.isBlank(userBaseInfoDTO.getUserId())) { | 
			
		
	
		
			
				
					|  |  |  |             List<UserBaseInfoDTO> userBaseInfoList = userBaseInfoService.getCommonIdNumUser(formDTO.getCustomerId(),formDTO.getIdNum()); | 
			
		
	
		
			
				
					|  |  |  |             if (CollectionUtils.isEmpty(userBaseInfoList)) { | 
			
		
	
		
			
				
					|  |  |  |                 log.info("user_base_info没有找到,去查下user_resi_info表吧"); | 
			
		
	
		
			
				
					|  |  |  |                 UserResiInfoDTO userResiInfoDTO = userResiInfoDao.selectByIdNum(formDTO.getCustomerId(), | 
			
		
	
		
			
				
					|  |  |  |                         formDTO.getIdNum(), null); | 
			
		
	
		
			
				
					|  |  |  |                 resiUserResDTO.setEpmetUserId(null != userResiInfoDTO ? userResiInfoDTO.getId() : StrConstant.EPMETY_STR); | 
			
		
	
		
			
				
					|  |  |  |                 List<UserResiInfoDTO> userResiInfoDTO = userResiInfoDao.selectCommonIdNumUser(formDTO.getCustomerId(),formDTO.getIdNum()); | 
			
		
	
		
			
				
					|  |  |  |                 resiUserResDTO.setEpmetUserIdList(CollectionUtils.isNotEmpty(userResiInfoDTO) ? userResiInfoDTO.stream().map(UserResiInfoDTO::getUserId).collect(Collectors.toList()): new ArrayList<>()); | 
			
		
	
		
			
				
					|  |  |  |             } else { | 
			
		
	
		
			
				
					|  |  |  |                 resiUserResDTO.setEpmetUserId(userBaseInfoDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  |                 resiUserResDTO.setEpmetUserIdList(userBaseInfoList.stream().map(UserBaseInfoDTO::getUserId).collect(Collectors.toList())); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         return resiUserResDTO; | 
			
		
	
	
		
			
				
					|  |  | 
 |