|
|
@ -217,6 +217,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
public Result createTopic(TokenDto tokenDto, ResiTopicPublishFormDTO resiTopicPublishFormDTO) { |
|
|
|
String topicContent = resiTopicPublishFormDTO.getTopicContent(); |
|
|
|
List<String> attachmentList = resiTopicPublishFormDTO.getAttachmentList(); |
|
|
|
if (StringUtils.isNotBlank(topicContent)) { |
|
|
|
//创建话题内容审核
|
|
|
|
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); |
|
|
|
TextTaskDTO taskDTO = new TextTaskDTO(); |
|
|
@ -224,14 +225,15 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); |
|
|
|
textScanParamDTO.getTasks().add(taskDTO); |
|
|
|
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); |
|
|
|
if (!textSyncScanResult.success()){ |
|
|
|
if (!textSyncScanResult.success()) { |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|
|
|
} else { |
|
|
|
if (!textSyncScanResult.getData().isAllPass()) { |
|
|
|
log.error(String.format(TopicConstant.CREATE_TOPIC,topicContent)); |
|
|
|
log.error(String.format(TopicConstant.CREATE_TOPIC, topicContent)); |
|
|
|
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//创建话题图片审核
|
|
|
|
if (attachmentList.size() != NumConstant.ZERO){ |
|
|
|
ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); |
|
|
@ -1099,6 +1101,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
//话题转议题审核:标题、建议
|
|
|
|
String issueTitle = topicTurnIssueFromDTO.getIssueTitle(); |
|
|
|
String suggestion = topicTurnIssueFromDTO.getSuggestion(); |
|
|
|
if (StringUtils.isNotBlank(issueTitle) || StringUtils.isNotBlank(suggestion)) { |
|
|
|
TextScanParamDTO textScan = new TextScanParamDTO(); |
|
|
|
//标题
|
|
|
|
TextTaskDTO taskTitle = new TextTaskDTO(); |
|
|
@ -1111,14 +1114,15 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
taskSuggestion.setContent(suggestion); |
|
|
|
textScan.getTasks().add(taskSuggestion); |
|
|
|
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScan); |
|
|
|
if (!textSyncScanResult.success()){ |
|
|
|
if (!textSyncScanResult.success()) { |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|
|
|
} else { |
|
|
|
if (!textSyncScanResult.getData().isAllPass()) { |
|
|
|
log.error(String.format(TopicConstant.SHIFT_ISSUE,issueTitle,suggestion)); |
|
|
|
log.error(String.format(TopicConstant.SHIFT_ISSUE, issueTitle, suggestion)); |
|
|
|
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//1.统一时间(群组服务 -> 议题服务)
|
|
|
|
Date now = new Date(); |
|
|
|
//2.调用gov-org获取数据权限
|
|
|
|