From 732ea41c1bcd1623068d46db64f88e36abe3dcb9 Mon Sep 17 00:00:00 2001
From: L <L@132>
Date: 星期一, 20 四月 2026 15:25:37 +0800
Subject: [PATCH] *
---
src/main/resources/mapper/WrkMastMapper.xml | 117 ++++++++++++++++++++++++++++++----------------------------
1 files changed, 60 insertions(+), 57 deletions(-)
diff --git a/src/main/resources/mapper/WrkMastMapper.xml b/src/main/resources/mapper/WrkMastMapper.xml
index a805e5e..0f0db40 100644
--- a/src/main/resources/mapper/WrkMastMapper.xml
+++ b/src/main/resources/mapper/WrkMastMapper.xml
@@ -67,11 +67,11 @@
</resultMap>
<select id="selectByLocNo" resultMap="BaseResultMap">
- select top 1 * from asr_wrk_mast where source_loc_no = #{sourceLocNo} and (ctn_no is null or ctn_no != 'Y')
+ select * from asr_wrk_mast where source_loc_no = #{sourceLocNo} and (ctn_no is null or ctn_no != 'Y') LIMIT 1
</select>
<select id="selectByLocNo1" resultMap="BaseResultMap">
- select top 1 * from asr_wrk_mast where source_loc_no = #{sourceLocNo} or loc_no = #{sourceLocNo}
+ select * from asr_wrk_mast where source_loc_no = #{sourceLocNo} or loc_no = #{sourceLocNo} LIMIT 1
</select>
<select id="selectToBeCompleteData" resultMap="BaseResultMap">
@@ -82,84 +82,84 @@
select * from asr_wrk_mast
where wrk_sts=4
or (wrk_sts=15 and ove_mk='Y' and wrk_no not in (select wrk_no from asr_bas_devp))
- or (wrk_sts=15 and dateadd(mi,15,crn_end_time) <= getdate() and wrk_no not in (select wrk_no from asr_bas_devp))
+ or (wrk_sts=15 and DATE_ADD(crn_end_time, INTERVAL 15 MINUTE) <= NOW() and wrk_no not in (select wrk_no from asr_bas_devp))
or (wrk_sts=15 and crn_end_time is null and wrk_no not in (select wrk_no from asr_bas_devp))
order by io_time,wrk_no asc
</select>
<select id="selectPakInStep1" resultMap="BaseResultMap">
- 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 * 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 LIMIT 1
</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 * 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 LIMIT 1
</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 * 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 LIMIT 1
</select>
<select id="selectPakInStep2" resultMap="BaseResultMap">
- select top 1 * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and sta_no=#{staNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC
+ select * from asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and sta_no=#{staNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC LIMIT 1
</select>
<select id="selectPakInStep12" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC
+ select * from asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC
</select>
<select id="selectPakInStep3" resultMap="BaseResultMap">
- select top 1 * from dbo.asr_wrk_mast where wrk_no=#{workNo}
+ select * from asr_wrk_mast where wrk_no=#{workNo} LIMIT 1
</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 * from asr_wrk_mast where sta_no=#{staNo} and wrk_sts = 14 and io_type>100 and sheet_no=#{sheetNo} LIMIT 1
</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 * from asr_wrk_mast where sta_no=#{staNo} and wrk_sts = 14 and io_type>100 and sheet_no!=#{sheetNo} LIMIT 1
</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 * from asr_wrk_mast where barcode=#{barcode} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104) LIMIT 1
</select>
<select id="selectPakOutStep1" resultMap="BaseResultMap">
- select top 1 * from dbo.asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc
+ select * from asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc LIMIT 1
</select>
<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 * from 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 LIMIT 1
</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 * from 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 LIMIT 1
</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 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and io_type=10 LIMIT 1
</select>
<select id="selectLocMove" resultMap="BaseResultMap">
- select top 1 * from dbo.asr_wrk_mast where wrk_sts=11 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no
+ select * from asr_wrk_mast where wrk_sts=11 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no LIMIT 1
</select>
<select id="selectLocMoving" resultMap="BaseResultMap">
- select top 1 * from dbo.asr_wrk_mast where wrk_sts=12 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no
+ select * from asr_wrk_mast where wrk_sts=12 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no LIMIT 1
</select>
<select id="selectWorking" resultMap="BaseResultMap">
- select top 1 * from dbo.asr_wrk_mast where 1=1 and (wrk_sts=3 or wrk_sts=12) and crn_no=#{crnNo} order by io_time,wrk_no
+ select * from asr_wrk_mast where 1=1 and (wrk_sts=3 or wrk_sts=12) and crn_no=#{crnNo} order by io_time,wrk_no LIMIT 1
</select>
<!-- <!– 鍏ュ簱浠诲姟 –>-->
<!-- <select id="selectWorkingPakin" resultMap="BaseResultMap">-->
-<!-- select top 1 * from dbo.asr_wrk_mast where wrk_sts in (2,3,4) and io_type != 11 and source_sta_no = 180 order by io_time,wrk_no-->
+<!-- select * from asr_wrk_mast where wrk_sts in (2,3,4) and io_type != 11 and source_sta_no = 180 order by io_time,wrk_no LIMIT 1-->
<!-- </select>-->
<!-- <!– 鍑哄簱浠诲姟 –>-->
<!-- <select id="selectWorkingPakout" resultMap="BaseResultMap">-->
-<!-- select top 1 *-->
-<!-- from dbo.asr_wrk_mast-->
+<!-- select *-->
+<!-- from asr_wrk_mast-->
<!-- where (wrk_sts in (11,12)-->
<!-- or (wrk_sts in (14,15) and wrk_no in-->
<!-- (-->
@@ -173,33 +173,33 @@
<!-- </select>-->
<select id="selectCrnWorking" resultMap="BaseResultMap">
- select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts in (3,4,11,12) and crn_no=#{crnNo} order by io_time,wrk_no
+ select * from asr_wrk_mast where 1=1 and wrk_sts in (3,4,11,12) and crn_no=#{crnNo} order by io_time,wrk_no LIMIT 1
</select>
<select id="selectDevWorking" resultMap="BaseResultMap">
- select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts=2 and crn_no=#{crnNo} order by io_time,wrk_no
+ select * from asr_wrk_mast where 1=1 and wrk_sts=2 and crn_no=#{crnNo} order by io_time,wrk_no LIMIT 1
</select>
<select id="selectPick" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast where 1=1 and wrk_sts = 14 and io_type in (103,104,107)
+ select * from asr_wrk_mast where 1=1 and wrk_sts = 14 and io_type in (103,104,107)
</select>
<select id="selectPakOutStep11" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc
+ select * from asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc
</select>
<select id="selectPakOutStep12" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast where crn_no=#{crnNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc
+ select * from asr_wrk_mast where crn_no=#{crnNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc
</select>
<!-- 鍏ュ嚭搴撴ā寮忕浉鍏� -->
<select id="selectWorkingPakin" resultMap="BaseResultMap">
- select top 1 * from dbo.asr_wrk_mast where wrk_sts in (2,3,4) and io_type != 11 and source_sta_no = #{sourceStaNo} order by io_time,wrk_no
+ select * from asr_wrk_mast where wrk_sts in (2,3,4) and io_type != 11 and source_sta_no = #{sourceStaNo} order by io_time,wrk_no LIMIT 1
</select>
<select id="selectWorkingPakout" resultMap="BaseResultMap">
- select top 1 *
- from dbo.asr_wrk_mast
+ select *
+ from asr_wrk_mast
where (wrk_sts in (11,12)
or (wrk_sts in (14,15) and wrk_no in
(
@@ -210,17 +210,18 @@
and io_type != 11
and source_sta_no = #{sourceStaNo}
order by io_time,wrk_no
+ LIMIT 1
</select>
<select id="selectPakoutEmpty" resultMap="BaseResultMap">
- select top 1 * from dbo.asr_wrk_mast where io_type = 110 and sta_no = #{staNo} order by io_time,wrk_no
+ select * from asr_wrk_mast where io_type = 110 and sta_no = #{staNo} order by io_time,wrk_no LIMIT 1
</select>
<select id="selectExistInEmpty" resultType="java.lang.Integer">
- SELECT COUNT(*) FROM dbo.asr_wrk_mast Where io_type = 10 and wrk_sts in (1,2,3)
+ SELECT COUNT(*) FROM asr_wrk_mast Where io_type = 10 and wrk_sts in (1,2,3)
</select>
<!-- RGV璋冨害鍏ュ嚭搴撶浉鍏� -->
<select id="selectRgvInStep1" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast
+ select * from asr_wrk_mast
where rgv_no=#{rgvNo} and rgv_ssta_no in
<foreach item="item" collection="staNos" index="index" separator="," open="(" close=")">
#{item}
@@ -230,23 +231,23 @@
</select>
<select id="selectRgvInStep2" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast where rgv_dsta_no=#{rgvInDStn} and wrk_sts=7 and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time desc,wrk_no ASC
+ select * from asr_wrk_mast where rgv_dsta_no=#{rgvInDStn} and wrk_sts=7 and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time desc,wrk_no ASC
</select>
<select id="selectRgvInWorking" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast where 1=1 and wrk_sts in (6,7) and rgv_no=#{rgvNo} order by io_time,wrk_no
+ select * from asr_wrk_mast where 1=1 and wrk_sts in (6,7) and rgv_no=#{rgvNo} order by io_time,wrk_no
</select>
<select id="selectRgvOutStep2" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast where rgv_dsta_no=#{rgvOutDStn} and wrk_sts=17 and io_type > 100 order by io_pri desc,io_time desc,wrk_no ASC
+ select * from asr_wrk_mast where rgv_dsta_no=#{rgvOutDStn} and wrk_sts=17 and io_type > 100 order by io_pri desc,io_time desc,wrk_no ASC
</select>
<select id="selectRgvDestStep2" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast where rgv_dsta_no=#{rgvDestStn} and wrk_sts in (7,17) order by io_pri desc,io_time desc,wrk_no ASC
+ select * from asr_wrk_mast where rgv_dsta_no=#{rgvDestStn} and wrk_sts in (7,17) order by io_pri desc,io_time desc,wrk_no ASC
</select>
<select id="selectRgvOutStep1" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast
+ select * from asr_wrk_mast
where rgv_no=#{rgvNo} and rgv_ssta_no in
<foreach item="item" collection="staNos" index="index" separator="," open="(" close=")">
#{item}
@@ -256,40 +257,40 @@
</select>
<select id="selectRgvOutWorking" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast where 1=1 and wrk_sts in (16,17) and rgv_no=#{rgvNo} order by io_time,wrk_no
+ select * from asr_wrk_mast where 1=1 and wrk_sts in (16,17) and rgv_no=#{rgvNo} order by io_time,wrk_no
</select>
<!-- RGV璋冨害鍏ュ嚭搴撶浉鍏� -->
<!-- ==============================================RGV浠诲姟缁戝畾鐩稿叧 ============================================== -->
<select id="selectWaitBindRGV" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast
+ select * from 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
+ select * from 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
+ select * from 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
+ select * from 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 INTO asr_wrk_mast_rgv SELECT * FROM asr_wrk_mast WHERE wrk_no = #{wrkNo}
</insert>
<update id="updateRgvMast">
@@ -300,15 +301,15 @@
</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 * from asr_wrk_mast where 1=1 and wrk_sts =12 and wrk_no=#{wrkNo} and rgv_no is null LIMIT 1
</select>
<select id="selectRgvOutSteWrkNo" resultMap="BaseResultMap">
- 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 * from asr_wrk_mast where 1=1 and wrk_sts =24 and wrk_no=#{wrkNo} and rgv_no is null LIMIT 1
</select>
<select id="selectIoRgvNo" resultMap="BaseResultMap">
- select * from dbo.asr_wrk_mast
+ select * from asr_wrk_mast
where 1=1
and wrk_sts in (2,4,23,25)
and rgv_no = #{rgvNo}
@@ -316,60 +317,62 @@
</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}
+ select * from 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>
+ LIMIT 1
</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}
+ select * from 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>
+ LIMIT 1
</select>
<!-- ==============================================RGV浠诲姟缁戝畾鐩稿叧 ============================================== -->
<!-- ==============================================鑷姩琛ョ┖鏉跨浉鍏� ============================================== -->
<!-- <select id="selectDischargingMachineOutputTray" resultMap="BaseResultMap">-->
-<!-- select * from dbo.asr_wrk_mast where 1=1 and io_type = 201-->
+<!-- select * from 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 * from 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 COUNT(1) FROM 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 * FROM asr_wrk_mast Where 1=1 and io_type=202 and wrk_sts =51 and source_sta_no = #{sourceStaNo} LIMIT 1
</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 * FROM asr_wrk_mast Where 1=1 and io_type=202 and wrk_sts =52 and source_sta_no = #{sourceStaNo} LIMIT 1
</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 * FROM asr_wrk_mast Where 1=1 and io_type=1 and wrk_sts =2 and sheet_no='4' and source_sta_no = #{sourceStaNo} LIMIT 1
</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 * FROM asr_wrk_mast Where 1=1 and io_type=202 and wrk_sts =54 LIMIT 1
</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 * FROM asr_wrk_mast Where 1=1 and io_type=212 and sta_no =212 LIMIT 1
</select>
</mapper>
--
Gitblit v1.9.1