万材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.
 
 
 
 

190 lines
12 KiB

<?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.SysSupplierQuotationMapper">
<resultMap type="SysSupplierQuotation" id="SysSupplierQuotationResult">
<result property="supplierQuotationId" column="supplier_quotation_id" />
<result property="quotationCode" column="quotation_code" />
<result property="rawSubsidiaryCode" column="raw_subsidiary_code" />
<result property="rawSubsidiaryName" column="raw_subsidiary_name" />
<result property="specificationModel" column="specification_model" />
<result property="typeMachine" column="type_machine" />
<result property="materialType" column="material_type" />
<result property="inventoryUnit" column="inventory_unit" />
<result property="commonCurrency" column="common_currency" />
<result property="inventoryPrice" column="inventory_price" />
<result property="purchasingUnit" column="purchasing_unit" />
<result property="purchasePrice" column="purchase_price" />
<result property="relationalFormula" column="relational_formula" />
<result property="supplierCode" column="supplier_code" />
<result property="supplierName" column="supplier_name" />
<result property="pricingDate" column="pricing_date" />
<result property="confirmTax" column="confirm_tax" />
<result property="taxRate" column="tax_rate" />
<result property="quotationExplain" column="quotation_explain" />
<result property="currentQuote" column="current_quote" />
<result property="registrant" column="registrant" />
<result property="confirmNo" column="confirm_no" />
<result property="auditNo" column="audit_no" />
<result property="approveNo" column="approve_no" />
<result property="confirmName" column="confirm_name" />
<result property="confirmTime" column="confirm_time" />
<result property="auditName" column="audit_name" />
<result property="auditTime" column="audit_time" />
<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="selectSysSupplierQuotationVo">
select supplier_quotation_id, quotation_code, raw_subsidiary_code, raw_subsidiary_name, specification_model, type_machine, material_type, inventory_unit, common_currency, inventory_price, purchasing_unit, purchase_price, relational_formula, supplier_code, supplier_name, pricing_date, confirm_tax, tax_rate, quotation_explain, current_quote, registrant, confirm_no, audit_no, approve_no, confirm_name, confirm_time, audit_name, audit_time, approve_name, approve_time, standby_one, standby_two, first_add_time, update_info_time from sys_supplier_quotation
</sql>
<select id="selectSysSupplierQuotationList" parameterType="SysSupplierQuotation" resultMap="SysSupplierQuotationResult">
<include refid="selectSysSupplierQuotationVo"/>
<where>
<if test="quotationCode != null and quotationCode != ''"> and quotation_code like concat('%', #{quotationCode}, '%')</if>
<if test="rawSubsidiaryCode != null and rawSubsidiaryCode != ''"> and raw_subsidiary_code like concat('%', #{rawSubsidiaryCode}, '%')</if>
<if test="rawSubsidiaryName != null and rawSubsidiaryName != ''"> and raw_subsidiary_name like concat('%', #{rawSubsidiaryName}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code like concat('%', #{supplierCode}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="currentQuote != null and currentQuote != ''"> and current_quote = #{currentQuote}</if>
<if test="confirmNo != null and confirmNo != ''"> and confirm_no = #{confirmNo}</if>
<if test="auditNo != null and auditNo != ''"> and audit_no = #{auditNo}</if>
<if test="approveNo != null and approveNo != ''"> and approve_no = #{approveNo}</if>
</where>
</select>
<select id="selectSysSupplierQuotationById" parameterType="Long" resultMap="SysSupplierQuotationResult">
<include refid="selectSysSupplierQuotationVo"/>
where supplier_quotation_id = #{supplierQuotationId}
</select>
<insert id="insertSysSupplierQuotation" parameterType="SysSupplierQuotation" useGeneratedKeys="true" keyProperty="supplierQuotationId">
insert into sys_supplier_quotation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="quotationCode != null">quotation_code,</if>
<if test="rawSubsidiaryCode != null">raw_subsidiary_code,</if>
<if test="rawSubsidiaryName != null">raw_subsidiary_name,</if>
<if test="specificationModel != null">specification_model,</if>
<if test="typeMachine != null">type_machine,</if>
<if test="materialType != null">material_type,</if>
<if test="inventoryUnit != null">inventory_unit,</if>
<if test="commonCurrency != null">common_currency,</if>
<if test="inventoryPrice != null">inventory_price,</if>
<if test="purchasingUnit != null">purchasing_unit,</if>
<if test="purchasePrice != null">purchase_price,</if>
<if test="relationalFormula != null">relational_formula,</if>
<if test="supplierCode != null">supplier_code,</if>
<if test="supplierName != null">supplier_name,</if>
<if test="pricingDate != null">pricing_date,</if>
<if test="confirmTax != null">confirm_tax,</if>
<if test="taxRate != null">tax_rate,</if>
<if test="quotationExplain != null">quotation_explain,</if>
<if test="currentQuote != null">current_quote,</if>
<if test="registrant != null">registrant,</if>
<if test="confirmNo != null">confirm_no,</if>
<if test="auditNo != null">audit_no,</if>
<if test="approveNo != null">approve_no,</if>
<if test="confirmName != null">confirm_name,</if>
<if test="confirmTime != null">confirm_time,</if>
<if test="auditName != null">audit_name,</if>
<if test="auditTime != null">audit_time,</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="rawSubsidiaryCode != null">#{rawSubsidiaryCode},</if>
<if test="rawSubsidiaryName != null">#{rawSubsidiaryName},</if>
<if test="specificationModel != null">#{specificationModel},</if>
<if test="typeMachine != null">#{typeMachine},</if>
<if test="materialType != null">#{materialType},</if>
<if test="inventoryUnit != null">#{inventoryUnit},</if>
<if test="commonCurrency != null">#{commonCurrency},</if>
<if test="inventoryPrice != null">#{inventoryPrice},</if>
<if test="purchasingUnit != null">#{purchasingUnit},</if>
<if test="purchasePrice != null">#{purchasePrice},</if>
<if test="relationalFormula != null">#{relationalFormula},</if>
<if test="supplierCode != null">#{supplierCode},</if>
<if test="supplierName != null">#{supplierName},</if>
<if test="pricingDate != null">#{pricingDate},</if>
<if test="confirmTax != null">#{confirmTax},</if>
<if test="taxRate != null">#{taxRate},</if>
<if test="quotationExplain != null">#{quotationExplain},</if>
<if test="currentQuote != null">#{currentQuote},</if>
<if test="registrant != null">#{registrant},</if>
<if test="confirmNo != null">#{confirmNo},</if>
<if test="auditNo != null">#{auditNo},</if>
<if test="approveNo != null">#{approveNo},</if>
<if test="confirmName != null">#{confirmName},</if>
<if test="confirmTime != null">#{confirmTime},</if>
<if test="auditName != null">#{auditName},</if>
<if test="auditTime != null">#{auditTime},</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="updateSysSupplierQuotation" parameterType="SysSupplierQuotation">
update sys_supplier_quotation
<trim prefix="SET" suffixOverrides=",">
<if test="quotationCode != null">quotation_code = #{quotationCode},</if>
<if test="rawSubsidiaryCode != null">raw_subsidiary_code = #{rawSubsidiaryCode},</if>
<if test="rawSubsidiaryName != null">raw_subsidiary_name = #{rawSubsidiaryName},</if>
<if test="specificationModel != null">specification_model = #{specificationModel},</if>
<if test="typeMachine != null">type_machine = #{typeMachine},</if>
<if test="materialType != null">material_type = #{materialType},</if>
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if>
<if test="commonCurrency != null">common_currency = #{commonCurrency},</if>
<if test="inventoryPrice != null">inventory_price = #{inventoryPrice},</if>
<if test="purchasingUnit != null">purchasing_unit = #{purchasingUnit},</if>
<if test="purchasePrice != null">purchase_price = #{purchasePrice},</if>
<if test="relationalFormula != null">relational_formula = #{relationalFormula},</if>
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</if>
<if test="pricingDate != null">pricing_date = #{pricingDate},</if>
<if test="confirmTax != null">confirm_tax = #{confirmTax},</if>
<if test="taxRate != null">tax_rate = #{taxRate},</if>
<if test="quotationExplain != null">quotation_explain = #{quotationExplain},</if>
<if test="currentQuote != null">current_quote = #{currentQuote},</if>
<if test="registrant != null">registrant = #{registrant},</if>
<if test="confirmNo != null">confirm_no = #{confirmNo},</if>
<if test="auditNo != null">audit_no = #{auditNo},</if>
<if test="approveNo != null">approve_no = #{approveNo},</if>
<if test="confirmName != null">confirm_name = #{confirmName},</if>
<if test="confirmTime != null">confirm_time = #{confirmTime},</if>
<if test="auditName != null">audit_name = #{auditName},</if>
<if test="auditTime != null">audit_time = #{auditTime},</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 supplier_quotation_id = #{supplierQuotationId}
</update>
<delete id="deleteSysSupplierQuotationById" parameterType="Long">
delete from sys_supplier_quotation where supplier_quotation_id = #{supplierQuotationId}
</delete>
<delete id="deleteSysSupplierQuotationByIds" parameterType="String">
delete from sys_supplier_quotation where supplier_quotation_id in
<foreach item="supplierQuotationId" collection="array" open="(" separator="," close=")">
#{supplierQuotationId}
</foreach>
</delete>
</mapper>