|
|
|
@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<mapper namespace="com.op.wms.mapper.BaseBomComponentMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="BaseBomComponent" id="BaseBomComponentResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="handle" column="handle" />
|
|
|
|
|
<result property="bomCode" column="bom_code" />
|
|
|
|
|
<result property="site" column="site" />
|
|
|
|
|
<result property="productCode" column="product_code" />
|
|
|
|
@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseBomComponentVo">
|
|
|
|
|
select id, 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
|
|
|
|
|
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">
|
|
|
|
@ -61,13 +61,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseBomComponentById" parameterType="Long" resultMap="BaseBomComponentResult">
|
|
|
|
|
<include refid="selectBaseBomComponentVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
where handle = #{handle}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertBaseBomComponent" parameterType="BaseBomComponent">
|
|
|
|
|
insert into base_bom_component
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">id,</if>
|
|
|
|
|
<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>
|
|
|
|
@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">#{id},</if>
|
|
|
|
|
<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>
|
|
|
|
@ -157,7 +157,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<delete id="deleteBaseBomComponentByIds" parameterType="String">
|
|
|
|
|
delete from base_bom_component where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
#{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>
|