From ff6d68f7c7e9fb4fd7b884eb282aa5f9e1a5d0ba Mon Sep 17 00:00:00 2001
From: ZY <zc857179121@qq.com>
Date: 星期三, 18 九月 2024 16:21:47 +0800
Subject: [PATCH] 初步改完,接下来进行测试

---
 src/main/resources/mapper/OrderDetlMapper.xml |   29 ++++++++++++++++++-----------
 1 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/main/resources/mapper/OrderDetlMapper.xml b/src/main/resources/mapper/OrderDetlMapper.xml
index ba0ddf5..14f5809 100644
--- a/src/main/resources/mapper/OrderDetlMapper.xml
+++ b/src/main/resources/mapper/OrderDetlMapper.xml
@@ -187,20 +187,27 @@
         INSERT INTO man_order_detl_log SELECT * FROM man_order_detl WHERE id = #{id}
     </insert>
 
-    <update id="increaseQtyByOrderNo">
+<!--    <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="increaseQtyById">
         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>
+        and id = #{id}
     </update>
 
     <update id="increaseWorkQty">

--
Gitblit v1.9.1