From df9abb6dfdfc6af92f8fd9134f4d111eae49734c Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期四, 16 二月 2023 13:49:42 +0800
Subject: [PATCH] 修改logo

---
 src/main/resources/mapper/OrderDetlMapper.xml |   33 ++++++++++++++++++++++++++++++---
 1 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/mapper/OrderDetlMapper.xml b/src/main/resources/mapper/OrderDetlMapper.xml
index b8e55d7..57f2b30 100644
--- a/src/main/resources/mapper/OrderDetlMapper.xml
+++ b/src/main/resources/mapper/OrderDetlMapper.xml
@@ -68,7 +68,7 @@
         where 1=1
         and order_no = #{orderNo}
         and matnr = #{matnr}
-        <if test="batch!=null and batch!='' ">
+        <if test="batch!=null">
             and batch = #{batch}
         </if>
     </select>
@@ -124,6 +124,17 @@
         and mdt.pakout = 1
         <include refid="pakOutPageCondition"></include>
     </select>
+    <select id="checkAllDetlFinish" resultType="java.lang.Integer">
+        SELECT count(*) From man_order_detl WHERE qty &lt; anfme and order_no = #{orderNo}
+    </select>
+    <select id="sameOrderComb" resultType="java.lang.Integer">
+        SELECT SUM(anfme) FROM cust_wait_pakin WHERE  1=1
+        <if test="orderNo!=null and orderNo!='' ">
+            and order_no like '%' + #{orderNo} + '%'
+        </if>
+        and matnr = #{matnr}
+        and batch = #{batch}
+    </select>
 
     <update id="increase">
         update man_order_detl
@@ -148,11 +159,11 @@
         and order_no = #{orderNo}
         and matnr = #{matnr}
         <choose>
-            <when test="batch != null and batch != ''">
+            <when test="batch != null">
                 and batch = #{batch}
             </when>
             <otherwise>
-                and (batch IS NULL OR batch = '')
+                and (batch IS NULL )
             </otherwise>
         </choose>
     </update>
@@ -168,6 +179,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