Commit ea4c19bc by 杨林龙

增加车辆时 添加车架号是否已经存在的校验

1 parent 10a5c76f
......@@ -305,11 +305,13 @@
td.activate_time ,
ddf.`status` AS freqStatus
from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id and tvd.bind_status = 1 and tvd.del_flag = 0
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_device td on td.sn = tvd.sn and td.del_flag = 0
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
and tvd.bind_status = 1
and tvd.del_flag = 0
<if test="keywords != null and keywords !=''">
and(
tv.owner_name like '%${keywords}%'
......@@ -350,11 +352,13 @@
td.activate_time ,
ddf.`status` AS freqStatus
from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id and tvd.bind_status = 1 and tvd.del_flag = 0
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_device td on td.sn = tvd.sn and td.del_flag = 0
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
and tvd.bind_status = 1
and tvd.del_flag = 0
<if test="keywords != null and keywords !=''">
and(
tv.owner_name like '%${keywords}%'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!