From 95da1e36eaad95a0701c7b6f44534054d217557f Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期五, 14 二月 2025 18:05:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 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 122a6b8..fe484d4 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
@@ -859,7 +859,7 @@
 			chargingGun.setStatus(4);
 			chargingGunClient.updateChargingGunById(chargingGun);
 			//推送状态给三方平台
-			tcecClient.pushChargingGunStatus(chargingGun.getId(), chargingGun.getStatus());
+			tcecClient.pushChargingGunStatus(chargingGun.getFullNumber(), chargingGun.getStatus());
 		}
 		redisService.setCacheObject("AQJC_" + order.getChargingGunId(), preChargeCheck1, 24L, TimeUnit.HOURS);
 		this.updateById(order);
@@ -1323,8 +1323,8 @@
 				}
 
 			}
-			chargingOrderVO.setCommissionAmount(chargingOrderVO.getOrderAmount()!=null?chargingOrderVO.getOrderAmount().multiply(new BigDecimal("0.006")):new BigDecimal("0"));
-			chargingOrderVO.setPlatFormMoney(chargingOrderVO.getOrderAmount()!=null?chargingOrderVO.getOrderAmount().multiply(new BigDecimal("0.006")).setScale(2,BigDecimal.ROUND_DOWN):new BigDecimal("0"));
+			chargingOrderVO.setCommissionAmount(chargingOrderVO.getRechargeAmount()!=null?chargingOrderVO.getRechargeAmount().multiply(new BigDecimal("0.006")):new BigDecimal("0"));
+			chargingOrderVO.setPlatFormMoney(chargingOrderVO.getRechargeAmount()!=null?chargingOrderVO.getRechargeAmount().multiply(new BigDecimal("0.006")).setScale(2,BigDecimal.ROUND_DOWN):new BigDecimal("0"));
 			chargingOrderVO.setUid(chargingOrderVO.getId()+"");
 			TChargingGun data3 = allGun.stream().filter(e->e.getId().equals(chargingOrderVO.getChargingGunId())).findFirst().orElse(null);
 			TChargingPile data2 = allPile.stream().filter(e->e.getId().equals(chargingOrderVO.getChargingPileId())).findFirst().orElse(null);
@@ -1378,7 +1378,7 @@
 
 		for (ChargingOrderVO chargingOrderVO : list1) {
 			paymentMoney= paymentMoney.add(chargingOrderVO.getPaymentAmount()!=null?chargingOrderVO.getPaymentAmount():new BigDecimal("0"));
-			commissionMoney = commissionMoney.add(chargingOrderVO.getOrderAmount()!=null?chargingOrderVO.getOrderAmount().multiply(new BigDecimal("0.006")):new BigDecimal("0"));
+			commissionMoney = commissionMoney.add(chargingOrderVO.getRechargeAmount()!=null?chargingOrderVO.getRechargeAmount().multiply(new BigDecimal("0.006")):new BigDecimal("0"));
 			if (chargingOrderVO.getChargingCapacity()!=null){
 				total = total.add(chargingOrderVO.getElectricity()!=null?chargingOrderVO.getElectricity():new BigDecimal("0"));
 			}
@@ -1577,7 +1577,7 @@
 			chargingOrderListVO.setChargingCapacity(chargingOrderListVO.getElectricity());
 			BigDecimal bigDecimal = new BigDecimal("0.006");
 			if (chargingOrderListVO.getOrderAmount()!=null){
-				chargingOrderListVO.setCommissionAmount(chargingOrderListVO.getPaymentAmount().multiply(bigDecimal));
+				chargingOrderListVO.setCommissionAmount(chargingOrderListVO.getRechargeAmount().multiply(bigDecimal));
 			}
 			chargingOrderListVO.setPaymentAmount(chargingOrderListVO.getPaymentAmount());
 			chargingOrderListVO.setUid(chargingOrderListVO.getId()+"");
@@ -2007,6 +2007,9 @@
 	@GlobalTransactional(rollbackFor = Exception.class)
 	public R endChargeBillingCharge(TransactionRecordMessageVO vo) {
 		TChargingOrder chargingOrder = this.getOne(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getCode, vo.getTransaction_serial_number()));
+		if(null == chargingOrder){
+			return R.ok();
+		}
 		Integer status = chargingOrder.getStatus();
 		if(status == 5){
 			return R.ok();
@@ -2358,7 +2361,7 @@
 		chargingGunClient.updateChargingGunById(chargingGun);
 		//推送状态给三方平台
 		if(2 == chargingOrder.getOrderSource()){
-			tcecClient.pushChargingGunStatus(chargingGun.getId(), chargingGun.getStatus());
+			tcecClient.pushChargingGunStatus(chargingGun.getFullNumber(), chargingGun.getStatus());
 		}
 		
 		//添加积分
@@ -2836,7 +2839,7 @@
 			}
 			if (tChargingOrder.getPaymentAmount()!=null){
 				paymentAmount = paymentAmount.add(tChargingOrder.getPaymentAmount());
-				orderCommission = orderCommission.add(tChargingOrder.getPaymentAmount().multiply(new BigDecimal("0.006"))
+				orderCommission = orderCommission.add(tChargingOrder.getRechargeAmount().multiply(new BigDecimal("0.006"))
 						.setScale(2,BigDecimal.ROUND_DOWN));
 			}
 

--
Gitblit v1.7.1