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.
184 lines
12 KiB
184 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.SysQutsourcingQuotationMapper">
|
|
|
|
<resultMap type="SysQutsourcingQuotation" id="SysQutsourcingQuotationResult">
|
|
<result property="qutsourcingQuotationId" column="qutsourcing_quotation_id" />
|
|
<result property="quotationCode" column="quotation_code" />
|
|
<result property="materialCode" column="material_code" />
|
|
<result property="materialName" column="material_name" />
|
|
<result property="specificationModel" column="specification_model" />
|
|
<result property="typeMachine" column="type_machine" />
|
|
<result property="measurementUnit" column="measurement_unit" />
|
|
<result property="commonCurrency" column="common_currency" />
|
|
<result property="processPrice" column="process_price" />
|
|
<result property="processingProcedureName" column="processing_procedure_name" />
|
|
<result property="processingProcedureCode" column="processing_procedure_code" />
|
|
<result property="converterCode" column="converter_code" />
|
|
<result property="converterName" column="converter_name" />
|
|
<result property="pricingDate" column="pricing_date" />
|
|
<result property="inventoryUnit" column="inventory_unit" />
|
|
<result property="taxRate" column="tax_rate" />
|
|
<result property="relationalFormula" column="relational_formula" />
|
|
<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="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="selectSysQutsourcingQuotationVo">
|
|
select qutsourcing_quotation_id, quotation_code, material_code, material_name, specification_model, type_machine, measurement_unit, common_currency, process_price, processing_procedure_name, processing_procedure_code, converter_code, converter_name, pricing_date, inventory_unit, tax_rate, relational_formula, quotation_explain, current_quote, registrant, 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_qutsourcing_quotation
|
|
</sql>
|
|
|
|
<select id="selectSysQutsourcingQuotationList" parameterType="SysQutsourcingQuotation" resultMap="SysQutsourcingQuotationResult">
|
|
<include refid="selectSysQutsourcingQuotationVo"/>
|
|
<where>
|
|
<if test="quotationCode != null and quotationCode != ''"> and quotation_code = #{quotationCode}</if>
|
|
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
|
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
|
<if test="converterName != null and converterName != ''"> and converter_name like concat('%', #{converterName}, '%')</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="selectSysQutsourcingQuotationById" parameterType="Long" resultMap="SysQutsourcingQuotationResult">
|
|
<include refid="selectSysQutsourcingQuotationVo"/>
|
|
where qutsourcing_quotation_id = #{qutsourcingQuotationId}
|
|
</select>
|
|
|
|
<insert id="insertSysQutsourcingQuotation" parameterType="SysQutsourcingQuotation" useGeneratedKeys="true" keyProperty="qutsourcingQuotationId">
|
|
insert into sys_qutsourcing_quotation
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="quotationCode != null">quotation_code,</if>
|
|
<if test="materialCode != null">material_code,</if>
|
|
<if test="materialName != null">material_name,</if>
|
|
<if test="specificationModel != null">specification_model,</if>
|
|
<if test="typeMachine != null">type_machine,</if>
|
|
<if test="measurementUnit != null">measurement_unit,</if>
|
|
<if test="commonCurrency != null">common_currency,</if>
|
|
<if test="processPrice != null">process_price,</if>
|
|
<if test="processingProcedureName != null">processing_procedure_name,</if>
|
|
<if test="processingProcedureCode != null">processing_procedure_code,</if>
|
|
<if test="converterCode != null">converter_code,</if>
|
|
<if test="converterName != null">converter_name,</if>
|
|
<if test="pricingDate != null">pricing_date,</if>
|
|
<if test="inventoryUnit != null">inventory_unit,</if>
|
|
<if test="taxRate != null">tax_rate,</if>
|
|
<if test="relationalFormula != null">relational_formula,</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="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="materialCode != null">#{materialCode},</if>
|
|
<if test="materialName != null">#{materialName},</if>
|
|
<if test="specificationModel != null">#{specificationModel},</if>
|
|
<if test="typeMachine != null">#{typeMachine},</if>
|
|
<if test="measurementUnit != null">#{measurementUnit},</if>
|
|
<if test="commonCurrency != null">#{commonCurrency},</if>
|
|
<if test="processPrice != null">#{processPrice},</if>
|
|
<if test="processingProcedureName != null">#{processingProcedureName},</if>
|
|
<if test="processingProcedureCode != null">#{processingProcedureCode},</if>
|
|
<if test="converterCode != null">#{converterCode},</if>
|
|
<if test="converterName != null">#{converterName},</if>
|
|
<if test="pricingDate != null">#{pricingDate},</if>
|
|
<if test="inventoryUnit != null">#{inventoryUnit},</if>
|
|
<if test="taxRate != null">#{taxRate},</if>
|
|
<if test="relationalFormula != null">#{relationalFormula},</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="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="updateSysQutsourcingQuotation" parameterType="SysQutsourcingQuotation">
|
|
update sys_qutsourcing_quotation
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="quotationCode != null">quotation_code = #{quotationCode},</if>
|
|
<if test="materialCode != null">material_code = #{materialCode},</if>
|
|
<if test="materialName != null">material_name = #{materialName},</if>
|
|
<if test="specificationModel != null">specification_model = #{specificationModel},</if>
|
|
<if test="typeMachine != null">type_machine = #{typeMachine},</if>
|
|
<if test="measurementUnit != null">measurement_unit = #{measurementUnit},</if>
|
|
<if test="commonCurrency != null">common_currency = #{commonCurrency},</if>
|
|
<if test="processPrice != null">process_price = #{processPrice},</if>
|
|
<if test="processingProcedureName != null">processing_procedure_name = #{processingProcedureName},</if>
|
|
<if test="processingProcedureCode != null">processing_procedure_code = #{processingProcedureCode},</if>
|
|
<if test="converterCode != null">converter_code = #{converterCode},</if>
|
|
<if test="converterName != null">converter_name = #{converterName},</if>
|
|
<if test="pricingDate != null">pricing_date = #{pricingDate},</if>
|
|
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if>
|
|
<if test="taxRate != null">tax_rate = #{taxRate},</if>
|
|
<if test="relationalFormula != null">relational_formula = #{relationalFormula},</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="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 qutsourcing_quotation_id = #{qutsourcingQuotationId}
|
|
</update>
|
|
|
|
<delete id="deleteSysQutsourcingQuotationById" parameterType="Long">
|
|
delete from sys_qutsourcing_quotation where qutsourcing_quotation_id = #{qutsourcingQuotationId}
|
|
</delete>
|
|
|
|
<delete id="deleteSysQutsourcingQuotationByIds" parameterType="String">
|
|
delete from sys_qutsourcing_quotation where qutsourcing_quotation_id in
|
|
<foreach item="qutsourcingQuotationId" collection="array" open="(" separator="," close=")">
|
|
#{qutsourcingQuotationId}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper>
|