diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java index a8a569100d..0b1295ab88 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java @@ -117,5 +117,5 @@ public interface ServiceConstant { /** * 数据统计 */ - String DATA_STATISTICAL = "data-statistical-server"; + String DATA_STATISTICAL_SERVER = "data-statistical-server"; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java index 9b8dace788..128cdf183c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java @@ -158,8 +158,9 @@ public class TopicServiceImpl implements TopicService { String agencyId = this.getLoginUserDetails(tokenDto); List topicSummaryInfo = topicDao.topicSummaryInfo(agencyId); TopicShiftedCountResultDTO shiftedCount = topicDao.getShiftedCount(agencyId); - int i = (shiftedCount.getShiftedIssueCount() / topicSummaryInfo.stream().collect(Collectors.summingInt(TopicSummaryInfoResultDTO::getValue))) * NumConstant.ONE_HUNDRED; - String ratio = String.valueOf(i) + TopicConstant.RATIO; + Integer collect = topicSummaryInfo.stream().collect(Collectors.summingInt(TopicSummaryInfoResultDTO::getValue)); + String ratio; + ratio = collect == NumConstant.ZERO ? NumConstant.ZERO + TopicConstant.RATIO : (shiftedCount.getShiftedIssueCount() / collect) * NumConstant.ONE_HUNDRED + TopicConstant.RATIO; TopicSummaryInfoResultDTO result = new TopicSummaryInfoResultDTO(); result.setName(TopicConstant.SHIFTED); result.setRatio(ratio); diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/IssueDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/IssueDao.xml index 19e81a0cb5..bb9e3b4747 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/IssueDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/issue/IssueDao.xml @@ -35,6 +35,7 @@ WHERE fiad.DEL_FLAG = '0' AND fiad.PID = #{agencyId} GROUP BY AGENCY_ID + ORDER BY fiad.ISSUE_TOTAL DESC