diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEnterpriseDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEnterpriseDao.xml
index 235c9e2d70..52945262d5 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEnterpriseDao.xml
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEnterpriseDao.xml
@@ -67,18 +67,28 @@
WHERE
ie.DEL_FLAG = '0'
- AND ie.GRID_ID = #{orgId}
+
+ AND ie.GRID_ID = #{orgId}
+
AND (ie.AGENCY_ID = #{orgId} or ie.AGENCY_PIDS like concat('%',#{orgId},'%'))
+
+ AND (
+ ie.AGENCY_ID = #{staffAgencyId}
+ OR ie.AGENCY_PIDS LIKE concat( '%', #{staffAgencyId}, '%' )
+ )
+
- AND (
- ie.AGENCY_ID = #{staffAgencyId}
- OR ie.AGENCY_PIDS LIKE concat( '%', #{staffAgencyId}, '%' )
- )
+
+ AND (
+ ie.AGENCY_ID = #{staffAgencyId}
+ OR ie.AGENCY_PIDS LIKE concat( '%', #{staffAgencyId}, '%' )
+ )
+
AND ie.GRID_ID = #{gridId}