@ -172,9 +172,7 @@
WHERE
ep.DEL_FLAG = '0'
AND eg.DEL_FLAG = '0'
<if test="id != null and id != ''">
AND ep.ID = #{id}
</if>
AND (ep.GRID_ID = #{gridId}
OR find_in_set(#{gridId},ep.ALL_DEPT_IDS))
GROUP BY