From bd57d989b918b469d07987159b007347e4eb339c Mon Sep 17 00:00:00 2001
From: longz <longzhaoz@qq.com>
Date: 星期三, 05 八月 2026 15:33:19 +0800
Subject: [PATCH] Merge branch 'fix/franchisee-income-align' into 2.2
---
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml
index f62726f..5b404a5 100644
--- a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml
+++ b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml
@@ -921,6 +921,9 @@
0 AS sharing_amount
FROM t_charging_order_share_record
WHERE del_flag = 0 AND online_share_status IN ('SUCCESS', 'RECORDED')
+ <if test="sixBefore != null">
+ AND create_time >= #{sixBefore}
+ </if>
<if test="siteIds != null and siteIds.size() > 0">
AND site_id IN
<foreach collection="siteIds" item="siteId" open="(" separator="," close=")">
@@ -935,6 +938,10 @@
COALESCE(ROUND(SUM(IFNULL(tripartite_commission, 0)), 2), 0) AS sharing_amount
FROM t_charging_settlement_bill
WHERE statistical_date_type = 1 AND site_id != 0
+ <if test="sixBefore != null">
+ AND billing_cycle >= #{sixBefore}
+ AND billing_cycle < DATE_FORMAT(CURDATE(), '%Y-%m-01')
+ </if>
<if test="siteIds != null and siteIds.size() > 0">
AND site_id IN
<foreach collection="siteIds" item="siteId" open="(" separator="," close=")">
@@ -949,6 +956,9 @@
SELECT COALESCE(ROUND(SUM(IFNULL(share_amount, 0)), 2), 0)
FROM t_charging_order_share_record
WHERE del_flag = 0 AND online_share_status IN ('SUCCESS', 'RECORDED')
+ <if test="sixBefore != null">
+ AND create_time >= #{sixBefore}
+ </if>
<if test="siteIds != null and siteIds.size() > 0">
AND site_id IN
<foreach collection="siteIds" item="siteId" open="(" separator="," close=")">
--
Gitblit v1.7.1