Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ea4c19bc
authored
Sep 27, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加车辆时 添加车架号是否已经存在的校验
1 parent
10a5c76f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
src/main/resources/mapper/VehicleMapper.xml
src/main/resources/mapper/VehicleMapper.xml
View file @
ea4c19b
...
@@ -305,11 +305,13 @@
...
@@ -305,11 +305,13 @@
td.activate_time ,
td.activate_time ,
ddf.`status` AS freqStatus
ddf.`status` AS freqStatus
from t_vehicle tv
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 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
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
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.del_flag = 0
<if
test=
"keywords != null and keywords !=''"
>
<if
test=
"keywords != null and keywords !=''"
>
and(
and(
tv.owner_name like '%${keywords}%'
tv.owner_name like '%${keywords}%'
...
@@ -350,11 +352,13 @@
...
@@ -350,11 +352,13 @@
td.activate_time ,
td.activate_time ,
ddf.`status` AS freqStatus
ddf.`status` AS freqStatus
from t_vehicle tv
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 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
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
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.del_flag = 0
<if
test=
"keywords != null and keywords !=''"
>
<if
test=
"keywords != null and keywords !=''"
>
and(
and(
tv.owner_name like '%${keywords}%'
tv.owner_name like '%${keywords}%'
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment