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 30eba9f8
authored
Mar 14, 2023
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.7.0 开发区域查车接口
1 parent
4e860656
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
21 deletions
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
src/main/resources/mapper/VehicleMapper.xml
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
View file @
30eba9f
...
...
@@ -380,5 +380,5 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
@DataPerm
(
permTable
=
"tv"
,
showSql
=
true
)
@DataPermShare
(
linkTable
=
"t_vehicle"
,
showSql
=
true
)
List
<
RegionalSearchVO
>
getVehicleInfoListBySns
(
@Param
(
"sn
List"
)
List
<
String
>
snList
);
List
<
RegionalSearchVO
>
getVehicleInfoListBySns
(
@Param
(
"sn
s"
)
String
sns
);
}
\ No newline at end of file
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
View file @
30eba9f
...
...
@@ -2539,6 +2539,9 @@ public class VehicleService extends AbstractCommonService {
* @return 车辆基本信息
*/
public
List
<
RegionalSearchVO
>
getVehicleInfoListBySns
(
List
<
String
>
snList
)
{
return
vehicleMapper
.
getVehicleInfoListBySns
(
snList
);
StringBuilder
builder
=
new
StringBuilder
();
snList
.
forEach
(
sn
->
builder
.
append
(
"'"
).
append
(
sn
).
append
(
"'"
).
append
(
","
));
String
sns
=
builder
.
substring
(
0
,
builder
.
toString
().
length
()
-
1
);
return
vehicleMapper
.
getVehicleInfoListBySns
(
sns
);
}
}
src/main/resources/mapper/VehicleMapper.xml
View file @
30eba9f
...
...
@@ -1435,27 +1435,22 @@
<select
id=
"getVehicleInfoListBySns"
resultType=
"cn.com.glsx.admin.modules.model.vo.RegionalSearchVO"
>
select tvd.id,
tw.partner_order_no workOrderNo,
tw.`shop_name`
AS shopName,
tv.owner_name
as ownerName,
tv.vin
as vin,
tvd.sn
as sn,
td.source
as `source`,
td.device_type
as deviceType,
tvd.created_date as activeDate
tw.partner_order_no workOrderNo,
tw.`shop_name`
AS shopName,
tv.owner_name
as ownerName,
tv.vin
as vin,
tvd.sn
as sn,
td.source
as `source`,
td.device_type
as deviceType,
tvd.created_date as activeDate
from t_vehicle tv
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_workorder tw on tw.id = tv.workorder_id and tw.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
left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0
where tv.del_flag = 0
and tvd.bind_status = 1
and tvd.del_flag = 0
<if
test=
"snList != null and snList.size() > 0"
>
and tvd.sn in
<foreach
collection=
"snList"
separator=
","
open=
"("
close=
")"
item=
"item"
>
#{item}
</foreach>
</if>
and tvd.bind_status = 1
and tvd.del_flag = 0
and tvd.sn in (${sns})
order by tvd.id desc
</select>
...
...
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