From ad46ec101f19c65d1c7ecda38608ea9fac7c9ef1 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期六, 28 二月 2026 10:11:07 +0800
Subject: [PATCH] 1

---
 zy-acs-cv/src/main/resources/mapper/JobMapper.xml |   38 ++++++++++++++++++++++++++++++++++----
 1 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/zy-acs-cv/src/main/resources/mapper/JobMapper.xml b/zy-acs-cv/src/main/resources/mapper/JobMapper.xml
index c73e8d1..4b7aaea 100644
--- a/zy-acs-cv/src/main/resources/mapper/JobMapper.xml
+++ b/zy-acs-cv/src/main/resources/mapper/JobMapper.xml
@@ -5,10 +5,15 @@
     <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
     <resultMap id="BaseResultMap" type="com.zy.asrs.entity.Job">
         <id column="id" property="id"/>
-        <result column="seq_num" property="seqNum"/>
+        <result column="task_no" property="taskNo"/>
+        <result column="batch_no" property="batchNo"/>
+        <result column="loc" property="loc"/>
+        <result column="sta_no" property="staNo"/>
+        <result column="barcode" property="barcode"/>
         <result column="job_no" property="jobNo"/>
         <result column="job_sts" property="jobSts"/>
-        <result column="in_time" property="inTime"/>
+        <result column="start_time" property="startTime"/>
+        <result column="wms_time" property="wmsTime"/>
         <result column="rcs_time" property="rcsTime"/>
         <result column="status" property="status"/>
         <result column="deleted" property="deleted"/>
@@ -20,10 +25,12 @@
         <result column="memo" property="memo"/>
     </resultMap>
 
-    <select id="getJobBySeqNum" resultMap="BaseResultMap">
+
+    <select id="getJobByTaskNo" resultMap="BaseResultMap">
         select *
         from cv_job
-        where seq_num = #{seqNum}
+        where task_no = #{seqNum}
+        order by id desc limit 1
     </select>
 
 
@@ -31,6 +38,7 @@
         select *
         from cv_job
         where job_no = #{workNo}
+        order by id desc limit 1
     </select>
 
     <select id="getJobByJobNoAndJobSts" resultMap="BaseResultMap">
@@ -38,6 +46,22 @@
         from cv_job
         where job_no = #{workNo}
           and job_sts = #{jobSts}
+        order by id desc limit 1
+    </select>
+
+    <select id="getJobByBarcodeAndJobSts" resultMap="BaseResultMap">
+        select *
+        from cv_job
+        where barcode = #{barcode}
+          and job_sts = #{jobSts}
+        order by id desc limit 1
+    </select>
+
+    <select id="getJobByBarcode" resultMap="BaseResultMap">
+        select *
+        from cv_job
+        where barcode = #{barcode}
+        order by id desc limit 1
     </select>
 
 
@@ -47,4 +71,10 @@
         where job_sts = #{jobSts}
     </select>
 
+
+    <select id="listJobToLog" resultMap="BaseResultMap">
+        select *
+        from cv_job
+        where job_sts = #{jobSts} and DATEDIFF(NOW(), #{day}) > 1
+    </select>
 </mapper>

--
Gitblit v1.9.1