Commit 1e033c10 by 刘宇峰

车辆监控-前端全选组织

1 parent e06b8558
...@@ -168,7 +168,8 @@ ...@@ -168,7 +168,8 @@
tvd.created_date installedTime tvd.created_date installedTime
from t_vehicle tv from t_vehicle tv
inner join t_trial_drive_vehicle ttdv on ttdv.vehicle_id = tv.id inner join t_trial_drive_vehicle ttdv on ttdv.vehicle_id = tv.id
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id and tvd.bind_status = 1 and tvd.del_flag = 0 and tvd.trial_type = 1 left join t_vehicle_device tvd on tv.id = tvd.vehicle_id and tvd.bind_status = 1 and tvd.del_flag = 0 and
tvd.trial_type = 1
left join t_user tu on tv.created_by = tu.id and tu.del_flag = 0 left join t_user tu on tv.created_by = tu.id and tu.del_flag = 0
left join t_trial_drive_shop ttds on tu.id = ttds.created_by and ttds.del_flag = 0 left join t_trial_drive_shop ttds on tu.id = ttds.created_by and ttds.del_flag = 0
where tv.del_flag = 0 where tv.del_flag = 0
...@@ -191,7 +192,8 @@ ...@@ -191,7 +192,8 @@
tvd.sn sns tvd.sn sns
from t_vehicle tv from t_vehicle tv
inner join t_trial_drive_vehicle ttdv on ttdv.vehicle_id = tv.id inner join t_trial_drive_vehicle ttdv on ttdv.vehicle_id = tv.id
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id and tvd.bind_status = 1 and tvd.del_flag = 0 and tvd.trial_type = 1 left join t_vehicle_device tvd on tv.id = tvd.vehicle_id and tvd.bind_status = 1 and tvd.del_flag = 0 and
tvd.trial_type = 1
left join t_user tu on tv.created_by = tu.id and tu.del_flag = 0 left join t_user tu on tv.created_by = tu.id and tu.del_flag = 0
left join t_trial_drive_shop ttds on tu.id = ttds.created_by and ttds.del_flag = 0 left join t_trial_drive_shop ttds on tu.id = ttds.created_by and ttds.del_flag = 0
where tv.del_flag = 0 where tv.del_flag = 0
...@@ -253,6 +255,7 @@ ...@@ -253,6 +255,7 @@
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
where tv.del_flag = 0 where tv.del_flag = 0
and tvd.bind_status = 1 and tvd.bind_status = 1
and tv.created_by is not null
<if test="userIds != null and userIds.size() > 0"> <if test="userIds != null and userIds.size() > 0">
and tv.created_by in and tv.created_by in
<foreach collection="userIds" separator="," open="(" close=")" item="item"> <foreach collection="userIds" separator="," open="(" close=")" item="item">
...@@ -297,7 +300,8 @@ ...@@ -297,7 +300,8 @@
from t_vehicle tv from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id 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 td on td.sn = tvd.sn
left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf on ddf.vehicle_id = tv.id and ddf.sn = td.sn left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf on
ddf.vehicle_id = tv.id and ddf.sn = td.sn
where tv.del_flag = 0 where tv.del_flag = 0
and tvd.bind_status = 1 and tvd.bind_status = 1
<if test="keywords != null and keywords !=''"> <if test="keywords != null and keywords !=''">
...@@ -334,7 +338,8 @@ ...@@ -334,7 +338,8 @@
from t_vehicle tv from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id 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 td on td.sn = tvd.sn
left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf on ddf.vehicle_id = tv.id and ddf.sn = td.sn left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf on
ddf.vehicle_id = tv.id and ddf.sn = td.sn
where tv.del_flag = 0 where tv.del_flag = 0
and tvd.bind_status = 1 and tvd.bind_status = 1
<if test="keywords != null and keywords !=''"> <if test="keywords != null and keywords !=''">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!