<?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.cwgl.mapper.ReceivableBillSettlementDetailMapper">
|
|
<resultMap type="com.ruoyi.cwgl.domain.ReceivableBillSettlementDetail" id="ReceivableBillSettlementDetailResult">
|
<result property="id" column="id" />
|
<result property="billId" column="bill_id" />
|
<result property="settlementMethod" column="settlement_method" />
|
<result property="customerBank" column="customer_bank" />
|
<result property="customerBankAccount" column="customer_bank_account" />
|
<result property="receivingBankAccount" column="receiving_bank_account" />
|
<result property="receivingBank" column="receiving_bank" />
|
<result property="receiptDate" column="receipt_date" />
|
<result property="receiptAmount" column="receipt_amount" />
|
<result property="remainingPendingAmount" column="remaining_pending_amount" />
|
<result property="remark" column="remark" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<result property="deleted" column="deleted" />
|
</resultMap>
|
|
<sql id="selectReceivableBillSettlementDetailVo">
|
select thisTab.id, thisTab.bill_id, thisTab.settlement_method, thisTab.customer_bank, thisTab.customer_bank_account, thisTab.receiving_bank_account, thisTab.receiving_bank, thisTab.receipt_date, thisTab.receipt_amount, thisTab.remaining_pending_amount, thisTab.remark, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.deleted from receivable_bill_settlement_detail AS thisTab
|
</sql>
|
<sql id="selectReceivableBillSettlementDetailVoCount">
|
select count(0) from receivable_bill_settlement_detail as thisTab
|
</sql>
|
|
<sql id="whereCondition">
|
<if test="billId != null "> and thisTab.bill_id = #{billId}</if>
|
<if test="settlementMethod != null and settlementMethod != ''"> and thisTab.settlement_method = #{settlementMethod}</if>
|
<if test="customerBank != null and customerBank != ''"> and thisTab.customer_bank = #{customerBank}</if>
|
<if test="customerBankAccount != null and customerBankAccount != ''"> and thisTab.customer_bank_account = #{customerBankAccount}</if>
|
<if test="receivingBankAccount != null and receivingBankAccount != ''"> and thisTab.receiving_bank_account = #{receivingBankAccount}</if>
|
<if test="receivingBank != null and receivingBank != ''"> and thisTab.receiving_bank = #{receivingBank}</if>
|
<if test="receiptDate != null "> and thisTab.receipt_date = #{receiptDate}</if>
|
<if test="receiptAmount != null "> and thisTab.receipt_amount = #{receiptAmount}</if>
|
<if test="remainingPendingAmount != null "> and thisTab.remaining_pending_amount = #{remainingPendingAmount}</if>
|
<if test="deleted != null "> and thisTab.deleted = #{deleted}</if>
|
</sql>
|
|
<!--查询-->
|
<select id="selectReceivableBillSettlementDetailById" parameterType="Integer" resultMap="ReceivableBillSettlementDetailResult">
|
<include refid="selectReceivableBillSettlementDetailVo"/>
|
where id = #{id}
|
</select>
|
|
<select id="selectReceivableBillSettlementDetailCount" parameterType="com.ruoyi.cwgl.domain.ReceivableBillSettlementDetail" resultType="int">
|
<include refid="selectReceivableBillSettlementDetailVoCount"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
</select>
|
|
<select id="selectReceivableBillSettlementDetailList" parameterType="com.ruoyi.cwgl.domain.ReceivableBillSettlementDetail" resultMap="ReceivableBillSettlementDetailResult">
|
<include refid="selectReceivableBillSettlementDetailVo"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
order by thisTab.id desc
|
</select>
|
|
<!-- 新增 -->
|
<insert id="insertReceivableBillSettlementDetail" parameterType="com.ruoyi.cwgl.domain.ReceivableBillSettlementDetail" useGeneratedKeys="true" keyProperty="id">
|
insert into receivable_bill_settlement_detail
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="billId != null">bill_id,</if>
|
<if test="settlementMethod != null and settlementMethod != ''">settlement_method,</if>
|
<if test="customerBank != null">customer_bank,</if>
|
<if test="customerBankAccount != null">customer_bank_account,</if>
|
<if test="receivingBankAccount != null">receiving_bank_account,</if>
|
<if test="receivingBank != null">receiving_bank,</if>
|
<if test="receiptDate != null">receipt_date,</if>
|
<if test="receiptAmount != null">receipt_amount,</if>
|
<if test="remainingPendingAmount != null">remaining_pending_amount,</if>
|
<if test="remark != null">remark,</if>
|
<if test="createBy != null">create_by,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateBy != null">update_by,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="deleted != null">deleted,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="billId != null">#{billId},</if>
|
<if test="settlementMethod != null and settlementMethod != ''">#{settlementMethod},</if>
|
<if test="customerBank != null">#{customerBank},</if>
|
<if test="customerBankAccount != null">#{customerBankAccount},</if>
|
<if test="receivingBankAccount != null">#{receivingBankAccount},</if>
|
<if test="receivingBank != null">#{receivingBank},</if>
|
<if test="receiptDate != null">#{receiptDate},</if>
|
<if test="receiptAmount != null">#{receiptAmount},</if>
|
<if test="remainingPendingAmount != null">#{remainingPendingAmount},</if>
|
<if test="remark != null">#{remark},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="deleted != null">#{deleted},</if>
|
</trim>
|
</insert>
|
|
<insert id="insertReceivableBillSettlementDetailBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
insert into receivable_bill_settlement_detail
|
<trim prefix="(" suffix=") values" suffixOverrides=",">
|
id,bill_id,settlement_method,customer_bank,customer_bank_account,receiving_bank_account,receiving_bank,receipt_date,receipt_amount,remaining_pending_amount,remark,create_by,create_time,update_by,update_time,deleted,
|
</trim>
|
<foreach item="item" index="index" collection="list" separator=",">
|
<trim prefix="(" suffix=") " suffixOverrides=",">
|
#{item.id},#{item.billId},#{item.settlementMethod},#{item.customerBank},#{item.customerBankAccount},#{item.receivingBankAccount},#{item.receivingBank},#{item.receiptDate},#{item.receiptAmount},#{item.remainingPendingAmount},#{item.remark},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.deleted},
|
</trim>
|
</foreach>
|
</insert>
|
|
<!-- 修改 -->
|
<update id="updateReceivableBillSettlementDetail" parameterType="com.ruoyi.cwgl.domain.ReceivableBillSettlementDetail">
|
update receivable_bill_settlement_detail
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="billId != null">bill_id = #{billId},</if>
|
<if test="settlementMethod != null and settlementMethod != ''">settlement_method = #{settlementMethod},</if>
|
<if test="customerBank != null">customer_bank = #{customerBank},</if>
|
<if test="customerBankAccount != null">customer_bank_account = #{customerBankAccount},</if>
|
<if test="receivingBankAccount != null">receiving_bank_account = #{receivingBankAccount},</if>
|
<if test="receivingBank != null">receiving_bank = #{receivingBank},</if>
|
<if test="receiptDate != null">receipt_date = #{receiptDate},</if>
|
<if test="receiptAmount != null">receipt_amount = #{receiptAmount},</if>
|
<if test="remainingPendingAmount != null">remaining_pending_amount = #{remainingPendingAmount},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="deleted != null">deleted = #{deleted},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
<!-- 修改 -->
|
<update id="updateReceivableBillSettlementDetailBatch" parameterType="java.util.List">
|
<foreach collection="list" item="item" index="index" separator=";">
|
update receivable_bill_settlement_detail
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="item.billId != null">bill_id = #{item.billId},</if>
|
<if test="item.settlementMethod != null and item.settlementMethod != ''">settlement_method = #{item.settlementMethod},</if>
|
<if test="item.customerBank != null">customer_bank = #{item.customerBank},</if>
|
<if test="item.customerBankAccount != null">customer_bank_account = #{item.customerBankAccount},</if>
|
<if test="item.receivingBankAccount != null">receiving_bank_account = #{item.receivingBankAccount},</if>
|
<if test="item.receivingBank != null">receiving_bank = #{item.receivingBank},</if>
|
<if test="item.receiptDate != null">receipt_date = #{item.receiptDate},</if>
|
<if test="item.receiptAmount != null">receipt_amount = #{item.receiptAmount},</if>
|
<if test="item.remainingPendingAmount != null">remaining_pending_amount = #{item.remainingPendingAmount},</if>
|
<if test="item.remark != null">remark = #{item.remark},</if>
|
<if test="item.createBy != null">create_by = #{item.createBy},</if>
|
<if test="item.createTime != null">create_time = #{item.createTime},</if>
|
<if test="item.updateBy != null">update_by = #{item.updateBy},</if>
|
<if test="item.updateTime != null">update_time = #{item.updateTime},</if>
|
<if test="item.deleted != null">deleted = #{item.deleted},</if>
|
</trim>
|
where id = #{item.id}
|
</foreach>
|
</update>
|
|
<!--删除-->
|
<delete id="deleteReceivableBillSettlementDetailById" parameterType="Integer">
|
delete from receivable_bill_settlement_detail where id = #{id}
|
</delete>
|
<delete id="deleteReceivableBillSettlementDetailByIds" parameterType="Integer">
|
delete from receivable_bill_settlement_detail where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
</mapper>
|