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.
155 lines
10 KiB
155 lines
10 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.TaxInvoiceInfoMapper">
|
||
|
|
||
|
<resultMap type="TaxInvoiceInfo" id="TaxInvoiceInfoResult">
|
||
|
<result property="taxInvoiceId" column="tax_invoice_id" />
|
||
|
<result property="taxInvoiceCode" column="tax_invoice_code" />
|
||
|
<result property="taxInvoiceNumber" column="tax_invoice_number" />
|
||
|
<result property="deliveryNoteNumber" column="delivery_note_number" />
|
||
|
<result property="enterpriseCode" column="enterprise_code" />
|
||
|
<result property="enterpriseName" column="enterprise_name" />
|
||
|
<result property="contractNumber" column="contract_number" />
|
||
|
<result property="paymentTerm" column="payment_term" />
|
||
|
<result property="billingDate" column="billing_date" />
|
||
|
<result property="transportWay" column="transport_way" />
|
||
|
<result property="transportMeans" column="transport_means" />
|
||
|
<result property="departureDate" column="departure_date" />
|
||
|
<result property="exportCustoms" column="export_customs" />
|
||
|
<result property="billCommonCurrency" column="bill_common_currency" />
|
||
|
<result property="packagesNumber" column="packages_number" />
|
||
|
<result property="arrivalArea" column="arrival_area" />
|
||
|
<result property="portOfDestination" column="port_of_destination" />
|
||
|
<result property="hoistingNumber" column="hoisting_number" />
|
||
|
<result property="printVersionNumber" column="print_version_number" />
|
||
|
<result property="billRemarks" column="bill_remarks" />
|
||
|
<result property="taxInvoiceNo" column="tax_invoice_no" />
|
||
|
<result property="getmoneyFlag" column="getMoney_flag" />
|
||
|
<result property="firstAddTime" column="first_add_time" />
|
||
|
<result property="updateInfoTime" column="update_info_time" />
|
||
|
<result property="standbyOne" column="standby_one" />
|
||
|
<result property="standbyTwo" column="standby_two" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectTaxInvoiceInfoVo">
|
||
|
select tax_invoice_id, tax_invoice_code, tax_invoice_number, delivery_note_number, enterprise_code, enterprise_name, contract_number, payment_term, billing_date, transport_way, transport_means, departure_date, export_customs, bill_common_currency, packages_number, arrival_area, port_of_destination, hoisting_number, print_version_number, bill_remarks, tax_invoice_no, getMoney_flag, first_add_time, update_info_time, standby_one, standby_two from tax_invoice_info
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectTaxInvoiceInfoList" parameterType="TaxInvoiceInfo" resultMap="TaxInvoiceInfoResult">
|
||
|
<include refid="selectTaxInvoiceInfoVo"/>
|
||
|
<where>
|
||
|
<if test="taxInvoiceNumber != null and taxInvoiceNumber != ''"> and tax_invoice_number like concat('%', #{taxInvoiceNumber}, '%')</if>
|
||
|
<if test="deliveryNoteNumber != null and deliveryNoteNumber != ''"> and delivery_note_number like concat('%', #{deliveryNoteNumber}, '%')</if>
|
||
|
<if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code like concat('%', #{enterpriseCode}, '%')</if>
|
||
|
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
|
||
|
<if test="taxInvoiceNo != null and taxInvoiceNo != ''"> and tax_invoice_no like concat('%', #{taxInvoiceNo}, '%')</if>
|
||
|
<if test="getmoneyFlag != null and getmoneyFlag != ''"> and getMoney_flag = #{getmoneyFlag}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectTaxInvoiceInfoById" parameterType="Long" resultMap="TaxInvoiceInfoResult">
|
||
|
<include refid="selectTaxInvoiceInfoVo"/>
|
||
|
where tax_invoice_id = #{taxInvoiceId}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertTaxInvoiceInfo" parameterType="TaxInvoiceInfo" useGeneratedKeys="true" keyProperty="taxInvoiceId">
|
||
|
insert into tax_invoice_info
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="taxInvoiceCode != null">tax_invoice_code,</if>
|
||
|
<if test="taxInvoiceNumber != null">tax_invoice_number,</if>
|
||
|
<if test="deliveryNoteNumber != null">delivery_note_number,</if>
|
||
|
<if test="enterpriseCode != null">enterprise_code,</if>
|
||
|
<if test="enterpriseName != null">enterprise_name,</if>
|
||
|
<if test="contractNumber != null">contract_number,</if>
|
||
|
<if test="paymentTerm != null">payment_term,</if>
|
||
|
<if test="billingDate != null">billing_date,</if>
|
||
|
<if test="transportWay != null">transport_way,</if>
|
||
|
<if test="transportMeans != null">transport_means,</if>
|
||
|
<if test="departureDate != null">departure_date,</if>
|
||
|
<if test="exportCustoms != null">export_customs,</if>
|
||
|
<if test="billCommonCurrency != null">bill_common_currency,</if>
|
||
|
<if test="packagesNumber != null">packages_number,</if>
|
||
|
<if test="arrivalArea != null">arrival_area,</if>
|
||
|
<if test="portOfDestination != null">port_of_destination,</if>
|
||
|
<if test="hoistingNumber != null">hoisting_number,</if>
|
||
|
<if test="printVersionNumber != null">print_version_number,</if>
|
||
|
<if test="billRemarks != null">bill_remarks,</if>
|
||
|
<if test="taxInvoiceNo != null">tax_invoice_no,</if>
|
||
|
<if test="getmoneyFlag != null">getMoney_flag,</if>
|
||
|
<if test="standbyOne != null">standby_one,</if>
|
||
|
<if test="standbyTwo != null">standby_two,</if>
|
||
|
first_add_time,
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="taxInvoiceCode != null">#{taxInvoiceCode},</if>
|
||
|
<if test="taxInvoiceNumber != null">#{taxInvoiceNumber},</if>
|
||
|
<if test="deliveryNoteNumber != null">#{deliveryNoteNumber},</if>
|
||
|
<if test="enterpriseCode != null">#{enterpriseCode},</if>
|
||
|
<if test="enterpriseName != null">#{enterpriseName},</if>
|
||
|
<if test="contractNumber != null">#{contractNumber},</if>
|
||
|
<if test="paymentTerm != null">#{paymentTerm},</if>
|
||
|
<if test="billingDate != null">#{billingDate},</if>
|
||
|
<if test="transportWay != null">#{transportWay},</if>
|
||
|
<if test="transportMeans != null">#{transportMeans},</if>
|
||
|
<if test="departureDate != null">#{departureDate},</if>
|
||
|
<if test="exportCustoms != null">#{exportCustoms},</if>
|
||
|
<if test="billCommonCurrency != null">#{billCommonCurrency},</if>
|
||
|
<if test="packagesNumber != null">#{packagesNumber},</if>
|
||
|
<if test="arrivalArea != null">#{arrivalArea},</if>
|
||
|
<if test="portOfDestination != null">#{portOfDestination},</if>
|
||
|
<if test="hoistingNumber != null">#{hoistingNumber},</if>
|
||
|
<if test="printVersionNumber != null">#{printVersionNumber},</if>
|
||
|
<if test="billRemarks != null">#{billRemarks},</if>
|
||
|
<if test="taxInvoiceNo != null">#{taxInvoiceNo},</if>
|
||
|
<if test="getmoneyFlag != null">#{getmoneyFlag},</if>
|
||
|
<if test="standbyOne != null">#{standbyOne},</if>
|
||
|
<if test="standbyTwo != null">#{standbyTwo},</if>
|
||
|
now(),
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateTaxInvoiceInfo" parameterType="TaxInvoiceInfo">
|
||
|
update tax_invoice_info
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="taxInvoiceCode != null">tax_invoice_code = #{taxInvoiceCode},</if>
|
||
|
<if test="taxInvoiceNumber != null">tax_invoice_number = #{taxInvoiceNumber},</if>
|
||
|
<if test="deliveryNoteNumber != null">delivery_note_number = #{deliveryNoteNumber},</if>
|
||
|
<if test="enterpriseCode != null">enterprise_code = #{enterpriseCode},</if>
|
||
|
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
|
||
|
<if test="contractNumber != null">contract_number = #{contractNumber},</if>
|
||
|
<if test="paymentTerm != null">payment_term = #{paymentTerm},</if>
|
||
|
<if test="billingDate != null">billing_date = #{billingDate},</if>
|
||
|
<if test="transportWay != null">transport_way = #{transportWay},</if>
|
||
|
<if test="transportMeans != null">transport_means = #{transportMeans},</if>
|
||
|
<if test="departureDate != null">departure_date = #{departureDate},</if>
|
||
|
<if test="exportCustoms != null">export_customs = #{exportCustoms},</if>
|
||
|
<if test="billCommonCurrency != null">bill_common_currency = #{billCommonCurrency},</if>
|
||
|
<if test="packagesNumber != null">packages_number = #{packagesNumber},</if>
|
||
|
<if test="arrivalArea != null">arrival_area = #{arrivalArea},</if>
|
||
|
<if test="portOfDestination != null">port_of_destination = #{portOfDestination},</if>
|
||
|
<if test="hoistingNumber != null">hoisting_number = #{hoistingNumber},</if>
|
||
|
<if test="printVersionNumber != null">print_version_number = #{printVersionNumber},</if>
|
||
|
<if test="billRemarks != null">bill_remarks = #{billRemarks},</if>
|
||
|
<if test="taxInvoiceNo != null">tax_invoice_no = #{taxInvoiceNo},</if>
|
||
|
<if test="getmoneyFlag != null">getMoney_flag = #{getmoneyFlag},</if>
|
||
|
<if test="standbyOne != null">standby_one = #{standbyOne},</if>
|
||
|
<if test="standbyTwo != null">standby_two = #{standbyTwo},</if>
|
||
|
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
|
||
|
</trim>
|
||
|
where tax_invoice_id = #{taxInvoiceId}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteTaxInvoiceInfoById" parameterType="Long">
|
||
|
delete from tax_invoice_info where tax_invoice_id = #{taxInvoiceId}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteTaxInvoiceInfoByIds" parameterType="String">
|
||
|
delete from tax_invoice_info where tax_invoice_id in
|
||
|
<foreach item="taxInvoiceId" collection="array" open="(" separator="," close=")">
|
||
|
#{taxInvoiceId}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|