From 6ef5d115862da9aa5e8028315c8ee2ed9de087ac Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期二, 10 九月 2024 13:30:28 +0800
Subject: [PATCH] #

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

diff --git a/src/main/resources/mapper/WrkMastMapper.xml b/src/main/resources/mapper/WrkMastMapper.xml
index ce04079..e49e71f 100644
--- a/src/main/resources/mapper/WrkMastMapper.xml
+++ b/src/main/resources/mapper/WrkMastMapper.xml
@@ -75,4 +75,29 @@
         order by io_time,wrk_no asc
     </select>
 
+    <select id="selectWrkMastWrkDetlMatnrBatch" resultMap="BaseResultMap">
+        select m.* from asr_wrk_mast m,asr_wrk_detl d
+        where 1=1
+        and m.wrk_no = d.wrk_no
+        and m.io_type = #{ioType}
+        and m.crn_no = #{crnNo}
+        and d.matnr = #{matnr}
+        <choose>
+            <when test="batch != null and batch != ''">
+                and d.batch = #{batch}
+            </when>
+            <otherwise>
+                and (d.batch IS NULL OR d.batch = '')
+            </otherwise>
+        </choose>
+        <choose>
+            <when test="grade != null and grade != ''">
+                and d.brand = #{grade}
+            </when>
+            <otherwise>
+                and (d.brand IS NULL OR d.brand = '')
+            </otherwise>
+        </choose>
+    </select>
+
 </mapper>

--
Gitblit v1.9.1