✨ 应收账单快照保存产品价和红线价

This commit is contained in:
caojia
2026-10-10 16:44:56 +08:00
parent 105a37f258
commit adc2160c91
10 changed files with 141 additions and 14 deletions
@@ -29,6 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="pkgHeight" column="pkg_height"/>
<result property="currency" column="currency"/>
<result property="totalAmount" column="total_amount"/>
<result property="productAmount" column="product_amount"/>
<result property="redlineAmount" column="redline_amount"/>
<result property="remark" column="remark"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
@@ -38,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select detail_id, ar_bill_id, prc_order_bill_id, detail_no, order_no, tracking_no, transfer_no, receive_time,
product_code, product_name, goods_description, country_code, country_name, dest_postcode,
actual_weight, volume_weight, charge_weight, freight_rate, registration_fee, pkg_length, pkg_width, pkg_height,
currency, total_amount, remark, create_by, create_time
currency, total_amount, product_amount, redline_amount, remark, create_by, create_time
from ar_bill_detail where ar_bill_id = #{arBillId} order by detail_no
</select>
@@ -46,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select detail_id, ar_bill_id, prc_order_bill_id, detail_no, order_no, tracking_no, transfer_no, receive_time,
product_code, product_name, goods_description, country_code, country_name, dest_postcode,
actual_weight, volume_weight, charge_weight, freight_rate, registration_fee, pkg_length, pkg_width, pkg_height,
currency, total_amount, remark, create_by, create_time
currency, total_amount, product_amount, redline_amount, remark, create_by, create_time
from ar_bill_detail
where ar_bill_id = #{arBillId}
and prc_order_bill_id in
@@ -69,6 +71,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="unit" column="fee_unit"/>
<result property="unitPrice" column="fee_unit_price"/>
<result property="amount" column="fee_amount"/>
<result property="productAmount" column="fee_product_amount"/>
<result property="redlineAmount" column="fee_redline_amount"/>
<result property="currency" column="fee_currency"/>
<result property="calculationFormula" column="fee_calculation_formula"/>
<result property="roundMode" column="fee_round_mode"/>
@@ -82,11 +86,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select d.detail_id, d.ar_bill_id, d.prc_order_bill_id, d.detail_no, d.order_no, d.tracking_no, d.transfer_no, d.receive_time,
d.product_code, d.product_name, d.goods_description, d.country_code, d.country_name, d.dest_postcode,
d.actual_weight, d.volume_weight, d.charge_weight, d.freight_rate, d.registration_fee, d.pkg_length, d.pkg_width, d.pkg_height,
d.currency, d.total_amount, d.remark, d.create_by, d.create_time,
d.currency, d.total_amount, d.product_amount, d.redline_amount, d.remark, d.create_by, d.create_time,
f.detail_fee_id as fee_detail_id, f.detail_id as fee_parent_detail_id,
f.prc_income_bill_fee_id as fee_prc_income_bill_fee_id,
f.fee_no, f.fee_type, f.fee_name, f.sc_id as fee_sc_id, f.quantity as fee_quantity,
f.unit as fee_unit, f.unit_price as fee_unit_price, f.amount as fee_amount,
f.product_amount as fee_product_amount, f.redline_amount as fee_redline_amount,
f.currency as fee_currency, f.calculation_formula as fee_calculation_formula,
f.round_mode as fee_round_mode, f.remark as fee_remark, f.create_by as fee_create_by,
f.create_time as fee_create_time
@@ -100,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select detail_id, ar_bill_id, prc_order_bill_id, detail_no, order_no, tracking_no, transfer_no, receive_time,
product_code, product_name, goods_description, country_code, country_name, dest_postcode,
actual_weight, volume_weight, charge_weight, freight_rate, registration_fee, pkg_length, pkg_width, pkg_height,
currency, total_amount, remark, create_by, create_time
currency, total_amount, product_amount, redline_amount, remark, create_by, create_time
from ar_bill_detail
where ar_bill_id = #{arBillId} and detail_no &gt; #{lastDetailNo}
order by detail_no
@@ -113,12 +118,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
product_name, goods_description, country_code, country_name, dest_postcode,
actual_weight,
volume_weight, charge_weight, freight_rate, registration_fee, pkg_length, pkg_width, pkg_height, currency,
total_amount,
total_amount, product_amount, redline_amount,
remark, create_by, create_time)
values (#{arBillId}, #{prcOrderBillId}, #{detailNo}, #{orderNo}, #{trackingNo}, #{transferNo}, #{receiveTime},
#{productCode}, #{productName}, #{goodsDescription}, #{countryCode}, #{countryName},
#{destPostcode}, #{actualWeight}, #{volumeWeight}, #{chargeWeight}, #{freightRate}, #{registrationFee}, #{pkgLength}, #{pkgWidth},
#{pkgHeight}, #{currency}, #{totalAmount}, #{remark}, #{createBy}, sysdate())
#{pkgHeight}, #{currency}, #{totalAmount}, #{productAmount}, #{redlineAmount}, #{remark}, #{createBy}, sysdate())
</insert>
<insert id="insertBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="detailId">
@@ -126,6 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ar_bill_id, prc_order_bill_id, detail_no, order_no, tracking_no, transfer_no, receive_time, product_code,
product_name, goods_description, country_code, country_name, dest_postcode, actual_weight,
volume_weight, charge_weight, freight_rate, registration_fee, pkg_length, pkg_width, pkg_height, currency, total_amount,
product_amount, redline_amount,
remark, create_by, create_time
) values
<foreach collection="list" item="item" separator=",">
@@ -133,7 +139,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.transferNo}, #{item.receiveTime}, #{item.productCode}, #{item.productName}, #{item.goodsDescription},
#{item.countryCode}, #{item.countryName}, #{item.destPostcode}, #{item.actualWeight},
#{item.volumeWeight}, #{item.chargeWeight}, #{item.freightRate}, #{item.registrationFee}, #{item.pkgLength}, #{item.pkgWidth}, #{item.pkgHeight},
#{item.currency}, #{item.totalAmount}, #{item.remark}, #{item.createBy}, sysdate())
#{item.currency}, #{item.totalAmount}, #{item.productAmount}, #{item.redlineAmount},
#{item.remark}, #{item.createBy}, sysdate())
</foreach>
</insert>