From ef58dbca0a0e74e0542dc77bd1ead02ab58a69d1 Mon Sep 17 00:00:00 2001
From: lsh <lsh>
Date: 星期五, 12 七月 2024 22:44:31 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/WrkMastMapper.xml | 122 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 122 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/WrkMastMapper.xml b/src/main/resources/mapper/WrkMastMapper.xml
index fd55f58..79abf49 100644
--- a/src/main/resources/mapper/WrkMastMapper.xml
+++ b/src/main/resources/mapper/WrkMastMapper.xml
@@ -62,6 +62,7 @@
<!-- <result column="Pdc_type" property="PdcType" />-->
<result column="ctn_no" property="ctnNo" />
<result column="full_plt" property="fullPlt" />
+ <result column="work_no_other" property="workNoOther" />
</resultMap>
@@ -90,6 +91,10 @@
select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and barcode=#{barcode} and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC
</select>
+ <select id="selectPakInStep111" resultMap="BaseResultMap">
+ select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and barcode=#{barcode} and ((io_type = 202 and wrk_sts=51) or (io_type=1 and wrk_sts=2)) order by io_pri desc,io_time,wrk_no ASC
+ </select>
+
<select id="selectPakInStep11" resultMap="BaseResultMap">
select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=1 and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC
</select>
@@ -106,6 +111,14 @@
select top 1 * from dbo.asr_wrk_mast where wrk_no=#{workNo}
</select>
+ <select id="selectPakInStep4" resultMap="BaseResultMap">
+ select top 1 * from dbo.asr_wrk_mast where sta_no=#{staNo} and wrk_sts = 14 and io_type>100 and sheet_no=#{sheetNo}
+ </select>
+
+ <select id="selectPakInStep5" resultMap="BaseResultMap">
+ select top 1 * from dbo.asr_wrk_mast where sta_no=#{staNo} and wrk_sts = 14 and io_type>100 and sheet_no!=#{sheetNo}
+ </select>
+
<select id="selectPickStep" resultMap="BaseResultMap">
select top 1 * from asr_wrk_mast where barcode=#{barcode} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)
</select>
@@ -116,6 +129,14 @@
<select id="selectPakOutStep2" resultMap="BaseResultMap">
select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC
+ </select>
+
+ <select id="selectPakOutStep2345" resultMap="BaseResultMap">
+ select top 1 * from dbo.asr_wrk_mast where wrk_no=#{workNo} and source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC
+ </select>
+
+ <select id="selectPakOutStep3" resultMap="BaseResultMap">
+ select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and io_type=10
</select>
<select id="selectLocMove" resultMap="BaseResultMap">
@@ -240,6 +261,44 @@
<!-- RGV璋冨害鍏ュ嚭搴撶浉鍏� -->
<!-- ==============================================RGV浠诲姟缁戝畾鐩稿叧 ============================================== -->
+ <select id="selectWaitBindRGV" resultMap="BaseResultMap">
+ select * from dbo.asr_wrk_mast
+ where 1=1
+ and wrk_sts in (2,14)
+ and rgv_no is null
+ </select>
+
+ <select id="selectWaitBindRgvNo2" resultMap="BaseResultMap">
+ select * from dbo.asr_wrk_mast
+ where 1=1
+ and wrk_sts in (2,14)
+ and (rgv_no IS NULL OR rgv_no = 0)
+ </select>
+
+ <select id="selectWaitBindRGVRgvNo" resultMap="BaseResultMap">
+ select * from dbo.asr_wrk_mast_rgv
+ where 1=1
+ and wrk_sts < 110
+ and rgv_no = #{rgvNo}
+ </select>
+
+ <select id="selectWaitBindRgvNoOneWrkNo" resultMap="BaseResultMap">
+ select * from dbo.asr_wrk_mast_rgv
+ where 1=1
+ and wrk_no = #{wrkNo}
+ </select>
+
+ <insert id="insertRgvMast">
+ INSERT INTO dbo.asr_wrk_mast_rgv SELECT * FROM asr_wrk_mast WHERE wrk_no = #{wrkNo}
+ </insert>
+
+ <update id="updateRgvMast">
+ update asr_wrk_mast_rgv
+ set wrk_sts=100
+ where 1=1
+ and wrk_no = #{wrkNo}
+ </update>
+
<select id="selectRgvInSteWrkNo" resultMap="BaseResultMap">
select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts =12 and wrk_no=#{wrkNo} and rgv_no is null
</select>
@@ -248,6 +307,69 @@
select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts =24 and wrk_no=#{wrkNo} and rgv_no is null
</select>
+ <select id="selectIoRgvNo" resultMap="BaseResultMap">
+ select * from dbo.asr_wrk_mast
+ where 1=1
+ and wrk_sts in (2,4,23,25)
+ and rgv_no = #{rgvNo}
+ order by io_pri desc,io_time desc,wrk_no ASC
+ </select>
+
+ <select id="selectRgvInSteNo" resultMap="BaseResultMap">
+ select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts =14 and rgv_no=#{rgvNo}
+ <if test="rgvNo == 1">
+ order by rgv_dsta_no
+ </if>
+ <if test="rgvNo == 2">
+ order by rgv_dsta_no desc
+ </if>
+ </select>
+
+ <select id="selectRgvOutSteNo" resultMap="BaseResultMap">
+ select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts =24 and rgv_no=#{rgvNo}
+ <if test="rgvNo == 1">
+ order by rgv_dsta_no
+ </if>
+ <if test="rgvNo == 2">
+ order by rgv_dsta_no desc
+ </if>
+ </select>
+
<!-- ==============================================RGV浠诲姟缁戝畾鐩稿叧 ============================================== -->
+ <!-- ==============================================鑷姩琛ョ┖鏉跨浉鍏� ============================================== -->
+<!-- <select id="selectDischargingMachineOutputTray" resultMap="BaseResultMap">-->
+<!-- select * from dbo.asr_wrk_mast where 1=1 and io_type = 201-->
+<!-- </select>-->
+
+
+<!-- <select id="selectStackingCompletionDriveTray" resultMap="BaseResultMap">-->
+<!-- select * from dbo.asr_wrk_mast where 1=1 and io_type = 201 and wrk_sts = 43-->
+<!-- </select>-->
+
+<!-- <select id="selectConfigCount10468N" resultType="java.lang.Integer">-->
+<!-- SELECT COUNT(1) FROM dbo.sys_config Where 1=1 and id=10468 and value = 'N'-->
+<!-- </select>-->
+
+ <!-- ==============================================鑷姩琛ョ┖鏉跨浉鍏� ============================================== -->
+
+ <select id="selectWrkMastUnstackingOne202" resultMap="BaseResultMap">
+ SELECT top 1 * FROM dbo.asr_wrk_mast Where 1=1 and io_type=202 and wrk_sts =51 and source_sta_no = #{sourceStaNo}
+ </select>
+
+ <select id="selectWrkMastUnstackingOne202Two" resultMap="BaseResultMap">
+ SELECT top 1 * FROM dbo.asr_wrk_mast Where 1=1 and io_type=202 and wrk_sts =52 and source_sta_no = #{sourceStaNo}
+ </select>
+
+ <select id="selectWrkMastUnstackingOne145" resultMap="BaseResultMap">
+ SELECT top 1 * FROM dbo.asr_wrk_mast Where 1=1 and io_type=1 and wrk_sts =2 and sheet_no='4' and source_sta_no = #{sourceStaNo}
+ </select>
+
+ <select id="selectWrkMastLabelingOne54" resultMap="BaseResultMap">
+ SELECT top 1 * FROM dbo.asr_wrk_mast Where 1=1 and io_type=202 and wrk_sts =54
+ </select>
+
+ <select id="selectWrkMastUnstackingOne212" resultMap="BaseResultMap">
+ SELECT top 1 * FROM dbo.asr_wrk_mast Where 1=1 and io_type=212 and sta_no =212
+ </select>
</mapper>
--
Gitblit v1.9.1