|
|
|
@ -395,7 +395,7 @@ public class DeliverFinishReportListener implements ReportService {
|
|
|
|
|
} |
|
|
|
|
// 最大公里数计算
|
|
|
|
|
if (NumberUtil.equals(kilometerCalculationRule, 3)) { |
|
|
|
|
BigDecimal total = null; |
|
|
|
|
BigDecimal total = BigDecimal.ZERO; |
|
|
|
|
String lastCode = null; |
|
|
|
|
if (CollUtil.isNotEmpty(firstRouteMap)) { |
|
|
|
|
for (Map.Entry<String, String> firstEntry : firstRouteMap.entrySet()) { |
|
|
|
@ -521,7 +521,7 @@ public class DeliverFinishReportListener implements ReportService {
|
|
|
|
|
} |
|
|
|
|
// 最大公里数计算
|
|
|
|
|
if (NumberUtil.equals(subsidyKilometerRule, 3)) { |
|
|
|
|
BigDecimal total = null; |
|
|
|
|
BigDecimal total = BigDecimal.ZERO; |
|
|
|
|
String lastCode = null; |
|
|
|
|
if (CollUtil.isNotEmpty(firstRouteMap)) { |
|
|
|
|
for (Map.Entry<String, String> firstEntry : firstRouteMap.entrySet()) { |
|
|
|
@ -673,7 +673,7 @@ public class DeliverFinishReportListener implements ReportService {
|
|
|
|
|
if (NumberUtil.equals(overZoneKilometerRule, 3)) { |
|
|
|
|
Integer overZoneSiteMode = rule.getOverZoneSiteMode(); |
|
|
|
|
if (NumberUtil.equals(overZoneSiteMode, 1)) { |
|
|
|
|
BigDecimal total = null; |
|
|
|
|
BigDecimal total = BigDecimal.ZERO; |
|
|
|
|
String lastCode = null; |
|
|
|
|
if (CollUtil.isNotEmpty(firstRouteMap)) { |
|
|
|
|
for (Map.Entry<String, String> firstEntry : firstRouteMap.entrySet()) { |
|
|
|
@ -709,7 +709,7 @@ public class DeliverFinishReportListener implements ReportService {
|
|
|
|
|
// 按区域计费
|
|
|
|
|
if (NumberUtil.equals(overZoneSiteMode, 2)) { |
|
|
|
|
if (CollUtil.isNotEmpty(overZoneEntityMap)) { |
|
|
|
|
BigDecimal total = null; |
|
|
|
|
BigDecimal total = BigDecimal.ZERO; |
|
|
|
|
String lastCode = null; |
|
|
|
|
if (CollUtil.isNotEmpty(firstRouteMap)) { |
|
|
|
|
for (Map.Entry<String, String> firstEntry : firstRouteMap.entrySet()) { |
|
|
|
@ -964,13 +964,13 @@ public class DeliverFinishReportListener implements ReportService {
|
|
|
|
|
if (StrUtil.isNotEmpty(arrivePositioning)) { |
|
|
|
|
// A-B A-C A-D 仓库为起点到每一个点的距离
|
|
|
|
|
Long first = GaoDeApiUtil.measureDistance(firstPositioning, arrivePositioning); |
|
|
|
|
firstRouteMap.put(value1.getSignReservationCode(), Convert.toStr(first / 1000)); |
|
|
|
|
firstRouteMap.put(value1.getSignReservationCode(), Convert.toStr(ObjectUtil.isNotEmpty(first) ? NumberUtil.div(new BigDecimal(first), 1000) : 0L / 1000)); |
|
|
|
|
if (StrUtil.isEmpty(beforePositioning)) { |
|
|
|
|
beforePositioning = firstPositioning; |
|
|
|
|
} |
|
|
|
|
// A-B B-C C-D 每一个点为起点到下一个点的距离
|
|
|
|
|
Long distance = GaoDeApiUtil.measureDistance(beforePositioning, arrivePositioning); |
|
|
|
|
allRouteMap.put(value1.getSignReservationCode(), Convert.toStr(distance / 1000)); |
|
|
|
|
allRouteMap.put(value1.getSignReservationCode(), Convert.toStr(ObjectUtil.isNotEmpty(distance) ? NumberUtil.div(new BigDecimal(distance), 1000) : 0L / 1000)); |
|
|
|
|
beforePositioning = arrivePositioning; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|