From ba09c6c753de16da201e4d04ff77c549358c9fc3 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期四, 30 五月 2024 08:55:06 +0800
Subject: [PATCH] #

---
 zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml b/zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml
index e8a6247..05fb103 100644
--- a/zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml
+++ b/zy-asrs-common/src/main/resources/mapper/wms/OrderDetlMapper.xml
@@ -39,6 +39,21 @@
         </choose>
     </select>
 
+    <select id="selectItem2" resultType="com.zy.asrs.common.wms.entity.OrderDetl">
+        select * from wms_order_detl
+        where 1=1
+        and order_no = #{orderNo}
+        and matnr = #{matnr}
+        <choose>
+            <when test="batch != null and batch != ''">
+                and batch = #{batch}
+            </when>
+            <otherwise>
+                and (batch IS NULL OR batch = '')
+            </otherwise>
+        </choose>
+    </select>
+
     <select id="getPakoutPage" resultType="com.zy.asrs.common.wms.entity.OrderDetl">
         select
         mod.*
@@ -86,4 +101,36 @@
         </choose>
     </update>
 
+    <update id="increaseQtyByOrderNo">
+        update wms_order_detl
+        set qty = qty + #{qty}
+        where 1=1
+        and order_no = #{orderNo}
+        and matnr = #{matnr}
+        <choose>
+            <when test="batch != null and batch != ''">
+                and batch = #{batch}
+            </when>
+            <otherwise>
+                and (batch IS NULL OR batch = '')
+            </otherwise>
+        </choose>
+    </update>
+
+    <update id="increaseWorkQtyByOrderNo">
+        update wms_order_detl
+        set work_qty = work_qty + #{qty}
+        where 1=1
+        and order_no = #{orderNo}
+        and matnr = #{matnr}
+        <choose>
+            <when test="batch != null and batch != ''">
+                and batch = #{batch}
+            </when>
+            <otherwise>
+                and (batch IS NULL OR batch = '')
+            </otherwise>
+        </choose>
+    </update>
+
 </mapper>

--
Gitblit v1.9.1