Files
FT542-WMS/ruoyi-admin/src/main/resources/mapper/out/ErpOutStockMapper.xml
2025-12-05 10:18:56 +08:00

189 lines
12 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.ErpOutStock.mapper.ErpOutStockMapper">
<resultMap type="ErpOutStock" id="ErpOutStockResult">
<result property="stockoutId" column="stockout_id" />
<result property="theme" column="theme" />
<result property="warehouse" column="warehouse" />
<result property="applicationDate" column="application_date" />
<result property="confirmTheDate" column="confirm_the_date" />
<result property="outboundRemarks" column="outbound_remarks" />
<result property="outboundCompletionStatus" column="outbound_completion_status" />
<result property="shippingStatus" column="shipping_status" />
<result property="approvalComments" column="approval_comments" />
<result property="addPersonnel" column="add_personnel" />
<result property="status" column="status" />
<result property="approver" column="approver" />
<result property="actualOperationTime" column="actual_operation_time" />
<result property="storekeeper" column="storekeeper" />
<result property="outboundNumber" column="outbound_number" />
<result property="outboundType" column="outbound_type" />
<result property="consignee" column="consignee" />
<result property="landline" column="landline" />
<result property="mobilePhone" column="mobile_phone" />
<result property="address" column="address" />
<result property="postalCode" column="postal_code" />
<result property="hedge" column="hedge" />
<result property="approvalStatus" column="approval_status" />
<result property="productDetails" column="product_details" />
<result property="customerName" column="customer_name" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
</resultMap>
<sql id="selectErpOutStockVo">
select stockout_id, theme, warehouse, application_date, confirm_the_date, outbound_remarks, outbound_completion_status, shipping_status, approval_comments, add_personnel, status, approver, actual_operation_time, storekeeper, outbound_number, outbound_type, consignee, landline, mobile_phone, address, postal_code, hedge, approval_status, product_details, customer_name, spare2, spare3, spare4 from erp_out_stock
</sql>
<select id="selectErpOutStockList" parameterType="ErpOutStock" resultMap="ErpOutStockResult">
<include refid="selectErpOutStockVo"/>
<where>
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
<if test="theme != null and theme != ''"> and theme = #{theme}</if>
<if test="warehouse != null and warehouse != ''"> and warehouse = #{warehouse}</if>
<if test="applicationDate != null and applicationDate != ''"> and application_date = #{applicationDate}</if>
<if test="confirmTheDate != null and confirmTheDate != ''"> and confirm_the_date = #{confirmTheDate}</if>
<if test="outboundRemarks != null and outboundRemarks != ''"> and outbound_remarks = #{outboundRemarks}</if>
<if test="outboundCompletionStatus != null and outboundCompletionStatus != ''"> and outbound_completion_status = #{outboundCompletionStatus}</if>
<if test="shippingStatus != null and shippingStatus != ''"> and shipping_status = #{shippingStatus}</if>
<if test="approvalComments != null and approvalComments != ''"> and approval_comments = #{approvalComments}</if>
<if test="addPersonnel != null and addPersonnel != ''"> and add_personnel = #{addPersonnel}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="approver != null and approver != ''"> and approver = #{approver}</if>
<if test="actualOperationTime != null and actualOperationTime != ''"> and actual_operation_time = #{actualOperationTime}</if>
<if test="storekeeper != null and storekeeper != ''"> and storekeeper = #{storekeeper}</if>
<if test="outboundNumber != null and outboundNumber != ''"> and outbound_number = #{outboundNumber}</if>
<if test="outboundType != null and outboundType != ''"> and outbound_type = #{outboundType}</if>
<if test="consignee != null and consignee != ''"> and consignee = #{consignee}</if>
<if test="landline != null and landline != ''"> and landline = #{landline}</if>
<if test="mobilePhone != null and mobilePhone != ''"> and mobile_phone = #{mobilePhone}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="postalCode != null and postalCode != ''"> and postal_code = #{postalCode}</if>
<if test="hedge != null and hedge != ''"> and hedge = #{hedge}</if>
<if test="approvalStatus != null and approvalStatus != ''"> and approval_status = #{approvalStatus}</if>
<if test="productDetails != null and productDetails != ''"> and product_details = #{productDetails}</if>
<if test="customerName != null and customerName != ''"> and customer_name = #{customerName}</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>
</where>
</select>
<select id="selectErpOutStockByStockoutId" parameterType="String" resultMap="ErpOutStockResult">
<include refid="selectErpOutStockVo"/>
where stockout_id = #{stockoutId}
</select>
<insert id="insertErpOutStock" parameterType="ErpOutStock">
insert into erp_out_stock
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stockoutId != null">stockout_id,</if>
<if test="theme != null">theme,</if>
<if test="warehouse != null">warehouse,</if>
<if test="applicationDate != null">application_date,</if>
<if test="confirmTheDate != null">confirm_the_date,</if>
<if test="outboundRemarks != null">outbound_remarks,</if>
<if test="outboundCompletionStatus != null">outbound_completion_status,</if>
<if test="shippingStatus != null">shipping_status,</if>
<if test="approvalComments != null">approval_comments,</if>
<if test="addPersonnel != null">add_personnel,</if>
<if test="status != null">status,</if>
<if test="approver != null">approver,</if>
<if test="actualOperationTime != null">actual_operation_time,</if>
<if test="storekeeper != null">storekeeper,</if>
<if test="outboundNumber != null">outbound_number,</if>
<if test="outboundType != null">outbound_type,</if>
<if test="consignee != null">consignee,</if>
<if test="landline != null">landline,</if>
<if test="mobilePhone != null">mobile_phone,</if>
<if test="address != null">address,</if>
<if test="postalCode != null">postal_code,</if>
<if test="hedge != null">hedge,</if>
<if test="approvalStatus != null">approval_status,</if>
<if test="productDetails != null">product_details,</if>
<if test="customerName != null">customer_name,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare4 != null">spare4,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stockoutId != null">#{stockoutId},</if>
<if test="theme != null">#{theme},</if>
<if test="warehouse != null">#{warehouse},</if>
<if test="applicationDate != null">#{applicationDate},</if>
<if test="confirmTheDate != null">#{confirmTheDate},</if>
<if test="outboundRemarks != null">#{outboundRemarks},</if>
<if test="outboundCompletionStatus != null">#{outboundCompletionStatus},</if>
<if test="shippingStatus != null">#{shippingStatus},</if>
<if test="approvalComments != null">#{approvalComments},</if>
<if test="addPersonnel != null">#{addPersonnel},</if>
<if test="status != null">#{status},</if>
<if test="approver != null">#{approver},</if>
<if test="actualOperationTime != null">#{actualOperationTime},</if>
<if test="storekeeper != null">#{storekeeper},</if>
<if test="outboundNumber != null">#{outboundNumber},</if>
<if test="outboundType != null">#{outboundType},</if>
<if test="consignee != null">#{consignee},</if>
<if test="landline != null">#{landline},</if>
<if test="mobilePhone != null">#{mobilePhone},</if>
<if test="address != null">#{address},</if>
<if test="postalCode != null">#{postalCode},</if>
<if test="hedge != null">#{hedge},</if>
<if test="approvalStatus != null">#{approvalStatus},</if>
<if test="productDetails != null">#{productDetails},</if>
<if test="customerName != null">#{customerName},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare4 != null">#{spare4},</if>
</trim>
</insert>
<update id="updateErpOutStock" parameterType="ErpOutStock">
update erp_out_stock
<trim prefix="SET" suffixOverrides=",">
<if test="theme != null">theme = #{theme},</if>
<if test="warehouse != null">warehouse = #{warehouse},</if>
<if test="applicationDate != null">application_date = #{applicationDate},</if>
<if test="confirmTheDate != null">confirm_the_date = #{confirmTheDate},</if>
<if test="outboundRemarks != null">outbound_remarks = #{outboundRemarks},</if>
<if test="outboundCompletionStatus != null">outbound_completion_status = #{outboundCompletionStatus},</if>
<if test="shippingStatus != null">shipping_status = #{shippingStatus},</if>
<if test="approvalComments != null">approval_comments = #{approvalComments},</if>
<if test="addPersonnel != null">add_personnel = #{addPersonnel},</if>
<if test="status != null">status = #{status},</if>
<if test="approver != null">approver = #{approver},</if>
<if test="actualOperationTime != null">actual_operation_time = #{actualOperationTime},</if>
<if test="storekeeper != null">storekeeper = #{storekeeper},</if>
<if test="outboundNumber != null">outbound_number = #{outboundNumber},</if>
<if test="outboundType != null">outbound_type = #{outboundType},</if>
<if test="consignee != null">consignee = #{consignee},</if>
<if test="landline != null">landline = #{landline},</if>
<if test="mobilePhone != null">mobile_phone = #{mobilePhone},</if>
<if test="address != null">address = #{address},</if>
<if test="postalCode != null">postal_code = #{postalCode},</if>
<if test="hedge != null">hedge = #{hedge},</if>
<if test="approvalStatus != null">approval_status = #{approvalStatus},</if>
<if test="productDetails != null">product_details = #{productDetails},</if>
<if test="customerName != null">customer_name = #{customerName},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
</trim>
where stockout_id = #{stockoutId}
</update>
<delete id="deleteErpOutStockByStockoutId" parameterType="String">
delete from erp_out_stock where stockout_id = #{stockoutId}
</delete>
<delete id="deleteErpOutStockByStockoutIds" parameterType="String">
delete from erp_out_stock where stockout_id in
<foreach item="stockoutId" collection="array" open="(" separator="," close=")">
#{stockoutId}
</foreach>
</delete>
</mapper>