Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
07e52051
Commit
07e52051
authored
Sep 14, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆里程过滤掉正常里程数处理,车辆里程的结束时间取
parent
f01709de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
ThreadCar.java
...c/main/java/com/yeejoin/equipmanage/thread/ThreadCar.java
+3
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/thread/ThreadCar.java
View file @
07e52051
...
...
@@ -94,8 +94,6 @@ ThreadCar extends Thread {
lastObj
.
put
(
"FireCar_Speed"
,
0
);
logger
.
info
(
"---过滤后last信息为null时的数据::"
+
JSONObject
.
toJSONString
(
last
));
}
double
endLongitude
=
lastObj
.
getDoubleValue
(
"FireCar_Longitude"
);
double
endLatitude
=
lastObj
.
getDoubleValue
(
"FireCar_Latitude"
);
//里程结束时间设置为最后一次的上报时间
Date
endTime
=
new
Date
(
last
.
getStartTime
().
getTime
()/
1000
*
1000
);
//实时库中的时间虽然坐标与记录的一致,但是更新时间可能最新,故可能会有记录的结束时间早于开始时间
...
...
@@ -103,7 +101,8 @@ ThreadCar extends Thread {
if
(
takeTime
<
0
)
{
takeTime
=
0
-
takeTime
;
}
double
endLongitude
=
lastObj
.
getDoubleValue
(
"FireCar_Longitude"
);
double
endLatitude
=
lastObj
.
getDoubleValue
(
"FireCar_Latitude"
);
last
.
setTakeTime
(
takeTime
);
last
.
setEndLongitude
(
endLongitude
);
last
.
setEndLatitude
(
endLatitude
);
...
...
@@ -132,7 +131,7 @@ ThreadCar extends Thread {
Double
travle
=
new
BigDecimal
(
travel
/
1000
).
setScale
(
1
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
();
logger
.
info
(
"---------------------本次里程::"
+
travle
+
"---------------------------------------"
);
last
.
setTravel
(
travle
);
iWlCarMileageService
.
updateById
(
last
);
Long
lastTime
=
System
.
currentTimeMillis
();
logger
.
info
(
"---正常时获取到的获取last信息::"
+
JSONObject
.
toJSONString
(
last
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment