From 1ca5584d7e3200a9af65a099bd26d3593e2ba702 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期四, 07 五月 2026 14:36:08 +0800
Subject: [PATCH] 迁移pro

---
 src/main/resources/mapper/account/AccountIncomeMapper.xml |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/account/AccountIncomeMapper.xml b/src/main/resources/mapper/account/AccountIncomeMapper.xml
index e4f3361..9becd41 100644
--- a/src/main/resources/mapper/account/AccountIncomeMapper.xml
+++ b/src/main/resources/mapper/account/AccountIncomeMapper.xml
@@ -11,13 +11,39 @@
         <if test="accountIncome.entryDateStart != null and accountIncome.entryDateStart != '' ">
             AND income_date &gt;= DATE_FORMAT(#{accountIncome.entryDateStart},'%Y-%m-%d')
         </if>
+        <if test="accountIncome.customerName != null and accountIncome.customerName != '' ">
+            AND customer_name like CONCAT('%',#{accountIncome.customerName},'%')
+        </if>
+
+        <if test="accountIncome.invoiceNumber != null and accountIncome.invoiceNumber != '' ">
+            AND invoice_number like CONCAT('%',#{accountIncome.invoiceNumber},'%')
+        </if>
         <if test="accountIncome.entryDateEnd != null and accountIncome.entryDateEnd != '' ">
             AND income_date &lt;= DATE_FORMAT(#{accountIncome.entryDateEnd},'%Y-%m-%d')
         </if>
         <if test="accountIncome.incomeType != null and accountIncome.incomeType != '' ">
             AND income_type = #{accountIncome.incomeType}
         </if>
-        <if test="accountIncome.incomeMethod != null and accountIncome.incomeMethod != '' ">
+        <if test="accountIncome.incomeMethodLabel != null and accountIncome.incomeMethodLabel != ''">
+            AND (
+            (
+            business_type = 1
+            AND income_method in
+            <foreach collection="accountIncome.receiptPaymentMethodList" item="method" open="(" separator="," close=")">
+                #{method}
+            </foreach>
+            )
+            OR
+            (
+            business_type is null
+            AND income_method in
+            <foreach collection="accountIncome.paymentMethodList" item="method" open="(" separator="," close=")">
+                #{method}
+            </foreach>
+            )
+            )
+        </if>
+        <if test="(accountIncome.incomeMethodLabel == null or accountIncome.incomeMethodLabel == '') and accountIncome.incomeMethod != null and accountIncome.incomeMethod != '' ">
             AND income_method = #{accountIncome.incomeMethod}
         </if>
     </select>
@@ -54,7 +80,7 @@
         <if test="dateQueryDto.entryDateEnd != null and dateQueryDto.entryDateEnd != '' ">
             AND income_date &lt;= DATE_FORMAT(#{dateQueryDto.entryDateEnd},'%Y-%m-%d')
         </if>
-        group by income_type
+        GROUP BY sdd.dict_label, ai.income_type
     </select>
     <select id="report1" resultType="java.math.BigDecimal">
         SELECT

--
Gitblit v1.9.3