From 00860b3f449e5b3289f2809c199dd56ec75d46e3 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 20 十月 2025 08:57:20 +0800
Subject: [PATCH] 1

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

diff --git a/src/main/resources/mapper/OrderDetlMapper.xml b/src/main/resources/mapper/OrderDetlMapper.xml
index ebca6c0..3cecff7 100644
--- a/src/main/resources/mapper/OrderDetlMapper.xml
+++ b/src/main/resources/mapper/OrderDetlMapper.xml
@@ -142,6 +142,18 @@
             </otherwise>
         </choose>
     </select>
+    <select id="selectCountToAsrByMatnr" resultType="java.lang.Long">
+        SELECT ISNULL(SUM(anfme), 0) FROM asr_loc_detl WHERE matnr = #{matnr}
+        <if test="batch!=null and batch!='' ">
+            and batch = #{batch}
+        </if>
+    </select>
+    <select id="selectCountToManByMatnr" resultType="java.lang.Long">
+        SELECT ISNULL(SUM(anfme), 0) FROM man_loc_detl WHERE matnr = #{matnr}
+        <if test="batch!=null and batch!='' ">
+            and batch = #{batch}
+        </if>
+    </select>
 
     <update id="increase">
         update man_order_detl
@@ -234,4 +246,20 @@
         </choose>
     </update>
 
+    <update id="increaseWorkQtyByOrderNo">
+        update man_order_detl
+        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>
+
 </mapper>

--
Gitblit v1.9.1