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 20499a13
authored
Aug 26, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
指定组织授权-车辆监控
1 parent
71058442
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
src/main/resources/mapper/VehicleMapper.xml
src/main/resources/mapper/VehicleMapper.xml
View file @
20499a1
...
@@ -402,16 +402,31 @@
...
@@ -402,16 +402,31 @@
tv.vin,
tv.vin,
tv.owner_name ownerName,
tv.owner_name ownerName,
tvd.sn sns,
tvd.sn sns,
tvp.receiver_id
creatorId,
${loginUserId} AS
creatorId,
td.source,
td.source,
td.device_type deviceType
td.device_type deviceType
from t_vehicle tv
from t_vehicle tv
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
left join t_device td on td.sn = tvd.sn
left join t_device td on td.sn = tvd.sn
left join t_vehicle_permit tvp on tvp.content_id = tv.id
where tv.del_flag = 0 and tvd.del_flag = 0
where tv.del_flag = 0 and tvd.del_flag = 0 and tvp.del_flag = 0
and tvd.bind_status = 1
and tvd.bind_status = 1
and tvp.receiver_id = #{loginUserId}
AND (
tv.id in (select tvp.content_id
from t_vehicle_permit tvp
where tvp.del_flag = 0
AND tvp.receiver_id IN (#{loginUserId})
AND tvp.content_type = 0)
OR
tv.created_by IN (SELECT tu2.id
FROM t_user tu2
WHERE tu2.del_flag = 0
AND tu2.department_id IN
(SELECT tvp.content_id
FROM t_vehicle_permit tvp
WHERE tvp.del_flag = 0
AND tvp.receiver_id IN (#{loginUserId})
AND tvp.content_type = 2))
)
<if
test=
"term != null and term != ''"
>
<if
test=
"term != null and term != ''"
>
<choose>
<choose>
<when
test=
"termType == 1"
>
<when
test=
"termType == 1"
>
...
@@ -447,7 +462,7 @@
...
@@ -447,7 +462,7 @@
</foreach>
</foreach>
</select>
</select>
<select
id=
"getVehicleByVin"
resultMap=
"BaseResultMap"
>
<select
id=
"getVehicleByVin"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from t_vehicle tv where tv.vin = #{vin} and del_flag = 0
from t_vehicle tv where tv.vin = #{vin} and del_flag = 0
...
...
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