万材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.
 
 
 
 

129 lines
8.8 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.storehouse.mapper.WarehousingInspectionDetailMapper">
<resultMap type="WarehousingInspectionDetail" id="WarehousingInspectionDetailResult">
<result property="warehousingInspectionDetailId" column="warehousing_inspection_detail_id" />
<result property="inNoticeNumber" column="in_notice_number" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="specificationModel" column="specification_model" />
<result property="typeMachine" column="type_machine" />
<result property="materialType" column="material_type" />
<result property="purchasingUnit" column="purchasing_unit" />
<result property="materialQuantity" column="material_quantity" />
<result property="qualifiedQuantity" column="qualified_quantity" />
<result property="unqualifiedQuantity" column="unqualified_quantity" />
<result property="qualificationRate" column="qualification_rate" />
<result property="purchaseExplain" column="purchase_explain" />
<result property="judgmentResults" column="judgment_results" />
<result property="receiptBatchNumber" column="receipt_batch_number" />
<result property="manufacturerBatchNumber" column="manufacturer_batch_number" />
<result property="productionOrderNumber" column="production_order_number" />
<result property="standbyOne" column="standby_one" />
<result property="standbyTwo" column="standby_two" />
</resultMap>
<sql id="selectWarehousingInspectionDetailVo">
select warehousing_inspection_detail_id, in_notice_number, material_code, material_name, specification_model, type_machine, material_type, purchasing_unit, material_quantity, qualified_quantity, unqualified_quantity, qualification_rate, purchase_explain, judgment_results, receipt_batch_number, manufacturer_batch_number, production_order_number, standby_one, standby_two from warehousing_inspection_detail
</sql>
<select id="selectWarehousingInspectionDetailList" parameterType="WarehousingInspectionDetail" resultMap="WarehousingInspectionDetailResult">
<include refid="selectWarehousingInspectionDetailVo"/>
<where>
<if test="inNoticeNumber != null and inNoticeNumber != ''"> and in_notice_number like concat('%', #{inNoticeNumber}, '%')</if>
<if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{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="judgmentResults != null and judgmentResults != ''"> and judgment_results = #{judgmentResults}</if>
</where>
</select>
<select id="selectWarehousingInspectionDetailById" parameterType="Long" resultMap="WarehousingInspectionDetailResult">
<include refid="selectWarehousingInspectionDetailVo"/>
where warehousing_inspection_detail_id = #{warehousingInspectionDetailId}
</select>
<insert id="insertWarehousingInspectionDetail" parameterType="WarehousingInspectionDetail" useGeneratedKeys="true" keyProperty="warehousingInspectionDetailId">
insert into warehousing_inspection_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="inNoticeNumber != null">in_notice_number,</if>
<if test="materialCode != null">material_code,</if>
<if test="materialName != null">material_name,</if>
<if test="specificationModel != null">specification_model,</if>
<if test="typeMachine != null">type_machine,</if>
<if test="materialType != null">material_type,</if>
<if test="purchasingUnit != null">purchasing_unit,</if>
<if test="materialQuantity != null">material_quantity,</if>
<if test="qualifiedQuantity != null">qualified_quantity,</if>
<if test="unqualifiedQuantity != null">unqualified_quantity,</if>
<if test="qualificationRate != null">qualification_rate,</if>
<if test="purchaseExplain != null">purchase_explain,</if>
<if test="judgmentResults != null">judgment_results,</if>
<if test="receiptBatchNumber != null">receipt_batch_number,</if>
<if test="manufacturerBatchNumber != null">manufacturer_batch_number,</if>
<if test="productionOrderNumber != null">production_order_number,</if>
<if test="standbyOne != null">standby_one,</if>
<if test="standbyTwo != null">standby_two,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="inNoticeNumber != null">#{inNoticeNumber},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="materialName != null">#{materialName},</if>
<if test="specificationModel != null">#{specificationModel},</if>
<if test="typeMachine != null">#{typeMachine},</if>
<if test="materialType != null">#{materialType},</if>
<if test="purchasingUnit != null">#{purchasingUnit},</if>
<if test="materialQuantity != null">#{materialQuantity},</if>
<if test="qualifiedQuantity != null">#{qualifiedQuantity},</if>
<if test="unqualifiedQuantity != null">#{unqualifiedQuantity},</if>
<if test="qualificationRate != null">#{qualificationRate},</if>
<if test="purchaseExplain != null">#{purchaseExplain},</if>
<if test="judgmentResults != null">#{judgmentResults},</if>
<if test="receiptBatchNumber != null">#{receiptBatchNumber},</if>
<if test="manufacturerBatchNumber != null">#{manufacturerBatchNumber},</if>
<if test="productionOrderNumber != null">#{productionOrderNumber},</if>
<if test="standbyOne != null">#{standbyOne},</if>
<if test="standbyTwo != null">#{standbyTwo},</if>
</trim>
</insert>
<update id="updateWarehousingInspectionDetail" parameterType="WarehousingInspectionDetail">
update warehousing_inspection_detail
<trim prefix="SET" suffixOverrides=",">
<if test="inNoticeNumber != null">in_notice_number = #{inNoticeNumber},</if>
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="specificationModel != null">specification_model = #{specificationModel},</if>
<if test="typeMachine != null">type_machine = #{typeMachine},</if>
<if test="materialType != null">material_type = #{materialType},</if>
<if test="purchasingUnit != null">purchasing_unit = #{purchasingUnit},</if>
<if test="materialQuantity != null">material_quantity = #{materialQuantity},</if>
<if test="qualifiedQuantity != null">qualified_quantity = #{qualifiedQuantity},</if>
<if test="unqualifiedQuantity != null">unqualified_quantity = #{unqualifiedQuantity},</if>
<if test="qualificationRate != null">qualification_rate = #{qualificationRate},</if>
<if test="purchaseExplain != null">purchase_explain = #{purchaseExplain},</if>
<if test="judgmentResults != null">judgment_results = #{judgmentResults},</if>
<if test="receiptBatchNumber != null">receipt_batch_number = #{receiptBatchNumber},</if>
<if test="manufacturerBatchNumber != null">manufacturer_batch_number = #{manufacturerBatchNumber},</if>
<if test="productionOrderNumber != null">production_order_number = #{productionOrderNumber},</if>
<if test="standbyOne != null">standby_one = #{standbyOne},</if>
<if test="standbyTwo != null">standby_two = #{standbyTwo},</if>
</trim>
where warehousing_inspection_detail_id = #{warehousingInspectionDetailId}
</update>
<delete id="deleteWarehousingInspectionDetailById" parameterType="Long">
delete from warehousing_inspection_detail where warehousing_inspection_detail_id = #{warehousingInspectionDetailId}
</delete>
<delete id="deleteWarehousingInspectionDetailByIds" parameterType="String">
delete from warehousing_inspection_detail where warehousing_inspection_detail_id in
<foreach item="warehousingInspectionDetailId" collection="array" open="(" separator="," close=")">
#{warehousingInspectionDetailId}
</foreach>
</delete>
</mapper>