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.
213 lines
12 KiB
213 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.ck.mapper.BcpBomMapper">
|
|
|
|
<resultMap type="BcpBom" id="BcpBomResult">
|
|
<result property="bcpCode" column="BCP_CODE" />
|
|
<result property="bcpName" column="BCP_NAME" />
|
|
<result property="bcpType" column="BCP_TYPE" />
|
|
<result property="bcpMachineNo" column="BCP_Machine_NO" />
|
|
<result property="bcpDw" column="BCP_DW" />
|
|
<result property="wlCode" column="Wl_Code" />
|
|
<result property="Itemname" column="Itemname" />
|
|
<result property="Itemstandard" column="Itemstandard" />
|
|
<result property="stockDw" column="Stock_dw" />
|
|
<result property="useNum" column="Use_Num" />
|
|
<result property="lostpre" column="lostpre" />
|
|
<result property="zpGuige" column="zp_guige" />
|
|
<result property="zpUseNum" column="zp_use_num" />
|
|
<result property="mQty" column="m_qty" />
|
|
<result property="memolist" column="memolist" />
|
|
<result property="pno" column="pno" />
|
|
<result property="Addtime" column="Addtime" />
|
|
<result property="mouldNo" column="Mould_No" />
|
|
<result property="comfirmFlag" column="Comfirm_Flag" />
|
|
<result property="comfirmMan" column="Comfirm_man" />
|
|
<result property="comfirmDate" column="Comfirm_date" />
|
|
<result property="writeMan" column="write_man" />
|
|
<result property="GongCha" column="GongCha" />
|
|
<result property="factoryMouldNo" column="Factory_Mould_no" />
|
|
<result property="mainMaterial" column="Main_Material" />
|
|
<result property="gongchaMore" column="gongcha_more" />
|
|
<result property="gongchaSmall" column="gongcha_small" />
|
|
<result property="changtime" column="changtime" />
|
|
<result property="cpNum" column="CP_NUM" />
|
|
<result property="worklineclass" column="worklineclass" />
|
|
</resultMap>
|
|
|
|
<sql id="selectBcpBomVo">
|
|
select BCP_CODE, BCP_NAME, BCP_TYPE, BCP_Machine_NO, BCP_DW, Wl_Code, Itemname, Itemstandard, Stock_dw, Use_Num, lostpre, zp_guige, zp_use_num, m_qty, memolist, pno, Addtime, Mould_No, Comfirm_Flag, Comfirm_man, Comfirm_date, write_man, GongCha, Factory_Mould_no, Main_Material, gongcha_more, gongcha_small, changtime, CP_NUM, worklineclass from bcp_bom
|
|
</sql>
|
|
|
|
<select id="selectBcpBomList" parameterType="BcpBom" resultMap="BcpBomResult">
|
|
<include refid="selectBcpBomVo"/>
|
|
<where>
|
|
<if test="bcpCode != null and bcpCode != ''"> and BCP_CODE = #{bcpCode}</if>
|
|
<if test="bcpName != null and bcpName != ''"> and BCP_NAME like concat('%', #{bcpName}, '%')</if>
|
|
<if test="bcpType != null and bcpType != ''"> and BCP_TYPE = #{bcpType}</if>
|
|
<if test="bcpMachineNo != null and bcpMachineNo != ''"> and BCP_Machine_NO = #{bcpMachineNo}</if>
|
|
<if test="bcpDw != null and bcpDw != ''"> and BCP_DW = #{bcpDw}</if>
|
|
<if test="wlCode != null and wlCode != ''"> and Wl_Code = #{wlCode}</if>
|
|
<if test="Itemname != null and Itemname != ''"> and Itemname like concat('%', #{Itemname}, '%')</if>
|
|
<if test="Itemstandard != null and Itemstandard != ''"> and Itemstandard = #{Itemstandard}</if>
|
|
<if test="stockDw != null and stockDw != ''"> and Stock_dw = #{stockDw}</if>
|
|
<if test="useNum != null "> and Use_Num = #{useNum}</if>
|
|
<if test="lostpre != null "> and lostpre = #{lostpre}</if>
|
|
<if test="zpGuige != null and zpGuige != ''"> and zp_guige = #{zpGuige}</if>
|
|
<if test="zpUseNum != null "> and zp_use_num = #{zpUseNum}</if>
|
|
<if test="mQty != null "> and m_qty = #{mQty}</if>
|
|
<if test="memolist != null and memolist != ''"> and memolist = #{memolist}</if>
|
|
<if test="pno != null and pno != ''"> and pno = #{pno}</if>
|
|
<if test="Addtime != null "> and Addtime = #{Addtime}</if>
|
|
<if test="mouldNo != null and mouldNo != ''"> and Mould_No = #{mouldNo}</if>
|
|
<if test="comfirmFlag != null "> and Comfirm_Flag = #{comfirmFlag}</if>
|
|
<if test="comfirmMan != null and comfirmMan != ''"> and Comfirm_man = #{comfirmMan}</if>
|
|
<if test="comfirmDate != null "> and Comfirm_date = #{comfirmDate}</if>
|
|
<if test="writeMan != null and writeMan != ''"> and write_man = #{writeMan}</if>
|
|
<if test="GongCha != null and GongCha != ''"> and GongCha = #{GongCha}</if>
|
|
<if test="factoryMouldNo != null and factoryMouldNo != ''"> and Factory_Mould_no = #{factoryMouldNo}</if>
|
|
<if test="mainMaterial != null "> and Main_Material = #{mainMaterial}</if>
|
|
<if test="gongchaMore != null "> and gongcha_more = #{gongchaMore}</if>
|
|
<if test="gongchaSmall != null "> and gongcha_small = #{gongchaSmall}</if>
|
|
<if test="changtime != null "> and changtime = #{changtime}</if>
|
|
<if test="cpNum != null "> and CP_NUM = #{cpNum}</if>
|
|
<if test="worklineclass != null and worklineclass != ''"> and worklineclass = #{worklineclass}</if>
|
|
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectBomGroupByBcpCode" parameterType="BcpBom" resultMap="BcpBomResult">
|
|
<include refid="selectBcpBomVo"/>
|
|
<where>
|
|
<if test="bcpCode != null and bcpCode != ''"> and BCP_CODE like concat('%', #{bcpCode}, '%')</if>
|
|
<if test="bcpName != null and bcpName != ''"> and BCP_NAME like concat('%', #{bcpName}, '%')</if>
|
|
<if test="bcpType != null and bcpType != ''"> and BCP_TYPE = #{bcpType}</if>
|
|
<if test="bcpMachineNo != null and bcpMachineNo != ''"> and BCP_Machine_NO = #{bcpMachineNo}</if>
|
|
</where>
|
|
group by BCP_CODE
|
|
</select>
|
|
|
|
<select id="selectBcpBomById" parameterType="String" resultMap="BcpBomResult">
|
|
<include refid="selectBcpBomVo"/>
|
|
where BCP_CODE = #{bcpCode}
|
|
</select>
|
|
|
|
|
|
<insert id="insertBcpBom" parameterType="BcpBom">
|
|
insert into bcp_bom
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="bcpCode != null">BCP_CODE,</if>
|
|
<if test="bcpName != null">BCP_NAME,</if>
|
|
<if test="bcpType != null">BCP_TYPE,</if>
|
|
<if test="bcpMachineNo != null">BCP_Machine_NO,</if>
|
|
<if test="bcpDw != null">BCP_DW,</if>
|
|
<if test="wlCode != null">Wl_Code,</if>
|
|
<if test="Itemname != null">Itemname,</if>
|
|
<if test="Itemstandard != null">Itemstandard,</if>
|
|
<if test="stockDw != null">Stock_dw,</if>
|
|
<if test="useNum != null">Use_Num,</if>
|
|
<if test="lostpre != null">lostpre,</if>
|
|
<if test="zpGuige != null">zp_guige,</if>
|
|
<if test="zpUseNum != null">zp_use_num,</if>
|
|
<if test="mQty != null">m_qty,</if>
|
|
<if test="memolist != null">memolist,</if>
|
|
<if test="pno != null">pno,</if>
|
|
<if test="Addtime != null">Addtime,</if>
|
|
<if test="mouldNo != null">Mould_No,</if>
|
|
<if test="comfirmFlag != null">Comfirm_Flag,</if>
|
|
<if test="comfirmMan != null">Comfirm_man,</if>
|
|
<if test="comfirmDate != null">Comfirm_date,</if>
|
|
<if test="writeMan != null">write_man,</if>
|
|
<if test="GongCha != null">GongCha,</if>
|
|
<if test="factoryMouldNo != null">Factory_Mould_no,</if>
|
|
<if test="mainMaterial != null">Main_Material,</if>
|
|
<if test="gongchaMore != null">gongcha_more,</if>
|
|
<if test="gongchaSmall != null">gongcha_small,</if>
|
|
<if test="changtime != null">changtime,</if>
|
|
<if test="cpNum != null">CP_NUM,</if>
|
|
<if test="worklineclass != null">worklineclass,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="bcpCode != null">#{bcpCode},</if>
|
|
<if test="bcpName != null">#{bcpName},</if>
|
|
<if test="bcpType != null">#{bcpType},</if>
|
|
<if test="bcpMachineNo != null">#{bcpMachineNo},</if>
|
|
<if test="bcpDw != null">#{bcpDw},</if>
|
|
<if test="wlCode != null">#{wlCode},</if>
|
|
<if test="Itemname != null">#{Itemname},</if>
|
|
<if test="Itemstandard != null">#{Itemstandard},</if>
|
|
<if test="stockDw != null">#{stockDw},</if>
|
|
<if test="useNum != null">#{useNum},</if>
|
|
<if test="lostpre != null">#{lostpre},</if>
|
|
<if test="zpGuige != null">#{zpGuige},</if>
|
|
<if test="zpUseNum != null">#{zpUseNum},</if>
|
|
<if test="mQty != null">#{mQty},</if>
|
|
<if test="memolist != null">#{memolist},</if>
|
|
<if test="pno != null">#{pno},</if>
|
|
<if test="Addtime != null">#{Addtime},</if>
|
|
<if test="mouldNo != null">#{mouldNo},</if>
|
|
<if test="comfirmFlag != null">#{comfirmFlag},</if>
|
|
<if test="comfirmMan != null">#{comfirmMan},</if>
|
|
<if test="comfirmDate != null">#{comfirmDate},</if>
|
|
<if test="writeMan != null">#{writeMan},</if>
|
|
<if test="GongCha != null">#{GongCha},</if>
|
|
<if test="factoryMouldNo != null">#{factoryMouldNo},</if>
|
|
<if test="mainMaterial != null">#{mainMaterial},</if>
|
|
<if test="gongchaMore != null">#{gongchaMore},</if>
|
|
<if test="gongchaSmall != null">#{gongchaSmall},</if>
|
|
<if test="changtime != null">#{changtime},</if>
|
|
<if test="cpNum != null">#{cpNum},</if>
|
|
<if test="worklineclass != null">#{worklineclass},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateBcpBom" parameterType="BcpBom">
|
|
update bcp_bom
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="bcpName != null">BCP_NAME = #{bcpName},</if>
|
|
<if test="bcpType != null">BCP_TYPE = #{bcpType},</if>
|
|
<if test="bcpMachineNo != null">BCP_Machine_NO = #{bcpMachineNo},</if>
|
|
<if test="bcpDw != null">BCP_DW = #{bcpDw},</if>
|
|
<if test="wlCode != null">Wl_Code = #{wlCode},</if>
|
|
<if test="Itemname != null">Itemname = #{Itemname},</if>
|
|
<if test="Itemstandard != null">Itemstandard = #{Itemstandard},</if>
|
|
<if test="stockDw != null">Stock_dw = #{stockDw},</if>
|
|
<if test="useNum != null">Use_Num = #{useNum},</if>
|
|
<if test="lostpre != null">lostpre = #{lostpre},</if>
|
|
<if test="zpGuige != null">zp_guige = #{zpGuige},</if>
|
|
<if test="zpUseNum != null">zp_use_num = #{zpUseNum},</if>
|
|
<if test="mQty != null">m_qty = #{mQty},</if>
|
|
<if test="memolist != null">memolist = #{memolist},</if>
|
|
<if test="pno != null">pno = #{pno},</if>
|
|
<if test="Addtime != null">Addtime = #{Addtime},</if>
|
|
<if test="mouldNo != null">Mould_No = #{mouldNo},</if>
|
|
<if test="comfirmFlag != null">Comfirm_Flag = #{comfirmFlag},</if>
|
|
<if test="comfirmMan != null">Comfirm_man = #{comfirmMan},</if>
|
|
<if test="comfirmDate != null">Comfirm_date = #{comfirmDate},</if>
|
|
<if test="writeMan != null">write_man = #{writeMan},</if>
|
|
<if test="GongCha != null">GongCha = #{GongCha},</if>
|
|
<if test="factoryMouldNo != null">Factory_Mould_no = #{factoryMouldNo},</if>
|
|
<if test="mainMaterial != null">Main_Material = #{mainMaterial},</if>
|
|
<if test="gongchaMore != null">gongcha_more = #{gongchaMore},</if>
|
|
<if test="gongchaSmall != null">gongcha_small = #{gongchaSmall},</if>
|
|
<if test="changtime != null">changtime = #{changtime},</if>
|
|
<if test="cpNum != null">CP_NUM = #{cpNum},</if>
|
|
<if test="worklineclass != null">worklineclass = #{worklineclass},</if>
|
|
</trim>
|
|
where BCP_CODE = #{bcpCode}
|
|
</update>
|
|
|
|
<delete id="deleteBcpBomById" parameterType="String">
|
|
delete from bcp_bom where BCP_CODE = #{bcpCode}
|
|
</delete>
|
|
|
|
<delete id="deleteBcpBomByIds" parameterType="String">
|
|
delete from bcp_bom where BCP_CODE in
|
|
<foreach item="bcpCode" collection="array" open="(" separator="," close=")">
|
|
#{bcpCode}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper>
|