diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java index cf62356848..a4babe6039 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/dao/publicity/PublicityDao.java @@ -42,76 +42,76 @@ public interface PublicityDao { /** * @Description 当月———获取机关下,获取每个标签阅读数量,按照数量降序,取前pagesize个 * @param agencyId,monthId,pageSize 机关id,月,展示数量 - * @author zxc + * @author jyy */ List getViewedMonthlyCountByTag(@Param("agencyId") String agencyId, @Param("monthId") String monthId, @Param("pageSize") Integer pageSize); /** * @Description 当季———获取机关下,获取每个标签阅读数量,按照数量降序,取前pagesize个 * @param agencyId,quarterId,pageSize 机关id,季,展示数量 - * @author zxc + * @author jyy */ List getViewedQuarterlyCountByTag(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId, @Param("pageSize") Integer pageSize); /** * @Description 当年———获取机关下,获取每个标签阅读数量,按照数量降序,取前pagesize个 * @param agencyId,yearId,pageSize 机关id,年,展示数量 - * @author zxc + * @author jyy */ List getViewedYearlyCountByTag(@Param("agencyId") String agencyId, @Param("yearId") String yearId, @Param("pageSize") Integer pageSize); /** * @Description 当月———获取机关下,获取每个标签发文数量,按照数量降序,取前pagesize个 * @param agencyId,monthId,pageSize 机关id,月,展示数量 - * @author zxc + * @author jyy */ List getUsedMonthlyCountByTag(@Param("agencyId") String agencyId, @Param("monthId") String monthId, @Param("pageSize") Integer pageSize); /** * @Description 当季———获取机关下,获取每个标签发文数量,按照数量降序,取前pagesize个 * @param agencyId,quarterId,pageSize 机关id,季,展示数量 - * @author zxc + * @author jyy */ List getUsedQuarterlyCountByTag(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId, @Param("pageSize") Integer pageSize); /** * @Description 当年———获取机关下,每个标签发文数量,按照数量降序,取前pagesize个 * @param agencyId,yearId,pageSize 机关id,年,展示数量 - * @author zxc + * @author jyy */ List getUsedYearlyCountByTag(@Param("agencyId") String agencyId, @Param("yearId") String yearId, @Param("pageSize") Integer pageSize); /** * @Description 当月———下级机发文数 * @param agencyId,monthId 机关id,月 - * @author zxc + * @author jyy */ List getSubAgencyPublishedMonth(@Param("agencyId") String agencyId, @Param("monthId") String monthId); /** * @Description 当季———下级机发文数 * @param agencyId,quarterId 机关id,季度 - * @author zxc + * @author jyy */ List getSubAgencyPublishedQuarter(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId); /** * @Description 当年———下级机发文数 * @param agencyId,yearId 机关id,年 - * @author zxc + * @author jyy */ List getSubAgencyPublishedYear(@Param("agencyId") String agencyId, @Param("yearId") String yearId); /** * @Description 当月———下级部门文数 * @param agencyId,monthId 机关id,月 - * @author zxc + * @author jyy */ List getSubDepartPublishedMonth(@Param("agencyId") String agencyId, @Param("monthId") String monthId); /** * @Description 当季———下级部门文数 * @param agencyId,quarterId 机关id,季度 - * @author zxc + * @author jyy */ List getSubDepartPublishedQuarter(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId); /** @@ -124,20 +124,20 @@ public interface PublicityDao { /** * @Description 当月———下级网格文数 * @param agencyId,monthId 机关id,月 - * @author zxc + * @author jyy */ List getSubGridPublishedMonth(@Param("agencyId") String agencyId, @Param("monthId") String monthId); /** * @Description 当季———下级网格文数 * @param agencyId,quarterId 机关id,季度 - * @author zxc + * @author jyy */ List getSubGridPublishedQuarter(@Param("agencyId") String agencyId, @Param("quarterId") String quarterId); /** * @Description 当年———下级网格文数 * @param agencyId,yearId 机关id,年 - * @author zxc + * @author jyy */ List getSubGridPublishedYear(@Param("agencyId") String agencyId, @Param("yearId") String yearId); diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/publicity/PublicityDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/publicity/PublicityDao.xml index bb4b53fd65..165aab88fa 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/publicity/PublicityDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/publicity/PublicityDao.xml @@ -19,7 +19,7 @@ tag_name AS name, agency_id AS agencyId, tag_id AS tagId, - COUNT(tag_read_count) AS value + SUM(tag_read_count) AS value FROM fact_tag_viewed_agency_monthly where agency_id = #{agencyId} AND month_id = #{monthId} @@ -34,7 +34,7 @@ tag_name AS name, agency_id AS agencyId, tag_id AS tagId, - COUNT(tag_read_count) AS value + SUM(tag_read_count) AS value FROM fact_tag_viewed_agency_quarterly where agency_id = #{agencyId} AND quarter_id = #{quarterId} @@ -49,7 +49,7 @@ tag_name AS name, agency_id AS agencyId, tag_id AS tagId, - COUNT(tag_read_count) AS value + SUM(tag_read_count) AS value FROM fact_tag_viewed_agency_yearly where agency_id = #{agencyId} AND year_id = #{yearId} @@ -64,7 +64,7 @@ tag_name AS name, agency_id AS agencyId, tag_id AS tagId, - COUNT(used_count) AS value + SUM(used_count) AS value FROM fact_tag_used_agency_monthly where agency_id = #{agencyId} AND month_id = #{monthId} @@ -79,7 +79,7 @@ tag_name AS name, agency_id AS agencyId, tag_id AS tagId, - COUNT(used_count) AS value + SUM(used_count) AS value FROM fact_tag_used_agency_quarterly where agency_id = #{agencyId} AND quarter_id = #{quarterId} @@ -94,7 +94,7 @@ tag_name AS name, agency_id AS agencyId, tag_id AS tagId, - COUNT(used_count) AS value + SUM(used_count) AS value FROM fact_tag_used_agency_yearly where agency_id = #{agencyId} AND year_id = #{yearId} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java index 999a90709e..a4e9ecbc6a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java @@ -84,6 +84,10 @@ public class TopicServiceImpl implements TopicService { } + if(!subGridOfAgency.containsKey(agency.getAgencyId())){ + subGridOfAgency.put(agency.getAgencyId(),new HashSet<>()); + } + }); return calculateAndSummarizeTopicStatisticalData(subGridOfAgency,agencies,gridGroupMap,targetDate,statusDimension,timeDimension,customerId); @@ -324,13 +328,13 @@ public class TopicServiceImpl implements TopicService { gridDistinct.put(gridId,true); }); - //机关-百分比 - setAgencyTopicProportion(numberFormat,topicAgencyD_discussing,topicAgencyD_hidden,topicAgencyD_closed,totalAgencyD); - setAgencyDailyDataPacket(dataPacket,issueAgencyD,totalAgencyD,topicAgencyD_discussing,topicAgencyD_hidden,topicAgencyD_closed); } + //机关-百分比 + setAgencyTopicProportion(numberFormat,topicAgencyD_discussing,topicAgencyD_hidden,topicAgencyD_closed,totalAgencyD); + setAgencyDailyDataPacket(dataPacket,issueAgencyD,totalAgencyD,topicAgencyD_discussing,topicAgencyD_hidden,topicAgencyD_closed); } @@ -417,13 +421,14 @@ public class TopicServiceImpl implements TopicService { gridDistinct.put(gridId,true); }); - //机关-百分比 - setAgencyTopicMonthlyProportion(numberFormat,topicAgencyM_discussing,topicAgencyM_hidden,topicAgencyM_closed); - setAgencyMonthlyDataPacket(dataPacket,issueAgencyM,topicAgencyM_discussing,topicAgencyM_hidden,topicAgencyM_closed); + } + //机关-百分比 + setAgencyTopicMonthlyProportion(numberFormat,topicAgencyM_discussing,topicAgencyM_hidden,topicAgencyM_closed); + setAgencyMonthlyDataPacket(dataPacket,issueAgencyM,topicAgencyM_discussing,topicAgencyM_hidden,topicAgencyM_closed); }