From 0b3ff378a9faaf9d7a4831b7f0de67378fe0dfea Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 30 五月 2023 12:20:15 +0800
Subject: [PATCH] optimize 统计
---
java110-db/src/main/resources/mapper/report/ReportFeeStatisticsServiceDaoImplMapper.xml | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/report/ReportFeeStatisticsServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/report/ReportFeeStatisticsServiceDaoImplMapper.xml
index 8687111..a5b26aa 100644
--- a/java110-db/src/main/resources/mapper/report/ReportFeeStatisticsServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/report/ReportFeeStatisticsServiceDaoImplMapper.xml
@@ -795,7 +795,7 @@
<!-- 浼樻儬璐圭敤-->
<select id="getDiscountFee" parameterType="Map" resultType="Map">
- select SUM(t.discount_amount) discountFee
+ select ifnull(SUM(t.discount_amount),0.0) discountFee
from pay_fee_detail_month t
where 1=1
and t.status_cd = '0'
@@ -808,7 +808,7 @@
<!-- 婊炵撼閲戣垂鐢�-->
<select id="getLateFee" parameterType="Map" resultType="Map">
- select SUM(t.discount_amount) lateFee
+ select ifnull(SUM(t.discount_amount),0.0) lateFee
from pay_fee_detail_month t
where 1=1
and t.status_cd = '0'
@@ -821,7 +821,7 @@
<!-- 鏌ヨ棰勫瓨璐︽埛-->
<select id="getPrestoreAccount" parameterType="Map" resultType="Map">
- select SUM(t.discount_amount) prestoreAccount lateFee
+ select ifnull(SUM(t.amount),0.0) prestoreAccount
from account_detail t
INNER JOIN account ac on t.acct_id = ac.acct_id and ac.status_cd = '0'
where 1=1
@@ -835,7 +835,7 @@
<!-- 鏌ヨ璐︽埛鎵f-->
<select id="getWithholdAccount" parameterType="Map" resultType="Map">
- select SUM(t.discount_amount) withholdAccount lateFee
+ select ifnull(SUM(t.amount),0.0) withholdAccount
from account_detail t
INNER JOIN account ac on t.acct_id = ac.acct_id and ac.status_cd = '0'
where 1=1
@@ -849,10 +849,10 @@
<!-- 鏌ヨ涓存椂杞﹁垂 -->
<select id="getTempCarFee" parameterType="Map" resultType="Map">
- select sum(t.pay_charge) tempCarFee
+ select ifnull(sum(t.pay_charge),0.0) tempCarFee
from car_inout_payment t
where 1=1
- and ac.part_id= #{communityId}
+ and t.community_id = #{communityId}
and t.create_time > #{startDate}
and t.create_time < #{endDate}
and t.status_cd = '0'
@@ -860,7 +860,7 @@
<!-- 鎶奸噾閫�娆鹃噾棰� -->
<select id="geRefundDeposit" parameterType="Map" resultType="Map">
- select sum(t.received_amount) refundDeposit from return_pay_fee t
+ select ifnull(sum(t.received_amount),0.0) refundDeposit from return_pay_fee t
where t.fee_type_cd = '888800010006'
and t.status_cd = '0'
and t.state = '1001'
@@ -881,7 +881,7 @@
<!-- 閫�娆鹃噾棰� -->
<select id="geRefundFee" parameterType="Map" resultType="Map">
- select sum(t.received_amount) refundFee from return_pay_fee t
+ select ifnull(sum(t.received_amount),0.0) refundFee from return_pay_fee t
where t.status_cd = '0'
and t.state = '1001'
and t.community_id = #{communityId}
@@ -891,7 +891,7 @@
<!-- 鏌ヨ鍏呯數璐圭敤-->
<select id="getChargeFee" parameterType="Map" resultType="Map">
- select sum(t.amount) chargeFee
+ select ifnull(sum(t.amount),0.0) chargeFee
from charge_machine_order t
where t.status_cd = '0'
and t.community_id = #{communityId}
--
Gitblit v1.8.0