108 lines
6.1 KiB
XML
108 lines
6.1 KiB
XML
<?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.sip.mapper.OmsPayableWriteOffMapper">
|
|
|
|
<resultMap type="com.ruoyi.sip.domain.OmsPayableWriteOff" id="OmsPayableWriteOffResult">
|
|
<result property="id" column="id" />
|
|
<result property="writeOffCode" column="write_off_code" />
|
|
<result property="writeOffType" column="write_off_type" />
|
|
<result property="paymentBillCode" column="payment_bill_code" />
|
|
<result property="vendorCode" column="vendor_code" />
|
|
<result property="writeOffAmount" column="write_off_amount" />
|
|
<result property="writeOffAmountWithoutTax" column="write_off_amount_without_tax" />
|
|
<result property="writeOffTaxAmount" column="write_off_tax_amount" />
|
|
<result property="writeOffTime" column="write_off_time" />
|
|
<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" />
|
|
</resultMap>
|
|
|
|
<sql id="selectOmsPayableWriteOffVo">
|
|
select id, write_off_code, write_off_type, payment_bill_code, vendor_code,
|
|
write_off_amount, write_off_amount_without_tax, write_off_tax_amount, write_off_time,
|
|
remark, create_by, create_time, update_by, update_time
|
|
from oms_payable_write_off
|
|
</sql>
|
|
|
|
<select id="selectOmsPayableWriteOffById" parameterType="Long" resultMap="OmsPayableWriteOffResult">
|
|
<include refid="selectOmsPayableWriteOffVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<select id="selectOmsPayableWriteOffList" parameterType="com.ruoyi.sip.domain.OmsPayableWriteOff" resultMap="OmsPayableWriteOffResult">
|
|
<include refid="selectOmsPayableWriteOffVo"/>
|
|
<where>
|
|
<if test="writeOffCode != null and writeOffCode != ''"> and write_off_code = #{writeOffCode}</if>
|
|
<if test="writeOffType != null and writeOffType != ''"> and write_off_type = #{writeOffType}</if>
|
|
<if test="paymentBillCode != null and paymentBillCode != ''"> and payment_bill_code = #{paymentBillCode}</if>
|
|
<if test="vendorCode != null and vendorCode != ''"> and vendor_code = #{vendorCode}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<insert id="insertOmsPayableWriteOff" parameterType="com.ruoyi.sip.domain.OmsPayableWriteOff" useGeneratedKeys="true" keyProperty="id">
|
|
insert into oms_payable_write_off
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="writeOffCode != null">write_off_code,</if>
|
|
<if test="writeOffType != null">write_off_type,</if>
|
|
<if test="paymentBillCode != null">payment_bill_code,</if>
|
|
<if test="vendorCode != null">vendor_code,</if>
|
|
<if test="writeOffAmount != null">write_off_amount,</if>
|
|
<if test="writeOffAmountWithoutTax != null">write_off_amount_without_tax,</if>
|
|
<if test="writeOffTaxAmount != null">write_off_tax_amount,</if>
|
|
<if test="writeOffTime != null">write_off_time,</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>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="writeOffCode != null">#{writeOffCode},</if>
|
|
<if test="writeOffType != null">#{writeOffType},</if>
|
|
<if test="paymentBillCode != null">#{paymentBillCode},</if>
|
|
<if test="vendorCode != null">#{vendorCode},</if>
|
|
<if test="writeOffAmount != null">#{writeOffAmount},</if>
|
|
<if test="writeOffAmountWithoutTax != null">#{writeOffAmountWithoutTax},</if>
|
|
<if test="writeOffTaxAmount != null">#{writeOffTaxAmount},</if>
|
|
<if test="writeOffTime != null">#{writeOffTime},</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>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateOmsPayableWriteOff" parameterType="com.ruoyi.sip.domain.OmsPayableWriteOff">
|
|
update oms_payable_write_off
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="writeOffCode != null">write_off_code = #{writeOffCode},</if>
|
|
<if test="writeOffType != null">write_off_type = #{writeOffType},</if>
|
|
<if test="paymentBillCode != null">payment_bill_code = #{paymentBillCode},</if>
|
|
<if test="vendorCode != null">vendor_code = #{vendorCode},</if>
|
|
<if test="writeOffAmount != null">write_off_amount = #{writeOffAmount},</if>
|
|
<if test="writeOffAmountWithoutTax != null">write_off_amount_without_tax = #{writeOffAmountWithoutTax},</if>
|
|
<if test="writeOffTaxAmount != null">write_off_tax_amount = #{writeOffTaxAmount},</if>
|
|
<if test="writeOffTime != null">write_off_time = #{writeOffTime},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteOmsPayableWriteOffById" parameterType="Long">
|
|
delete from oms_payable_write_off where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteOmsPayableWriteOffByIds" parameterType="String">
|
|
delete from oms_payable_write_off where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |