|
|
@ -113,17 +113,17 @@ |
|
|
|
<!--新闻数 通知数 议题数--> |
|
|
|
<select id="selectListNewsNoticeEventCount" resultType="com.elink.esua.epdc.dto.user.result.GridOpeningResultDTO"> |
|
|
|
SELECT |
|
|
|
dept.id, |
|
|
|
dept.id gridId, |
|
|
|
COUNT( DISTINCT nne.id ) newsCount, |
|
|
|
-- COUNT( DISTINCT nnn.ID ) noticeCount, |
|
|
|
COUNT( DISTINCT nnn.ID ) noticeCount, |
|
|
|
COUNT( DISTINCT eee.ID ) eventCount |
|
|
|
FROM |
|
|
|
esua_epdc_admin.sys_dept dept |
|
|
|
LEFT JOIN esua_epdc_news.epdc_news nne ON nne.DEPT_ID = dept.id AND nne.DEL_FLAG = '0' |
|
|
|
<!-- LEFT JOIN esua_epdc_news.epdc_notice nnn ON nnn.DEPT_ID = dept.id AND nnn.DEL_FLAG = '0'--> |
|
|
|
<!-- <if test="startTime != null and endTime != null and endTime != ''">--> |
|
|
|
<!-- AND DATE_FORMAT(nnn.CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}--> |
|
|
|
<!-- </if>--> |
|
|
|
LEFT JOIN esua_epdc_news.epdc_notice nnn ON nnn.DEPT_ID = dept.id AND nnn.DEL_FLAG = '0' |
|
|
|
<if test="startTime != null and endTime != null and endTime != ''"> |
|
|
|
AND DATE_FORMAT(nnn.CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime} |
|
|
|
</if> |
|
|
|
LEFT JOIN esua_epdc_events.epdc_issue eee ON eee.GRID_ID = dept.id AND eee.DEL_FLAG = '0' |
|
|
|
<if test="startTime != null and endTime != null and endTime != ''"> |
|
|
|
AND DATE_FORMAT(eee.CREATED_TIME,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime} |
|
|
|