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..af1f9bd464 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 @@ -73,12 +73,20 @@ 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}