From dfbfe5bc6cc23568704e3bb55fdb9e43131d8b1a Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Thu, 19 Dec 2024 11:00:36 +0800 Subject: [PATCH] =?UTF-8?q?feat(all):=20=E8=BD=A6=E6=AC=A1=E6=88=90?= =?UTF-8?q?=E6=9C=AC=E6=98=8E=E7=BB=86=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1 修改报表逻辑 --- .../com/logpm/distribution/entity/QualityDeliverEntity.java | 5 +++++ .../receiver/report/DeliverFinishReportListener.java | 3 +++ .../distribution/receiver/report/PlanReportListener.java | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java index 55f75c767..79824d951 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java @@ -639,6 +639,11 @@ public class QualityDeliverEntity extends TenantEntity { */ @ApiModelProperty(value = "上楼费成本") private BigDecimal apstairsCost; + /** + * 平移米数 + */ + @ApiModelProperty(value = "平移米数") + private Integer moveNumber; /** * 平移费成本 */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/DeliverFinishReportListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/DeliverFinishReportListener.java index 7e624de0a..9eafa08a8 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/DeliverFinishReportListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/DeliverFinishReportListener.java @@ -207,6 +207,7 @@ public class DeliverFinishReportListener implements ReportService { if (ObjectUtil.isEmpty(rule)) { continue; } + // 计算配送成本 if (CollUtil.isNotEmpty(priceList)) { Map priceMap = priceList.stream().collect(Collectors.toMap(ExpenseDispatchPriceCategoryVO::getCategoryId, v -> v)); // 车的总运费 用于计算是否触发保底 @@ -298,6 +299,7 @@ public class DeliverFinishReportListener implements ReportService { // 上楼费成本 = 上楼费单价 * 上楼层数 * 签收件数 QualityDeliverEntity qualityDeliverEntity1 = valueMap.get(entity.getId()); if (ObjectUtil.isNotEmpty(stairsNumber) && StrUtil.isNotEmpty(stairsCharge)) { + qualityDeliverEntity1.setStairsNumber(stairsNumber); qualityDeliverEntity1.setApstairsCost(NumberUtil.mul(stairsNumber, new BigDecimal(stairsCharge), signNum)); } // 分货费成本 = 分货费单价 * 签收件数 @@ -306,6 +308,7 @@ public class DeliverFinishReportListener implements ReportService { } // 平移费成本 = 平移费单价 * 平移米数 * 签收件数 if (StrUtil.isNotEmpty(translationFee)) { + qualityDeliverEntity1.setMoveNumber(translationNumber); qualityDeliverEntity1.setMoveCost(NumberUtil.mul(translationNumber, new BigDecimal(translationFee), signNum)); } // 装卸费成本 = 装卸费单价 * 签收件数 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java index 2f205cd87..862c5cf1b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java @@ -90,7 +90,7 @@ public class PlanReportListener implements ReportService { } else { // 没有查询到,延迟30秒重新推送 factoryDataClient.sendMessage(SendMsg.builder() - .exchange(FanoutConstants.distribution.DeliveryAndPlan.EXCHANGE) + .exchange(FanoutConstants.distribution.DeliveryAndPlan.EXCHANGE_DELAY) .routingKey(null) .message(msg) .delay(30000)