|  |  | @ -1757,16 +1757,24 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
			
		
	
		
			
				
					|  |  |  |             // 插入附件头像(只有一张)
 | 
			
		
	
		
			
				
					|  |  |  |             List<IcResiUserAttachmentDTO> images = formDTO.getImages(); | 
			
		
	
		
			
				
					|  |  |  |             images.forEach(item -> item.setUserId(userDTO.getId())); | 
			
		
	
		
			
				
					|  |  |  |             images.forEach(item-> icResiUserAttachmentService.save(item)); | 
			
		
	
		
			
				
					|  |  |  |             images.forEach(item -> icResiUserAttachmentService.save(item)); | 
			
		
	
		
			
				
					|  |  |  |             // 如果是已经存在的居民,并且是租客状态,需要更新原本的状态
 | 
			
		
	
		
			
				
					|  |  |  |             if (NumConstant.ONE_STR.equals(formDTO.getType())) { | 
			
		
	
		
			
				
					|  |  |  |                 IcResiUserEntity entity = new IcResiUserEntity(); | 
			
		
	
		
			
				
					|  |  |  |                 entity.setId(resiUserId); | 
			
		
	
		
			
				
					|  |  |  |                 entity.setIsTenant(NumConstant.ONE_STR); | 
			
		
	
		
			
				
					|  |  |  |                 updateById(entity); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         } else if (NumConstant.ONE_STR.equals(formDTO.getType())) { | 
			
		
	
		
			
				
					|  |  |  |             // 如果是新增的租客,需要新增一条信息,不存在的房东就不管了
 | 
			
		
	
		
			
				
					|  |  |  |             IcResiUserEntity entity = ConvertUtils.sourceToTarget(formDTO.getUser(), IcResiUserEntity.class); | 
			
		
	
		
			
				
					|  |  |  |             entity.setIsTenant(NumConstant.ONE_STR); | 
			
		
	
		
			
				
					|  |  |  |             insert(entity); | 
			
		
	
		
			
				
					|  |  |  |             resiUserId = entity.getId(); | 
			
		
	
		
			
				
					|  |  |  |             // 变更记录表和变更记录明细表新增数据
 | 
			
		
	
		
			
				
					|  |  |  |             LinkedHashMap<String, String> map = new LinkedHashMap(); | 
			
		
	
		
			
				
					|  |  |  |             map.put("AGENCY_ID",entity.getAgencyId()); | 
			
		
	
		
			
				
					|  |  |  |             saveUserChangeRecord(tokenDto,map,resiUserId,entity.getName()); | 
			
		
	
		
			
				
					|  |  |  |             map.put("AGENCY_ID", entity.getAgencyId()); | 
			
		
	
		
			
				
					|  |  |  |             saveUserChangeRecord(tokenDto, map, resiUserId, entity.getName()); | 
			
		
	
		
			
				
					|  |  |  |             // 新增用户后保存头像信息
 | 
			
		
	
		
			
				
					|  |  |  |             List<IcResiUserAttachmentDTO> images = formDTO.getImages(); | 
			
		
	
		
			
				
					|  |  |  |             images.forEach(item -> item.setUserId(entity.getId())); | 
			
		
	
	
		
			
				
					|  |  | 
 |