应收账单功能实现

This commit is contained in:
caojia
2026-09-16 11:02:18 +08:00
parent 58d13904ec
commit 7172621fd3
64 changed files with 4103 additions and 4 deletions
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.ar.mapper.ArBillDetailFeeMapper">
<resultMap id="ArBillDetailFeeResult" type="ArBillDetailFee">
<id property="detailFeeId" column="detail_fee_id"/>
<result property="detailId" column="detail_id"/>
<result property="prcFeeId" column="prc_fee_id"/>
<result property="feeNo" column="fee_no"/>
<result property="feeType" column="fee_type"/>
<result property="feeName" column="fee_name"/>
<result property="scId" column="sc_id"/>
<result property="quantity" column="quantity"/>
<result property="unit" column="unit"/>
<result property="unitPrice" column="unit_price"/>
<result property="amount" column="amount"/>
<result property="currency" column="currency"/>
<result property="calculationFormula" column="calculation_formula"/>
<result property="roundMode" column="round_mode"/>
<result property="remark" column="remark"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
</resultMap>
<select id="selectByDetailId" parameterType="long" resultMap="ArBillDetailFeeResult">
select detail_fee_id, detail_id, prc_fee_id, fee_no, fee_type, fee_name, sc_id, quantity,
unit, unit_price, amount, currency, calculation_formula, round_mode, remark, create_by, create_time
from ar_bill_detail_fee where detail_id = #{detailId} order by fee_no, detail_fee_id
</select>
<select id="selectByBillId" parameterType="long" resultMap="ArBillDetailFeeResult">
select detail_fee_id, detail_id, prc_fee_id, fee_no, fee_type, fee_name, sc_id, quantity,
unit, unit_price, amount, currency, calculation_formula, round_mode, remark, create_by, create_time
from ar_bill_detail_fee
where detail_id in (select detail_id from ar_bill_detail where ar_bill_id = #{arBillId})
order by detail_id, fee_no, detail_fee_id
</select>
<insert id="insert" parameterType="ArBillDetailFee" useGeneratedKeys="true" keyProperty="detailFeeId">
insert into ar_bill_detail_fee (
detail_id, prc_fee_id, fee_no, fee_type, fee_name, sc_id, quantity, unit, unit_price,
amount, currency, calculation_formula, round_mode, remark, create_by, create_time
) values (
#{detailId}, #{prcFeeId}, #{feeNo}, #{feeType}, #{feeName}, #{scId}, #{quantity}, #{unit},
#{unitPrice}, #{amount}, #{currency}, #{calculationFormula}, #{roundMode}, #{remark},
#{createBy}, sysdate()
)
</insert>
<insert id="insertBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="detailFeeId">
insert into ar_bill_detail_fee (
detail_id, prc_fee_id, fee_no, fee_type, fee_name, sc_id, quantity, unit, unit_price,
amount, currency, calculation_formula, round_mode, remark, create_by, create_time
) values
<foreach collection="list" item="item" separator=",">
(#{item.detailId}, #{item.prcFeeId}, #{item.feeNo}, #{item.feeType}, #{item.feeName}, #{item.scId},
#{item.quantity}, #{item.unit}, #{item.unitPrice}, #{item.amount}, #{item.currency},
#{item.calculationFormula}, #{item.roundMode}, #{item.remark}, #{item.createBy}, sysdate())
</foreach>
</insert>
</mapper>