Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 381dd7a1
authored
Nov 15, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(工单进度查询): 进度的预估时间计算逻辑以假设电动车19KM/H计算
1 parent
83fd6e55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderCreateServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderCreateServiceImpl.java
View file @
381dd7a
...
...
@@ -203,7 +203,17 @@ public class OrderCreateServiceImpl implements OrderCreateService {
Double
.
parseDouble
(
orderInfo
.
getX
()),
Double
.
parseDouble
(
orderInfo
.
getY
()));
estimate
.
setDistance
(
distance
);
estimate
.
setArriveTime
(
palnDate
);
if
(
Math
.
abs
(
distance
)
<
1
e
-
15
)
{
estimate
.
setArriveTime
(
com
.
dituhui
.
pea
.
order
.
common
.
jackson
.
DateUtil
.
toDate
(
orderInfo
.
getActualStartTime
()));
}
else
{
//当前时间 加大概需要的时间
//计算大概时间, 电动车 19KM/H
double
speed
=
0.3167
;
LocalDateTime
localDateTime
=
LocalDateTime
.
now
().
plusMinutes
((
int
)
Math
.
ceil
(
distance
/
speed
));
estimate
.
setArriveTime
(
com
.
dituhui
.
pea
.
order
.
common
.
jackson
.
DateUtil
.
toDate
(
localDateTime
));
}
realtimeInfo
.
setEstimate
(
estimate
);
stageResult
.
setRealtimeInfo
(
realtimeInfo
);
...
...
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