调整应付配置和应付列表订单的费用重算

This commit is contained in:
liuminghui
2026-11-17 17:47:01 +08:00
parent 9483bb4899
commit 6b2b205083
45 changed files with 1448 additions and 2131 deletions
@@ -123,7 +123,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<foreach collection="billIds" item="billId" open="(" separator="," close=")">#{billId}</foreach>
group by bill_id
) s on s.bill_id = b.bill_id
set b.pay_total = ifnull(s.total, 0),
set b.pay_total = round(ifnull(s.total, 0), 2),
b.currency = case
when not exists (
select 1 from prc_pay_bill_fee fx
where fx.bill_id = b.bill_id
and ifnull(fx.is_deleted, '0') = '0'
and upper(ifnull(fx.currency, 'CNY')) not in ('CNY', 'RMB')
) then 'CNY'
else b.currency
end,
b.update_time = sysdate()
where b.bill_id in
<foreach collection="billIds" item="billId" open="(" separator="," close=")">#{billId}</foreach>