From e9d4746af2164d4dbff94bd7736b28072b44fc57 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 06 十一月 2024 17:28:18 +0800
Subject: [PATCH] 合并代码

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java |    7 +++----
 1 files changed, 3 insertions(+), 4 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..1c9338f 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
@@ -528,9 +528,9 @@
 			req.setSubject("充电充值");
 			req.setBuyerOpenId(appUser.getAliOpenid());
 			req.setBody("充电充值");
+			req.setNotifyUrl("/payment/callBack/ali/all");
 			AliPaymentResp data = aliPaymentClient.payment(req).getData();
 			if(null != data){
-				data.setNotifyUrl(data.getNotifyUrl() + "/order/t-charging-order/chargingOrderALICallback");
 				return AjaxResult.success(data);
 			}
 		}
@@ -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;

--
Gitblit v1.7.1