From 8d5c70aef9cbacbcc412d73c4b730e21f94e6514 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 30 六月 2025 09:04:10 +0800
Subject: [PATCH] 1

---
 src/main/resources/mapper/TaskWrkMapper.xml |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/mapper/TaskWrkMapper.xml b/src/main/resources/mapper/TaskWrkMapper.xml
index 8c6800e..1efa21d 100644
--- a/src/main/resources/mapper/TaskWrkMapper.xml
+++ b/src/main/resources/mapper/TaskWrkMapper.xml
@@ -24,6 +24,7 @@
         <result column="crn_no" property="crnNo" />
         <result column="command_step" property="commandStep" />
         <result column="transfer_mark" property="transferMark" />
+        <result column="mark_start" property="markStart"/>
 
     </resultMap>
     
@@ -36,8 +37,21 @@
     <select id="selectByStartPoint" resultMap="BaseResultMap">
         select top 1 * from wcs_task_wrk
         where 1=1
-        and io_type=3
         and start_point = #{startPoint}
+    </select>
+
+    <select id="selectByTargetPoint" resultMap="BaseResultMap">
+        select top 1 * from wcs_task_wrk
+        where 1=1
+        and target_point = #{targetPoint}
+    </select>
+
+
+    <select id="selectByBarcode" resultMap="BaseResultMap">
+        select top 1 * from wcs_task_wrk
+        where 1=1
+          and io_type=3
+          and barcode = #{barcode}
     </select>
 
     <select id="selectByWrkNo" resultMap="BaseResultMap">
@@ -48,7 +62,7 @@
 
     <select id="selectPakIn" resultMap="BaseResultMap">
         select top 1 * from dbo.wcs_task_wrk
-        where status=1
+        where status=2
         and crn_no=#{crnNo}
         and wrk_no=#{workNo}
         and start_point=#{startPoint}
@@ -118,7 +132,7 @@
     <select id="selectToBeHistoryData" resultMap="BaseResultMap">
         select * from dbo.wcs_task_wrk
         where 1=1
-        and ((wrk_sts=14 and status=5) or status=7 or status=4 or (wrk_sts=4 and status=5))
+        and ((wrk_sts=14 and status=5 and dateadd(ss,10,complete_time) &lt;= getdate() and wrk_no not in (select wrk_no from asr_bas_devp)) or status=7 or status=4 or (wrk_sts=4 and status=5))
         order by io_pri desc,create_time,wrk_no ASC
     </select>
 

--
Gitblit v1.9.1