|
|
@ -402,26 +402,24 @@ |
|
|
|
#{deptId} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<if test="gridId != null and gridId != ''"> |
|
|
|
AND dept.DEPT_ID = #{gridId} |
|
|
|
</if> |
|
|
|
<if test="streetId != null and streetId != ''"> |
|
|
|
AND dept.DEPT_ID = #{streetId} |
|
|
|
</if> |
|
|
|
<if test="communityId != null and communityId != ''"> |
|
|
|
AND dept.DEPT_ID = #{communityId} |
|
|
|
</if> |
|
|
|
|
|
|
|
) temp |
|
|
|
) |
|
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
|
|
|
AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} |
|
|
|
</if> |
|
|
|
<if test="gridId != null and gridId != ''"> |
|
|
|
AND (item.GRID_ID = #{gridId} |
|
|
|
OR find_in_set(#{gridId},item.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="streetId != null and streetId != ''"> |
|
|
|
AND (find_in_set(#{streetId},item.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{streetId},item.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="communityId != null and communityId != ''"> |
|
|
|
AND (find_in_set(#{communityId},item.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{communityId},item.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="itemCode != null and itemCode != ''"> |
|
|
|
AND item.ITEM_CODE like concat('%', #{itemCode}, '%') |
|
|
|
</if> |
|
|
|
<if test="itemCode != null and itemCode != ''"> |
|
|
|
AND item.ITEM_CODE like concat('%', #{itemCode}, '%') |
|
|
|
</if> |
|
|
|
ORDER BY |
|
|
|
item.CREATED_TIME DESC |
|
|
|
</select> |
|
|
|