Commit fb819b78 by 王力

Merge branch 'dev_bugfix_order_assign0713' into 'develop'

修改

See merge request !226
2 parents 4f355a73 f3739024
......@@ -86,7 +86,7 @@ public class OrderAssignCheck {
return new Result(false, "没有连续可插入空间(没计算时间)", 0, 0, null, null);
}
log.info("插入位置为第{}单", index);
log.info("插入位置为第{}单, 已分配单数(不包含本单):{}", index, orderSegments.size());
// 计算距离 & 时间
if(index == 0 && orderSegments.isEmpty()) {
// 第一订单为出发地, 没有其他订单
......@@ -119,7 +119,7 @@ public class OrderAssignCheck {
}
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);
// 最早可插入位置为技术员上一单出发时间+行程时间
int startPos = pre.getEnd() + p.getDuration();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!