From 4e2b44115f857b1172521b7a29bc51afc357d819 Mon Sep 17 00:00:00 2001
From: 18516761980 <tqsxp@163.com>
Date: 星期三, 30 十一月 2022 08:32:15 +0800
Subject: [PATCH] Merge remote-tracking branch 'aliyun/hylyasrs' into hylyasrs

---
 src/main/resources/mapper/OrderDetlMapper.xml |   37 +++++++++++++++++++++++++++----------
 1 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/src/main/resources/mapper/OrderDetlMapper.xml b/src/main/resources/mapper/OrderDetlMapper.xml
index b8e55d7..bb7dc9f 100644
--- a/src/main/resources/mapper/OrderDetlMapper.xml
+++ b/src/main/resources/mapper/OrderDetlMapper.xml
@@ -127,7 +127,7 @@
 
     <update id="increase">
         update man_order_detl
-        set qty = qty + #{qty}
+        set work_qty = work_qty + #{qty}
         where 1=1
         and order_id = #{orderId}
         and matnr = #{matnr}
@@ -143,18 +143,11 @@
 
     <update id="decrease">
         update man_order_detl
-        set qty = qty - #{qty}
+        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>
 
     <update id="modifyStatus">
@@ -167,6 +160,22 @@
     <insert id="addToLogTable">
         INSERT INTO man_order_detl_log SELECT * FROM man_order_detl WHERE id = #{id}
     </insert>
+
+    <update id="increaseQtyByOrderNo">
+        update man_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="increaseWorkQty">
         update man_order_detl
@@ -184,4 +193,12 @@
         </choose>
     </update>
 
+    <update id="increaseWorkQtytest">
+        update man_order_detl
+        set work_qty = work_qty + #{anfme}
+        where 1=1
+        and order_no = #{orderNo}
+        and matnr = #{matnr};
+    </update>
+
 </mapper>

--
Gitblit v1.9.1