|
|
@ -8,7 +8,7 @@ |
|
|
|
SELECT |
|
|
|
article_total_count AS publishedTotal, |
|
|
|
article_published_count AS publishingTotal, |
|
|
|
DATE_FORMAT( date_id, '%Y-%m-%d' ) AS dateName |
|
|
|
DATE_FORMAT( date_id, '%Y.%m.%d' ) AS dateName |
|
|
|
FROM fact_article_published_agency_daily |
|
|
|
where agency_id = #{agencyId} |
|
|
|
</select> |
|
|
@ -74,8 +74,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 机关当季—每个标签发文数量—前pageSize --> |
|
|
|
<select id="getUsedQuarterlyCountByTag" parameterType="java.lang.String" |
|
|
|
resultType="com.epmet.publicity.dto.result.FactTagAgencyDTO"> |
|
|
|
<select id="getUsedQuarterlyCountByTag" resultType="com.epmet.publicity.dto.result.FactTagAgencyDTO"> |
|
|
|
SELECT |
|
|
|
tag_name AS name, |
|
|
|
agency_id AS agencyId, |
|
|
@ -90,8 +89,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 机关当年—每个标签发文数量—前pageSize --> |
|
|
|
<select id="getUsedYearlyCountByTag" parameterType="map" |
|
|
|
resultType="com.epmet.publicity.dto.result.FactTagAgencyDTO"> |
|
|
|
<select id="getUsedYearlyCountByTag" resultType="com.epmet.publicity.dto.result.FactTagAgencyDTO"> |
|
|
|
SELECT |
|
|
|
tag_name AS name, |
|
|
|
agency_id AS agencyId, |
|
|
@ -104,4 +102,161 @@ |
|
|
|
ORDER BY value DESC |
|
|
|
LIMIT #{pageSize} |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 当月——下级机发文数:机关名称、机关id、发文数量、上级机关id --> |
|
|
|
<select id="getSubAgencyPublishedMonth" resultType="com.epmet.publicity.dto.result.FactPublishedAgencyDTO"> |
|
|
|
SELECT |
|
|
|
agency.agency_name AS name, |
|
|
|
pub.agency_id AS agencyId, |
|
|
|
pub.pid AS pid, |
|
|
|
SUM(pub.published_count) AS value |
|
|
|
FROM |
|
|
|
fact_article_published_agency_daily AS pub , |
|
|
|
dim_agency AS agency |
|
|
|
where |
|
|
|
pub.agency_id = agency.id |
|
|
|
AND pub.PID =#{agencyId} |
|
|
|
AND pub.month_id=#{monthId} |
|
|
|
GROUP BY pub.agency_id |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 当季——下级机发文数:机关名称、机关id、发文数量、上级机关id --> |
|
|
|
<select id="getSubAgencyPublishedQuarter" resultType="com.epmet.publicity.dto.result.FactPublishedAgencyDTO"> |
|
|
|
SELECT |
|
|
|
agency.agency_name AS name, |
|
|
|
pub.agency_id AS agencyId, |
|
|
|
pub.pid AS pid, |
|
|
|
SUM(pub.published_count) AS value |
|
|
|
FROM |
|
|
|
fact_article_published_agency_daily AS pub , |
|
|
|
dim_agency AS agency |
|
|
|
where |
|
|
|
pub.agency_id = agency.id |
|
|
|
AND pub.PID =#{agencyId} |
|
|
|
AND pub.quarter_id=#{quarterId} |
|
|
|
GROUP BY pub.agency_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 当年——下级机发文数:机关名称、机关id、发文数量、上级机关id --> |
|
|
|
<select id="getSubAgencyPublishedYear" resultType="com.epmet.publicity.dto.result.FactPublishedAgencyDTO"> |
|
|
|
SELECT |
|
|
|
agency.agency_name AS name, |
|
|
|
pub.agency_id AS agencyId, |
|
|
|
pub.pid AS pid, |
|
|
|
SUM(pub.published_count) AS value |
|
|
|
FROM |
|
|
|
fact_article_published_agency_daily AS pub , |
|
|
|
dim_agency AS agency |
|
|
|
where |
|
|
|
pub.agency_id = agency.id |
|
|
|
AND pub.PID =#{agencyId} |
|
|
|
AND pub.year_id=#{yearId} |
|
|
|
GROUP BY pub.agency_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 当月——下级部门文数:部门名称、机关id、发文数量、部门id --> |
|
|
|
<select id="getSubDepartPublishedMonth" resultType="com.epmet.publicity.dto.result.FactPublishedDepartmentDTO"> |
|
|
|
SELECT |
|
|
|
depart.department_name AS name, |
|
|
|
pub.agency_id AS agencyId, |
|
|
|
pub.department_id AS departmentId, |
|
|
|
SUM(pub.published_count) AS value |
|
|
|
FROM |
|
|
|
fact_article_published_department_daily AS pub , |
|
|
|
dim_department AS depart |
|
|
|
where |
|
|
|
pub.department_id = depart.id |
|
|
|
AND pub.agency_id =#{agencyId} |
|
|
|
AND pub.month_id=#{monthId} |
|
|
|
GROUP BY pub.department_id |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 当季——下级部门文数:部门名称、机关id、发文数量、部门id --> |
|
|
|
<select id="getSubDepartPublishedQuarter" resultType="com.epmet.publicity.dto.result.FactPublishedDepartmentDTO"> |
|
|
|
SELECT |
|
|
|
depart.department_name AS name, |
|
|
|
pub.agency_id AS agencyId, |
|
|
|
pub.department_id AS departmentId, |
|
|
|
SUM(pub.published_count) AS value |
|
|
|
FROM |
|
|
|
fact_article_published_department_daily AS pub , |
|
|
|
dim_department AS depart |
|
|
|
where |
|
|
|
pub.department_id = depart.id |
|
|
|
AND pub.agency_id =#{agencyId} |
|
|
|
AND pub.quarter_id=#{quarterId} |
|
|
|
GROUP BY pub.department_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 当年——下级部门文数:部门名称、机关id、发文数量、部门id --> |
|
|
|
<select id="getSubDepartPublishedYear" resultType="com.epmet.publicity.dto.result.FactPublishedDepartmentDTO"> |
|
|
|
SELECT |
|
|
|
depart.department_name AS name, |
|
|
|
pub.agency_id AS agencyId, |
|
|
|
pub.department_id AS departmentId, |
|
|
|
SUM(pub.published_count) AS value |
|
|
|
FROM |
|
|
|
fact_article_published_department_daily AS pub , |
|
|
|
dim_department AS depart |
|
|
|
where |
|
|
|
pub.department_id = depart.id |
|
|
|
AND pub.agency_id =#{agencyId} |
|
|
|
AND pub.year_id=#{yearId} |
|
|
|
GROUP BY pub.department_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 当月——下级网格文数:网格名称、机关id、发文数量、网格id --> |
|
|
|
<select id="getSubGridPublishedMonth" resultType="com.epmet.publicity.dto.result.FactPublishedGridDTO"> |
|
|
|
SELECT |
|
|
|
grid.grid_name AS name, |
|
|
|
pub.agency_id AS agencyId, |
|
|
|
pub.grid_id AS gridId, |
|
|
|
SUM(pub.published_count) AS value |
|
|
|
FROM |
|
|
|
fact_article_published_grid_daily AS pub , |
|
|
|
dim_grid AS grid |
|
|
|
where |
|
|
|
pub.grid_id = grid.id |
|
|
|
AND pub.agency_id = #{agencyId} |
|
|
|
AND pub.month_id=#{monthId} |
|
|
|
GROUP BY pub.grid_id |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 当季——下级网格文数:网格名称、机关id、发文数量、网格id --> |
|
|
|
<select id="getSubGridPublishedQuarter" resultType="com.epmet.publicity.dto.result.FactPublishedGridDTO"> |
|
|
|
SELECT |
|
|
|
grid.grid_name AS name, |
|
|
|
pub.agency_id AS agencyId, |
|
|
|
pub.grid_id AS gridId, |
|
|
|
SUM(pub.published_count) AS value |
|
|
|
FROM |
|
|
|
fact_article_published_grid_daily AS pub , |
|
|
|
dim_grid AS grid |
|
|
|
where |
|
|
|
pub.grid_id = grid.id |
|
|
|
AND pub.agency_id = #{agencyId} |
|
|
|
AND pub.quarter_id=#{quarterId} |
|
|
|
GROUP BY pub.grid_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 当年——下级网格文数:网格名称、机关id、发文数量、网格id --> |
|
|
|
<select id="getSubGridPublishedYear" resultType="com.epmet.publicity.dto.result.FactPublishedGridDTO"> |
|
|
|
SELECT |
|
|
|
grid.grid_name AS name, |
|
|
|
pub.agency_id AS agencyId, |
|
|
|
pub.grid_id AS gridId, |
|
|
|
SUM(pub.published_count) AS value |
|
|
|
FROM |
|
|
|
fact_article_published_grid_daily AS pub , |
|
|
|
dim_grid AS grid |
|
|
|
where |
|
|
|
pub.grid_id = grid.id |
|
|
|
AND pub.agency_id = #{agencyId} |
|
|
|
AND pub.year_id = #{yearId} |
|
|
|
GROUP BY pub.grid_id |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |