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 f09461bb
authored
Mar 24, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/v1.5.0' into v1.5.0
2 parents
8320c19e
24aaa5b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
src/main/resources/mapper/VehicleMapper.xml
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
View file @
f09461b
...
@@ -53,6 +53,9 @@ public class VehicleMonitorSevice {
...
@@ -53,6 +53,9 @@ public class VehicleMonitorSevice {
@Autowired
@Autowired
private
WorkOrderService
workOrderService
;
private
WorkOrderService
workOrderService
;
@Autowired
private
UserApiService
userApiService
;
/**
/**
* 车辆监控树-设备维度
* 车辆监控树-设备维度
*
*
...
@@ -68,9 +71,16 @@ public class VehicleMonitorSevice {
...
@@ -68,9 +71,16 @@ public class VehicleMonitorSevice {
//模糊搜索业务数据,反向生成组织+车辆树结构
//模糊搜索业务数据,反向生成组织+车辆树结构
if
(
search
.
getTermType
()
!=
null
&&
StringUtils
.
isNotBlank
(
search
.
getTerm
()))
{
if
(
search
.
getTermType
()
!=
null
&&
StringUtils
.
isNotBlank
(
search
.
getTerm
()))
{
sw
.
start
(
"task1"
);
sw
.
start
(
"task1"
);
//搜索车辆或设备
//搜索车辆或设备
-常规数据
List
<
OrgVehicleModel
>
modelList
=
vehicleMapper
.
selectOrgVehicleSns
(
search
);
List
<
OrgVehicleModel
>
modelList
=
vehicleMapper
.
selectOrgVehicleSns
(
search
);
//搜索车辆或设备-授权数据
Set
<
Long
>
subordinateIds
=
userApiService
.
getSubordinateById
(
ShieldContextHolder
.
getUserId
());
log
.
info
(
"资源用户列表:{}"
,
JSONUtil
.
toJsonStr
(
subordinateIds
));
List
<
OrgVehicleModel
>
sharedModelList
=
vehicleMapper
.
selectAbsolutelyVehicleSns
(
search
.
setUserIds
(
subordinateIds
));
modelList
.
addAll
(
sharedModelList
);
if
(
CollectionUtils
.
isEmpty
(
modelList
))
{
if
(
CollectionUtils
.
isEmpty
(
modelList
))
{
return
Lists
.
newArrayList
();
return
Lists
.
newArrayList
();
}
}
...
...
src/main/resources/mapper/VehicleMapper.xml
View file @
f09461b
...
@@ -334,7 +334,7 @@
...
@@ -334,7 +334,7 @@
tv.vin,
tv.vin,
tv.owner_name ownerName,
tv.owner_name ownerName,
tvd.sn sns,
tvd.sn sns,
tv
.created_by
creatorId,
tv
p.receiver_id
creatorId,
td.source,
td.source,
td.device_type deviceType
td.device_type deviceType
from t_vehicle tv
from t_vehicle tv
...
@@ -343,12 +343,10 @@
...
@@ -343,12 +343,10 @@
left join t_vehicle_permit tvp on tvp.content_id = tv.id
left join t_vehicle_permit tvp on tvp.content_id = tv.id
where tv.del_flag = 0 and tvd.del_flag = 0 and tvp.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
<if
test=
"userIds != null and userIds.size() > 0"
>
and tvp.receiver_id in
and tvp.receiver_id in
<foreach
collection=
"userIds"
separator=
","
open=
"("
close=
")"
item=
"item"
>
<foreach
collection=
"userIds"
separator=
","
open=
"("
close=
")"
item=
"item"
>
#{item}
#{item}
</foreach>
</foreach>
</if>
<choose>
<choose>
<when
test=
"termType == 1"
>
<when
test=
"termType == 1"
>
and tvd.sn like concat('%',#{term},'%')
and tvd.sn like concat('%',#{term},'%')
...
...
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