From d0cd9b9d98f2aa7a67c56aecb85044f52dbc9cd8 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期四, 02 四月 2026 16:12:10 +0800
Subject: [PATCH] chore: 数据库端口修改
---
src/main/resources/mapper/account/AccountIncomeMapper.xml | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/account/AccountIncomeMapper.xml b/src/main/resources/mapper/account/AccountIncomeMapper.xml
index 7400904..56d254d 100644
--- a/src/main/resources/mapper/account/AccountIncomeMapper.xml
+++ b/src/main/resources/mapper/account/AccountIncomeMapper.xml
@@ -11,6 +11,13 @@
<if test="accountIncome.entryDateStart != null and accountIncome.entryDateStart != '' ">
AND income_date >= 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 <= DATE_FORMAT(#{accountIncome.entryDateEnd},'%Y-%m-%d')
</if>
@@ -69,4 +76,17 @@
AND income_date <= DATE_FORMAT(#{dateQueryDto.entryDateEnd},'%Y-%m-%d')
</if>
</select>
+
+ <select id="selectIncomeStats"
+ resultType="com.ruoyi.home.dto.IncomeExpenseAnalysisDto">
+ SELECT DATE_FORMAT(income_date, #{dateFormat}) AS dateStr,
+ IFNULL(SUM(income_money), 0) AS amount
+ FROM account_income
+ WHERE income_date BETWEEN #{startDate} AND #{endDate}
+# AND business_type = 1
+ GROUP BY dateStr
+ ORDER BY dateStr
+
+ </select>
+
</mapper>
--
Gitblit v1.9.3