提交 43a034d5 authored 作者: liuhaiquan's avatar liuhaiquan

修改接单之后 计算 到达目的地的时间

上级 dc2e0616
......@@ -311,11 +311,12 @@ public class OrderChildServiceImpl implements OrderChildService {
expectSendTime = now.plusSeconds(sendPlusTime);
}
}
if(Objects.nonNull(orderGoods.getSendLongitude()) && Objects.nonNull(orderGoods.getSendLatitude()) ){
List<GdRouteDTO> receiveGdRouteDTOS = getRoute(truckNo, truckLongitudeX, truckLatitudeY, orderGoods.getReceiveLongitude(),orderGoods.getReceiveLatitude());
//到达目的地的时间 = 到达货源地的时间 + (货源地到目的地的实时距离时间)
if(Objects.nonNull(expectSendTime) && Objects.nonNull(orderGoods.getSendLongitude()) && Objects.nonNull(orderGoods.getSendLatitude()) ){
List<GdRouteDTO> receiveGdRouteDTOS = getRoute(truckNo, orderGoods.getSendLongitude(), orderGoods.getSendLatitude(), orderGoods.getReceiveLongitude(),orderGoods.getReceiveLatitude());
if (CollectionUtils.isNotEmpty(receiveGdRouteDTOS)) {
Integer receivePlusTime = receiveGdRouteDTOS.get(0).getDuration();
expectReceiveTime = now.plusSeconds(receivePlusTime);
expectReceiveTime = expectSendTime.plusSeconds(receivePlusTime);
}
}
return new LocalDateTime[]{expectSendTime,expectReceiveTime};
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论