From 8a51855d8f12478d827bb432270dc0ff199c0d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98chaoosc=E2=80=99?= <‘chaoosc@gmail.com’> Date: Wed, 22 Nov 2023 15:20:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E6=8F=90=E5=8D=95?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionDeliveryListServiceImpl.java | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index ede38db53..c50748ba5 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -165,6 +165,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl fua = new HashMap<>(); // 需要去查询费用明细 + LambdaQueryWrapper qu = new LambdaQueryWrapper<>(); + qu.eq(DistributionDeliveryChargeEntity::getBillLading,distrilbutionBillLadingEntity.getId()); + List distributionDeliveryChargeEntities = distributionDeliveryChargeMapper.selectList(qu); + + HashMap objectObjectHashMap = new HashMap<>(); + + BigDecimal sumMoney =new BigDecimal("0.00"); + // 构建费用明细 + for (DistributionDeliveryChargeEntity distributionDeliveryChargeEntity : distributionDeliveryChargeEntities) { + + String costName = distributionDeliveryChargeEntity.getCost();// 查询码表 得到类型 + + costName=DictBizCache.getValue("delivery_cost",costName); + BigDecimal costMoney = distributionDeliveryChargeEntity.getMoney();// 查询码表 得到类型 + objectObjectHashMap.put(costName,costMoney); + sumMoney.add(costMoney); + + } - fua.put("费用明细",0); + fua.put("费用明细",objectObjectHashMap); - fua.put("费用合计",0); + fua.put("费用合计",sumMoney); map.put("费用统计",fua);