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

123 lines
7.9 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.manufacture.mapper.DeliveryGoodsNoticeMapper">
<resultMap type="DeliveryGoodsNotice" id="DeliveryGoodsNoticeResult">
<result property="deliveryGoodsNoticeId" column="delivery_goods_notice_id" />
<result property="noticeOrderNumber" column="notice_order_number" />
<result property="deliveryDate" column="delivery_date" />
<result property="enterpriseCode" column="enterprise_code" />
<result property="enterpriseName" column="enterprise_name" />
<result property="customerContact" column="customer_contact" />
<result property="customerFactory" column="customer_factory" />
<result property="deliveryAddress" column="delivery_address" />
<result property="exportSales" column="export_sales" />
<result property="stockNumber" column="stock_number" />
<result property="stockName" column="stock_name" />
<result property="remarks" column="remarks" />
<result property="voucherPreparation" column="voucher_preparation" />
<result property="deliveryGoodsFlag" column="delivery_goods_flag" />
<result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" />
<result property="standbyOne" column="standby_one" />
<result property="standbyTwo" column="standby_two" />
</resultMap>
<sql id="selectDeliveryGoodsNoticeVo">
select delivery_goods_notice_id, notice_order_number, delivery_date, enterprise_code, enterprise_name, customer_contact, customer_factory, delivery_address, export_sales, stock_number, stock_name, remarks, voucher_preparation, delivery_goods_flag, first_add_time, update_info_time, standby_one, standby_two from delivery_goods_notice
</sql>
<select id="selectDeliveryGoodsNoticeList" parameterType="DeliveryGoodsNotice" resultMap="DeliveryGoodsNoticeResult">
<include refid="selectDeliveryGoodsNoticeVo"/>
<where>
<if test="noticeOrderNumber != null and noticeOrderNumber != ''"> and notice_order_number like concat('%', #{noticeOrderNumber}, '%')</if>
<if test="deliveryDate != null and deliveryDate != ''"> and delivery_date like concat('%', #{deliveryDate}, '%')</if>
<if test="enterpriseCode != null and enterpriseCode != ''"> and enterprise_code like concat('%', #{enterpriseCode}, '%')</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="exportSales != null and exportSales != ''"> and export_sales = #{exportSales}</if>
<if test="deliveryGoodsFlag != null and deliveryGoodsFlag != ''"> and delivery_goods_flag = #{deliveryGoodsFlag}</if>
</where>
</select>
<select id="selectDeliveryGoodsNoticeById" parameterType="Long" resultMap="DeliveryGoodsNoticeResult">
<include refid="selectDeliveryGoodsNoticeVo"/>
where delivery_goods_notice_id = #{deliveryGoodsNoticeId}
</select>
<insert id="insertDeliveryGoodsNotice" parameterType="DeliveryGoodsNotice" useGeneratedKeys="true" keyProperty="deliveryGoodsNoticeId">
insert into delivery_goods_notice
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="noticeOrderNumber != null and noticeOrderNumber != ''">notice_order_number,</if>
<if test="deliveryDate != null">delivery_date,</if>
<if test="enterpriseCode != null and enterpriseCode != ''">enterprise_code,</if>
<if test="enterpriseName != null and enterpriseName != ''">enterprise_name,</if>
<if test="customerContact != null">customer_contact,</if>
<if test="customerFactory != null">customer_factory,</if>
<if test="deliveryAddress != null">delivery_address,</if>
<if test="exportSales != null">export_sales,</if>
<if test="stockNumber != null">stock_number,</if>
<if test="stockName != null">stock_name,</if>
<if test="remarks != null">remarks,</if>
<if test="voucherPreparation != null">voucher_preparation,</if>
<if test="deliveryGoodsFlag != null">delivery_goods_flag,</if>
<if test="standbyOne != null">standby_one,</if>
<if test="standbyTwo != null">standby_two,</if>
first_add_time,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="noticeOrderNumber != null and noticeOrderNumber != ''">#{noticeOrderNumber},</if>
<if test="deliveryDate != null">#{deliveryDate},</if>
<if test="enterpriseCode != null and enterpriseCode != ''">#{enterpriseCode},</if>
<if test="enterpriseName != null and enterpriseName != ''">#{enterpriseName},</if>
<if test="customerContact != null">#{customerContact},</if>
<if test="customerFactory != null">#{customerFactory},</if>
<if test="deliveryAddress != null">#{deliveryAddress},</if>
<if test="exportSales != null">#{exportSales},</if>
<if test="stockNumber != null">#{stockNumber},</if>
<if test="stockName != null">#{stockName},</if>
<if test="remarks != null">#{remarks},</if>
<if test="voucherPreparation != null">#{voucherPreparation},</if>
<if test="deliveryGoodsFlag != null">#{deliveryGoodsFlag},</if>
<if test="standbyOne != null">#{standbyOne},</if>
<if test="standbyTwo != null">#{standbyTwo},</if>
NOW(),
</trim>
</insert>
<update id="updateDeliveryGoodsNotice" parameterType="DeliveryGoodsNotice">
update delivery_goods_notice
<trim prefix="SET" suffixOverrides=",">
<if test="noticeOrderNumber != null and noticeOrderNumber != ''">notice_order_number = #{noticeOrderNumber},</if>
<if test="deliveryDate != null">delivery_date = #{deliveryDate},</if>
<if test="enterpriseCode != null and enterpriseCode != ''">enterprise_code = #{enterpriseCode},</if>
<if test="enterpriseName != null and enterpriseName != ''">enterprise_name = #{enterpriseName},</if>
<if test="customerContact != null">customer_contact = #{customerContact},</if>
<if test="customerFactory != null">customer_factory = #{customerFactory},</if>
<if test="deliveryAddress != null">delivery_address = #{deliveryAddress},</if>
<if test="exportSales != null">export_sales = #{exportSales},</if>
<if test="stockNumber != null">stock_number = #{stockNumber},</if>
<if test="stockName != null">stock_name = #{stockName},</if>
<if test="remarks != null">remarks = #{remarks},</if>
<if test="voucherPreparation != null">voucher_preparation = #{voucherPreparation},</if>
<if test="deliveryGoodsFlag != null">delivery_goods_flag = #{deliveryGoodsFlag},</if>
<if test="standbyOne != null">standby_one = #{standbyOne},</if>
<if test="standbyTwo != null">standby_two = #{standbyTwo},</if>
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
</trim>
where delivery_goods_notice_id = #{deliveryGoodsNoticeId}
</update>
<delete id="deleteDeliveryGoodsNoticeById" parameterType="Long">
delete from delivery_goods_notice where delivery_goods_notice_id = #{deliveryGoodsNoticeId}
</delete>
<delete id="deleteDeliveryGoodsNoticeByIds" parameterType="String">
delete from delivery_goods_notice where delivery_goods_notice_id in
<foreach item="deliveryGoodsNoticeId" collection="array" open="(" separator="," close=")">
#{deliveryGoodsNoticeId}
</foreach>
</delete>
</mapper>