万材erp项目
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.

126 lines
8.1 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.SysBomBcpMapper">
<resultMap type="SysBomBcp" id="SysBomBcpResult">
<result property="bomBcpId" column="bom_bcp_id" />
<result property="finishProductCode" column="finish_product_code" />
<result property="versionNumber" column="version_number" />
<result property="bcpCode" column="bcp_code" />
<result property="bcpName" column="bcp_name" />
<result property="bcpVersionNumber" column="bcp_version_number" />
<result property="specificationModel" column="specification_model" />
<result property="inventoryUnit" column="inventory_unit" />
<result property="bcpMaterialConsumption" column="bcp_material_consumption" />
<result property="bcpMaterialLoss" column="bcp_material_loss" />
<result property="customerNumber" column="customer_number" />
<result property="finishedProductQuantity" column="finished_product_quantity" />
<result property="remarks" column="remarks" />
<result property="processingCategory" column="processing_category" />
<result property="standbyOne" column="standby_one" />
<result property="standbyTwo" column="standby_two" />
</resultMap>
<sql id="selectSysBomBcpVo">
select bom_bcp_id, finish_product_code, version_number, bcp_code, bcp_name, bcp_version_number,
specification_model, inventory_unit, bcp_material_consumption, bcp_material_loss, customer_number,
finished_product_quantity, remarks, processing_category, standby_one, standby_two from sys_bom_bcp
</sql>
<select id="selectSysBomBcpList" parameterType="SysBomBcp" resultMap="SysBomBcpResult">
<include refid="selectSysBomBcpVo"/>
<where>
<if test="finishProductCode != null and finishProductCode != ''"> and finish_product_code like concat('%', #{finishProductCode}, '%')</if>
<if test="versionNumber != null and versionNumber != ''"> and version_number like concat('%', #{versionNumber}, '%')</if>
<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="bcpVersionNumber != null and bcpVersionNumber != ''"> and bcp_version_number like concat('%', #{bcpVersionNumber}, '%')</if>
<if test="specificationModel != null and specificationModel != ''"> and specification_model = #{specificationModel}</if>
<if test="inventoryUnit != null and inventoryUnit != ''"> and inventory_unit = #{inventoryUnit}</if>
<if test="bcpMaterialConsumption != null and bcpMaterialConsumption != ''"> and bcp_material_consumption = #{bcpMaterialConsumption}</if>
<if test="bcpMaterialLoss != null and bcpMaterialLoss != ''"> and bcp_material_loss = #{bcpMaterialLoss}</if>
<if test="customerNumber != null and customerNumber != ''"> and customer_number = #{customerNumber}</if>
<if test="finishedProductQuantity != null and finishedProductQuantity != ''"> and finished_product_quantity = #{finishedProductQuantity}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="processingCategory != null and processingCategory != ''"> and processing_category = #{processingCategory}</if>
</where>
</select>
<select id="selectSysBomBcpById" parameterType="Long" resultMap="SysBomBcpResult">
<include refid="selectSysBomBcpVo"/>
where bom_bcp_id = #{bomBcpId}
</select>
<insert id="insertSysBomBcp" parameterType="SysBomBcp" useGeneratedKeys="true" keyProperty="bomBcpId">
insert into sys_bom_bcp
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="finishProductCode != null">finish_product_code,</if>
<if test="versionNumber != null">version_number,</if>
<if test="bcpCode != null">bcp_code,</if>
<if test="bcpName != null">bcp_name,</if>
<if test="bcpVersionNumber != null">bcp_version_number,</if>
<if test="specificationModel != null">specification_model,</if>
<if test="inventoryUnit != null">inventory_unit,</if>
<if test="bcpMaterialConsumption != null">bcp_material_consumption,</if>
<if test="bcpMaterialLoss != null">bcp_material_loss,</if>
<if test="customerNumber != null">customer_number,</if>
<if test="finishedProductQuantity != null">finished_product_quantity,</if>
<if test="remarks != null">remarks,</if>
<if test="processingCategory != null">processing_category,</if>
<if test="standbyOne != null">standby_one,</if>
<if test="standbyTwo != null">standby_two,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="finishProductCode != null">#{finishProductCode},</if>
<if test="versionNumber != null">#{versionNumber},</if>
<if test="bcpCode != null">#{bcpCode},</if>
<if test="bcpName != null">#{bcpName},</if>
<if test="bcpVersionNumber != null">#{bcpVersionNumber},</if>
<if test="specificationModel != null">#{specificationModel},</if>
<if test="inventoryUnit != null">#{inventoryUnit},</if>
<if test="bcpMaterialConsumption != null">#{bcpMaterialConsumption},</if>
<if test="bcpMaterialLoss != null">#{bcpMaterialLoss},</if>
<if test="customerNumber != null">#{customerNumber},</if>
<if test="finishedProductQuantity != null">#{finishedProductQuantity},</if>
<if test="remarks != null">#{remarks},</if>
<if test="processingCategory != null">#{processingCategory},</if>
<if test="standbyOne != null">#{standbyOne},</if>
<if test="standbyTwo != null">#{standbyTwo},</if>
</trim>
</insert>
<update id="updateSysBomBcp" parameterType="SysBomBcp">
update sys_bom_bcp
<trim prefix="SET" suffixOverrides=",">
<if test="finishProductCode != null">finish_product_code = #{finishProductCode},</if>
<if test="versionNumber != null">version_number = #{versionNumber},</if>
<if test="bcpCode != null">bcp_code = #{bcpCode},</if>
<if test="bcpName != null">bcp_name = #{bcpName},</if>
<if test="bcpVersionNumber != null">bcp_version_number = #{bcpVersionNumber},</if>
<if test="specificationModel != null">specification_model = #{specificationModel},</if>
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if>
<if test="bcpMaterialConsumption != null">bcp_material_consumption = #{bcpMaterialConsumption},</if>
<if test="bcpMaterialLoss != null">bcp_material_loss = #{bcpMaterialLoss},</if>
<if test="customerNumber != null">customer_number = #{customerNumber},</if>
<if test="finishedProductQuantity != null">finished_product_quantity = #{finishedProductQuantity},</if>
<if test="remarks != null">remarks = #{remarks},</if>
<if test="processingCategory != null">processing_category = #{processingCategory},</if>
<if test="standbyOne != null">standby_one = #{standbyOne},</if>
<if test="standbyTwo != null">standby_two = #{standbyTwo},</if>
</trim>
where bom_bcp_id = #{bomBcpId}
</update>
<delete id="deleteSysBomBcpById" parameterType="Long">
delete from sys_bom_bcp where bom_bcp_id = #{bomBcpId}
</delete>
<delete id="deleteSysBomBcpByIds" parameterType="String">
delete from sys_bom_bcp where bom_bcp_id in
<foreach item="bomBcpId" collection="array" open="(" separator="," close=")">
#{bomBcpId}
</foreach>
</delete>
</mapper>