| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -964,25 +964,25 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public Result shiftProjectV2(ShiftProjectFormDTO formDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        RLock lock = null; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 锁持有10分钟,等待10s
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            lock = distributedLock.tryLock(formDTO.getIssueId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //获取锁,判断当前议题是否已处理
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            lock = distributedLock.tryLock(formDTO.getCustomerId() + formDTO.getIssueId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //1:查询议题数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IssueEntity entity = baseDao.selectById(formDTO.getIssueId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (null == entity) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(IssueConstant.SELECT_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException(9999,IssueConstant.SELECT_EXCEPTION,IssueConstant.SELECT_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (IssueConstant.ISSUE_SHIFT_PROJECT.equals(entity.getIssueStatus())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(IssueConstant.ISSUE_SHIFT_PROJECT_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException(9999,IssueConstant.ISSUE_SHIFT_PROJECT_EXCEPTION,IssueConstant.ISSUE_SHIFT_PROJECT_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (!IssueConstant.ISSUE_VOTING.equals(entity.getIssueStatus())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(IssueConstant.ISSUE_VOTING_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException(9999,IssueConstant.ISSUE_VOTING_EXCEPTION,IssueConstant.ISSUE_VOTING_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            formDTO.setIssueDTO(ConvertUtils.sourceToTarget(entity, IssueDTO.class)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //获取议题分类
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<IssueCategoryDTO> categoryList = issueCategoryService.getCategoryByIssue(formDTO.getIssueId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (CollectionUtils.isEmpty(categoryList)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(EpmetErrorCode.CATEGORY_IS_NULL.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException(EpmetErrorCode.CATEGORY_IS_NULL.getCode(),EpmetErrorCode.CATEGORY_IS_NULL.getMsg(),EpmetErrorCode.CATEGORY_IS_NULL.getMsg()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //公开回复内容审核
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -994,10 +994,10 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                textScanParamDTO.getTasks().add(taskDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (!textSyncScanResult.success()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(),EpmetErrorCode.SERVER_ERROR.getMsg(),EpmetErrorCode.SERVER_ERROR.getMsg()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    if (!textSyncScanResult.getData().isAllPass()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        throw new EpmetException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode(),EpmetErrorCode.TEXT_SCAN_FAILED.getMsg(),EpmetErrorCode.TEXT_SCAN_FAILED.getMsg()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -1007,7 +1007,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //2:调用resi-group查询话题创建人数据(目前议题来源只有来自话题),为了到项目服务初始数据以及发送消息使用
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            Result<ResiTopicDTO> resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(IssueConstant.SELECT_TOPIC_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException(9999,IssueConstant.SELECT_TOPIC_EXCEPTION,IssueConstant.SELECT_TOPIC_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            ResiTopicDTO topicDTO = resultTopicDTO.getData(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            formDTO.setTopicDTO(topicDTO); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -1019,7 +1019,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            Result<IssueProjectResultDTO> resultDTO = govProjectFeignClient.issueShiftProject(formDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (!resultDTO.success() || null == resultDTO.getData()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                logger.error(resultDTO.getInternalMsg()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(IssueConstant.GOV_PRJECT_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException(9999,IssueConstant.GOV_PRJECT_EXCEPTION,IssueConstant.GOV_PRJECT_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            IssueProjectResultDTO issueProjectResultDTO = resultDTO.getData(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //更新项目对标签的引用次数
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -1054,7 +1054,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //5:调用epmet-message服务,给居民端话题创建人、议题发起人以及政府端工作人员发送消息
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (!shiftProjectMessage(issueProjectResultDTO, formDTO, entity).success()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new RenException(IssueConstant.SAVE_MSG_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException(9999,IssueConstant.SAVE_MSG_EXCEPTION,IssueConstant.SAVE_MSG_EXCEPTION); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //5-1:2020.10.26  添加给居民端话题创建人、议题发起人以及政府端工作人员推送微信订阅消息功能  sun
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (!wxmpShiftProjectMessage(issueProjectResultDTO, formDTO, entity).success()) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -1088,7 +1088,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //SendMqMsgUtil.build().openFeignClient(messageOpenFeignClient).sendProjectChangedMqMsg();
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return new Result(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } catch (Exception e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return new Result().error("议题数据正在处理中,请勿重复提交!"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return new Result().error(e.getMessage()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } finally { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            distributedLock.unLock(lock); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |