194 lines
11 KiB
XML
194 lines
11 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.project.out.outStock.mapper.OutStockoutMapper">
|
|
|
|
<resultMap type="OutStockout" id="OutStockoutResult">
|
|
<result property="stockoutGuid" column="stockout_guid"/>
|
|
<result property="stockoutId" column="stockout_id"/>
|
|
<result property="outType" column="out_type"/>
|
|
<result property="createDate" column="create_date"/>
|
|
<result property="departmentNo" column="department_no"/>
|
|
<result property="customerNo" column="customer_no"/>
|
|
<result property="createManId" column="create_man_id"/>
|
|
<result property="status" column="status"/>
|
|
<result property="stockoutSource" column="stockout_source"/>
|
|
<result property="warehouseId" column="warehouse_id"/>
|
|
<result property="classNowId" column="class_now_id"/>
|
|
<result property="exitId" column="exit_id"/>
|
|
<result property="carNumber" column="car_number"/>
|
|
|
|
<result property="FID" column="FID"/>
|
|
<result property="erpStockoutId" column="erp_stockout_id"/>
|
|
<result property="orgOwner" column="org_owner"/>
|
|
<result property="timeShipPlan" column="time_ship_plan"/>
|
|
|
|
<result property="barCodeList" column="bar_code_list" />
|
|
<result property="trayCodeList" column="tray_code_list" />
|
|
<result property="kdNum" column="kd_num" />
|
|
<result property="requester" column="requester" />
|
|
<result property="requireTime" column="require_time" />
|
|
<result property="isExpedited" column="is_expedited" />
|
|
<result property="deliveryPoint" column="delivery_point"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectOutStockoutVo">
|
|
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,bar_code_list,tray_code_list,org,task_id,kd_num,requester,require_time,is_expedited,time_ship_plan,delivery_point from out_stockout
|
|
</sql>
|
|
|
|
<select id="selectOutStockoutList" parameterType="OutStockout" resultMap="OutStockoutResult">
|
|
<include refid="selectOutStockoutVo"/>
|
|
<where>
|
|
<if test="stockoutGuid != null and stockoutGuid != ''">and stockout_guid = #{stockoutGuid}</if>
|
|
<if test="stockoutId != null and stockoutId != ''">and stockout_id = #{stockoutId}</if>
|
|
<if test="outType != null and outType != ''">and out_type = #{outType}</if>
|
|
<if test="beginDate != null and beginDate != ''">and create_date >= #{beginDate}</if>
|
|
<if test="finishDate != null and finishDate != ''">and create_date <= #{finishDate}</if>
|
|
<if test="departmentNo != null and departmentNo != ''">and department_no = #{departmentNo}</if>
|
|
<if test="customerNo != null and customerNo != ''">and customer_no = #{customerNo}</if>
|
|
<if test="createManId != null and createManId != ''">and create_man_id = #{createManId}</if>
|
|
<if test="status != null and status != ''">and status = #{status}</if>
|
|
<if test="stockoutSource != null and stockoutSource != ''">and stockout_source = #{stockoutSource}</if>
|
|
<if test="warehouseId != null and warehouseId != ''">and warehouse_id = #{warehouseId}</if>
|
|
<if test="classNowId != null and classNowId != ''">and class_now_id = #{classNowId}</if>
|
|
<!--<if test="exitId != null and exitId != ''">and exit_id = #{exitId}</if>-->
|
|
<if test="carNumber != null and carNumber != ''">and car_number = #{carNumber}</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="barCodeList != null and barCodeList != ''">and bar_code_list = #{barCodeList}</if>
|
|
<if test="trayCodeList != null and trayCodeList != ''">and tray_code_list = #{trayCodeList}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectOutStockoutByStockoutGuid" parameterType="String" resultMap="OutStockoutResult">
|
|
<include refid="selectOutStockoutVo"/>
|
|
where stockout_guid = #{stockoutGuid}
|
|
</select>
|
|
|
|
<insert id="insertOutStockout" parameterType="OutStockout">
|
|
insert into out_stockout
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="stockoutGuid != null">stockout_guid,</if>
|
|
<if test="stockoutId != null">stockout_id,</if>
|
|
<if test="outType != null">out_type,</if>
|
|
<if test="createDate != null">create_date,</if>
|
|
<if test="departmentNo != null">department_no,</if>
|
|
<if test="customerNo != null">customer_no,</if>
|
|
<if test="createManId != null">create_man_id,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="stockoutSource != null">stockout_source,</if>
|
|
<if test="warehouseId != null">warehouse_id,</if>
|
|
<if test="classNowId != null">class_now_id,</if>
|
|
<if test="exitId != null">exit_id,</if>
|
|
<if test="carNumber != null">car_number,</if>
|
|
|
|
<if test="FID != null">FID,</if>
|
|
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
|
<if test="orgOwner != null">org_owner,</if>
|
|
<if test="timeShipPlan != null">time_ship_plan,</if>
|
|
<if test="barCodeList != null">bar_code_list,</if>
|
|
<if test="trayCodeList != null">tray_code_list,</if>
|
|
<if test="org != null">org,</if>
|
|
<if test="kdNum != null">kd_num,</if>
|
|
<if test="taskId != null">task_id,</if>
|
|
<if test="requester != null">requester,</if>
|
|
<if test="requireTime != null">require_time,</if>
|
|
<if test="isExpedited != null">is_expedited,</if>
|
|
<if test="deliveryPoint != null">delivery_point,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="stockoutGuid != null">#{stockoutGuid},</if>
|
|
<if test="stockoutId != null">#{stockoutId},</if>
|
|
<if test="outType != null">#{outType},</if>
|
|
<if test="createDate != null">#{createDate},</if>
|
|
<if test="departmentNo != null">#{departmentNo},</if>
|
|
<if test="customerNo != null">#{customerNo},</if>
|
|
<if test="createManId != null">#{createManId},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="stockoutSource != null">#{stockoutSource},</if>
|
|
<if test="warehouseId != null">#{warehouseId},</if>
|
|
<if test="classNowId != null">#{classNowId},</if>
|
|
<if test="exitId != null">#{exitId},</if>
|
|
<if test="carNumber != null">#{carNumber},</if>
|
|
|
|
<if test="FID != null">#{FID},</if>
|
|
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
|
<if test="orgOwner != null">#{orgOwner},</if>
|
|
<if test="timeShipPlan != null">#{timeShipPlan},</if>
|
|
<if test="barCodeList != null">#{barCodeList},</if>
|
|
<if test="trayCodeList != null">#{trayCodeList},</if>
|
|
<if test="org != null">#{org},</if>
|
|
<if test="kdNum != null">#{kdNum},</if>
|
|
<if test="taskId != null">#{taskId},</if>
|
|
<if test="requester != null">#{requester},</if>
|
|
<if test="requireTime != null">#{requireTime},</if>
|
|
<if test="isExpedited != null">#{isExpedited},</if>
|
|
<if test="deliveryPoint != null">#{deliveryPoint},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateOutStockout" parameterType="OutStockout">
|
|
update out_stockout
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="stockoutId != null">stockout_id = #{stockoutId},</if>
|
|
<if test="outType != null">out_type = #{outType},</if>
|
|
<if test="createDate != null">create_date = #{createDate},</if>
|
|
<if test="departmentNo != null">department_no = #{departmentNo},</if>
|
|
<if test="customerNo != null">customer_no = #{customerNo},</if>
|
|
<if test="createManId != null">create_man_id = #{createManId},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="stockoutSource != null">stockout_source = #{stockoutSource},</if>
|
|
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
|
<if test="classNowId != null">class_now_id = #{classNowId},</if>
|
|
<if test="exitId != null">exit_id = #{exitId},</if>
|
|
<if test="carNumber != null">car_number = #{carNumber},</if>
|
|
|
|
<if test="FID != null">FID = #{FID},</if>
|
|
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
|
<if test="isExpedited != null">is_expedited = #{isExpedited},</if>
|
|
<if test="deliveryPoint != null">delivery_point = #{deliveryPoint},</if>
|
|
<if test="timeShipPlan != null">time_ship_plan = #{timeShipPlan},</if>
|
|
<if test="requester != null">requester = #{requester},</if>
|
|
<if test="requireTime != null">require_time = #{requireTime},</if>
|
|
</trim>
|
|
where stockout_guid = #{stockoutGuid}
|
|
</update>
|
|
|
|
<delete id="deleteOutStockoutByStockoutGuid" parameterType="String">
|
|
delete from out_stockout where stockout_guid = #{stockoutGuid}
|
|
</delete>
|
|
|
|
<delete id="deleteOutStockoutByStockoutGuids" parameterType="String">
|
|
delete from out_stockout where stockout_guid in
|
|
<foreach item="stockoutGuid" collection="array" open="(" separator="," close=")">
|
|
#{stockoutGuid}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<update id="updateExitById" parameterType="String">
|
|
update out_stockout set exit_id=#{arg1} where stockout_id=#{arg0}
|
|
</update>
|
|
|
|
<select id="updatedjStatusOut" parameterType="java.util.HashMap" statementType="CALLABLE">
|
|
{call updatdjStatusOut(
|
|
#{outStockId},#{status},#{newStatus},#{v_result,mode=OUT,jdbcType=VARCHAR},#{v_resultString,mode=OUT,jdbcType=VARCHAR})}
|
|
</select>
|
|
|
|
<select id="autoAllocation" parameterType="java.util.HashMap" statementType="CALLABLE">
|
|
{call proc_auto_out_product(
|
|
#{v_stockout_detail_id},#{v_result,mode=OUT,jdbcType=VARCHAR},#{v_resultMsg,mode=OUT,jdbcType=VARCHAR})}
|
|
</select>
|
|
|
|
<select id="selectAttributeFromMesPro" resultType="string" parameterType="String">
|
|
select distinguishing_sign from mes_product where product_id = #{productId}
|
|
</select>
|
|
<select id="selectOutStockoutByStockouId" parameterType="String" resultMap="OutStockoutResult">
|
|
select * from out_stockout
|
|
where stockout_id = #{fillNo}
|
|
</select>
|
|
|
|
</mapper>
|