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/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index b576a0f1ca..ac11b644fc 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -510,23 +510,7 @@ public class IssueServiceImpl extends BaseServiceImpl imp @Override @Transactional(rollbackFor = Exception.class) public String audit(TokenDto token, IssueAuditionFormDTO param){ - - if (StringUtils.isNotBlank(param.getReason())) { - TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); - TextTaskDTO taskDTO = new TextTaskDTO(); - taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); - taskDTO.setContent(param.getReason()); - textScanParamDTO.getTasks().add(taskDTO); - Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); - if (!textSyncScanResult.success()){ - throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); - } else { - if (!textSyncScanResult.getData().isAllPass()) { - throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); - } - } - } - + scanReason(param.getReason()); Date unifiedDate = new Date(); IssueApplicationDTO application = applicationService.get(param.getIssueApplicationId()); @@ -613,6 +597,24 @@ public class IssueServiceImpl extends BaseServiceImpl imp return app2update.getIssueId(); } + private void scanReason(String reason) { + if (StringUtils.isNotBlank(reason)) { + TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); + TextTaskDTO taskDTO = new TextTaskDTO(); + taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); + taskDTO.setContent(reason); + textScanParamDTO.getTasks().add(taskDTO); + Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!textSyncScanResult.success()){ + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!textSyncScanResult.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); + } + } + } + } + /** * @Description 表决中列表 * @param issueListForm diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/IssueShiftedFromTopicFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/IssueShiftedFromTopicFormDTO.java index 6eba4678d7..ac45f7b351 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/IssueShiftedFromTopicFormDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/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..eeda789667 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 @@ -2019,7 +2041,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl