组织创建首次订购在账户总览中可开票金额不显示问题修复

This commit is contained in:
gaoqr
2025-09-23 11:49:38 +08:00
parent 81abd5f692
commit 91ee86c3c2
@@ -2,8 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<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}' and deleted = false;;
SELECT SUM(
CASE
WHEN initial = TRUE THEN total_amount
ELSE account_balance_spent
END
) AS total_spent
FROM purchase_record
where organ_id = #{organId} and is_invocing = '${@com.cf.imes.module.system.enums.pay.InvoiceStatusEnum@INVOICABLE.code}' and deleted = false;
</select>
<!-- 查询机构下开票金额统计:可开票、开票中、已开票-->