From 4b8bdefa889a3e6797d2760bc207c0e373e86c86 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期三, 07 二月 2024 09:17:22 +0800
Subject: [PATCH] #AGV 输送线扫码器扫描

---
 src/main/resources/mapper/WrkChargeMapper.xml |   40 ++++++++++++++++++++++++++++++++++++++--
 1 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/WrkChargeMapper.xml b/src/main/resources/mapper/WrkChargeMapper.xml
index c9d4725..b029dfc 100644
--- a/src/main/resources/mapper/WrkChargeMapper.xml
+++ b/src/main/resources/mapper/WrkChargeMapper.xml
@@ -10,6 +10,7 @@
         <result column="io_type" property="ioType" />
         <result column="crn_no" property="crnNo" />
         <result column="ste_no" property="steNo" />
+        <result column="charge" property="charge" />
         <result column="out_most" property="outMost" />
         <result column="io_pri" property="ioPri" />
         <result column="loc_no" property="locNo" />
@@ -26,6 +27,7 @@
         <result column="appe_time" property="appeTime" />
         <result column="memo" property="memo" />
         <result column="barcode" property="barcode" />
+        <result column="shuttle_no" property="shuttleNo" />
 
     </resultMap>
 
@@ -33,8 +35,42 @@
         select top 1 *
         from asr_wrk_charge
         where 1=1
-        and ste_no = #{steNo}
-        and wrk_sts &lt; 28
+        <if test="shuttleNo != null">
+            and shuttle_no = #{shuttleNo}
+        </if>
+        and wrk_sts &lt; 60
+        and memo = 'charge'
+        order by appe_time, io_pri desc
+    </select>
+
+    <select id="selectWorkingOfCharge" resultMap="BaseResultMap">
+        select top 1 *
+        from asr_wrk_charge
+        where 1=1
+        <if test="charge != null">
+            and charge = #{charge}
+        </if>
+        and wrk_sts &lt; 60
+        and memo = 'charge'
+        order by appe_time, io_pri desc
+    </select>
+
+    <select id="selectWorkingOfReset" resultMap="BaseResultMap">
+        select top 1 *
+        from asr_wrk_charge
+        where 1=1
+        <if test="steNo != null">
+            and ste_no = #{steNo}
+        </if>
+        and wrk_sts &lt; 47
+        and memo = 'reset'
+        order by appe_time, io_pri desc
+    </select>
+
+    <select id="selectByWorkNo" resultMap="BaseResultMap">
+        select top 1 * from asr_wrk_charge
+        where wrk_no=#{workNo}
+        order by appe_time, io_pri desc
     </select>
 
 </mapper>

--
Gitblit v1.9.1