| 
						
						
							
								
							
						
						
					 | 
					@ -5,11 +5,10 @@ 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.constant.NumConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					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.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; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.IcResiUserAttachmentDTO; | 
					 | 
					 | 
					import com.epmet.dto.IcResiUserAttachmentDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.form.RentTenantFormDTO; | 
					 | 
					 | 
					import com.epmet.dto.form.RentTenantFormDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.feign.EpmetUserOpenFeignClient; | 
					 | 
					 | 
					import com.epmet.feign.EpmetUserOpenFeignClient; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -25,10 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.transaction.annotation.Transactional; | 
					 | 
					 | 
					import org.springframework.transaction.annotation.Transactional; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					import java.util.ArrayList; | 
					 | 
					 | 
					import java.util.*; | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.Arrays; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.List; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import java.util.Map; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					/** | 
					 | 
					 | 
					/** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 * 租客表 | 
					 | 
					 | 
					 * 租客表 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -70,11 +66,13 @@ public class RentTenantInfoServiceImpl extends BaseServiceImpl<RentTenantInfoDao | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private QueryWrapper<RentTenantInfoEntity> getWrapper(Map<String, Object> params) { | 
					 | 
					 | 
					    private QueryWrapper<RentTenantInfoEntity> getWrapper(Map<String, Object> params) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        String id = (String) params.get(FieldConstant.ID_HUMP); | 
					 | 
					 | 
					        String id = (String) params.get(FieldConstant.ID_HUMP); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        String contractId = (String) params.get("contractId"); | 
					 | 
					 | 
					        String contractId = (String) params.get("contractId"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        String idCard = (String) params.get("idCard"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        String type = (String) params.get("type"); | 
					 | 
					 | 
					        String type = (String) params.get("type"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        QueryWrapper<RentTenantInfoEntity> wrapper = new QueryWrapper<>(); | 
					 | 
					 | 
					        QueryWrapper<RentTenantInfoEntity> wrapper = new QueryWrapper<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | 
					 | 
					 | 
					        wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        wrapper.eq(StringUtils.isNotBlank(contractId), "CONTRACT_ID", contractId); | 
					 | 
					 | 
					        wrapper.eq(StringUtils.isNotBlank(contractId), "CONTRACT_ID", contractId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        wrapper.eq(StringUtils.isNotBlank(idCard), "ID_CARD", idCard); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        wrapper.eq(StringUtils.isNotBlank(type), "TYPE", type); | 
					 | 
					 | 
					        wrapper.eq(StringUtils.isNotBlank(type), "TYPE", type); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return wrapper; | 
					 | 
					 | 
					        return wrapper; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -88,11 +86,17 @@ public class RentTenantInfoServiceImpl extends BaseServiceImpl<RentTenantInfoDao | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
					 | 
					 | 
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public void save(RentTenantInfoDTO dto) { | 
					 | 
					 | 
					    public Result save(RentTenantInfoDTO dto) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        Map<String, Object> params = new HashMap<>(4); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        params.put("idCard",dto.getIdCard()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if(!list(params).isEmpty()){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            return new Result().error("用户已存在"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<IcResiUserAttachmentDTO> images = new ArrayList<>(); | 
					 | 
					 | 
					        List<IcResiUserAttachmentDTO> images = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 处理头像
 | 
					 | 
					 | 
					        // 处理头像
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (dto.getImgList().isEmpty()) { | 
					 | 
					 | 
					        if (dto.getImgList().isEmpty()) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "照片不能为空"); | 
					 | 
					 | 
					            return new Result().error("照片不能为空"); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        } else { | 
					 | 
					 | 
					        } else { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            RentTenantInfoEntity entity = ConvertUtils.sourceToTarget(dto, RentTenantInfoEntity.class); | 
					 | 
					 | 
					            RentTenantInfoEntity entity = ConvertUtils.sourceToTarget(dto, RentTenantInfoEntity.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            entity.setCustomerId(loginUserUtil.getLoginUserCustomerId()); | 
					 | 
					 | 
					            entity.setCustomerId(loginUserUtil.getLoginUserCustomerId()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -122,6 +126,7 @@ public class RentTenantInfoServiceImpl extends BaseServiceImpl<RentTenantInfoDao | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                epmetUserOpenFeignClient.updateImage(formDTO); | 
					 | 
					 | 
					                epmetUserOpenFeignClient.updateImage(formDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        return new Result(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |