@ -402,21 +402,26 @@
#{deptId}
</foreach>
</if>
<if test= "gridId != null and grid Id != ''" >
AND dept.DEPT_ID = #{grid Id}
<if test= "districtDeptId != null and districtDept Id != ''" >
AND dept.DEPT_ID = #{districtDept Id}
</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>