diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueShiftedFromTopicFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueShiftedFromTopicFormDTO.java index 872eb43772..b41592a829 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueShiftedFromTopicFormDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/IssueShiftedFromTopicFormDTO.java @@ -122,4 +122,19 @@ public class IssueShiftedFromTopicFormDTO implements Serializable { private String groupId; private String issueId; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 地址 + */ + private String address; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicAndGroupResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicAndGroupResultDTO.java index ac3516418d..8577b8493b 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicAndGroupResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/ResiTopicAndGroupResultDTO.java @@ -33,4 +33,19 @@ public class ResiTopicAndGroupResultDTO implements Serializable { * 客户Id * */ private String customerId; + + /** + * 定位地址 + * */ + private String locateAddress; + + /** + * 定位经度 + * */ + private String locateLongitude; + + /** + * 定位纬度 + * */ + private String locateDimension; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index 1592aa0fe7..3c000533e0 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -1797,38 +1797,10 @@ public class ResiTopicServiceImpl extends BaseServiceImpl textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScan); - if (!textSyncScanResult.success()) { - throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); - } else { - if (!textSyncScanResult.getData().isAllPass()) { - log.error(String.format(TopicConstant.SHIFT_ISSUE, issueTitle, suggestion)); - throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); - } - } - } + // 是否已经转议题? + checkShiftedIssue(topicTurnIssueFromDTO.getTopicId()); + // 话题转议题审核:标题、建议 + scanIssueContent(topicTurnIssueFromDTO.getIssueTitle(),topicTurnIssueFromDTO.getSuggestion()); FirstTopicShiftedToIssueApplicationResultDTO result = null; //1.统一时间(群组服务 -> 议题服务) @@ -1856,6 +1828,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl issueResult = issueOpenFeignClient.topicShiftedToIssueV2(issueInfo); if (issueResult == null || !issueResult.success() || null == issueResult.getData()) { @@ -1994,6 +1969,53 @@ public class ResiTopicServiceImpl extends BaseServiceImpl result = govIssueFeignClient.checkTopicShiftIssue(topicInfoFormDTO); + if (result.success()) { + Integer issueCount = result.getData(); + if (issueCount != NumConstant.ZERO) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), ModuleConstant.ALREADY_SHIFT_ISSUE, ModuleConstant.ALREADY_SHIFT_ISSUE); + } + } + } + + /** + * 审核提出来 + * @param issueTitle + * @param suggestion + */ + private void scanIssueContent(String issueTitle, String suggestion) { + //话题转议题审核:标题、建议 + if (StringUtils.isNotBlank(issueTitle) || StringUtils.isNotBlank(suggestion)) { + TextScanParamDTO textScan = new TextScanParamDTO(); + //标题 + TextTaskDTO taskTitle = new TextTaskDTO(); + taskTitle.setContent(issueTitle); + taskTitle.setDataId(UUID.randomUUID().toString().replace("-", "")); + textScan.getTasks().add(taskTitle); + //建议 + TextTaskDTO taskSuggestion = new TextTaskDTO(); + taskSuggestion.setDataId(UUID.randomUUID().toString().replace("-", "")); + taskSuggestion.setContent(suggestion); + textScan.getTasks().add(taskSuggestion); + Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScan); + if (!textSyncScanResult.success()) { + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + log.error(String.format(TopicConstant.SHIFT_ISSUE, issueTitle, suggestion)); + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); + } + } + } + } + /** * @Description 工作端审核议题通过时获取一些议题相关信息 * @param param diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml index 2610b429eb..c5ebbc64ea 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml @@ -400,7 +400,10 @@ groupp.ID AS groupId, IFNULL(groupp.GRID_ID,'') AS gridId, IFNULL(groupp.CUSTOMER_ID,'') AS customerId, - topic.CREATED_BY AS topicAuthorId + topic.CREATED_BY AS topicAuthorId, + topic.LOCATE_ADDRESS as locateAddress, + topic.LOCATE_LONGITUDE as locateLongitude, + topic.LOCATE_DIMENSION as locateDimension FROM RESI_TOPIC topic INNER JOIN RESI_GROUP groupp ON topic.GROUP_ID = groupp.ID