Commit 6bc91fe9 by huangjinxin

fix:插单优化

1 parent 866b9a58
......@@ -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());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!