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 b75bf26d
authored
Feb 23, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
组织树查询车辆设备限制优化
1 parent
90feec23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
src/main/java/cn/com/glsx/admin/modules/controller/VehicleMonitorController.java
src/main/java/cn/com/glsx/admin/modules/controller/VehicleMonitorController.java
View file @
b75bf26
...
...
@@ -55,7 +55,14 @@ public class VehicleMonitorController {
List
<
OrgVehicleModel
>
modelList
=
vehicleMonitorSevice
.
selectTreeByOrgId
(
oId
);
return
handleOrgVehicleTreeResult
(
modelList
);
//非最小节点选择数超过阈值时提示
Integer
maxMonitorNum
=
Integer
.
valueOf
(
PropertiesUtils
.
getProperty
(
"max.monitor.num"
,
"100"
));
if
(
modelList
.
size
()
>
maxMonitorNum
)
{
return
R
.
ok
().
put
(
"tips"
,
"当所选分组包含车辆过多时,请尝试分多次查询,以防等待时间过久,监控设备上限为"
+
maxMonitorNum
+
"台"
+
maxMonitorNum
);
}
else
{
List
<
OrgVehicleTree
>
list
=
vehicleMonitorSevice
.
convert2ovt
(
modelList
);
return
R
.
ok
().
data
(
list
);
}
}
/**
...
...
@@ -68,17 +75,9 @@ public class VehicleMonitorController {
List
<
OrgVehicleModel
>
modelList
=
vehicleMonitorSevice
.
selectVehiclesByUserId
(
Long
.
valueOf
(
uId
.
replace
(
"u"
,
""
)));
return
handleOrgVehicleTreeResult
(
modelList
);
}
List
<
OrgVehicleTree
>
list
=
vehicleMonitorSevice
.
convert2ovt
(
modelList
);
public
R
<
List
<
OrgVehicleTree
>>
handleOrgVehicleTreeResult
(
List
<
OrgVehicleModel
>
modelList
)
{
Integer
maxMonitorNum
=
Integer
.
valueOf
(
PropertiesUtils
.
getProperty
(
"max.monitor.num"
,
"100"
));
if
(
modelList
.
size
()
>
maxMonitorNum
)
{
return
R
.
ok
().
put
(
"tips"
,
"超过监控设备最大值"
+
maxMonitorNum
);
}
else
{
List
<
OrgVehicleTree
>
deviceList
=
vehicleMonitorSevice
.
convert2ovt
(
modelList
);
return
R
.
ok
().
data
(
deviceList
);
}
return
R
.
ok
().
data
(
list
);
}
@ApiOperation
(
value
=
"查询车辆位置信息接口"
)
...
...
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