@@ -234,57 +234,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where f.fee_id = #{oldId}
|
||||
</insert>
|
||||
|
||||
<select id="selectPayIds" resultType="String">
|
||||
select pay_bill_id from prc_pay_bill where bill_id = #{oldBillId}
|
||||
</select>
|
||||
|
||||
<insert id="insertPayBillNew" useGeneratedKeys="true" keyProperty="newId" keyColumn="pay_bill_id">
|
||||
insert into prc_pay_bill_new (
|
||||
bill_id, currency, product_amount, redline_amount,
|
||||
cost_amount, pay_total, amount_a, amount_b,
|
||||
amount_c, amount_d, belong_saler, belong_saler_code,
|
||||
settlement_man, settlement_man_code, create_by, create_time,
|
||||
update_by, update_time
|
||||
)
|
||||
select
|
||||
#{newBillId}, p.currency, p.product_amount, p.redline_amount,
|
||||
p.cost_amount, p.pay_total, p.amount_a, p.amount_b,
|
||||
p.amount_c, p.amount_d, p.belong_saler, p.belong_saler_code,
|
||||
p.settlement_man, p.settlement_man_code, p.create_by, p.create_time,
|
||||
p.update_by, p.update_time
|
||||
from prc_pay_bill p
|
||||
where p.pay_bill_id = #{oldId}
|
||||
</insert>
|
||||
|
||||
<select id="selectPayFees" resultType="com.bms.price.migration.domain.UuidToNewFeeRow">
|
||||
select fee_id as feeId, pay_bill_id as parentId
|
||||
from prc_pay_bill_fee
|
||||
where bill_id = #{oldBillId}
|
||||
order by fee_id
|
||||
</select>
|
||||
|
||||
<insert id="insertPayFeeNew" useGeneratedKeys="true" keyProperty="newId" keyColumn="id">
|
||||
insert into prc_pay_bill_fee_new (
|
||||
fee_id, bill_id, pay_bill_id, fee_type,
|
||||
sc_id, fee_level, amount, currency,
|
||||
round_mode, remark, fee_source, source_id,
|
||||
is_deleted, statement_line_id, settle_supplier_id, settle_supplier_name,
|
||||
create_time
|
||||
)
|
||||
select
|
||||
0, #{newBillId}, #{newPayId}, f.fee_type,
|
||||
f.sc_id, f.fee_level, f.amount, f.currency,
|
||||
f.round_mode, f.remark, f.fee_source, f.source_id,
|
||||
f.is_deleted, f.statement_line_id, f.settle_supplier_id, f.settle_supplier_name,
|
||||
f.create_time
|
||||
from prc_pay_bill_fee f
|
||||
where f.fee_id = #{oldId}
|
||||
</insert>
|
||||
|
||||
<update id="updatePayFeeIdEqualsId">
|
||||
update prc_pay_bill_fee_new set fee_id = id where id = #{id}
|
||||
</update>
|
||||
|
||||
<insert id="insertArDetailNew">
|
||||
insert into ar_bill_detail_new (
|
||||
detail_id, ar_bill_id, prc_order_bill_id, detail_no,
|
||||
@@ -335,33 +284,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where f.detail_fee_id = #{detailFeeId}
|
||||
</insert>
|
||||
|
||||
<select id="selectPayBillLines" resultType="com.bms.price.migration.domain.UuidToNewFeeRow">
|
||||
select cast(line_id as char) as parentId, fee_id as feeId
|
||||
from pay_bill_line
|
||||
where order_bill_id = #{oldBillId}
|
||||
order by line_id
|
||||
</select>
|
||||
|
||||
<insert id="insertPayBillLineNew">
|
||||
insert into pay_bill_line_new (
|
||||
line_id, bill_id, fee_id, order_bill_id,
|
||||
order_no, lading_no, lading_fee_id, fee_name,
|
||||
fee_source, fee_level, amount, supplier_amount,
|
||||
diff_amount, diff_status, tax_rate, amount_net,
|
||||
tax_amount, base_amount, currency, price_date,
|
||||
version_no, remote_flag, density_level, line_source
|
||||
)
|
||||
select
|
||||
l.line_id, l.bill_id, #{newFeeId}, #{newBillId},
|
||||
l.order_no, l.lading_no, l.lading_fee_id, l.fee_name,
|
||||
l.fee_source, l.fee_level, l.amount, l.supplier_amount,
|
||||
l.diff_amount, l.diff_status, l.tax_rate, l.amount_net,
|
||||
l.tax_amount, l.base_amount, l.currency, l.price_date,
|
||||
l.version_no, l.remote_flag, l.density_level, l.line_source
|
||||
from pay_bill_line l
|
||||
where l.line_id = #{lineId}
|
||||
</insert>
|
||||
|
||||
<insert id="insertBillingTaskNew">
|
||||
insert into prc_billing_task_new (
|
||||
task_id, transfer_no, tracking_no, order_no,
|
||||
|
||||
Reference in New Issue
Block a user