From 670b142d5c9650a6d1aabf2f766512d5d17a179e Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期二, 03 二月 2026 10:30:18 +0800
Subject: [PATCH] yys 导入销售台账同步生成生产订单
---
src/main/resources/mapper/account/AccountIncomeMapper.xml | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/account/AccountIncomeMapper.xml b/src/main/resources/mapper/account/AccountIncomeMapper.xml
index 1cb49b9..4acb504 100644
--- a/src/main/resources/mapper/account/AccountIncomeMapper.xml
+++ b/src/main/resources/mapper/account/AccountIncomeMapper.xml
@@ -43,7 +43,7 @@
<select id="report" resultType="com.ruoyi.account.dto.AccountDto2">
SELECT
sdd.dict_label typeName,
- sum(income_money) account
+ ifnull(sum(income_money),0) account
FROM account_income ai
left join sys_dict_data sdd on ai.income_type = sdd.dict_value and sdd.dict_type='income_types'
where
@@ -58,7 +58,7 @@
</select>
<select id="report1" resultType="java.math.BigDecimal">
SELECT
- sum(income_money) account
+ ifnull(sum(income_money),0) account
FROM account_income ai
where
income_type=#{dictValue}
@@ -69,4 +69,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