Files
FT546MWS/ruoyi-admin/src/main/resources/mapper/out/OutStockoutDetailBackMapper.xml
2026-02-24 10:17:20 +08:00

247 lines
16 KiB
XML

<?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.out.outStockoutDetailBack.mapper.OutStockoutDetailBackMapper">
<resultMap type="OutStockoutDetailBack" id="OutStockoutDetailBackResult">
<result property="stockoutDetailId" column="stockout_detail_id" />
<result property="stockoutGuid" column="stockout_guid" />
<result property="stockoutId" column="stockout_id" />
<result property="lotNo" column="lot_no" />
<result property="productGuid" column="product_guid" />
<result property="productId" column="product_id" />
<result property="quantity" column="quantity" />
<result property="quantityX" column="quantity_x" />
<result property="quantityJ" column="quantity_j" />
<result property="assignNum" column="assign_num" />
<result property="assignNumX" column="assign_num_x" />
<result property="assignNumJ" column="assign_num_j" />
<result property="allotQuantity" column="allot_quantity" />
<result property="allotQuantityX" column="allot_quantity_x" />
<result property="allotQuantityJ" column="allot_quantity_j" />
<result property="price" column="price" />
<result property="remark" column="remark" />
<result property="warehouseId" column="warehouse_id" />
<result property="outId" column="out_id" />
<result property="bukechaiQuantity" column="bukechai_quantity" />
<result property="kechaiQuantity" column="kechai_quantity" />
<result property="entryid" column="entryid" />
<result property="flatQuantity" column="flat_quantity" />
<result property="fid" column="fid" />
<result property="erpStockoutId" column="erp_stockout_id" />
<result property="unit" column="unit" />
<result property="spec" column="spec" />
<result property="productName" column="product_name" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
<result property="spare7" column="spare7" />
<result property="spare8" column="spare8" />
<result property="spare9" column="spare9" />
<result property="sendStatus" column="send_status" />
<result property="sendTime" column="send_time" />
<result property="msg" column="msg" />
</resultMap>
<sql id="selectOutStockoutDetailBackVo">
select stockout_detail_id, stockout_guid, stockout_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, assign_num, assign_num_x, assign_num_j, allot_quantity, allot_quantity_x, allot_quantity_j, price, remark, warehouse_id, out_id, bukechai_quantity, kechai_quantity, entryid, flat_quantity, fid, erp_stockout_id, unit, spec, product_name, spare1, spare2, spare3, spare4, spare5, spare6, spare7, spare8, spare9, send_status, send_time, msg from out_stockout_detail_back
</sql>
<select id="selectOutStockoutDetailBackList" parameterType="OutStockoutDetailBack" resultMap="OutStockoutDetailBackResult">
<include refid="selectOutStockoutDetailBackVo"/>
<where>
<if test="stockoutDetailId != null and stockoutDetailId != ''"> and stockout_detail_id = #{stockoutDetailId}</if>
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="quantity != null "> and quantity = #{quantity}</if>
<if test="quantityX != null "> and quantity_x = #{quantityX}</if>
<if test="quantityJ != null "> and quantity_j = #{quantityJ}</if>
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
<if test="assignNumX != null "> and assign_num_x = #{assignNumX}</if>
<if test="assignNumJ != null "> and assign_num_j = #{assignNumJ}</if>
<if test="allotQuantity != null "> and allot_quantity = #{allotQuantity}</if>
<if test="allotQuantityX != null "> and allot_quantity_x = #{allotQuantityX}</if>
<if test="allotQuantityJ != null "> and allot_quantity_j = #{allotQuantityJ}</if>
<if test="price != null and price != ''"> and price = #{price}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="outId != null and outId != ''"> and out_id = #{outId}</if>
<if test="bukechaiQuantity != null and bukechaiQuantity != ''"> and bukechai_quantity = #{bukechaiQuantity}</if>
<if test="kechaiQuantity != null and kechaiQuantity != ''"> and kechai_quantity = #{kechaiQuantity}</if>
<if test="entryid != null and entryid != ''"> and entryid = #{entryid}</if>
<if test="flatQuantity != null and flatQuantity != ''"> and flat_quantity = #{flatQuantity}</if>
<if test="fid != null and fid != ''"> and fid = #{fid}</if>
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
<if test="spare9 != null and spare9 != ''"> and spare9 = #{spare9}</if>
<if test="sendStatus != null and sendStatus != ''"> and send_status = #{sendStatus}</if>
<if test="sendTime != null and sendTime != ''"> and send_time = #{sendTime}</if>
<if test="msg != null and msg != ''"> and msg = #{msg}</if>
</where>
</select>
<select id="selectOutStockoutDetailBackByStockoutDetailId" parameterType="String" resultMap="OutStockoutDetailBackResult">
<include refid="selectOutStockoutDetailBackVo"/>
where stockout_detail_id = #{stockoutDetailId}
</select>
<insert id="insertOutStockoutDetailBack" parameterType="OutStockoutDetailBack">
insert into out_stockout_detail_back
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockoutDetailId != null and stockoutDetailId != ''">stockout_detail_id,</if>
<if test="stockoutGuid != null">stockout_guid,</if>
<if test="stockoutId != null">stockout_id,</if>
<if test="lotNo != null">lot_no,</if>
<if test="productGuid != null">product_guid,</if>
<if test="productId != null">product_id,</if>
<if test="quantity != null">quantity,</if>
<if test="quantityX != null">quantity_x,</if>
<if test="quantityJ != null">quantity_j,</if>
<if test="assignNum != null">assign_num,</if>
<if test="assignNumX != null">assign_num_x,</if>
<if test="assignNumJ != null">assign_num_j,</if>
<if test="allotQuantity != null">allot_quantity,</if>
<if test="allotQuantityX != null">allot_quantity_x,</if>
<if test="allotQuantityJ != null">allot_quantity_j,</if>
<if test="price != null">price,</if>
<if test="remark != null">remark,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="outId != null">out_id,</if>
<if test="bukechaiQuantity != null">bukechai_quantity,</if>
<if test="kechaiQuantity != null">kechai_quantity,</if>
<if test="entryid != null">entryid,</if>
<if test="flatQuantity != null">flat_quantity,</if>
<if test="fid != null">fid,</if>
<if test="erpStockoutId != null">erp_stockout_id,</if>
<if test="unit != null">unit,</if>
<if test="spec != null">spec,</if>
<if test="productName != null">product_name,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare4 != null">spare4,</if>
<if test="spare5 != null">spare5,</if>
<if test="spare6 != null">spare6,</if>
<if test="spare7 != null">spare7,</if>
<if test="spare8 != null">spare8,</if>
<if test="spare9 != null">spare9,</if>
<if test="sendStatus != null">send_status,</if>
<if test="sendTime != null">send_time,</if>
<if test="msg != null">msg,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
<if test="stockoutGuid != null">#{stockoutGuid},</if>
<if test="stockoutId != null">#{stockoutId},</if>
<if test="lotNo != null">#{lotNo},</if>
<if test="productGuid != null">#{productGuid},</if>
<if test="productId != null">#{productId},</if>
<if test="quantity != null">#{quantity},</if>
<if test="quantityX != null">#{quantityX},</if>
<if test="quantityJ != null">#{quantityJ},</if>
<if test="assignNum != null">#{assignNum},</if>
<if test="assignNumX != null">#{assignNumX},</if>
<if test="assignNumJ != null">#{assignNumJ},</if>
<if test="allotQuantity != null">#{allotQuantity},</if>
<if test="allotQuantityX != null">#{allotQuantityX},</if>
<if test="allotQuantityJ != null">#{allotQuantityJ},</if>
<if test="price != null">#{price},</if>
<if test="remark != null">#{remark},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="outId != null">#{outId},</if>
<if test="bukechaiQuantity != null">#{bukechaiQuantity},</if>
<if test="kechaiQuantity != null">#{kechaiQuantity},</if>
<if test="entryid != null">#{entryid},</if>
<if test="flatQuantity != null">#{flatQuantity},</if>
<if test="fid != null">#{fid},</if>
<if test="erpStockoutId != null">#{erpStockoutId},</if>
<if test="unit != null">#{unit},</if>
<if test="spec != null">#{spec},</if>
<if test="productName != null">#{productName},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare4 != null">#{spare4},</if>
<if test="spare5 != null">#{spare5},</if>
<if test="spare6 != null">#{spare6},</if>
<if test="spare7 != null">#{spare7},</if>
<if test="spare8 != null">#{spare8},</if>
<if test="spare9 != null">#{spare9},</if>
<if test="sendStatus != null">#{sendStatus},</if>
<if test="sendTime != null">#{sendTime},</if>
<if test="msg != null">#{msg},</if>
</trim>
</insert>
<update id="updateOutStockoutDetailBack" parameterType="OutStockoutDetailBack">
update out_stockout_detail_back
<trim prefix="SET" suffixOverrides=",">
<if test="stockoutGuid != null">stockout_guid = #{stockoutGuid},</if>
<if test="lotNo != null">lot_no = #{lotNo},</if>
<if test="productGuid != null">product_guid = #{productGuid},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="quantity != null">quantity = #{quantity},</if>
<if test="quantityX != null">quantity_x = #{quantityX},</if>
<if test="quantityJ != null">quantity_j = #{quantityJ},</if>
<if test="assignNum != null">assign_num = #{assignNum},</if>
<if test="assignNumX != null">assign_num_x = #{assignNumX},</if>
<if test="assignNumJ != null">assign_num_j = #{assignNumJ},</if>
<if test="allotQuantity != null">allot_quantity = #{allotQuantity},</if>
<if test="allotQuantityX != null">allot_quantity_x = #{allotQuantityX},</if>
<if test="allotQuantityJ != null">allot_quantity_j = #{allotQuantityJ},</if>
<if test="price != null">price = #{price},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="outId != null">out_id = #{outId},</if>
<if test="bukechaiQuantity != null">bukechai_quantity = #{bukechaiQuantity},</if>
<if test="kechaiQuantity != null">kechai_quantity = #{kechaiQuantity},</if>
<if test="entryid != null">entryid = #{entryid},</if>
<if test="flatQuantity != null">flat_quantity = #{flatQuantity},</if>
<if test="fid != null">fid = #{fid},</if>
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
<if test="unit != null">unit = #{unit},</if>
<if test="spec != null">spec = #{spec},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
<if test="spare6 != null">spare6 = #{spare6},</if>
<if test="spare7 != null">spare7 = #{spare7},</if>
<if test="spare8 != null">spare8 = #{spare8},</if>
<if test="spare9 != null">spare9 = #{spare9},</if>
<if test="sendStatus != null">send_status = #{sendStatus},</if>
<if test="sendTime != null">send_time = #{sendTime},</if>
<if test="msg != null">msg = #{msg},</if>
</trim>
where stockout_id = #{stockoutId}
</update>
<delete id="deleteOutStockoutDetailBackByStockoutDetailId" parameterType="String">
delete from out_stockout_detail_back where stockout_detail_id = #{stockoutDetailId}
</delete>
<delete id="deleteOutStockoutDetailBackByStockoutDetailIds" parameterType="String">
delete from out_stockout_detail_back where stockout_detail_id in
<foreach item="stockoutDetailId" collection="array" open="(" separator="," close=")">
#{stockoutDetailId}
</foreach>
</delete>
</mapper>