| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -7,6 +7,7 @@ import com.epmet.commons.tools.constant.FieldConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.exception.EpmetException; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.page.PageData; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.security.user.LoginUserUtil; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.plugin.power.dto.rent.RentContractFileDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.plugin.power.dto.rent.RentContractInfoDTO; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -41,6 +42,9 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Autowired | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private RentContractInfoRedis rentContractInfoRedis; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Autowired | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    LoginUserUtil loginUserUtil; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Autowired | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private RentTenantInfoService rentTenantInfoService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -141,6 +145,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void save(RentContractInfoDTO dto) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        RentContractInfoEntity entity = ConvertUtils.sourceToTarget(dto, RentContractInfoEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        entity.setCustomerId(loginUserUtil.getLoginUserCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        insert(entity); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        updateTenantAndFile(entity.getId(), dto); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -150,8 +155,8 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public void review(RentContractInfoDTO dto) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        RentContractInfoEntity entity = ConvertUtils.sourceToTarget(dto, RentContractInfoEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        updateById(entity); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(NumConstant.ONE_STR.equals(entity.getState())){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (NumConstant.ONE_STR.equals(entity.getState())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // todo 更新头像到产品人员库
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -191,6 +196,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                tenant.setContractId(contractId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                tenant.setType(NumConstant.ONE_STR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                tenant.setCustomerId(loginUserUtil.getLoginUserCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            rentTenantInfoService.insertBatch(tenantList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 处理租客头像
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -202,6 +208,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    imgList.forEach(img -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        img.setReferenceId(tenant.getId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        img.setFileType(NumConstant.ZERO_STR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        img.setCustomerId(loginUserUtil.getLoginUserCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    rentContractFileService.insertBatch(imgList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -215,6 +222,7 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl<RentContractInf | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            fileList.forEach(item -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                item.setReferenceId(contractId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                item.setFileType(NumConstant.ONE_STR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                item.setCustomerId(loginUserUtil.getLoginUserCustomerId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            rentContractFileService.insertBatch(fileList); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |