From bb1befa2a8abae3f75cc71b524c46a6d206cb46b Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期五, 30 一月 2026 10:47:01 +0800
Subject: [PATCH] feat(production): 添加生产核算功能和相关接口

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

diff --git a/src/main/resources/mapper/account/AccountIncomeMapper.xml b/src/main/resources/mapper/account/AccountIncomeMapper.xml
index 7400904..4acb504 100644
--- a/src/main/resources/mapper/account/AccountIncomeMapper.xml
+++ b/src/main/resources/mapper/account/AccountIncomeMapper.xml
@@ -69,4 +69,17 @@
             AND income_date &lt;= 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