From 74a80161d264f597b827ef91fcd9230be407d7f4 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期二, 02 九月 2025 16:52:46 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/OrderDetlMapper.xml |   41 ++++++++++++++++++++---------------------
 1 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/src/main/resources/mapper/OrderDetlMapper.xml b/src/main/resources/mapper/OrderDetlMapper.xml
index bb7dc9f..25b6cf8 100644
--- a/src/main/resources/mapper/OrderDetlMapper.xml
+++ b/src/main/resources/mapper/OrderDetlMapper.xml
@@ -98,17 +98,17 @@
     <select id="getPakoutPage" resultMap="BaseResultMap">
         select * from
         (
-            select
-            ROW_NUMBER() over (order by mo.create_time desc) as row,
-            mod.*
-            from man_order_detl mod
-            inner join man_order mo on mod.order_id = mo.id
-            inner join man_doc_type mdt on mo.doc_type = mdt.doc_id
-            where 1=1
-            and mo.settle &lt;= 2
-            and mo.status = 1
-            and mdt.pakout = 1
-            <include refid="pakOutPageCondition"></include>
+        select
+        ROW_NUMBER() over (order by mo.create_time desc) as row,
+        mod.*
+        from man_order_detl mod
+        inner join man_order mo on mod.order_id = mo.id
+        inner join man_doc_type mdt on mo.doc_type = mdt.doc_id
+        where 1=1
+        and mo.settle &lt;= 2
+        and mo.status = 1
+        and mdt.pakout = 1
+        <include refid="pakOutPageCondition"></include>
         ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
     </select>
 
@@ -127,7 +127,7 @@
 
     <update id="increase">
         update man_order_detl
-        set work_qty = work_qty + #{qty}
+        set qty = qty + #{qty}
         where 1=1
         and order_id = #{orderId}
         and matnr = #{matnr}
@@ -147,7 +147,14 @@
         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">
@@ -191,14 +198,6 @@
                 and (batch IS NULL OR batch = '')
             </otherwise>
         </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