diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml
index 2e1e6cd3a..c83bd412a 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/events/EpdcEventsDao.xml
@@ -68,7 +68,8 @@
AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
- AND temp.grid_id = #{gridId}
+ AND (temp.GRID_ID = #{gridId}
+ OR find_in_set(#{gridId},temp.ALL_DEPT_IDS))
AND (find_in_set(#{streetId},temp.PARENT_DEPT_IDS)
@@ -96,7 +97,8 @@
AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
- AND temp.grid_id = #{gridId}
+ AND (temp.GRID_ID = #{gridId}
+ OR find_in_set(#{gridId},temp.ALL_DEPT_IDS))
AND find_in_set(#{streetId},temp.PARENT_DEPT_IDS)
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
index 0c023ef1a..b551bc37d 100644
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/issue/IssueDao.xml
@@ -24,7 +24,8 @@
AND DATE_FORMAT( issue.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
- AND issue.GRID_ID = #{gridId}
+ AND (issue.GRID_ID = #{gridId}
+ OR find_in_set(#{gridId},issue.ALL_DEPT_IDS))
AND (find_in_set(#{streetId},issue.PARENT_DEPT_IDS)
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
index 6de92e905..321dee8ed 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
@@ -402,7 +402,8 @@
AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
- AND item.GRID_ID = #{gridId}
+ AND (item.GRID_ID = #{gridId}
+ OR find_in_set(#{gridId},item.ALL_DEPT_IDS))
AND (find_in_set(#{streetId},item.PARENT_DEPT_IDS)
diff --git a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml
index 684365f26..d319fed6a 100644
--- a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml
+++ b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/group/GroupDao.xml
@@ -22,13 +22,16 @@
AND gp.STATE = #{state}
- AND gp.GRID_ID = #{gridId}
+ AND (gp.GRID_ID = #{gridId}
+ OR find_in_set(#{gridId},gp.ALL_DEPT_IDS))
- AND gp.STREET_ID = #{streetId}
+ AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS)
+ OR find_in_set(#{streetId},gp.ALL_DEPT_IDS))
- AND gp.COMMUNITY_ID = #{communityId}
+ AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS)
+ OR find_in_set(#{communityId},gp.ALL_DEPT_IDS))
ORDER BY
gp.GROUP_CATEGORY, gp.CREATED_TIME DESC
@@ -200,13 +203,16 @@
gp.DEL_FLAG = '0'
AND gp.STATE IN ( 10, 15 )
- AND gp.GRID_ID = #{gridId}
+ AND (gp.GRID_ID = #{gridId}
+ OR find_in_set(#{gridId},gp.ALL_DEPT_IDS))
- AND gp.STREET_ID = #{streetId}
+ AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS)
+ OR find_in_set(#{streetId},gp.ALL_DEPT_IDS))
- AND gp.COMMUNITY_ID = #{communityId}
+ AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS)
+ OR find_in_set(#{communityId},gp.ALL_DEPT_IDS))
AND DATE_FORMAT( gp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
@@ -234,13 +240,16 @@
gp.DEL_FLAG = '0'
AND gp.STATE IN ( 10, 15 )
- AND gp.GRID_ID = #{gridId}
+ AND (gp.GRID_ID = #{gridId}
+ OR find_in_set(#{gridId},gp.ALL_DEPT_IDS))
- AND gp.STREET_ID = #{streetId}
+ AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS)
+ OR find_in_set(#{streetId},gp.ALL_DEPT_IDS))
- AND gp.COMMUNITY_ID = #{communityId}
+ AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS)
+ OR find_in_set(#{communityId},gp.ALL_DEPT_IDS))
AND DATE_FORMAT( gp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
diff --git a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/topic/TopicDao.xml b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/topic/TopicDao.xml
index 84fb0cf11..f5270850d 100644
--- a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/topic/TopicDao.xml
+++ b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/resources/mapper/topic/TopicDao.xml
@@ -201,13 +201,16 @@
temp.DEL_FLAG = '0'
AND temp.STATE IN ( 0, 5, 20 )
- AND temp.STREET_ID = #{streetId}
+ AND (find_in_set(#{streetId},temp.PARENT_DEPT_IDS)
+ OR find_in_set(#{streetId},temp.ALL_DEPT_IDS))
- AND temp.COMMUNITY_ID = #{communityId}
+ AND (find_in_set(#{communityId},temp.PARENT_DEPT_IDS)
+ OR find_in_set(#{communityId},temp.ALL_DEPT_IDS))
- AND temp.grid_id = #{gridId}
+ AND (temp.GRID_ID = #{gridId}
+ OR find_in_set(#{gridId},temp.ALL_DEPT_IDS))
AND DATE_FORMAT( temp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}