入库部分和接口
This commit is contained in:
108
ruoyi-admin/src/main/resources/mapper/api/MoveMsgMapper.xml
Normal file
108
ruoyi-admin/src/main/resources/mapper/api/MoveMsgMapper.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?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.api.moveMsg.mapper.MoveMsgMapper">
|
||||
|
||||
<resultMap type="MoveMsg" id="MoveMsgResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="oldSpace" column="old_space" />
|
||||
<result property="newSpace" column="new_space" />
|
||||
<result property="status" column="status" />
|
||||
<result property="sendTime" column="send_time" />
|
||||
<result property="msg" column="msg" />
|
||||
<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" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMoveMsgVo">
|
||||
select id, tray_code, old_space, new_space, status, send_time, msg, spare1, spare2, spare3, spare4, spare5 from move_msg
|
||||
</sql>
|
||||
|
||||
<select id="selectMoveMsgList" parameterType="MoveMsg" resultMap="MoveMsgResult">
|
||||
<include refid="selectMoveMsgVo"/>
|
||||
<where>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="oldSpace != null and oldSpace != ''"> and old_space = #{oldSpace}</if>
|
||||
<if test="newSpace != null and newSpace != ''"> and new_space = #{newSpace}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="sendTime != null and sendTime != ''"> and send_time = #{sendTime}</if>
|
||||
<if test="msg != null and msg != ''"> and msg = #{msg}</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>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMoveMsgById" parameterType="String" resultMap="MoveMsgResult">
|
||||
<include refid="selectMoveMsgVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMoveMsg" parameterType="MoveMsg">
|
||||
insert into move_msg
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="oldSpace != null">old_space,</if>
|
||||
<if test="newSpace != null">new_space,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="sendTime != null">send_time,</if>
|
||||
<if test="msg != null">msg,</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>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="oldSpace != null">#{oldSpace},</if>
|
||||
<if test="newSpace != null">#{newSpace},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="sendTime != null">#{sendTime},</if>
|
||||
<if test="msg != null">#{msg},</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>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMoveMsg" parameterType="MoveMsg">
|
||||
update move_msg
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="oldSpace != null">old_space = #{oldSpace},</if>
|
||||
<if test="newSpace != null">new_space = #{newSpace},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="sendTime != null">send_time = #{sendTime},</if>
|
||||
<if test="msg != null">msg = #{msg},</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>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMoveMsgById" parameterType="String">
|
||||
delete from move_msg where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMoveMsgByIds" parameterType="String">
|
||||
delete from move_msg where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -146,7 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="classNo != null">class_no = #{classNo},</if>
|
||||
<if test="supplierNo != null">supplier_no = #{supplierNo},</if>
|
||||
<if test="sendStatus != null">send_status = #{sendStatus},</if>
|
||||
<if test="senTime != null">send_time = #{senTime},</if>
|
||||
<if test="sendTime != null">send_time = #{sendTime},</if>
|
||||
<if test="msg != null">msg = #{msg},</if>
|
||||
</trim>
|
||||
where stockin_guid = #{stockinGuid}
|
||||
@@ -165,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectTopInStockin" resultMap="InStockinBackResult">
|
||||
select top(1) *
|
||||
from in_stockin_back where status= 0
|
||||
from in_stockin_back where send_status= 0
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -189,7 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
update in_stockin_detail_back
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockinGuid != null and stockinGuid != ''">stockin_guid = #{stockinGuid},</if>
|
||||
<if test="stockinId != null and stockinId != ''">stockin_id = #{stockinId},</if>
|
||||
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
<if test="productId != null and productId != ''">product_id = #{productId},</if>
|
||||
@@ -222,10 +222,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare9 != null">spare9 = #{spare9},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="sendStatus != null">send_status = #{sendStatus},</if>
|
||||
<if test="senTime != null">send_time = #{senTime},</if>
|
||||
<if test="sendTime != null">send_time = #{sendTime},</if>
|
||||
<if test="msg != null">msg = #{msg},</if>
|
||||
</trim>
|
||||
where stockin_detail_id = #{stockinDetailId}
|
||||
where stockin_id = #{stockinId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteInStockinDetailBackByStockinDetailId" parameterType="String">
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
<?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.outStockoutBack.mapper.OutStockoutBackMapper">
|
||||
|
||||
<resultMap type="OutStockoutBack" id="OutStockoutBackResult">
|
||||
<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="startDate" column="start_date" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
<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="sendStatus" column="send_status" />
|
||||
<result property="sendTime" column="send_time" />
|
||||
<result property="msg" column="msg" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutBackVo">
|
||||
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, start_date, finish_date, spare1, spare2, spare3, spare4, spare5, spare6, spare7, spare8, send_status, send_time, msg from out_stockout_back
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutBackList" parameterType="OutStockoutBack" resultMap="OutStockoutBackResult">
|
||||
<include refid="selectOutStockoutBackVo"/>
|
||||
<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="createDate != null and createDate != ''"> and create_date = #{createDate}</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="startDate != null and startDate != ''"> and start_date = #{startDate}</if>
|
||||
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</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="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="selectOutStockoutBackByStockoutGuid" parameterType="String" resultMap="OutStockoutBackResult">
|
||||
<include refid="selectOutStockoutBackVo"/>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
|
||||
<select id="selelctTopOutStockout" resultMap="OutStockoutBackResult">
|
||||
select top(1)* from out_stockout_back where send_status=0
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockoutBack" parameterType="OutStockoutBack">
|
||||
insert into out_stockout_back
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">stockout_guid,</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
|
||||
<if test="outType != null and outType != ''">out_type,</if>
|
||||
<if test="createDate != null and createDate != ''">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 and status != ''">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="startDate != null">start_date,</if>
|
||||
<if test="finishDate != null">finish_date,</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="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="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">#{outType},</if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate},</if>
|
||||
<if test="departmentNo != null">#{departmentNo},</if>
|
||||
<if test="customerNo != null">#{customerNo},</if>
|
||||
<if test="createManId != null">#{createManId},</if>
|
||||
<if test="status != null and status != ''">#{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="startDate != null">#{startDate},</if>
|
||||
<if test="finishDate != null">#{finishDate},</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="sendStatus != null">#{sendStatus},</if>
|
||||
<if test="sendTime != null">#{sendTime},</if>
|
||||
<if test="msg != null">#{msg},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockoutBack" parameterType="OutStockoutBack">
|
||||
update out_stockout_back
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id = #{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">out_type = #{outType},</if>
|
||||
<if test="createDate != null and createDate != ''">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 and status != ''">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="startDate != null">start_date = #{startDate},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</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="sendStatus != null">send_status = #{sendStatus},</if>
|
||||
<if test="sendTime != null">send_time = #{sendTime},</if>
|
||||
<if test="msg != null">msg = #{msg},</if>
|
||||
</trim>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockoutBackByStockoutGuid" parameterType="String">
|
||||
delete from out_stockout_back where stockout_guid = #{stockoutGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutBackByStockoutGuids" parameterType="String">
|
||||
delete from out_stockout_back where stockout_guid in
|
||||
<foreach item="stockoutGuid" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,247 @@
|
||||
<?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>
|
||||
@@ -29,10 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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" />
|
||||
</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,start_date,finish_date,spare1,spare2,spare3,spare4,spare5 from out_stockout
|
||||
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,start_date,finish_date,spare1,spare2,spare3,spare4,spare5,spare6,spare7,spare8 from out_stockout
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutList" parameterType="OutStockout" resultMap="OutStockoutResult">
|
||||
@@ -68,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare3 != null and spare3 != ''"> and is2.spare3 = #{spare3}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and is2.spare5 = #{spare5}</if>
|
||||
|
||||
|
||||
</where>
|
||||
order by o.create_date desc
|
||||
</select>
|
||||
@@ -100,6 +104,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare3 != null">spare3,</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>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
|
||||
@@ -122,6 +129,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare3 != null">#{spare3},</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>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user