From 8e943b7104561c3b14cf223016698709c5ade4b5 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期二, 03 二月 2026 15:37:26 +0800
Subject: [PATCH] #pda料箱组托和换码

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

diff --git a/src/main/resources/mapper/WrkDetlMapper.xml b/src/main/resources/mapper/WrkDetlMapper.xml
index 037f5ed..5894eba 100644
--- a/src/main/resources/mapper/WrkDetlMapper.xml
+++ b/src/main/resources/mapper/WrkDetlMapper.xml
@@ -56,6 +56,14 @@
                 and (batch IS NULL OR batch = '')
             </otherwise>
         </choose>
+        <choose>
+            <when test="barcode != null and barcode != ''">
+                and barcode = #{barcode}
+            </when>
+            <otherwise>
+                and (barcode IS NULL OR barcode = '')
+            </otherwise>
+        </choose>
     </sql>
 
 
@@ -79,6 +87,12 @@
         and wrk_no = #{wrkNo}
         and matnr = #{matnr}
         <include refid="batchSeq"></include>
+    </update>
+    <update id="updateBuyerLabel">
+        update asr_wrk_detl
+        set memo = #{buyerLabel}
+        where order_no = #{orderNo}
+        and barcode = #{barcode}
     </update>
 
     <select id="selectAndLogByOrderNo" resultMap="BaseResultMap">
@@ -130,5 +144,11 @@
         where 1=1
           and wrk_no = #{workNo}
     </update>
+    <select id="findByWorkNo" resultMap="BaseResultMap">
+        select wrk_no, matnr, maktx, anfme ,specs,batch from asr_wrk_detl where 1=1 and wrk_no = #{workNo}
+    </select>
 
+    <select id="findByBarcode" resultMap="BaseResultMap">
+        select * from asr_wrk_detl where 1=1 and zpallet = #{barcode}
+    </select>
 </mapper>

--
Gitblit v1.9.1