数据库执行
update x set paid_amt = x.sheet_amt
from ac_payrec_flow x
where paid_amt = sheet_amt * 2 and paid_amt > 0
update ac_payrec_flow
set paid_amt = (select sum(total_amt) from ac_payrec_record where settle_no = ac_payrec_flow.voucher_no and approve_id = '1')
where sheet_amt < paid_amt
and pay_date >'2019-01-01'