From b472e4952016fb8934a65b19d76fb5348ff6e176 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期三, 06 十一月 2024 18:38:46 +0800 Subject: [PATCH] bug修改 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java index 9c2d449..c8218c0 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java @@ -963,9 +963,8 @@ if(null != chargingHandshake && null != data && null != one.getAppUserCarId()){ BigDecimal bms_battery_capacity = chargingHandshake.getBms_battery_capacity(); TAppUserCar appUserCar = appUserCarClient.getCarByIds(Arrays.asList(one.getAppUserCarId())).getData().get(0); - // 续航 = 电池容量 / 续航里程 * soc - BigDecimal divide = bms_battery_capacity.divide(new BigDecimal(appUserCar.getEndurance())); - BigDecimal multiply = new BigDecimal(data.getSoc() / 100).multiply(divide); + // 续航 = 续航里程 * soc + BigDecimal multiply = new BigDecimal(data.getSoc() / 100).multiply(new BigDecimal(appUserCar.getEndurance())); chargingDetails.setEndurance(multiply); } return chargingDetails; @@ -1289,7 +1288,7 @@ } tCharingOrderVO.setTotal(total); tCharingOrderVO.setTime(time); - tCharingOrderVO.setIncome(income.subtract(commissionMoney)); + tCharingOrderVO.setIncome(paymentMoney.subtract(commissionMoney)); tCharingOrderVO.setElectronicMoney(electronicMoney); tCharingOrderVO.setServiceMoney(serviceMoney); pageInfo.setRecords(list); @@ -2643,7 +2642,7 @@ BigDecimal subtract = new BigDecimal("1").subtract(dto.getProportionPartner()); BigDecimal subtract9 = new BigDecimal("1").subtract(dto.getServicePartner()); // 总电损费用 - BigDecimal divide = tSettlementConfirm.getProportionMoney().divide(subtract, 2, RoundingMode.HALF_DOWN); + BigDecimal divide = tSettlementConfirm.getProportionMoney().divide(subtract, 2, BigDecimal.ROUND_DOWN); // 平台承担电损 BigDecimal subtract1 = divide.subtract(tSettlementConfirm.getProportionMoney()); BigDecimal multiply = dto.getServiceMoney().multiply(subtract); -- Gitblit v1.7.1