|
|
|
@ -1100,7 +1100,13 @@ public class DeliverFinishReportListener implements ReportService {
|
|
|
|
|
} |
|
|
|
|
// A-B B-C C-D 每一个点为起点到下一个点的距离
|
|
|
|
|
Long distance = GaoDeApiUtil.measureDistance(beforePositioning, arrivePositioning); |
|
|
|
|
allRouteMap.put(value1.getSignReservationCode(), Convert.toStr(ObjectUtil.isNotEmpty(distance) ? NumberUtil.div(new BigDecimal(distance), 1000) : 0L / 1000)); |
|
|
|
|
// 获取上一个点位的总距离
|
|
|
|
|
BigDecimal reduce = BigDecimal.ZERO; |
|
|
|
|
if(CollUtil.isNotEmpty(allRouteMap)){ |
|
|
|
|
reduce = allRouteMap.values().stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); |
|
|
|
|
} |
|
|
|
|
String str = Convert.toStr(ObjectUtil.isNotEmpty(distance) ? NumberUtil.div(new BigDecimal(distance), 1000) : 0L / 1000); |
|
|
|
|
allRouteMap.put(value1.getSignReservationCode(), Convert.toStr(NumberUtil.add(reduce, new BigDecimal(str)))); |
|
|
|
|
beforePositioning = arrivePositioning; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|