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 eab675f9
authored
Jul 13, 2023
by
chamberone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://zhangguoping@gitlab.dituhui.com/bsh/project/pr…
…oject.git into develop
2 parents
862cc249
fb819b78
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
project-order/src/main/java/com/dituhui/pea/order/common/OrderAssignCheck.java
project-order/src/main/java/com/dituhui/pea/order/common/OrderAssignCheck.java
View file @
eab675f
...
@@ -86,7 +86,7 @@ public class OrderAssignCheck {
...
@@ -86,7 +86,7 @@ public class OrderAssignCheck {
return
new
Result
(
false
,
"没有连续可插入空间(没计算时间)"
,
0
,
0
,
null
,
null
);
return
new
Result
(
false
,
"没有连续可插入空间(没计算时间)"
,
0
,
0
,
null
,
null
);
}
}
log
.
info
(
"插入位置为第{}单
"
,
index
);
log
.
info
(
"插入位置为第{}单
, 已分配单数(不包含本单):{}"
,
index
,
orderSegments
.
size
()
);
// 计算距离 & 时间
// 计算距离 & 时间
if
(
index
==
0
&&
orderSegments
.
isEmpty
())
{
if
(
index
==
0
&&
orderSegments
.
isEmpty
())
{
// 第一订单为出发地, 没有其他订单
// 第一订单为出发地, 没有其他订单
...
@@ -119,7 +119,7 @@ public class OrderAssignCheck {
...
@@ -119,7 +119,7 @@ public class OrderAssignCheck {
}
}
else
if
(
index
==
orderSegments
.
size
())
{
else
if
(
index
==
orderSegments
.
size
())
{
// 最后一个订单出发
// 最后一个订单出发
OrderSegment
pre
=
orderSegments
.
get
(
index
);
OrderSegment
pre
=
orderSegments
.
get
(
index
-
1
);
Pair
p
=
this
.
getDistanceAndDuration
(
pre
.
getX
(),
pre
.
getY
(),
curX
,
curY
);
Pair
p
=
this
.
getDistanceAndDuration
(
pre
.
getX
(),
pre
.
getY
(),
curX
,
curY
);
// 最早可插入位置为技术员上一单出发时间+行程时间
// 最早可插入位置为技术员上一单出发时间+行程时间
int
startPos
=
pre
.
getEnd
()
+
p
.
getDuration
();
int
startPos
=
pre
.
getEnd
()
+
p
.
getDuration
();
...
...
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