| | |
| | | ELSE device_type |
| | | END AS split_device_type |
| | | FROM ja_fw_device |
| | | WHERE is_deleted = 0 -- 排除已删除数据 |
| | | WHERE is_deleted = 0 and status != 3 -- 排除已删除数据 |
| | | |
| | | UNION ALL -- 合并拆分的反制部分 |
| | | |
| | |
| | | ELSE device_type |
| | | END AS split_device_type |
| | | FROM ja_fw_device |
| | | WHERE is_deleted = 0 |
| | | AND device_type != '3' -- 避免普通设备重复统计 |
| | | WHERE is_deleted = 0 and status != 3 |
| | | AND device_type = '3' -- 避免普通设备重复统计 |
| | | ) AS temp |
| | | GROUP BY split_device_type |
| | | ORDER BY split_device_type |
| | |
| | | |
| | | <select id="selectCockpitDevicePage" resultType="org.sxkj.fw.device.vo.CockpitFwDeviceVO"> |
| | | select |
| | | d.*, |
| | | fts.longitude, |
| | | fts.latitude |
| | | d.*, |
| | | fts.longitude, |
| | | fts.latitude |
| | | from |
| | | ja_fw_device d |
| | | left join ja_fw_task_schedule fts on d.id = fts.device_id |
| | | left join ( |
| | | SELECT |
| | | device_id, |
| | | longitude, |
| | | latitude, |
| | | MAX(create_time) AS create_time |
| | | FROM |
| | | ja_fw_task_schedule |
| | | WHERE |
| | | is_deleted = 0 |
| | | GROUP BY |
| | | device_id |
| | | ) fts ON fts.device_id = d.id |
| | | <where> |
| | | d.is_deleted = 0 |
| | | and d.status != 3 |
| | | and fts.longitude is not null |
| | | and fts.latitude is not null |
| | | and d.longitude is not null |
| | | and d.latitude is not null |
| | | <if test="param2.id != null and param2.id != ''"> |