Browse Source

[feat]采购报价单物料信息表SQL语句配置

dev
zhangsiqi 6 months ago
parent
commit
788c1884ef
  1. 167
      ruoyi-admin/src/main/resources/mapper/system/SysPurchaseQuoteChildMapper.xml

167
ruoyi-admin/src/main/resources/mapper/system/SysPurchaseQuoteChildMapper.xml

@ -0,0 +1,167 @@
<?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.SysPurchaseQuoteChildMapper">
<resultMap type="SysPurchaseQuoteChild" id="SysPurchaseQuoteChildResult">
<result property="purchaseQuoteChildId" column="purchase_quote_child_id" />
<result property="purchaseQuoteCode" column="purchase_quote_code" />
<result property="materialId" column="material_id" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="materialType" column="material_type" />
<result property="processMethod" column="processMethod" />
<result property="brand" column="brand" />
<result property="photoUrl" column="photoUrl" />
<result property="describe" column="describe" />
<result property="taxRate" column="tax_rate" />
<result property="usdRate" column="usd_rate" />
<result property="materialNum" column="material_num" />
<result property="materialSole" column="material_sole" />
<result property="materialRmb" column="material_rmb" />
<result property="materialNormb" column="material_noRmb" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="useStatus" column="use_status" />
<result property="auditStatus" column="audit_status" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSysPurchaseQuoteChildVo">
select purchase_quote_child_id, purchase_quote_code, material_id, material_code, material_name, material_type, processMethod, brand, photoUrl, describe, tax_rate, usd_rate, material_num, material_sole, material_rmb, material_noRmb, create_by, create_time, update_by, update_time, remark, use_status, audit_status, del_flag from sys_purchase_quote_child
</sql>
<select id="selectSysPurchaseQuoteChildList" parameterType="SysPurchaseQuoteChild" resultMap="SysPurchaseQuoteChildResult">
<include refid="selectSysPurchaseQuoteChildVo"/>
<where>
<if test="purchaseQuoteCode != null and purchaseQuoteCode != ''"> and purchase_quote_code = #{purchaseQuoteCode}</if>
<if test="materialId != null "> and material_id = #{materialId}</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="materialType != null and materialType != ''"> and material_type = #{materialType}</if>
<if test="processMethod != null and processMethod != ''"> and processMethod = #{processMethod}</if>
<if test="brand != null and brand != ''"> and brand = #{brand}</if>
<if test="photoUrl != null and photoUrl != ''"> and photoUrl = #{photoUrl}</if>
<if test="describe != null and describe != ''"> and describe = #{describe}</if>
<if test="materialNum != null "> and material_num = #{materialNum}</if>
<if test="materialSole != null "> and material_sole = #{materialSole}</if>
<if test="materialRmb != null "> and material_rmb = #{materialRmb}</if>
<if test="materialNormb != null "> and material_noRmb = #{materialNormb}</if>
<if test="useStatus != null and useStatus != ''"> and use_status = #{useStatus}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
</where>
</select>
<select id="selectSysPurchaseQuoteChildById" parameterType="Long" resultMap="SysPurchaseQuoteChildResult">
<include refid="selectSysPurchaseQuoteChildVo"/>
where purchase_quote_child_id = #{purchaseQuoteChildId}
</select>
<insert id="insertSysPurchaseQuoteChild" parameterType="SysPurchaseQuoteChild" useGeneratedKeys="true" keyProperty="purchaseQuoteChildId">
insert into sys_purchase_quote_child
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="purchaseQuoteCode != null">purchase_quote_code,</if>
<if test="materialId != null">material_id,</if>
<if test="materialCode != null">material_code,</if>
<if test="materialName != null">material_name,</if>
<if test="materialType != null">material_type,</if>
<if test="processMethod != null">processMethod,</if>
<if test="brand != null">brand,</if>
<if test="photoUrl != null">photoUrl,</if>
<if test="describe != null">describe,</if>
<if test="taxRate != null">tax_rate,</if>
<if test="usdRate != null">usd_rate,</if>
<if test="materialNum != null">material_num,</if>
<if test="materialSole != null">material_sole,</if>
<if test="materialRmb != null">material_rmb,</if>
<if test="materialNormb != null">material_noRmb,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="useStatus != null">use_status,</if>
<if test="auditStatus != null">audit_status,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="purchaseQuoteCode != null">#{purchaseQuoteCode},</if>
<if test="materialId != null">#{materialId},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="materialName != null">#{materialName},</if>
<if test="materialType != null">#{materialType},</if>
<if test="processMethod != null">#{processMethod},</if>
<if test="brand != null">#{brand},</if>
<if test="photoUrl != null">#{photoUrl},</if>
<if test="describe != null">#{describe},</if>
<if test="taxRate != null">#{taxRate},</if>
<if test="usdRate != null">#{usdRate},</if>
<if test="materialNum != null">#{materialNum},</if>
<if test="materialSole != null">#{materialSole},</if>
<if test="materialRmb != null">#{materialRmb},</if>
<if test="materialNormb != null">#{materialNormb},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="useStatus != null">#{useStatus},</if>
<if test="auditStatus != null">#{auditStatus},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateSysPurchaseQuoteChild" parameterType="SysPurchaseQuoteChild">
update sys_purchase_quote_child
<trim prefix="SET" suffixOverrides=",">
<if test="purchaseQuoteCode != null">purchase_quote_code = #{purchaseQuoteCode},</if>
<if test="materialId != null">material_id = #{materialId},</if>
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="materialType != null">material_type = #{materialType},</if>
<if test="processMethod != null">processMethod = #{processMethod},</if>
<if test="brand != null">brand = #{brand},</if>
<if test="photoUrl != null">photoUrl = #{photoUrl},</if>
<if test="describe != null">describe = #{describe},</if>
<if test="taxRate != null">tax_rate = #{taxRate},</if>
<if test="usdRate != null">usd_rate = #{usdRate},</if>
<if test="materialNum != null">material_num = #{materialNum},</if>
<if test="materialSole != null">material_sole = #{materialSole},</if>
<if test="materialRmb != null">material_rmb = #{materialRmb},</if>
<if test="materialNormb != null">material_noRmb = #{materialNormb},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="useStatus != null">use_status = #{useStatus},</if>
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where purchase_quote_child_id = #{purchaseQuoteChildId}
</update>
<delete id="deleteSysPurchaseQuoteChildById" parameterType="Long">
delete from sys_purchase_quote_child where purchase_quote_child_id = #{purchaseQuoteChildId}
</delete>
<delete id="deleteSysPurchaseQuoteChildByIds" parameterType="String">
delete from sys_purchase_quote_child where purchase_quote_child_id in
<foreach item="purchaseQuoteChildId" collection="array" open="(" separator="," close=")">
#{purchaseQuoteChildId}
</foreach>
</delete>
<update id="cancelSysPurchaseQuoteChildById" parameterType="Long">
update sys_purchase_quote_child set del_flag = '1' where purchase_quote_child_id = #{purchaseQuoteChildId}
</update>
<update id="restoreSysPurchaseQuoteChildById" parameterType="Long">
update sys_purchase_quote_child set del_flag = '0' where purchase_quote_child_id = #{purchaseQuoteChildId}
</update>
</mapper>
Loading…
Cancel
Save