You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
6.5 KiB
109 lines
6.5 KiB
2 years ago
|
<?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.taxInvoice.mapper.TaxInvoiceProductMapper">
|
||
|
|
||
|
<resultMap type="TaxInvoiceProduct" id="TaxInvoiceProductResult">
|
||
|
<result property="taxInvoiceProductId" column="tax_invoice_product_id" />
|
||
|
<result property="taxInvoiceCode" column="tax_invoice_code" />
|
||
|
<result property="taxInvoiceNumber" column="tax_invoice_number" />
|
||
|
<result property="finishProductCode" column="finish_product_code" />
|
||
|
<result property="finishProductName" column="finish_product_name" />
|
||
|
<result property="specificationModel" column="specification_model" />
|
||
|
<result property="inventoryUnit" column="inventory_unit" />
|
||
|
<result property="commonCurrency" column="common_currency" />
|
||
|
<result property="quantity" column="quantity" />
|
||
|
<result property="processPrice" column="process_price" />
|
||
|
<result property="amountOfMoney" column="amount_of_money" />
|
||
|
<result property="standbyOne" column="standby_one" />
|
||
|
<result property="standbyTwo" column="standby_two" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectTaxInvoiceProductVo">
|
||
|
select tax_invoice_product_id, tax_invoice_code, tax_invoice_number, finish_product_code, finish_product_name, specification_model, inventory_unit, common_currency, quantity, process_price, amount_of_money, standby_one, standby_two from tax_invoice_product
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectTaxInvoiceProductList" parameterType="TaxInvoiceProduct" resultMap="TaxInvoiceProductResult">
|
||
|
<include refid="selectTaxInvoiceProductVo"/>
|
||
|
<where>
|
||
|
<if test="taxInvoiceCode != null and taxInvoiceCode != ''"> and tax_invoice_code like concat('%', #{taxInvoiceCode}, '%')</if>
|
||
|
<if test="taxInvoiceNumber != null and taxInvoiceNumber != ''"> and tax_invoice_number like concat('%', #{taxInvoiceNumber}, '%')</if>
|
||
|
<if test="finishProductCode != null and finishProductCode != ''"> and finish_product_code like concat('%', #{finishProductCode}, '%')</if>
|
||
|
<if test="finishProductName != null and finishProductName != ''"> and finish_product_name like concat('%', #{finishProductName}, '%')</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectTaxInvoiceProductById" parameterType="Long" resultMap="TaxInvoiceProductResult">
|
||
|
<include refid="selectTaxInvoiceProductVo"/>
|
||
|
where tax_invoice_product_id = #{taxInvoiceProductId}
|
||
|
</select>
|
||
|
|
||
|
<select id="selectTaxInvoiceByCodeAndNumber" resultMap="TaxInvoiceProductResult">
|
||
|
<include refid="selectTaxInvoiceProductVo"/>
|
||
|
where tax_invoice_code = #{taxInvoiceCode} AND tax_invoice_number = #{taxInvoiceNumber}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertTaxInvoiceProduct" parameterType="TaxInvoiceProduct" useGeneratedKeys="true" keyProperty="taxInvoiceProductId">
|
||
|
insert into tax_invoice_product
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="taxInvoiceCode != null">tax_invoice_code,</if>
|
||
|
<if test="taxInvoiceNumber != null">tax_invoice_number,</if>
|
||
|
<if test="finishProductCode != null">finish_product_code,</if>
|
||
|
<if test="finishProductName != null">finish_product_name,</if>
|
||
|
<if test="specificationModel != null">specification_model,</if>
|
||
|
<if test="inventoryUnit != null">inventory_unit,</if>
|
||
|
<if test="commonCurrency != null">common_currency,</if>
|
||
|
<if test="quantity != null">quantity,</if>
|
||
|
<if test="processPrice != null">process_price,</if>
|
||
|
<if test="amountOfMoney != null">amount_of_money,</if>
|
||
|
<if test="standbyOne != null">standby_one,</if>
|
||
|
<if test="standbyTwo != null">standby_two,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="taxInvoiceCode != null">#{taxInvoiceCode},</if>
|
||
|
<if test="taxInvoiceNumber != null">#{taxInvoiceNumber},</if>
|
||
|
<if test="finishProductCode != null">#{finishProductCode},</if>
|
||
|
<if test="finishProductName != null">#{finishProductName},</if>
|
||
|
<if test="specificationModel != null">#{specificationModel},</if>
|
||
|
<if test="inventoryUnit != null">#{inventoryUnit},</if>
|
||
|
<if test="commonCurrency != null">#{commonCurrency},</if>
|
||
|
<if test="quantity != null">#{quantity},</if>
|
||
|
<if test="processPrice != null">#{processPrice},</if>
|
||
|
<if test="amountOfMoney != null">#{amountOfMoney},</if>
|
||
|
<if test="standbyOne != null">#{standbyOne},</if>
|
||
|
<if test="standbyTwo != null">#{standbyTwo},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateTaxInvoiceProduct" parameterType="TaxInvoiceProduct">
|
||
|
update tax_invoice_product
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="taxInvoiceCode != null">tax_invoice_code = #{taxInvoiceCode},</if>
|
||
|
<if test="taxInvoiceNumber != null">tax_invoice_number = #{taxInvoiceNumber},</if>
|
||
|
<if test="finishProductCode != null">finish_product_code = #{finishProductCode},</if>
|
||
|
<if test="finishProductName != null">finish_product_name = #{finishProductName},</if>
|
||
|
<if test="specificationModel != null">specification_model = #{specificationModel},</if>
|
||
|
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if>
|
||
|
<if test="commonCurrency != null">common_currency = #{commonCurrency},</if>
|
||
|
<if test="quantity != null">quantity = #{quantity},</if>
|
||
|
<if test="processPrice != null">process_price = #{processPrice},</if>
|
||
|
<if test="amountOfMoney != null">amount_of_money = #{amountOfMoney},</if>
|
||
|
<if test="standbyOne != null">standby_one = #{standbyOne},</if>
|
||
|
<if test="standbyTwo != null">standby_two = #{standbyTwo},</if>
|
||
|
</trim>
|
||
|
where tax_invoice_product_id = #{taxInvoiceProductId}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteTaxInvoiceProductById" parameterType="Long">
|
||
|
delete from tax_invoice_product where tax_invoice_product_id = #{taxInvoiceProductId}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteTaxInvoiceProductByIds" parameterType="String">
|
||
|
delete from tax_invoice_product where tax_invoice_product_id in
|
||
|
<foreach item="taxInvoiceProductId" collection="array" open="(" separator="," close=")">
|
||
|
#{taxInvoiceProductId}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|