Commit df2a27bf authored by 王晓倩's avatar 王晓倩

实时数据和历史数据列表过滤已删除的设备的数据

parent 62fa8301
......@@ -73,8 +73,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ELSE '报警'
END as device_status
from t_device_report_data t
left join t_device_info d on t.device_num = d.iot_no
<where>
join t_device_info d on t.device_num = d.iot_no
<where> d.is_del = '0'
<if test="deviceCode != null and deviceCode != ''"> and d.device_code like concat('%',#{deviceCode},'%')</if>
<if test="deviceType != null and deviceType != ''"> and d.device_type = #{deviceType}</if>
<if test="startReportTime != null "> and t.report_time &gt;= #{startReportTime}</if>
......@@ -125,12 +125,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
END AS device_status
FROM
t_device_report_data t
LEFT JOIN t_device_info d ON t.device_num = d.iot_no
JOIN t_device_info d ON t.device_num = d.iot_no
WHERE
(
d.device_type = '3'
OR d.device_type = '4'
)
) and d.is_del = '0'
ORDER BY t.create_time DESC
)data
<where>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment