Commit 8c0cc7bf by 杨林龙

Merge remote-tracking branch 'origin/v1.5.0' into v1.5.0

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