From 24bc065e9009bfb3c778e762921268a389aeaf49 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期二, 10 十二月 2024 09:00:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
index 0c164f2..9611a10 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
@@ -99,6 +99,7 @@
(#{item.glassId}, #{item.targetSlot})
</foreach>
)
+ and state !=101
</where>
</update>
@@ -134,7 +135,9 @@
details_temp as (
select t.engineer_id, t.tempering_layout_id, t.virtual_slot, count(1) as slot_count
from big_storage_glass_relation_info t
- left join big_storage_cage_details t1 on t.glass_id = t1.glass_id
+ left join big_storage_cage_details t1 on
+ t.engineer_id = t1.engineer_id and t.tempering_layout_id = t1.tempering_layout_id and
+ t.tempering_feed_sequence = t1.tempering_feed_sequence
where t1.state = 100
group by t.engineer_id, t.tempering_layout_id, t.virtual_slot
),
@@ -153,16 +156,20 @@
<select id="queryNeedDispatchSlot" resultMap="baseSlotSequenceDTO">
with glass_id_temp as (
- select glass_id
+ select engineer_id, tempering_layout_id, tempering_feed_sequence
from big_storage_glass_relation_info
where (engineer_id, tempering_layout_id, virtual_slot) =
(#{engineerId}, #{temperingLayoutId}, #{virtualSlot})
)
- select t.slot, max(t1.slot_sequence) as max_sequence, min(t1.slot_sequence) as min_sequence
+ select t.slot, max(t1.tempering_feed_sequence) as max_sequence, min(t1.tempering_feed_sequence) as min_sequence
from big_storage_cage_details t
- inner join big_storage_glass_relation_info t1 on t.glass_id = t1.glass_id
- where t.glass_id in (select * from glass_id_temp)
+ inner join big_storage_glass_relation_info t1
+ on t.engineer_id = t1.engineer_id and t.tempering_layout_id = t1.tempering_layout_id and
+ t.tempering_feed_sequence = t1.tempering_feed_sequence
+ where (t.engineer_id, t.tempering_layout_id, t.tempering_feed_sequence) in
+ (select engineer_id, tempering_layout_id, tempering_feed_sequence from glass_id_temp)
+ and t.state = 100
group by t.slot
- order by max_sequence
+ order by max_sequence desc
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0