0
0

控制中心查询

This commit is contained in:
2025-10-11 11:06:07 +08:00
parent 5b4fa38dbd
commit 1bc7dc676e

View File

@ -259,12 +259,12 @@
d.online_status,
c.binding_time,
d.create_time,
ROW_NUMBER() OVER (PARTITION BY d.id ORDER BY c.binding_time) AS row_num
ROW_NUMBER() OVER (PARTITION BY d.id ORDER BY d.id) AS row_num
from device d
inner join device_type dt on d.device_type = dt.id
left join app_device_bind_record c on d.id = c.device_id
left join app_personnel_info ap on ap.device_id = d.id
where dt.communication_mode in (0, 2) ) a where a.row_num = 1
where dt.communication_mode in (0, 2) ORDER BY (case when d.online_status = 1 then 2 else 1 end) DESC) a where a.row_num = 1
<if test="criteria.deviceType != null">
and a.device_type = #{criteria.deviceType}
</if>
@ -295,7 +295,7 @@
<if test="criteria.onlineStatus != null">
and a.online_status = #{criteria.onlineStatus}
</if>
ORDER BY (case when a.online_status = 1 then 2 else 1 end) DESC
</select>
<select id="getLocationHistory" resultType="com.fuyuanshen.equipment.domain.vo.LocationHistoryVo">
select a.id,a.device_name,a.device_type,b.type_name deviceTypeName,a.device_imei,a.device_mac from device a