From 5c58ac36853e09b09498ac2ed75bf5a9e7b80e12 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 21 一月 2026 10:35:25 +0800
Subject: [PATCH] 浪潮对接单点登录:能耗管理系统2
---
src/main/resources/mapper/account/AccountIncomeMapper.xml | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/account/AccountIncomeMapper.xml b/src/main/resources/mapper/account/AccountIncomeMapper.xml
index bfb6d73..7400904 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
@@ -56,4 +56,17 @@
</if>
group by income_type
</select>
+ <select id="report1" resultType="java.math.BigDecimal">
+ SELECT
+ ifnull(sum(income_money),0) account
+ FROM account_income ai
+ where
+ income_type=#{dictValue}
+ <if test="dateQueryDto.entryDateStart != null and dateQueryDto.entryDateStart != '' ">
+ AND income_date >= DATE_FORMAT(#{dateQueryDto.entryDateStart},'%Y-%m-%d')
+ </if>
+ <if test="dateQueryDto.entryDateEnd != null and dateQueryDto.entryDateEnd != '' ">
+ AND income_date <= DATE_FORMAT(#{dateQueryDto.entryDateEnd},'%Y-%m-%d')
+ </if>
+ </select>
</mapper>
--
Gitblit v1.9.3