INSERT INTO cash_record (
order_type,
jwcode,
name,
market,
activity,
order_code,
bank_code,
goods_name,
good_num,
audit_id,
payment_currency,
payment_amount,
received_currency,
received_amount,
handling_charge,
received_market,
pay_type,
pay_time,
received_time,
status,
submitter_id,
voucher,
remark,
refund_reason,
refund_model,
executor,
refund_channels,
refund_time,
refund_remark,
refund_voucher
) VALUES (
#{orderType},
#{jwcode},
#{name},
#{market},
#{activity},
#{orderCode},
#{bankCode},
#{goodsName},
#{goodNum},
#{auditId},
#{paymentCurrency},
#{paymentAmount},
#{receivedCurrency},
#{receivedAmount},
#{handlingCharge},
#{receivedMarket},
#{payType},
#{payTime},
#{receivedTime},
#{status},
#{submitterId},
#{voucher},
#{remark},
#{refundReason},
#{refundModel},
#{executor},
#{refundChannels},
#{refundTime},
#{refundRemark},
#{refundVoucher}
);
insert into lhl_audit
(
area_servise,
area_finance,
area_charge,
head_finance
)
values(
#{areaServise},
#{areaFinance},
#{areaCharge},
#{headFinance}
)
update cash_record
set
status = 10,
refund_model = #{refundModel},
refund_reason = #{refundReason}
where id = #{id}
update cash_record set status = 11
where order_type =2 and id = #{id}
update cash_record set status = #{status},executor = #{executor},reject_reason = #{rejectReason}
where order_type =2 and id = #{id}
update cash_record set refund_currency = #{refundCurrency},
refund_amount = #{refundAmount},
refund_channels = #{refundChannels},
refund_time = #{refundTime},
refund_remark = #{refundRemark},
refund_voucher = #{refundVoucher},
status = #{status},
executor = #{executor}
where order_type =2 and id = #{id}
update cash_record
set status = #{status}
and id = #{id}
and order_code = #{orderCode}
update lhl_audit
area_servise = #{areaServise},
area_finance = #{areaFinance},
area_charge = #{areaCharge},
head_finance = #{headFinance},
where id = #{auditId}