|
|
|
@ -22,13 +22,16 @@ |
|
|
|
AND gp.STATE = #{state} |
|
|
|
</if> |
|
|
|
<if test="gridId != null and gridId != ''"> |
|
|
|
AND gp.GRID_ID = #{gridId} |
|
|
|
AND (gp.GRID_ID = #{gridId} |
|
|
|
OR find_in_set(#{gridId},gp.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="streetId != null and streetId != ''"> |
|
|
|
AND gp.STREET_ID = #{streetId} |
|
|
|
AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{streetId},gp.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="communityId != null and communityId != ''"> |
|
|
|
AND gp.COMMUNITY_ID = #{communityId} |
|
|
|
AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{communityId},gp.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
ORDER BY |
|
|
|
gp.GROUP_CATEGORY, gp.CREATED_TIME DESC |
|
|
|
@ -200,13 +203,16 @@ |
|
|
|
gp.DEL_FLAG = '0' |
|
|
|
AND gp.STATE IN ( 10, 15 ) |
|
|
|
<if test="gridId != null and gridId != ''"> |
|
|
|
AND gp.GRID_ID = #{gridId} |
|
|
|
AND (gp.GRID_ID = #{gridId} |
|
|
|
OR find_in_set(#{gridId},gp.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="streetId != null and streetId != ''"> |
|
|
|
AND gp.STREET_ID = #{streetId} |
|
|
|
AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{streetId},gp.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="communityId != null and communityId != ''"> |
|
|
|
AND gp.COMMUNITY_ID = #{communityId} |
|
|
|
AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{communityId},gp.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
|
|
|
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 ) |
|
|
|
<if test="gridId != null and gridId != ''"> |
|
|
|
AND gp.GRID_ID = #{gridId} |
|
|
|
AND (gp.GRID_ID = #{gridId} |
|
|
|
OR find_in_set(#{gridId},gp.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="streetId != null and streetId != ''"> |
|
|
|
AND gp.STREET_ID = #{streetId} |
|
|
|
AND (find_in_set(#{streetId},gp.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{streetId},gp.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="communityId != null and communityId != ''"> |
|
|
|
AND gp.COMMUNITY_ID = #{communityId} |
|
|
|
AND (find_in_set(#{communityId},gp.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{communityId},gp.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
|
|
|
AND DATE_FORMAT( gp.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} |
|
|
|
|