<?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.PayableBillSettlementDetailMapper">
|
|
<resultMap type="com.ruoyi.cwgl.domain.PayableBillSettlementDetail" id="PayableBillSettlementDetailResult">
|
<result property="id" column="id" />
|
<result property="billId" column="bill_id" />
|
<result property="settlementMethod" column="settlement_method" />
|
<result property="paymentBank" column="payment_bank" />
|
<result property="paymentBankAccount" column="payment_bank_account" />
|
<result property="supplierReceivingAccount" column="supplier_receiving_account" />
|
<result property="supplierReceivingBank" column="supplier_receiving_bank" />
|
<result property="paymentDate" column="payment_date" />
|
<result property="paymentAmount" column="payment_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="selectPayableBillSettlementDetailVo">
|
select thisTab.id, thisTab.bill_id, thisTab.settlement_method, thisTab.payment_bank, thisTab.payment_bank_account, thisTab.supplier_receiving_account, thisTab.supplier_receiving_bank, thisTab.payment_date, thisTab.payment_amount, thisTab.remaining_pending_amount, thisTab.remark, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.deleted from payable_bill_settlement_detail AS thisTab
|
</sql>
|
<sql id="selectPayableBillSettlementDetailVoCount">
|
select count(0) from payable_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="paymentBank != null and paymentBank != ''"> and thisTab.payment_bank = #{paymentBank}</if>
|
<if test="paymentBankAccount != null and paymentBankAccount != ''"> and thisTab.payment_bank_account = #{paymentBankAccount}</if>
|
<if test="supplierReceivingAccount != null and supplierReceivingAccount != ''"> and thisTab.supplier_receiving_account = #{supplierReceivingAccount}</if>
|
<if test="supplierReceivingBank != null and supplierReceivingBank != ''"> and thisTab.supplier_receiving_bank = #{supplierReceivingBank}</if>
|
<if test="paymentDate != null "> and thisTab.payment_date = #{paymentDate}</if>
|
<if test="paymentAmount != null "> and thisTab.payment_amount = #{paymentAmount}</if>
|
<if test="remainingPendingAmount != null "> and thisTab.remaining_pending_amount = #{remainingPendingAmount}</if>
|
<if test="deleted != null "> and thisTab.deleted = #{deleted}</if>
|
</sql>
|
|
<!--查询-->
|
<select id="selectPayableBillSettlementDetailById" parameterType="Integer" resultMap="PayableBillSettlementDetailResult">
|
<include refid="selectPayableBillSettlementDetailVo"/>
|
where id = #{id}
|
</select>
|
|
<select id="selectPayableBillSettlementDetailCount" parameterType="com.ruoyi.cwgl.domain.PayableBillSettlementDetail" resultType="int">
|
<include refid="selectPayableBillSettlementDetailVoCount"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
</select>
|
|
<select id="selectPayableBillSettlementDetailList" parameterType="com.ruoyi.cwgl.domain.PayableBillSettlementDetail" resultMap="PayableBillSettlementDetailResult">
|
<include refid="selectPayableBillSettlementDetailVo"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
order by thisTab.id desc
|
</select>
|
|
<!-- 新增 -->
|
<insert id="insertPayableBillSettlementDetail" parameterType="com.ruoyi.cwgl.domain.PayableBillSettlementDetail" useGeneratedKeys="true" keyProperty="id">
|
insert into payable_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="paymentBank != null">payment_bank,</if>
|
<if test="paymentBankAccount != null">payment_bank_account,</if>
|
<if test="supplierReceivingAccount != null">supplier_receiving_account,</if>
|
<if test="supplierReceivingBank != null">supplier_receiving_bank,</if>
|
<if test="paymentDate != null">payment_date,</if>
|
<if test="paymentAmount != null">payment_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="paymentBank != null">#{paymentBank},</if>
|
<if test="paymentBankAccount != null">#{paymentBankAccount},</if>
|
<if test="supplierReceivingAccount != null">#{supplierReceivingAccount},</if>
|
<if test="supplierReceivingBank != null">#{supplierReceivingBank},</if>
|
<if test="paymentDate != null">#{paymentDate},</if>
|
<if test="paymentAmount != null">#{paymentAmount},</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="insertPayableBillSettlementDetailBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
insert into payable_bill_settlement_detail
|
<trim prefix="(" suffix=") values" suffixOverrides=",">
|
id,bill_id,settlement_method,payment_bank,payment_bank_account,supplier_receiving_account,supplier_receiving_bank,payment_date,payment_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.paymentBank},#{item.paymentBankAccount},#{item.supplierReceivingAccount},#{item.supplierReceivingBank},#{item.paymentDate},#{item.paymentAmount},#{item.remainingPendingAmount},#{item.remark},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.deleted},
|
</trim>
|
</foreach>
|
</insert>
|
|
<!-- 修改 -->
|
<update id="updatePayableBillSettlementDetail" parameterType="com.ruoyi.cwgl.domain.PayableBillSettlementDetail">
|
update payable_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="paymentBank != null">payment_bank = #{paymentBank},</if>
|
<if test="paymentBankAccount != null">payment_bank_account = #{paymentBankAccount},</if>
|
<if test="supplierReceivingAccount != null">supplier_receiving_account = #{supplierReceivingAccount},</if>
|
<if test="supplierReceivingBank != null">supplier_receiving_bank = #{supplierReceivingBank},</if>
|
<if test="paymentDate != null">payment_date = #{paymentDate},</if>
|
<if test="paymentAmount != null">payment_amount = #{paymentAmount},</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="updatePayableBillSettlementDetailBatch" parameterType="java.util.List">
|
<foreach collection="list" item="item" index="index" separator=";">
|
update payable_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.paymentBank != null">payment_bank = #{item.paymentBank},</if>
|
<if test="item.paymentBankAccount != null">payment_bank_account = #{item.paymentBankAccount},</if>
|
<if test="item.supplierReceivingAccount != null">supplier_receiving_account = #{item.supplierReceivingAccount},</if>
|
<if test="item.supplierReceivingBank != null">supplier_receiving_bank = #{item.supplierReceivingBank},</if>
|
<if test="item.paymentDate != null">payment_date = #{item.paymentDate},</if>
|
<if test="item.paymentAmount != null">payment_amount = #{item.paymentAmount},</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="deletePayableBillSettlementDetailById" parameterType="Integer">
|
delete from payable_bill_settlement_detail where id = #{id}
|
</delete>
|
<delete id="deletePayableBillSettlementDetailByIds" parameterType="Integer">
|
delete from payable_bill_settlement_detail where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
</mapper>
|