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 bc075f57
authored
Aug 30, 2021
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车辆监控-前端全选组织 返回组织下所有车辆id
1 parent
2a36e7e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
View file @
bc075f5
...
...
@@ -68,9 +68,6 @@ public class VehicleMonitorSevice {
private
AlarmFeignClient
alarmFeignClient
;
@Autowired
private
UserApiService
userApiService
;
@Autowired
private
OrganizationApiService
organizationApiService
;
/**
...
...
@@ -129,7 +126,14 @@ public class VehicleMonitorSevice {
});
}
/**
* 用户勾选车辆树 某节点 全选下面所有车辆时候 需要返回给前端所有设备id
*
* @param oid
* @return
*/
public
List
<
String
>
selectTree
(
Long
oid
)
{
VehicleTreeSearch
search
=
new
VehicleTreeSearch
();
search
.
setOrgIds
(
Lists
.
newArrayList
(
oid
));
...
...
@@ -137,6 +141,10 @@ public class VehicleMonitorSevice {
//待优化,这里只需要拿组织下的用户即可,可以在用户服务端过滤掉组织
List
<
OrgTreeModel
>
orgTreeModelList
=
organizationApiService
.
orgTree
(
search
);
if
(
CollectionUtils
.
isEmpty
(
orgTreeModelList
))
{
return
Lists
.
newArrayList
();
}
List
<
OrgTreeModel
>
userList
=
orgTreeModelList
.
stream
().
filter
(
index
->
"u"
.
equals
(
index
.
getOrigin
().
getType
())).
collect
(
Collectors
.
toList
());
Set
<
String
>
userIdSet
=
userList
.
stream
().
map
(
OrgTreeModel:
:
getId
).
collect
(
Collectors
.
toSet
());
...
...
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