|  |  | @ -25,11 +25,14 @@ import com.epmet.commons.tools.constant.AppClientConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.EpmetRoleKeyConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.FieldConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.page.PageData; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.ConvertUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.Result; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.constant.PartyMemberConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.UserRoleDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.form.UserResiInfoFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.UserResiInfoResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.modules.feign.EpmetUserFeignClient; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.modules.warmhearted.constant.ResiWarmheartedVisitConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.modules.warmhearted.dao.ResiWarmheartedApplyDao; | 
			
		
	
	
		
			
				
					|  |  | @ -129,8 +132,19 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  |     public Result<ResiWarmheartedResultDTO> init(ResiWarmheartedFormDTO formDTO) { | 
			
		
	
		
			
				
					|  |  |  |         Result<ResiWarmheartedResultDTO> result = new Result<ResiWarmheartedResultDTO>(); | 
			
		
	
		
			
				
					|  |  |  |         //0:先判断该用户是否是已注册居民
 | 
			
		
	
		
			
				
					|  |  |  |         UserResiInfoFormDTO userResiInfoFormDTO = new UserResiInfoFormDTO(); | 
			
		
	
		
			
				
					|  |  |  |         userResiInfoFormDTO.setCustomerId(formDTO.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  |         userResiInfoFormDTO.setUserId(formDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  |         Result<UserResiInfoResultDTO> result1 = epmetUserFeignClient.getUserResiInfoDTO(userResiInfoFormDTO); | 
			
		
	
		
			
				
					|  |  |  |         if (!result1.success() || null == result1.getData()) { | 
			
		
	
		
			
				
					|  |  |  |             result.setCode(EpmetErrorCode.CANNOT_AUDIT_WARM.getValue()); | 
			
		
	
		
			
				
					|  |  |  |             result.setMsg(EpmetErrorCode.CANNOT_AUDIT_WARM.getName()); | 
			
		
	
		
			
				
					|  |  |  |             return result; | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         //1:热心居民申请行为记录表新增数据
 | 
			
		
	
		
			
				
					|  |  |  |         Result<ResiWarmheartedResultDTO> result = resiWarmheartedVisitService.saveResiWarmheartedVisit(formDTO); | 
			
		
	
		
			
				
					|  |  |  |         result = resiWarmheartedVisitService.saveResiWarmheartedVisit(formDTO); | 
			
		
	
		
			
				
					|  |  |  |         if (!result.success()) { | 
			
		
	
		
			
				
					|  |  |  |             log.warn(ResiWarmheartedVisitConstant.OPERATION_EXCEPTION); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
	
		
			
				
					|  |  | @ -187,12 +201,12 @@ public class ResiWarmheartedApplyServiceImpl extends BaseServiceImpl<ResiWarmhea | 
			
		
	
		
			
				
					|  |  |  |             //审核状态-通过
 | 
			
		
	
		
			
				
					|  |  |  |             entity.setAuditStatus(PartyMemberConstant.APPROVED); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         if(!StringUtils.isBlank(formDTO.getRefuseReason())){ | 
			
		
	
		
			
				
					|  |  |  |         if (!StringUtils.isBlank(formDTO.getRefuseReason())) { | 
			
		
	
		
			
				
					|  |  |  |             entity.setRefuseReason(formDTO.getRefuseReason()); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         baseDao.updateById(entity); | 
			
		
	
		
			
				
					|  |  |  |         //2:审核通过的添加热心居民的角色
 | 
			
		
	
		
			
				
					|  |  |  |         if(NumConstant.ONE_STR.equals(formDTO.getAuditStatus())){ | 
			
		
	
		
			
				
					|  |  |  |         if (NumConstant.ONE_STR.equals(formDTO.getAuditStatus())) { | 
			
		
	
		
			
				
					|  |  |  |             //查询需要添加热心居民角色的userId
 | 
			
		
	
		
			
				
					|  |  |  |             ResiWarmheartedApplyEntity resiWarmheartedApplyEntity = baseDao.selectById(formDTO.getResiWarmApplyId()); | 
			
		
	
		
			
				
					|  |  |  |             UserRoleDTO dto = new UserRoleDTO(); | 
			
		
	
	
		
			
				
					|  |  | 
 |