Commit 8d2ae861 by 杨林龙

Merge remote-tracking branch 'origin/develop' into develop

2 parents c2efe16b 20499a13
...@@ -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">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!