From 4ad1f324ab1fd2b51504afc00b43b4ee40f029c2 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期四, 20 二月 2025 09:40:03 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/WrkDetlLogMapper.xml |   36 ++++++++++++++++++++++++++++++------
 1 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/src/main/resources/mapper/WrkDetlLogMapper.xml b/src/main/resources/mapper/WrkDetlLogMapper.xml
index eea3275..4ba2dbd 100644
--- a/src/main/resources/mapper/WrkDetlLogMapper.xml
+++ b/src/main/resources/mapper/WrkDetlLogMapper.xml
@@ -45,11 +45,16 @@
         <result column="appe_user" property="appeUser"/>
         <result column="appe_time" property="appeTime"/>
         <result column="memo" property="memo"/>
+        <result column="roll_up" property="rollUp" />
+
     </resultMap>
 
     <sql id="batchSeq">
         <if test="wrkNo != null and wrkNo != ''">
             and a.wrk_no = #{wrkNo}
+        </if>
+        <if test="anfme != null and anfme != ''">
+            and a.anfme = #{anfme}
         </if>
         <if test="modiTimeStart != null ">
             <if test="modiTimeEnd != null ">
@@ -57,11 +62,22 @@
             </if>
         </if>
         <if test="orderNo != null and orderNo != ''">
-            and ( a.order_no like concat('%',#{orderNo},'%')
-            or a.batch like concat('%',#{orderNo},'%')
-            or a.matnr like concat('%',#{orderNo},'%')
-            or a.zpallet like concat('%',#{orderNo},'%')
-            )
+            and a.order_no like concat('%',#{orderNo},'%')
+        </if>
+        <if test="batch != null and batch != ''">
+            and a.batch like concat('%',#{batch},'%')
+        </if>
+        <if test="model != null and model != ''">
+            and a.model like concat('%',#{model},'%')
+        </if>
+        <if test="matnr != null and matnr != ''">
+            and a.matnr like concat('%',#{matnr},'%')
+        </if>
+        <if test="zpallet != null and zpallet != ''">
+            and a.zpallet like concat('%',#{zpallet},'%')
+        </if>
+        <if test="specs != null and specs != ''">
+            and a.specs like concat('%',#{specs},'%')
         </if>
     </sql>
 
@@ -82,7 +98,7 @@
     </select>
 
     <select id="selectWrkDetlLogsTotal" resultType="Long">
-        select count(*) from asr_wrk_detl_log as a ,asr_wrk_mast_log as b
+        select count(1) from asr_wrk_detl_log as a ,asr_wrk_mast_log as b
         where 1=1
         and a.io_time=b.io_time
         and a.wrk_no=b.wrk_no
@@ -90,4 +106,12 @@
         <include refid="batchSeq"></include>
     </select>
 
+    <select id="selectWrkDetlLogByOrderNoNotNull" resultMap="BaseResultMap">
+        select top 1 * from asr_wrk_detl_log
+        where batch = #{batch}
+        and order_no is not null
+        and order_no != ''
+        order by io_time desc
+    </select>
+
 </mapper>

--
Gitblit v1.9.1