Browse Source

feat(all): 车次成本明细报表

1 修改报表逻辑
pre-production
zhaoqiaobo 1 month ago
parent
commit
dfbfe5bc6c
  1. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/QualityDeliverEntity.java
  2. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/DeliverFinishReportListener.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/report/PlanReportListener.java

5
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;
/**
* 平移费成本
*/

3
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<Long, ExpenseDispatchPriceCategoryVO> 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));
}
// 装卸费成本 = 装卸费单价 * 签收件数

2
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)

Loading…
Cancel
Save