From d4c3ebd99e8619c3fc230bb50828e9e762f8dd7a Mon Sep 17 00:00:00 2001
From: zwl <zwl123456>
Date: 星期二, 30 九月 2025 09:23:25 +0800
Subject: [PATCH] 字段完善

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

diff --git a/src/main/resources/mapper/OrderDetlMapper.xml b/src/main/resources/mapper/OrderDetlMapper.xml
index b8e55d7..7ed07e6 100644
--- a/src/main/resources/mapper/OrderDetlMapper.xml
+++ b/src/main/resources/mapper/OrderDetlMapper.xml
@@ -108,6 +108,7 @@
             and mo.settle &lt;= 2
             and mo.status = 1
             and mdt.pakout = 1
+            and mod.status = 1
             <include refid="pakOutPageCondition"></include>
         ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
     </select>
@@ -143,7 +144,7 @@
 
     <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}
@@ -168,6 +169,22 @@
         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
         set work_qty = work_qty + #{workQty}

--
Gitblit v1.9.1