You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
178 lines
9.5 KiB
XML
178 lines
9.5 KiB
XML
<?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.op.wms.mapper.BaseBomComponentMapper">
|
|
|
|
<resultMap type="BaseBomComponent" id="BaseBomComponentResult">
|
|
<result property="handle" column="handle"/>
|
|
<result property="bomCode" column="bom_code"/>
|
|
<result property="site" column="site"/>
|
|
<result property="productCode" column="product_code"/>
|
|
<result property="cumc" column="cumc"/>
|
|
<result property="component" column="component"/>
|
|
<result property="bomHierarchy" column="bom_hierarchy"/>
|
|
<result property="projectNo" column="project_no"/>
|
|
<result property="standardDosage" column="standard_dosage"/>
|
|
<result property="lossRate" column="loss_rate"/>
|
|
<result property="lossAmount" column="loss_amount"/>
|
|
<result property="cilosses" column="cilosses"/>
|
|
<result property="componentUnit" column="component_unit"/>
|
|
<result property="componentProFlag" column="component_pro_flag"/>
|
|
<result property="msi" column="msi"/>
|
|
<result property="sanka" column="sanka"/>
|
|
<result property="attr1" column="attr1"/>
|
|
<result property="attr2" column="attr2"/>
|
|
<result property="attr3" column="attr3"/>
|
|
<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"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectBaseBomComponentVo">
|
|
select handle, bom_code, site, product_code, cumc, component, bom_hierarchy, project_no, standard_dosage, loss_rate, loss_amount, cilosses, component_unit, component_pro_flag, msi, sanka, attr1, attr2, attr3, create_by, create_time, update_by, update_time, remark from base_bom_component
|
|
</sql>
|
|
|
|
<select id="selectBaseBomComponentList" parameterType="BaseBomComponent" resultMap="BaseBomComponentResult">
|
|
<include refid="selectBaseBomComponentVo"/>
|
|
<where>
|
|
<if test="bomCode != null and bomCode != ''">and bom_code = #{bomCode}</if>
|
|
<if test="site != null and site != ''">and site = #{site}</if>
|
|
<if test="productCode != null and productCode != ''">and product_code = #{productCode}</if>
|
|
<if test="cumc != null and cumc != ''">and cumc = #{cumc}</if>
|
|
<if test="component != null and component != ''">and component = #{component}</if>
|
|
<if test="bomHierarchy != null and bomHierarchy != ''">and bom_hierarchy = #{bomHierarchy}</if>
|
|
<if test="projectNo != null and projectNo != ''">and project_no = #{projectNo}</if>
|
|
<if test="standardDosage != null ">and standard_dosage = #{standardDosage}</if>
|
|
<if test="lossRate != null ">and loss_rate = #{lossRate}</if>
|
|
<if test="lossAmount != null ">and loss_amount = #{lossAmount}</if>
|
|
<if test="cilosses != null ">and cilosses = #{cilosses}</if>
|
|
<if test="componentUnit != null and componentUnit != ''">and component_unit = #{componentUnit}</if>
|
|
<if test="componentProFlag != null and componentProFlag != ''">and component_pro_flag =
|
|
#{componentProFlag}
|
|
</if>
|
|
<if test="msi != null and msi != ''">and msi = #{msi}</if>
|
|
<if test="sanka != null and sanka != ''">and sanka = #{sanka}</if>
|
|
<if test="attr1 != null and attr1 != ''">and attr1 = #{attr1}</if>
|
|
<if test="attr2 != null and attr2 != ''">and attr2 = #{attr2}</if>
|
|
<if test="attr3 != null and attr3 != ''">and attr3 = #{attr3}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectBaseBomComponentById" parameterType="Long" resultMap="BaseBomComponentResult">
|
|
<include refid="selectBaseBomComponentVo"/>
|
|
where handle = #{handle}
|
|
</select>
|
|
|
|
<insert id="insertBaseBomComponent" parameterType="BaseBomComponent">
|
|
insert into base_bom_component
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="handle != null">handle,</if>
|
|
<if test="bomCode != null and bomCode != ''">bom_code,</if>
|
|
<if test="site != null">site,</if>
|
|
<if test="productCode != null">product_code,</if>
|
|
<if test="cumc != null">cumc,</if>
|
|
<if test="component != null">component,</if>
|
|
<if test="bomHierarchy != null">bom_hierarchy,</if>
|
|
<if test="projectNo != null">project_no,</if>
|
|
<if test="standardDosage != null">standard_dosage,</if>
|
|
<if test="lossRate != null">loss_rate,</if>
|
|
<if test="lossAmount != null">loss_amount,</if>
|
|
<if test="cilosses != null">cilosses,</if>
|
|
<if test="componentUnit != null">component_unit,</if>
|
|
<if test="componentProFlag != null">component_pro_flag,</if>
|
|
<if test="msi != null">msi,</if>
|
|
<if test="sanka != null">sanka,</if>
|
|
<if test="attr1 != null">attr1,</if>
|
|
<if test="attr2 != null">attr2,</if>
|
|
<if test="attr3 != null">attr3,</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>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="handle != null">#{handle},</if>
|
|
<if test="bomCode != null and bomCode != ''">#{bomCode},</if>
|
|
<if test="site != null">#{site},</if>
|
|
<if test="productCode != null">#{productCode},</if>
|
|
<if test="cumc != null">#{cumc},</if>
|
|
<if test="component != null">#{component},</if>
|
|
<if test="bomHierarchy != null">#{bomHierarchy},</if>
|
|
<if test="projectNo != null">#{projectNo},</if>
|
|
<if test="standardDosage != null">#{standardDosage},</if>
|
|
<if test="lossRate != null">#{lossRate},</if>
|
|
<if test="lossAmount != null">#{lossAmount},</if>
|
|
<if test="cilosses != null">#{cilosses},</if>
|
|
<if test="componentUnit != null">#{componentUnit},</if>
|
|
<if test="componentProFlag != null">#{componentProFlag},</if>
|
|
<if test="msi != null">#{msi},</if>
|
|
<if test="sanka != null">#{sanka},</if>
|
|
<if test="attr1 != null">#{attr1},</if>
|
|
<if test="attr2 != null">#{attr2},</if>
|
|
<if test="attr3 != null">#{attr3},</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>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateBaseBomComponent" parameterType="BaseBomComponent">
|
|
update base_bom_component
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="bomCode != null and bomCode != ''">bom_code = #{bomCode},</if>
|
|
<if test="site != null">site = #{site},</if>
|
|
<if test="productCode != null">product_code = #{productCode},</if>
|
|
<if test="cumc != null">cumc = #{cumc},</if>
|
|
<if test="component != null">component = #{component},</if>
|
|
<if test="bomHierarchy != null">bom_hierarchy = #{bomHierarchy},</if>
|
|
<if test="projectNo != null">project_no = #{projectNo},</if>
|
|
<if test="standardDosage != null">standard_dosage = #{standardDosage},</if>
|
|
<if test="lossRate != null">loss_rate = #{lossRate},</if>
|
|
<if test="lossAmount != null">loss_amount = #{lossAmount},</if>
|
|
<if test="cilosses != null">cilosses = #{cilosses},</if>
|
|
<if test="componentUnit != null">component_unit = #{componentUnit},</if>
|
|
<if test="componentProFlag != null">component_pro_flag = #{componentProFlag},</if>
|
|
<if test="msi != null">msi = #{msi},</if>
|
|
<if test="sanka != null">sanka = #{sanka},</if>
|
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
|
<if test="attr3 != null">attr3 = #{attr3},</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>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteBaseBomComponentById" parameterType="Long">
|
|
delete from base_bom_component where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteBaseBomComponentByIds" parameterType="String">
|
|
delete from base_bom_component where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{handle}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<select id="selectBomCodeList" parameterType="BaseBomComponent" resultType="java.lang.String">
|
|
select bom_code
|
|
from base_bom
|
|
</select>
|
|
|
|
<select id="selectProductCodeList" parameterType="BaseBomComponent" resultType="java.lang.String">
|
|
select product_code
|
|
from base_bom_component
|
|
order by product_code
|
|
</select>
|
|
|
|
</mapper>
|