Commit 22b0713e by 王欣伟

离线数和离线报警规则修改

1 parent 33ebe094
......@@ -844,12 +844,8 @@
left join t_device td on td.sn = tvd.sn
left join t_device_location tdl on tdl.sn = td.sn
WHERE tvd.del_flag = 0 and tv.del_flag = 0 and tvd.bind_status = 1
and (
(timestampdiff(SECOND, tdl.last_gps_time, now()) > #{offlineTime}
and timestampdiff(SECOND, tdl.last_bs_time, now()) > #{offlineTime} and td.source = 1)
or
(timestampdiff(SECOND, tdl.last_bs_time, now()) > #{offlineTime} and td.source = 0)
)
and timestampdiff(SECOND, tdl.last_gps_time, now()) > #{offlineTime}
and timestampdiff(SECOND, tdl.last_bs_time, now()) > #{offlineTime}
<if test="offlineSnStr != null and offlineSnStr != ''">
and tvd.sn not in (${offlineSnStr})
</if>
......@@ -894,8 +890,7 @@
and tvd.created_date > '2013-01-01 00:00:00.0'
<!--离线时间-->
<if test="lostBegin != null">
and ((tdl.last_gps_time &lt; #{lostBegin} and tdl.last_bs_time &lt; #{lostBegin} and td.source = 1)
or (tdl.last_bs_time &lt; #{lostBegin} and td.source = 0))
and tdl.last_gps_time &lt; #{lostBegin} and tdl.last_bs_time &lt; #{lostBegin}
</if>
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!