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 0937d884
authored
Aug 24, 2021
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车辆监控-车辆组织树
1 parent
248da7a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
src/main/java/cn/com/glsx/admin/modules/controller/VehicleMonitorController.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
src/main/java/cn/com/glsx/admin/modules/controller/VehicleMonitorController.java
View file @
0937d88
...
@@ -51,13 +51,13 @@ public class VehicleMonitorController {
...
@@ -51,13 +51,13 @@ public class VehicleMonitorController {
}
}
/**
/**
* @param u
o
Id
* @param uId
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"获取用户拥有的车辆列表"
)
@ApiOperation
(
value
=
"获取用户拥有的车辆列表"
)
@GetMapping
(
"/vlist"
)
@GetMapping
(
"/
u
vlist"
)
public
R
<
List
<
OrgVehicleTree
>>
vehicleList
(
@RequestParam
(
"u
oId"
)
Long
uo
Id
)
{
public
R
<
List
<
OrgVehicleTree
>>
vehicleList
(
@RequestParam
(
"u
Id"
)
String
u
Id
)
{
List
<
OrgVehicleTree
>
list
=
vehicleMonitorSevice
.
getVehiclesByUserId
(
uoId
);
List
<
OrgVehicleTree
>
list
=
vehicleMonitorSevice
.
getVehiclesByUserId
(
Long
.
valueOf
(
uId
.
replace
(
"u"
,
""
))
);
return
R
.
ok
().
data
(
list
);
return
R
.
ok
().
data
(
list
);
}
}
...
...
src/main/java/cn/com/glsx/admin/modules/service/VehicleMonitorSevice.java
View file @
0937d88
...
@@ -116,8 +116,10 @@ public class VehicleMonitorSevice {
...
@@ -116,8 +116,10 @@ public class VehicleMonitorSevice {
*/
*/
public
void
mountVehicle2Tree
(
List
<
OrgTreeModel
>
orgList
,
Map
<
Long
,
List
<
OrgVehicleModel
>>
modelMap
)
{
public
void
mountVehicle2Tree
(
List
<
OrgTreeModel
>
orgList
,
Map
<
Long
,
List
<
OrgVehicleModel
>>
modelMap
)
{
orgList
.
forEach
(
org
->
{
orgList
.
forEach
(
org
->
{
if
(
"v"
==
org
.
getOrigin
().
getType
())
{
if
(
"u"
.
equals
(
org
.
getOrigin
().
getType
()))
{
List
<
OrgVehicleModel
>
modelList
=
modelMap
.
get
(
org
.
getId
());
Long
uId
=
Long
.
valueOf
(
org
.
getId
().
replace
(
org
.
getOrigin
().
getType
(),
""
));
List
<
OrgVehicleModel
>
modelList
=
modelMap
.
get
(
uId
);
List
<
OrgVehicleTree
>
vehicleList
=
convert2ovt
(
modelList
);
List
<
OrgVehicleTree
>
vehicleList
=
convert2ovt
(
modelList
);
...
...
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