From 6851a3e83b5bcf27688688660073cb21bcc61eb6 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期四, 07 十一月 2024 11:56:30 +0800 Subject: [PATCH] 提交代码 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java index 4085b34..6361e2a 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java @@ -266,7 +266,7 @@ if (data3!=null)tChargingOrder.setUserName(data3.getName()); // 累加实收金额 支付结算金额 if (tChargingOrder.getChargeAmount()!=null){ - paymentAmount = paymentAmount.add(tChargingOrder.getChargeAmount()); + paymentAmount = paymentAmount.add(tChargingOrder.getRechargeAmount()); } // 总金额 if (tChargingOrder.getOrderAmount()!=null){ @@ -383,7 +383,7 @@ chargingBillVO.setExportList(tChargingOrders); for (TChargingOrder tChargingOrder : tChargingOrders) { if (tChargingOrder.getOrderAmount()!=null){ - paymentAmountTotal = paymentAmountTotal.add(tChargingOrder.getChargeAmount()); + paymentAmountTotal = paymentAmountTotal.add(tChargingOrder.getRechargeAmount()); } // 累加订单金额 @@ -479,7 +479,7 @@ BigDecimal sharingAmountTotal = new BigDecimal("0"); BigDecimal chargingCapacityTotal = new BigDecimal("0"); BigDecimal discountTotal = new BigDecimal("0"); - BigDecimal refundAmount = new BigDecimal("0"); + BigDecimal refundAmountTotal = new BigDecimal("0"); int orderCount = 0; for (ChargingBillListVO chargingBillListVO : list) { String temp = ""; @@ -538,6 +538,7 @@ BigDecimal commissionAmount = new BigDecimal("0"); BigDecimal sharingAmount = new BigDecimal("0"); BigDecimal chargingCapacity = new BigDecimal("0"); + BigDecimal refundAmount = new BigDecimal("0"); chargingBillVO.setCategory(""); chargingBillListVO.setOrderCount(tChargingOrders.size()); chargingBillVO.setExportList(tChargingOrders); @@ -753,9 +754,9 @@ paymentAmountTotal = paymentAmountTotal.add(tChargingOrder.getPaymentAmount()); } // 累加订单金额 - if (tChargingOrder.getOrderAmount()!=null){ - orderAmount = orderAmount.add(tChargingOrder.getPaymentAmount()); - orderAmountTotal = orderAmountTotal.add(tChargingOrder.getPaymentAmount()); + if (tChargingOrder.getRechargeAmount()!=null){ + orderAmount = orderAmount.add(tChargingOrder.getRechargeAmount()); + orderAmountTotal = orderAmountTotal.add(tChargingOrder.getRechargeAmount()); } // 累加累计电费 if (tChargingOrder.getElectrovalence()!=null){ @@ -763,7 +764,7 @@ electrovalenceTotal = electrovalenceTotal.add(tChargingOrder.getElectrovalence()); } if (tChargingOrder.getRefundAmount()!=null && tChargingOrder.getRefundStatus() !=null && tChargingOrder.getRefundStatus() == 2){ - refundAmount = refundAmount.add(tChargingOrder.getRefundAmount()); + refundAmountTotal = refundAmountTotal.add(tChargingOrder.getRefundAmount()); } // 累加累计服务费 if (tChargingOrder.getServiceCharge()!=null){ @@ -796,8 +797,8 @@ } } chargingBillVO.setChargingCapacity(chargingCapacityTotal); - chargingBillVO.setPaymentAmount(orderAmountTotal.subtract(commissionAmountTotal).subtract(sharingAmountTotal).setScale(2, BigDecimal.ROUND_DOWN)); - chargingBillVO.setOrderAmount(orderAmountTotal.setScale(2, BigDecimal.ROUND_DOWN)); + chargingBillVO.setPaymentAmount(paymentAmountTotal.subtract(commissionAmountTotal).subtract(sharingAmountTotal).setScale(2, BigDecimal.ROUND_DOWN)); + chargingBillVO.setOrderAmount(orderAmountTotal.subtract(refundAmountTotal).setScale(2, BigDecimal.ROUND_DOWN)); chargingBillVO.setElectrovalence(electrovalenceTotal.setScale(2, BigDecimal.ROUND_DOWN)); chargingBillVO.setServiceCharge(serviceChargeTotal.setScale(2, BigDecimal.ROUND_DOWN)); chargingBillVO.setOrderCount(orderCount); -- Gitblit v1.7.1