unis_sip/ruoyi-sip/src/main/resources/mapper/finance/OmsInvoiceReceiptBillMapper...

106 lines
6.0 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.OmsInvoiceReceiptBillMapper">
<resultMap type="OmsInvoiceReceiptBill" id="OmsInvoiceReceiptBillResult">
<result property="id" column="id" />
<result property="invoiceReceiptBillCode" column="invoice_receipt_bill_code" />
<result property="vendorCode" column="vendor_code" />
<result property="orderCode" column="order_code" />
<result property="totalPriceWithTax" column="total_price_with_tax" />
<result property="totalPriceWithoutTax" column="total_price_without_tax" />
<result property="taxAmount" column="tax_amount" />
<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="remark" column="remark" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectOmsInvoiceReceiptBillVo">
select id, invoice_receipt_bill_code, vendor_code, order_code, total_price_with_tax, total_price_without_tax, tax_amount, create_by, create_time, update_by, update_time, remark, del_flag from oms_invoice_receipt_bill
</sql>
<select id="selectOmsInvoiceReceiptBillList" parameterType="OmsInvoiceReceiptBill" resultMap="OmsInvoiceReceiptBillResult">
<include refid="selectOmsInvoiceReceiptBillVo"/>
<where>
<if test="invoiceReceiptBillCode != null and invoiceReceiptBillCode != ''"> and invoice_receipt_bill_code = #{invoiceReceiptBillCode}</if>
<if test="vendorCode != null and vendorCode != ''"> and vendor_code = #{vendorCode}</if>
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
<if test="totalPriceWithTax != null "> and total_price_with_tax = #{totalPriceWithTax}</if>
<if test="totalPriceWithoutTax != null "> and total_price_without_tax = #{totalPriceWithoutTax}</if>
<if test="taxAmount != null "> and tax_amount = #{taxAmount}</if>
</where>
</select>
<select id="selectOmsInvoiceReceiptBillById" parameterType="Long" resultMap="OmsInvoiceReceiptBillResult">
<include refid="selectOmsInvoiceReceiptBillVo"/>
where id = #{id}
</select>
<insert id="insertOmsInvoiceReceiptBill" parameterType="OmsInvoiceReceiptBill" useGeneratedKeys="true" keyProperty="id">
insert into oms_invoice_receipt_bill
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="invoiceReceiptBillCode != null and invoiceReceiptBillCode != ''">invoice_receipt_bill_code,</if>
<if test="vendorCode != null">vendor_code,</if>
<if test="orderCode != null">order_code,</if>
<if test="totalPriceWithTax != null">total_price_with_tax,</if>
<if test="totalPriceWithoutTax != null">total_price_without_tax,</if>
<if test="taxAmount != null">tax_amount,</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="remark != null">remark,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="invoiceReceiptBillCode != null and invoiceReceiptBillCode != ''">#{invoiceReceiptBillCode},</if>
<if test="vendorCode != null">#{vendorCode},</if>
<if test="orderCode != null">#{orderCode},</if>
<if test="totalPriceWithTax != null">#{totalPriceWithTax},</if>
<if test="totalPriceWithoutTax != null">#{totalPriceWithoutTax},</if>
<if test="taxAmount != null">#{taxAmount},</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="remark != null">#{remark},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateOmsInvoiceReceiptBill" parameterType="OmsInvoiceReceiptBill">
update oms_invoice_receipt_bill
<trim prefix="SET" suffixOverrides=",">
<if test="invoiceReceiptBillCode != null and invoiceReceiptBillCode != ''">invoice_receipt_bill_code = #{invoiceReceiptBillCode},</if>
<if test="vendorCode != null">vendor_code = #{vendorCode},</if>
<if test="orderCode != null">order_code = #{orderCode},</if>
<if test="totalPriceWithTax != null">total_price_with_tax = #{totalPriceWithTax},</if>
<if test="totalPriceWithoutTax != null">total_price_without_tax = #{totalPriceWithoutTax},</if>
<if test="taxAmount != null">tax_amount = #{taxAmount},</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="remark != null">remark = #{remark},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteOmsInvoiceReceiptBillById" parameterType="Long">
delete from oms_invoice_receipt_bill where id = #{id}
</delete>
<delete id="deleteOmsInvoiceReceiptBillByIds" parameterType="String">
delete from oms_invoice_receipt_bill where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>