补充查询购买记录的未删除标识

This commit is contained in:
gaoqr
2025-09-22 10:28:17 +08:00
parent 9629734e48
commit 1f1bd7ff53
2 changed files with 7 additions and 3 deletions
@@ -3,7 +3,7 @@
<mapper namespace="com.cf.imes.module.system.dal.mysql.funds.purchase.PurchaseRecordMapper">
<select id="getInvoicingAmount" resultType="java.math.BigDecimal">
select sum(account_balance_spent) from purchase_record
where organ_id = #{organId} and is_invocing = '${@com.cf.imes.module.system.enums.pay.InvoiceStatusEnum@INVOICABLE.code}';
where organ_id = #{organId} and is_invocing = '${@com.cf.imes.module.system.enums.pay.InvoiceStatusEnum@INVOICABLE.code}' and deleted = false;;
</select>
<!-- 查询机构下开票金额统计:可开票、开票中、已开票-->
@@ -12,7 +12,7 @@
sum(case when is_invocing = '${@com.cf.imes.module.system.enums.pay.InvoiceStatusEnum@PENDINGINVOICING.code}' then account_balance_spent else 0 end) as inTheInvoice,
sum(case when is_invocing = '${@com.cf.imes.module.system.enums.pay.InvoiceStatusEnum@INVOICINGSUCCESSFUL.code}' then account_balance_spent else 0 end) as invoiced
from purchase_record
where organ_id = #{organId}
where organ_id = #{organId} and deleted = false;
</select>
<select id="getInvoicableAmount" resultType="java.math.BigDecimal">
@@ -22,6 +22,7 @@
<foreach collection="ids" item="id" open="(" close=")" separator=",">
#{id}
</foreach>
and deleted = false;
</select>
<select id="getTotalSales"
@@ -29,7 +30,8 @@
select
sum(total_amount - gift_money_spent) as amount,
sum(gift_money_spent) as giftAmount
from purchase_record;
from purchase_record
where deleted = false;
</select>
<select id="getTotalRechargeUsageAmount" resultType="java.math.BigDecimal">