万材erp项目
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.

210 lines
14 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.system.mapper.SysProductQuotationMapper">
<resultMap type="SysProductQuotation" id="SysProductQuotationResult">
<result property="productQuotationId" column="product_quotation_id" />
<result property="quotationCode" column="quotation_code" />
<result property="finishProductCode" column="finish_product_code" />
<result property="finishProductName" column="finish_product_name" />
<result property="specificationModel" column="specification_model" />
<result property="typeMachine" column="type_machine" />
<result property="inventoryUnit" column="inventory_unit" />
<result property="commonCurrency" column="common_currency" />
<result property="processPrice" column="process_price" />
<result property="customerNumber" column="customer_number" />
<result property="enterpriseCode" column="enterprise_code" />
<result property="enterpriseName" column="enterprise_name" />
<result property="registrant" column="registrant" />
<result property="pricingDate" column="pricing_date" />
<result property="taxRate" column="tax_rate" />
<result property="priceExcludingTax" column="price_excluding_tax" />
<result property="priceIncludingTax" column="price_including_tax" />
<result property="lastPrice" column="last_price" />
<result property="lastPriceEnd" column="last_price_end" />
<result property="costRmb" column="cost_rmb" />
<result property="currentExchangeRate" column="current_exchange_rate" />
<result property="proportionMaterials" column="proportion_materials" />
<result property="quotationExplain" column="quotation_explain" />
<result property="currentQuote" column="current_quote" />
<result property="confirmTax" column="confirm_tax" />
<result property="fileUpload" column="file_upload" />
<result property="confirmNo" column="confirm_no" />
<result property="confirmName" column="confirm_name" />
<result property="confirmTime" column="confirm_time" />
<result property="auditNo" column="audit_no" />
<result property="auditName" column="audit_name" />
<result property="auditTime" column="audit_time" />
<result property="approveNo" column="approve_no" />
<result property="approveName" column="approve_name" />
<result property="approveTime" column="approve_time" />
<result property="standbyOne" column="standby_one" />
<result property="standbyTwo" column="standby_two" />
<result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" />
</resultMap>
<sql id="selectSysProductQuotationVo">
select product_quotation_id, quotation_code, finish_product_code, finish_product_name, specification_model, type_machine, inventory_unit, common_currency, process_price, customer_number, enterprise_code, enterprise_name, registrant, pricing_date, tax_rate, price_excluding_tax, price_including_tax, last_price, last_price_end, cost_rmb, current_exchange_rate, proportion_materials, quotation_explain, current_quote, confirm_tax, file_upload, confirm_no, confirm_name, confirm_time, audit_no, audit_name, audit_time, approve_no, approve_name, approve_time, standby_one, standby_two, first_add_time, update_info_time from sys_product_quotation
</sql>
<select id="selectSysProductQuotationList" parameterType="SysProductQuotation" resultMap="SysProductQuotationResult">
<include refid="selectSysProductQuotationVo"/>
<where>
<if test="quotationCode != null and quotationCode != ''"> and quotation_code like concat('%', #{quotationCode}, '%')</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>
<if test="customerNumber != null and customerNumber != ''"> and customer_number like concat('%', #{customerNumber}, '%')</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="pricingDate != null and pricingDate != ''"> and pricing_date like concat('%', #{pricingDate}, '%')</if>
<if test="currentQuote != null and currentQuote != ''"> and current_quote = #{currentQuote}</if>
</where>
</select>
<select id="selectSysProductQuotationById" parameterType="Long" resultMap="SysProductQuotationResult">
<include refid="selectSysProductQuotationVo"/>
where product_quotation_id = #{productQuotationId}
</select>
<insert id="insertSysProductQuotation" parameterType="SysProductQuotation" useGeneratedKeys="true" keyProperty="productQuotationId">
insert into sys_product_quotation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="quotationCode != null">quotation_code,</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="typeMachine != null">type_machine,</if>
<if test="inventoryUnit != null">inventory_unit,</if>
<if test="commonCurrency != null">common_currency,</if>
<if test="processPrice != null">process_price,</if>
<if test="customerNumber != null">customer_number,</if>
<if test="enterpriseCode != null">enterprise_code,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="registrant != null">registrant,</if>
<if test="pricingDate != null">pricing_date,</if>
<if test="taxRate != null">tax_rate,</if>
<if test="priceExcludingTax != null">price_excluding_tax,</if>
<if test="priceIncludingTax != null">price_including_tax,</if>
<if test="lastPrice != null">last_price,</if>
<if test="lastPriceEnd != null">last_price_end,</if>
<if test="costRmb != null">cost_rmb,</if>
<if test="currentExchangeRate != null">current_exchange_rate,</if>
<if test="proportionMaterials != null">proportion_materials,</if>
<if test="quotationExplain != null">quotation_explain,</if>
<if test="currentQuote != null">current_quote,</if>
<if test="confirmTax != null">confirm_tax,</if>
<if test="fileUpload != null">file_upload,</if>
<if test="confirmNo != null">confirm_no,</if>
<if test="confirmName != null">confirm_name,</if>
<if test="confirmTime != null">confirm_time,</if>
<if test="auditNo != null">audit_no,</if>
<if test="auditName != null">audit_name,</if>
<if test="auditTime != null">audit_time,</if>
<if test="approveNo != null">approve_no,</if>
<if test="approveName != null">approve_name,</if>
<if test="approveTime != null">approve_time,</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="quotationCode != null">#{quotationCode},</if>
<if test="finishProductCode != null">#{finishProductCode},</if>
<if test="finishProductName != null">#{finishProductName},</if>
<if test="specificationModel != null">#{specificationModel},</if>
<if test="typeMachine != null">#{typeMachine},</if>
<if test="inventoryUnit != null">#{inventoryUnit},</if>
<if test="commonCurrency != null">#{commonCurrency},</if>
<if test="processPrice != null">#{processPrice},</if>
<if test="customerNumber != null">#{customerNumber},</if>
<if test="enterpriseCode != null">#{enterpriseCode},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="registrant != null">#{registrant},</if>
<if test="pricingDate != null">#{pricingDate},</if>
<if test="taxRate != null">#{taxRate},</if>
<if test="priceExcludingTax != null">#{priceExcludingTax},</if>
<if test="priceIncludingTax != null">#{priceIncludingTax},</if>
<if test="lastPrice != null">#{lastPrice},</if>
<if test="lastPriceEnd != null">#{lastPriceEnd},</if>
<if test="costRmb != null">#{costRmb},</if>
<if test="currentExchangeRate != null">#{currentExchangeRate},</if>
<if test="proportionMaterials != null">#{proportionMaterials},</if>
<if test="quotationExplain != null">#{quotationExplain},</if>
<if test="currentQuote != null">#{currentQuote},</if>
<if test="confirmTax != null">#{confirmTax},</if>
<if test="fileUpload != null">#{fileUpload},</if>
<if test="confirmNo != null">#{confirmNo},</if>
<if test="confirmName != null">#{confirmName},</if>
<if test="confirmTime != null">#{confirmTime},</if>
<if test="auditNo != null">#{auditNo},</if>
<if test="auditName != null">#{auditName},</if>
<if test="auditTime != null">#{auditTime},</if>
<if test="approveNo != null">#{approveNo},</if>
<if test="approveName != null">#{approveName},</if>
<if test="approveTime != null">#{approveTime},</if>
<if test="standbyOne != null">#{standbyOne},</if>
<if test="standbyTwo != null">#{standbyTwo},</if>
now(),
</trim>
</insert>
<update id="updateSysProductQuotation" parameterType="SysProductQuotation">
update sys_product_quotation
<trim prefix="SET" suffixOverrides=",">
<if test="quotationCode != null">quotation_code = #{quotationCode},</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="typeMachine != null">type_machine = #{typeMachine},</if>
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if>
<if test="commonCurrency != null">common_currency = #{commonCurrency},</if>
<if test="processPrice != null">process_price = #{processPrice},</if>
<if test="customerNumber != null">customer_number = #{customerNumber},</if>
<if test="enterpriseCode != null">enterprise_code = #{enterpriseCode},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="registrant != null">registrant = #{registrant},</if>
<if test="pricingDate != null">pricing_date = #{pricingDate},</if>
<if test="taxRate != null">tax_rate = #{taxRate},</if>
<if test="priceExcludingTax != null">price_excluding_tax = #{priceExcludingTax},</if>
<if test="priceIncludingTax != null">price_including_tax = #{priceIncludingTax},</if>
<if test="lastPrice != null">last_price = #{lastPrice},</if>
<if test="lastPriceEnd != null">last_price_end = #{lastPriceEnd},</if>
<if test="costRmb != null">cost_rmb = #{costRmb},</if>
<if test="currentExchangeRate != null">current_exchange_rate = #{currentExchangeRate},</if>
<if test="proportionMaterials != null">proportion_materials = #{proportionMaterials},</if>
<if test="quotationExplain != null">quotation_explain = #{quotationExplain},</if>
<if test="currentQuote != null">current_quote = #{currentQuote},</if>
<if test="confirmTax != null">confirm_tax = #{confirmTax},</if>
<if test="fileUpload != null">file_upload = #{fileUpload},</if>
<if test="confirmNo != null">confirm_no = #{confirmNo},</if>
<if test="confirmName != null">confirm_name = #{confirmName},</if>
<if test="confirmTime != null">confirm_time = #{confirmTime},</if>
<if test="auditNo != null">audit_no = #{auditNo},</if>
<if test="auditName != null">audit_name = #{auditName},</if>
<if test="auditTime != null">audit_time = #{auditTime},</if>
<if test="approveNo != null">approve_no = #{approveNo},</if>
<if test="approveName != null">approve_name = #{approveName},</if>
<if test="approveTime != null">approve_time = #{approveTime},</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 product_quotation_id = #{productQuotationId}
</update>
<delete id="deleteSysProductQuotationById" parameterType="Long">
delete from sys_product_quotation where product_quotation_id = #{productQuotationId}
</delete>
<delete id="deleteSysProductQuotationByIds" parameterType="String">
delete from sys_product_quotation where product_quotation_id in
<foreach item="productQuotationId" collection="array" open="(" separator="," close=")">
#{productQuotationId}
</foreach>
</delete>
</mapper>