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 1f671038
authored
Sep 13, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
2 parents
85728b78
e06b8558
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 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 @
1f67103
...
@@ -18,6 +18,7 @@ import org.apache.commons.lang.StringUtils;
...
@@ -18,6 +18,7 @@ import org.apache.commons.lang.StringUtils;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StopWatch
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -55,7 +56,10 @@ public class VehicleMonitorSevice {
...
@@ -55,7 +56,10 @@ public class VehicleMonitorSevice {
List
<
OrgTreeModel
>
orgTreeModelList
=
Lists
.
newArrayList
();
List
<
OrgTreeModel
>
orgTreeModelList
=
Lists
.
newArrayList
();
StopWatch
sw
=
new
StopWatch
();
if
(
search
.
getTermType
()
!=
null
&&
StringUtils
.
isNotBlank
(
search
.
getTerm
()))
{
if
(
search
.
getTermType
()
!=
null
&&
StringUtils
.
isNotBlank
(
search
.
getTerm
()))
{
sw
.
start
(
"task1"
);
//搜索车辆或设备
//搜索车辆或设备
List
<
OrgVehicleModel
>
modelList
=
vehicleMapper
.
selectVehicleSns
(
search
);
List
<
OrgVehicleModel
>
modelList
=
vehicleMapper
.
selectVehicleSns
(
search
);
...
@@ -77,12 +81,19 @@ public class VehicleMonitorSevice {
...
@@ -77,12 +81,19 @@ public class VehicleMonitorSevice {
return
convert2ovt
(
modelList
);
return
convert2ovt
(
modelList
);
}
}
}
else
{
}
else
{
sw
.
start
(
"task2"
);
orgTreeModelList
=
organizationApiService
.
orgTree
(
search
);
orgTreeModelList
=
organizationApiService
.
orgTree
(
search
);
}
}
sw
.
stop
();
log
.
info
(
"{} 耗时:{} s"
,
sw
.
getLastTaskName
(),
sw
.
getLastTaskTimeMillis
());
sw
.
start
(
"task3"
);
//线性结构转树型结构
//线性结构转树型结构
List
<?
extends
TreeModel
>
orgTree
=
TreeModelUtil
.
fastConvertByRootMark
(
orgTreeModelList
,
1
);
List
<?
extends
TreeModel
>
orgTree
=
TreeModelUtil
.
fastConvertByRootMark
(
orgTreeModelList
,
1
);
sw
.
stop
();
log
.
info
(
sw
.
prettyPrint
());
log
.
info
(
"总耗时:{} s"
,
sw
.
getTotalTimeSeconds
());
return
orgTree
;
return
orgTree
;
}
}
...
@@ -213,6 +224,7 @@ public class VehicleMonitorSevice {
...
@@ -213,6 +224,7 @@ public class VehicleMonitorSevice {
/**
/**
* 构建位置信息 无gps、基站、wifi定位的返回null
* 构建位置信息 无gps、基站、wifi定位的返回null
*
* @param deviceBo
* @param deviceBo
* @return
* @return
*/
*/
...
...
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