From 236edf0559e2d5a6031b1df56a69454baa0357e5 Mon Sep 17 00:00:00 2001
From: zzgtfwq <zzgtfwq>
Date: 星期二, 09 十二月 2025 14:26:44 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/WrkMastStaMapper.xml | 132 +++++++++++++++++++++++++++++++++++++++-----
1 files changed, 117 insertions(+), 15 deletions(-)
diff --git a/src/main/resources/mapper/WrkMastStaMapper.xml b/src/main/resources/mapper/WrkMastStaMapper.xml
index 6997839..ebc1221 100644
--- a/src/main/resources/mapper/WrkMastStaMapper.xml
+++ b/src/main/resources/mapper/WrkMastStaMapper.xml
@@ -17,6 +17,9 @@
<result column="line_number" property="lineNumber" />
<result column="wrk_type" property="wrkType" />
<result column="bign_time" property="bignTime" />
+ <result column="work_sta" property="workSta"/>
+ <result column="rgv_no" property="rgvNo"/>
+ <result column="mk" property="mk"/>
</resultMap>
@@ -36,24 +39,31 @@
and wrk_no = #{workNo}
</select>
- <select id="selectNoInterfere" resultMap="BaseResultMap">
+ <select id="selectByWrkNoPut" resultMap="BaseResultMap">
select top 1 * from asr_wrk_mast_sta
where 1=1
- and (sta_start in
- <foreach item="item" collection="staStarts" index="index" separator="," open="(" close=")">
- #{item}
- </foreach>
- or sta_start = 0
- )
- and (sta_end in
- <foreach item="item" collection="staEnds" index="index" separator="," open="(" close=")">
- #{item}
- </foreach>
- or sta_end = 0
- )
- and wrk_sts=0
- order by line_number,id
+ and wrk_no = #{workNo}
+ and wrk_sts = 1
</select>
+
+<!-- <select id="selectNoInterfere" resultMap="BaseResultMap">-->
+<!-- select top 1 * from asr_wrk_mast_sta-->
+<!-- where 1=1-->
+<!-- and (sta_start in-->
+<!-- <foreach item="item" collection="staStarts" index="index" separator="," open="(" close=")">-->
+<!-- #{item}-->
+<!-- </foreach>-->
+<!-- or sta_start = 0-->
+<!-- )-->
+<!-- and (sta_end in-->
+<!-- <foreach item="item" collection="staEnds" index="index" separator="," open="(" close=")">-->
+<!-- #{item}-->
+<!-- </foreach>-->
+<!-- or sta_end = 0-->
+<!-- )-->
+<!-- and wrk_sts=0-->
+<!-- order by line_number,id-->
+<!-- </select>-->
<select id="selectNoInterfereList" resultMap="BaseResultMap">
select * from asr_wrk_mast_sta
@@ -74,6 +84,78 @@
order by line_number,id
</select>
+ <select id="selectNoInterfere" resultMap="BaseResultMap">
+ select * from asr_wrk_mast_sta
+ where 1=1
+ and (sta_start in
+ <foreach item="item" collection="staStarts" index="index" separator="," open="(" close=")">
+ #{item}
+ </foreach>
+ or sta_start = 0
+ )
+ and (sta_end in
+ <foreach item="item" collection="staEnds" index="index" separator="," open="(" close=")">
+ #{item}
+ </foreach>
+ or sta_end = 0
+ )
+ and wrk_sts=0
+ and wrk_no = #{workNo}
+ order by line_number,id
+ </select>
+ <select id="selectNoInterfereCrn" resultMap="BaseResultMap">
+ select * from asr_wrk_mast_sta
+ where 1=1
+ and (sta_start in
+ <foreach item="item" collection="staStarts" index="index" separator="," open="(" close=")">
+ #{item}
+ </foreach>
+ or sta_start = 0
+ )
+ and (sta_end in
+ <foreach item="item" collection="staEnds" index="index" separator="," open="(" close=")">
+ #{item}
+ </foreach>
+ or sta_end = 0
+ )
+ and wrk_sts=0
+ and sta_end in (2006.2012,2018,2024,2030,1004,1014,1018,1028,1035)
+ and wrk_no = #{workNo}
+ order by
+ case when mk = 1 then 0 else 1 end,
+ line_number,
+ id
+ </select>
+
+ <select id="selectNoInterfereToCrn" resultMap="BaseResultMap">
+ select * from asr_wrk_mast_sta
+ where 1=1
+ and (sta_start in
+ <foreach item="item" collection="staStarts" index="index" separator="," open="(" close=")">
+ #{item}
+ </foreach>
+ or sta_start = 0
+ )
+ or sta_end = 0
+ )
+ and sta_end in (2018,1018)
+ and wrk_sts=0
+ and wrk_no = #{workNo}
+ order by line_number,id
+ </select>
+ <select id="selectByWorkSta" resultMap="BaseResultMap">
+ select top 1 * from asr_wrk_mast_sta
+ where work_sta = #{workSta}
+ and rgv_no = #{rgvNo}
+ </select>
+
+ <select id="selectByWorkStaList" resultMap="BaseResultMap">
+ select * from asr_wrk_mast_sta
+ where work_sta = #{workSta}
+ and rgv_no = #{rgvNo}
+ order by update_time
+ </select>
+
<select id="selectAllWrkCount" resultType="java.lang.Integer">
select count(1) from asr_wrk_mast_sta
where 1=1
@@ -92,7 +174,27 @@
and wrk_sts = #{wrkSts}
</if>
</select>
+ <select id="selectLockWrk" resultMap="BaseResultMap">
+ select * from asr_wrk_mast_sta
+ where wrk_sts > 0
+ and sta_end < 2000
+ </select>
+ <select id="selectLockWrkT" resultMap="BaseResultMap">
+ select * from asr_wrk_mast_sta
+ where wrk_sts > 0
+ and sta_end > 2000
+ </select>
+ <select id="selectPakingWrk" resultMap="BaseResultMap">
+ select * from asr_wrk_mast_sta
+ where mk = 1
+ and sta_start = #{staStart}
+ </select>
+ <select id="selectPakingWrkNum" resultMap="BaseResultMap">
+ select * from asr_wrk_mast_sta
+ where mk = 1
+ and rgv_no = #{rgvNo}
+ </select>
--
Gitblit v1.9.1