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

145 lines
9.7 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.stock.mapper.WarehousingPurchaseNoticeMapper">
<resultMap type="WarehousingPurchaseNotice" id="WarehousingPurchaseNoticeResult">
<result property="warehousingpurchasenoticeNo" column="warehousingPurchaseNotice_NO" />
<result property="customerId" column="customer_ID" />
<result property="customerName" column="customer_name" />
<result property="warehousingType" column="warehousing_type" />
<result property="warehousingnoticeDate" column="warehousingNotice_date" />
<result property="purchaseorderNo" column="purchaseOrder_NO" />
<result property="domesticOrExport" column="domesticOrExport" />
<result property="warehouseNo" column="warehouse_NO" />
<result property="warehouseName" column="warehouse_name" />
<result property="itemTimes" column="itemTimes" />
<result property="itemNo" column="item_NO" />
<result property="itemName" column="item_name" />
<result property="specificationModel" column="specificationModel" />
<result property="machineType" column="machine_type" />
<result property="unit" column="unit" />
<result property="warehousingAmt" column="warehousing_amt" />
<result property="purchaseorderAmt" column="purchaseOrder_amt" />
<result property="spell1" column="spell_1" />
<result property="spell2" column="spell_2" />
</resultMap>
<sql id="selectWarehousingPurchaseNoticeVo">
select warehousingPurchaseNotice_NO, customer_ID, customer_name, warehousing_type, warehousingNotice_date, purchaseOrder_NO, domesticOrExport, warehouse_NO, warehouse_name, itemTimes, item_NO, item_name, specificationModel, machine_type, unit, warehousing_amt, purchaseOrder_amt, spell_1, spell_2 from warehousing_purchase_notice
</sql>
<select id="selectWarehousingPurchaseNoticeList" parameterType="WarehousingPurchaseNotice" resultMap="WarehousingPurchaseNoticeResult">
<include refid="selectWarehousingPurchaseNoticeVo"/>
<where>
<if test="warehousingpurchasenoticeNo != null and warehousingpurchasenoticeNo != ''"> and warehousingPurchaseNotice_NO = #{warehousingpurchasenoticeNo}</if>
<if test="customerId != null and customerId != ''"> and customer_ID = #{customerId}</if>
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
<if test="warehousingType != null and warehousingType != ''"> and warehousing_type = #{warehousingType}</if>
<if test="warehousingnoticeDate != null "> and warehousingNotice_date = #{warehousingnoticeDate}</if>
<if test="purchaseorderNo != null and purchaseorderNo != ''"> and purchaseOrder_NO = #{purchaseorderNo}</if>
<if test="domesticOrExport != null and domesticOrExport != ''"> and domesticOrExport = #{domesticOrExport}</if>
<if test="warehouseNo != null and warehouseNo != ''"> and warehouse_NO = #{warehouseNo}</if>
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
<if test="itemTimes != null and itemTimes != ''"> and itemTimes = #{itemTimes}</if>
<if test="itemNo != null and itemNo != ''"> and item_NO = #{itemNo}</if>
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
<if test="specificationModel != null and specificationModel != ''"> and specificationModel = #{specificationModel}</if>
<if test="machineType != null and machineType != ''"> and machine_type = #{machineType}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="warehousingAmt != null and warehousingAmt != ''"> and warehousing_amt = #{warehousingAmt}</if>
<if test="purchaseorderAmt != null and purchaseorderAmt != ''"> and purchaseOrder_amt = #{purchaseorderAmt}</if>
<if test="spell1 != null and spell1 != ''"> and spell_1 = #{spell1}</if>
<if test="spell2 != null and spell2 != ''"> and spell_2 = #{spell2}</if>
</where>
</select>
<select id="selectWarehousingPurchaseNoticeById" parameterType="String" resultMap="WarehousingPurchaseNoticeResult">
<include refid="selectWarehousingPurchaseNoticeVo"/>
where warehousingPurchaseNotice_NO = #{warehousingpurchasenoticeNo}
</select>
<insert id="insertWarehousingPurchaseNotice" parameterType="WarehousingPurchaseNotice">
insert into warehousing_purchase_notice
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="warehousingpurchasenoticeNo != null">warehousingPurchaseNotice_NO,</if>
<if test="customerId != null">customer_ID,</if>
<if test="customerName != null">customer_name,</if>
<if test="warehousingType != null">warehousing_type,</if>
<if test="warehousingnoticeDate != null">warehousingNotice_date,</if>
<if test="purchaseorderNo != null">purchaseOrder_NO,</if>
<if test="domesticOrExport != null">domesticOrExport,</if>
<if test="warehouseNo != null">warehouse_NO,</if>
<if test="warehouseName != null">warehouse_name,</if>
<if test="itemTimes != null">itemTimes,</if>
<if test="itemNo != null">item_NO,</if>
<if test="itemName != null">item_name,</if>
<if test="specificationModel != null">specificationModel,</if>
<if test="machineType != null">machine_type,</if>
<if test="unit != null">unit,</if>
<if test="warehousingAmt != null">warehousing_amt,</if>
<if test="purchaseorderAmt != null">purchaseOrder_amt,</if>
<if test="spell1 != null">spell_1,</if>
<if test="spell2 != null">spell_2,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="warehousingpurchasenoticeNo != null">#{warehousingpurchasenoticeNo},</if>
<if test="customerId != null">#{customerId},</if>
<if test="customerName != null">#{customerName},</if>
<if test="warehousingType != null">#{warehousingType},</if>
<if test="warehousingnoticeDate != null">#{warehousingnoticeDate},</if>
<if test="purchaseorderNo != null">#{purchaseorderNo},</if>
<if test="domesticOrExport != null">#{domesticOrExport},</if>
<if test="warehouseNo != null">#{warehouseNo},</if>
<if test="warehouseName != null">#{warehouseName},</if>
<if test="itemTimes != null">#{itemTimes},</if>
<if test="itemNo != null">#{itemNo},</if>
<if test="itemName != null">#{itemName},</if>
<if test="specificationModel != null">#{specificationModel},</if>
<if test="machineType != null">#{machineType},</if>
<if test="unit != null">#{unit},</if>
<if test="warehousingAmt != null">#{warehousingAmt},</if>
<if test="purchaseorderAmt != null">#{purchaseorderAmt},</if>
<if test="spell1 != null">#{spell1},</if>
<if test="spell2 != null">#{spell2},</if>
</trim>
</insert>
<update id="updateWarehousingPurchaseNotice" parameterType="WarehousingPurchaseNotice">
update warehousing_purchase_notice
<trim prefix="SET" suffixOverrides=",">
<if test="customerId != null">customer_ID = #{customerId},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="warehousingType != null">warehousing_type = #{warehousingType},</if>
<if test="warehousingnoticeDate != null">warehousingNotice_date = #{warehousingnoticeDate},</if>
<if test="purchaseorderNo != null">purchaseOrder_NO = #{purchaseorderNo},</if>
<if test="domesticOrExport != null">domesticOrExport = #{domesticOrExport},</if>
<if test="warehouseNo != null">warehouse_NO = #{warehouseNo},</if>
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
<if test="itemTimes != null">itemTimes = #{itemTimes},</if>
<if test="itemNo != null">item_NO = #{itemNo},</if>
<if test="itemName != null">item_name = #{itemName},</if>
<if test="specificationModel != null">specificationModel = #{specificationModel},</if>
<if test="machineType != null">machine_type = #{machineType},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="warehousingAmt != null">warehousing_amt = #{warehousingAmt},</if>
<if test="purchaseorderAmt != null">purchaseOrder_amt = #{purchaseorderAmt},</if>
<if test="spell1 != null">spell_1 = #{spell1},</if>
<if test="spell2 != null">spell_2 = #{spell2},</if>
</trim>
where warehousingPurchaseNotice_NO = #{warehousingpurchasenoticeNo}
</update>
<delete id="deleteWarehousingPurchaseNoticeById" parameterType="String">
delete from warehousing_purchase_notice where warehousingPurchaseNotice_NO = #{warehousingpurchasenoticeNo}
</delete>
<delete id="deleteWarehousingPurchaseNoticeByIds" parameterType="String">
delete from warehousing_purchase_notice where warehousingPurchaseNotice_NO in
<foreach item="warehousingpurchasenoticeNo" collection="array" open="(" separator="," close=")">
#{warehousingpurchasenoticeNo}
</foreach>
</delete>
</mapper>