diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index 3e058e209a..16c1b42383 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -282,6 +282,7 @@ screen_customer_agency sca WHERE sca.DEL_FLAG = '0' + and sca.IS_DISPLAY='1' AND sca.PARENT_AREA_CODE = #{areaCode} @@ -296,6 +297,7 @@ FROM screen_customer_grid m where m.DEL_FLAG = '0' + and m.IS_DISPLAY='1' and m.AREA_CODE=#{areaCode} diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index 6f7477cf70..932120feec 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml @@ -108,41 +108,24 @@ topicContent, type FROM - ( - SELECT - a.ID AS textId, - a.TOPIC_CONTENT AS topicContent, - 'topic' AS type, - max( a.CREATED_TIME ) AS CREATED_TIME - FROM - resi_topic a - WHERE - a.GROUP_ID = #{groupId} - GROUP BY - a.GROUP_ID UNION ALL - SELECT - a.ID AS textId, - a.TITLE AS topicContent, - 'notice' AS type, - max( a.CREATED_TIME ) AS CREATED_TIME - FROM - notice a - WHERE - a.GROUP_ID = #{groupId} - GROUP BY - a.GROUP_ID UNION ALL - SELECT - a.ID AS textId, - a.TITLE AS topicContent, - 'activity' AS type, - max( a.CREATED_TIME ) AS CREATED_TIME - FROM - group_act_info a - WHERE - a.GROUP_ID = #{groupId} - GROUP BY - a.GROUP_ID - ) a + ( + SELECT + a.ID AS textId, + a.TOPIC_CONTENT AS topicContent, + 'topic' AS type, + a.CREATED_TIME + FROM + resi_topic a + INNER JOIN ( + SELECT max( CREATED_TIME ) AS CREATED_TIME + FROM resi_topic + WHERE GROUP_ID = #{groupId} + AND DEL_FLAG = '0' + ) b ON a.CREATED_TIME = b.CREATED_TIME + WHERE + a.DEL_FLAG = '0' + AND a.GROUP_ID = #{groupId} + ) a ORDER BY CREATED_TIME DESC LIMIT 1