| | |
| | | |
| | | <select id="selectCockpitDevicePage" resultType="org.sxkj.fw.device.vo.CockpitFwDeviceVO"> |
| | | select |
| | | d.* |
| | | d.*, |
| | | min(ad.id) as area_divide_id, |
| | | min(dsm.id) as defense_scene_manage_id |
| | | from |
| | | ja_fw_device d |
| | | left join ja_fw_area_divide ad |
| | | on find_in_set(d.id, ad.device_ids) > 0 |
| | | and ad.is_deleted = 0 |
| | | left join ja_fw_defense_scene ds |
| | | on find_in_set(ad.id, ds.area_divide_ids) > 0 |
| | | and ds.is_deleted = 0 |
| | | left join ja_fw_defense_scene_manage dsm |
| | | on dsm.defense_scene_id = ds.id |
| | | and dsm.is_deleted = 0 |
| | | <where> |
| | | d.is_deleted = 0 |
| | | and d.is_enabled = 1 |
| | |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | group by d.id |
| | | </select> |
| | | |
| | | <update id="updateTrackStatusByDeviceId"> |