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 262ebb141..2861530e2 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);