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 6bc91fe9
authored
Nov 22, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:插单优化
1 parent
866b9a58
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderInfoServiceImpl.java
View file @
6bc91fe
...
...
@@ -542,7 +542,10 @@ public class OrderInfoServiceImpl implements OrderInfoService {
int
moveTime
=
0
;
for
(
int
i
=
0
;
i
<
orderSegments
.
size
();
i
++)
{
OrderSegment
orderSegment
=
orderSegments
.
get
(
i
);
if
(
isMove
&&
!
orderSegment
.
getOrderId
().
equals
(
insertOrder
.
getOrderId
())
&&
moveTime
>
0
)
{
if
(
isMove
)
{
if
(
orderSegment
.
getOrderId
().
equals
(
insertOrder
.
getOrderId
()))
{
continue
;
}
OrderInfoEntity
nestOrder
=
orderInfoDao
.
getByOrderId
(
orderSegment
.
getOrderId
());
nestOrder
.
setPlanStartTime
(
nestOrder
.
getPlanStartTime
().
plusMinutes
(
moveTime
));
nestOrder
.
setPlanEndTime
(
nestOrder
.
getPlanEndTime
().
plusMinutes
(
moveTime
));
...
...
@@ -618,6 +621,10 @@ public class OrderInfoServiceImpl implements OrderInfoService {
int
roadTimePrev
=
BigDecimal
.
valueOf
(
roadResultPrev
.
getResult
().
getTime
()).
divide
(
BigDecimal
.
valueOf
(
60
),
0
,
RoundingMode
.
HALF_UP
).
intValue
();
insertOrder
.
setArriveElapsed
(
roadTimePrev
);
insertOrder
.
setArriveDistance
(
BigDecimal
.
valueOf
(
roadResultPrev
.
getResult
().
getDis
()).
intValue
());
}
else
{
// 第一单没有在途时长
insertOrder
.
setArriveElapsed
(
0
);
insertOrder
.
setArriveDistance
(
0
);
}
OrderInfoEntity
nestOrder
=
orderInfoDao
.
getByOrderId
(
orderSegment
.
getOrderId
());
...
...
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