|
|
@ -112,7 +112,7 @@ |
|
|
|
|
|
|
|
<!--新闻数 通知数 议题数--> |
|
|
|
<select id="selectListNewsNoticeEventCount" resultType="com.elink.esua.epdc.dto.user.result.GridOpeningResultDTO"> |
|
|
|
<!-- SELECT |
|
|
|
SELECT |
|
|
|
dept.id gridId, |
|
|
|
COUNT( DISTINCT nne.id ) newsCount, |
|
|
|
COUNT( DISTINCT nnn.ID ) noticeCount, |
|
|
@ -138,55 +138,7 @@ |
|
|
|
AND dept.id in <include refid="foreachGridIdList"></include> |
|
|
|
</if> |
|
|
|
GROUP BY |
|
|
|
dept.id --> |
|
|
|
SELECT |
|
|
|
dept.id gridId, |
|
|
|
( |
|
|
|
SELECT |
|
|
|
count(1) |
|
|
|
FROM |
|
|
|
esua_epdc_news.epdc_news |
|
|
|
WHERE |
|
|
|
DEL_FLAG = '0' |
|
|
|
<if test="startTime != null and endTime != null and endTime != ''"> |
|
|
|
AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime} |
|
|
|
</if> |
|
|
|
AND DEPT_ID = dept.id |
|
|
|
|
|
|
|
) AS newsCount, |
|
|
|
( |
|
|
|
SELECT |
|
|
|
count(1) |
|
|
|
FROM |
|
|
|
esua_epdc_news.epdc_notice |
|
|
|
WHERE |
|
|
|
DEL_FLAG = '0' |
|
|
|
<if test="startTime != null and endTime != null and endTime != ''"> |
|
|
|
AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime} |
|
|
|
</if> |
|
|
|
AND DEPT_ID = dept.id |
|
|
|
|
|
|
|
) AS noticeCount, |
|
|
|
(SELECT |
|
|
|
count(1) |
|
|
|
FROM |
|
|
|
esua_epdc_events.epdc_issue |
|
|
|
WHERE |
|
|
|
DEL_FLAG = '0' |
|
|
|
<if test="startTime != null and endTime != null and endTime != ''"> |
|
|
|
AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime} |
|
|
|
</if> |
|
|
|
AND GRID_ID = dept.id |
|
|
|
) AS eventCount |
|
|
|
FROM |
|
|
|
esua_epdc_admin.sys_dept dept |
|
|
|
WHERE |
|
|
|
dept.DEL_FLAG = '0' |
|
|
|
AND dept.type_key = 'grid_party' |
|
|
|
<if test="gridIdList != null and gridIdList.size() > 0"> |
|
|
|
AND dept.id in <include refid="foreachGridIdList"></include> |
|
|
|
</if> |
|
|
|
GROUP BY dept.id |
|
|
|
dept.id |
|
|
|
</select> |
|
|
|
|
|
|
|
<!--项目数--> |
|
|
|