Commit 7b555c54 by 杨林龙

优化假性离线查询

1 parent 387a6bb8
......@@ -42,11 +42,10 @@
<select id="getOfflineVehicleNumMap" resultType="cn.com.glsx.admin.modules.model.FakeOfficeMapDto">
select tv.vin as vin,
count(tdl.sn) as num
count(tvd.sn) as num
from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
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 = tvd.sn
where tv.del_flag = 0
and tvd.bind_status = 1
and tvd.del_flag = 0
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!