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.
136 lines
8.9 KiB
136 lines
8.9 KiB
2 years ago
|
<?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.DeliveryGoodsDetailMapper">
|
||
|
|
||
|
<resultMap type="DeliveryGoodsDetail" id="DeliveryGoodsDetailResult">
|
||
|
<result property="deliveryGoodsDetailId" column="delivery_goods_detail_id" />
|
||
|
<result property="noticeOrderNumber" column="notice_order_number" />
|
||
|
<result property="salesOrderNumber" column="sales_order_number" />
|
||
|
<result property="enterpriseCode" column="enterprise_code" />
|
||
|
<result property="enterpriseName" column="enterprise_name" />
|
||
|
<result property="finishProductCode" column="finish_product_code" />
|
||
|
<result property="finishProductName" column="finish_product_name" />
|
||
|
<result property="specificationModel" column="specification_model" />
|
||
|
<result property="customerNumber" column="customer_number" />
|
||
|
<result property="typeMachine" column="type_machine" />
|
||
|
<result property="inventoryUnit" column="inventory_unit" />
|
||
|
<result property="commonCurrency" column="common_currency" />
|
||
|
<result property="processPrice" column="process_price" />
|
||
|
<result property="productQuantity" column="product_quantity" />
|
||
|
<result property="amountMoney" column="amount_money" />
|
||
|
<result property="line" column="line" />
|
||
|
<result property="versionNumber" column="version_number" />
|
||
|
<result property="salesExplain" column="sales_explain" />
|
||
|
<result property="standbyOne" column="standby_one" />
|
||
|
<result property="standbyTwo" column="standby_two" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectDeliveryGoodsDetailVo">
|
||
|
select delivery_goods_detail_id, notice_order_number, sales_order_number, enterprise_code, enterprise_name, finish_product_code, finish_product_name, specification_model, customer_number, type_machine, inventory_unit, common_currency, process_price, product_quantity, amount_money, line, version_number, sales_explain, standby_one, standby_two from delivery_goods_detail
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectDeliveryGoodsDetailList" parameterType="DeliveryGoodsDetail" resultMap="DeliveryGoodsDetailResult">
|
||
|
<include refid="selectDeliveryGoodsDetailVo"/>
|
||
|
<where>
|
||
|
<if test="noticeOrderNumber != null and noticeOrderNumber != ''"> and notice_order_number like concat('%', #{noticeOrderNumber}, '%')</if>
|
||
|
<if test="salesOrderNumber != null and salesOrderNumber != ''"> and sales_order_number like concat('%', #{salesOrderNumber}, '%')</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="finishProductCode != null and finishProductCode != ''"> and finish_product_code like concat('%', #{finishProductCode}, '%')</if>
|
||
|
<if test="finishProductName != null and finishProductName != ''"> and finish_product_name like concat('%', #{finishProductName}, '%')</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectDeliveryGoodsDetailById" parameterType="Long" resultMap="DeliveryGoodsDetailResult">
|
||
|
<include refid="selectDeliveryGoodsDetailVo"/>
|
||
|
where delivery_goods_detail_id = #{deliveryGoodsDetailId}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertDeliveryGoodsDetail" parameterType="DeliveryGoodsDetail">
|
||
|
insert into delivery_goods_detail
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="deliveryGoodsDetailId != null">delivery_goods_detail_id,</if>
|
||
|
<if test="noticeOrderNumber != null">notice_order_number,</if>
|
||
|
<if test="salesOrderNumber != null">sales_order_number,</if>
|
||
|
<if test="enterpriseCode != null">enterprise_code,</if>
|
||
|
<if test="enterpriseName != null">enterprise_name,</if>
|
||
|
<if test="finishProductCode != null">finish_product_code,</if>
|
||
|
<if test="finishProductName != null">finish_product_name,</if>
|
||
|
<if test="specificationModel != null">specification_model,</if>
|
||
|
<if test="customerNumber != null">customer_number,</if>
|
||
|
<if test="typeMachine != null">type_machine,</if>
|
||
|
<if test="inventoryUnit != null">inventory_unit,</if>
|
||
|
<if test="commonCurrency != null">common_currency,</if>
|
||
|
<if test="processPrice != null">process_price,</if>
|
||
|
<if test="productQuantity != null">product_quantity,</if>
|
||
|
<if test="amountMoney != null">amount_money,</if>
|
||
|
<if test="line != null">line,</if>
|
||
|
<if test="versionNumber != null">version_number,</if>
|
||
|
<if test="salesExplain != null">sales_explain,</if>
|
||
|
<if test="standbyOne != null">standby_one,</if>
|
||
|
<if test="standbyTwo != null">standby_two,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="deliveryGoodsDetailId != null">#{deliveryGoodsDetailId},</if>
|
||
|
<if test="noticeOrderNumber != null">#{noticeOrderNumber},</if>
|
||
|
<if test="salesOrderNumber != null">#{salesOrderNumber},</if>
|
||
|
<if test="enterpriseCode != null">#{enterpriseCode},</if>
|
||
|
<if test="enterpriseName != null">#{enterpriseName},</if>
|
||
|
<if test="finishProductCode != null">#{finishProductCode},</if>
|
||
|
<if test="finishProductName != null">#{finishProductName},</if>
|
||
|
<if test="specificationModel != null">#{specificationModel},</if>
|
||
|
<if test="customerNumber != null">#{customerNumber},</if>
|
||
|
<if test="typeMachine != null">#{typeMachine},</if>
|
||
|
<if test="inventoryUnit != null">#{inventoryUnit},</if>
|
||
|
<if test="commonCurrency != null">#{commonCurrency},</if>
|
||
|
<if test="processPrice != null">#{processPrice},</if>
|
||
|
<if test="productQuantity != null">#{productQuantity},</if>
|
||
|
<if test="amountMoney != null">#{amountMoney},</if>
|
||
|
<if test="line != null">#{line},</if>
|
||
|
<if test="versionNumber != null">#{versionNumber},</if>
|
||
|
<if test="salesExplain != null">#{salesExplain},</if>
|
||
|
<if test="standbyOne != null">#{standbyOne},</if>
|
||
|
<if test="standbyTwo != null">#{standbyTwo},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateDeliveryGoodsDetail" parameterType="DeliveryGoodsDetail">
|
||
|
update delivery_goods_detail
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="noticeOrderNumber != null">notice_order_number = #{noticeOrderNumber},</if>
|
||
|
<if test="salesOrderNumber != null">sales_order_number = #{salesOrderNumber},</if>
|
||
|
<if test="enterpriseCode != null">enterprise_code = #{enterpriseCode},</if>
|
||
|
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
|
||
|
<if test="finishProductCode != null">finish_product_code = #{finishProductCode},</if>
|
||
|
<if test="finishProductName != null">finish_product_name = #{finishProductName},</if>
|
||
|
<if test="specificationModel != null">specification_model = #{specificationModel},</if>
|
||
|
<if test="customerNumber != null">customer_number = #{customerNumber},</if>
|
||
|
<if test="typeMachine != null">type_machine = #{typeMachine},</if>
|
||
|
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if>
|
||
|
<if test="commonCurrency != null">common_currency = #{commonCurrency},</if>
|
||
|
<if test="processPrice != null">process_price = #{processPrice},</if>
|
||
|
<if test="productQuantity != null">product_quantity = #{productQuantity},</if>
|
||
|
<if test="amountMoney != null">amount_money = #{amountMoney},</if>
|
||
|
<if test="line != null">line = #{line},</if>
|
||
|
<if test="versionNumber != null">version_number = #{versionNumber},</if>
|
||
|
<if test="salesExplain != null">sales_explain = #{salesExplain},</if>
|
||
|
<if test="standbyOne != null">standby_one = #{standbyOne},</if>
|
||
|
<if test="standbyTwo != null">standby_two = #{standbyTwo},</if>
|
||
|
</trim>
|
||
|
where delivery_goods_detail_id = #{deliveryGoodsDetailId}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteDeliveryGoodsDetailById" parameterType="Long">
|
||
|
delete from delivery_goods_detail where delivery_goods_detail_id = #{deliveryGoodsDetailId}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteDeliveryGoodsDetailByIds" parameterType="String">
|
||
|
delete from delivery_goods_detail where delivery_goods_detail_id in
|
||
|
<foreach item="deliveryGoodsDetailId" collection="array" open="(" separator="," close=")">
|
||
|
#{deliveryGoodsDetailId}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|