demand: TMS系统 - 客户账单管理 - 查询开票子账单关联表列表接口查询返回发票已收金额 TMS系统 - 客户账单管理 - 收款明细查询 - 查询账单金额取值问题修复

committer: heyu
This commit is contained in:
aike 2025-09-29 11:38:14 +08:00
parent 02266528f0
commit d8786e0d08
2 changed files with 9 additions and 9 deletions

View File

@ -23,10 +23,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectEmisSettleInvoiceRelVo">
select r.id, r.apply_seq_no, r.pay_id, r.bill_no, r.money,
COALESCE(s.reced_money, 0) as reced_money,
COALESCE(i.reced_money, 0) as reced_money,
r.del_flag, r.create_by, r.create_time, r.update_by, r.update_time, r.create_site, r.update_site
from emis_settle_invoice_rel r
left join emis_settle_sub_bill s on r.bill_no = s.bill_no and s.del_flag = '0'
left join emis_settle_invoice_record i on r.apply_seq_no = i.apply_seq_no and i.del_flag = '0'
</sql>
<select id="selectEmisSettleInvoiceRelList" parameterType="EmisSettleInvoiceRel" resultMap="EmisSettleInvoiceRelWithSubBillResult">
@ -72,28 +72,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectEmisSettleInvoiceRelById" parameterType="Long" resultMap="EmisSettleInvoiceRelResult">
select r.id, r.apply_seq_no, r.pay_id, r.bill_no, r.money,
COALESCE(s.reced_money, 0) as reced_money,
COALESCE(i.reced_money, 0) as reced_money,
r.del_flag, r.create_by, r.create_time, r.update_by, r.update_time, r.create_site, r.update_site
from emis_settle_invoice_rel r
left join emis_settle_sub_bill s on r.bill_no = s.bill_no and s.del_flag = '0'
left join emis_settle_invoice_record i on r.apply_seq_no = i.apply_seq_no and i.del_flag = '0'
where r.id = #{id}
</select>
<select id="selectListByApplySeqNo" parameterType="String" resultMap="EmisSettleInvoiceRelWithSubBillResult">
select r.id, r.apply_seq_no, r.pay_id, r.bill_no, r.money,
COALESCE(s.reced_money, 0) as reced_money,
COALESCE(i.reced_money, 0) as reced_money,
r.del_flag, r.create_by, r.create_time, r.update_by, r.update_time, r.create_site, r.update_site
from emis_settle_invoice_rel r
left join emis_settle_sub_bill s on r.bill_no = s.bill_no and s.del_flag = '0'
left join emis_settle_invoice_record i on r.apply_seq_no = i.apply_seq_no and i.del_flag = '0'
where r.apply_seq_no = #{applySeqNo} and r.del_flag='0'
</select>
<select id="selectHasOpenListBySettleBillNo" parameterType="String" resultMap="EmisSettleInvoiceRelWithSubBillResult">
select r.id, r.apply_seq_no, r.pay_id, r.bill_no, r.money,
COALESCE(s.reced_money, 0) as reced_money,
COALESCE(i.reced_money, 0) as reced_money,
r.del_flag, r.create_by, r.create_time, r.update_by, r.update_time, r.create_site, r.update_site
from emis_settle_invoice_rel r
left join emis_settle_sub_bill s on r.bill_no = s.bill_no and s.del_flag = '0'
left join emis_settle_invoice_record i on r.apply_seq_no = i.apply_seq_no and i.del_flag = '0'
where r.del_flag='0'
AND r.apply_seq_no IN (
SELECT x1.apply_seq_no FROM

View File

@ -640,7 +640,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getBillAmountsByPayIds" parameterType="java.util.List" resultType="map">
select
espbr.pay_id,
esb.rec_money
SUM(COALESCE(esb.rec_money, 0)) as rec_money
from emis_settle_pay_bill_rel espbr
left join emis_settle_bill esb on espbr.settle_bill_no = esb.settle_bill_no
where espbr.del_flag = '0' and esb.del_flag = '0'