| | |
| | | where dz.is_deleted = 0 |
| | | and dz.defense_scene_ids is not null |
| | | and dz.defense_scene_ids != '' |
| | | and find_in_set(ds.id, dz.defense_scene_ids) |
| | | and ds.id = ANY(string_to_array(dz.defense_scene_ids, ',')::bigint[]) |
| | | ) |
| | | <if test="zoneId != null"> |
| | | or exists ( |
| | |
| | | and dz.id = #{zoneId} |
| | | and dz.defense_scene_ids is not null |
| | | and dz.defense_scene_ids != '' |
| | | and find_in_set(ds.id, dz.defense_scene_ids) |
| | | and ds.id = ANY(string_to_array(dz.defense_scene_ids, ',')::bigint[]) |
| | | ) |
| | | </if> |
| | | ) |
| | |
| | | <if test="areaId != null and (filterSelected == null or filterSelected != 1)"> |
| | | and ds.area_divide_ids is not null |
| | | and ds.area_divide_ids != '' |
| | | and find_in_set(#{areaId}, replace(ds.area_divide_ids, ' ', '')) |
| | | and #{areaId} = ANY(string_to_array(replace(ds.area_divide_ids, ' ', ''), ',')::bigint[]) |
| | | </if> |
| | | </where> |
| | | </select> |