From 77f5af7a1cd1a57804a6391f5e2c73e8ae10a531 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期一, 03 三月 2025 23:32:37 +0800
Subject: [PATCH] 1、优化出片队列,避免930lisec出片玻璃顺序倒叙情况下,出片玻璃尺寸较大一车只能存放小于一对的数量造成玻璃顺序错乱问题
---
hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml
index 3ef3805..f4f8fc6 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml
@@ -29,6 +29,7 @@
select slot, min(id) as id, count(*) as glass_count
from edg_storage_cage_details
where state = 100
+ and device_id = #{deviceId}
group by slot
),
size_max_temp as (
@@ -50,9 +51,26 @@
and t.height = #{height}
</if>
</where>
- order by total_count desc, glass_count, abs(t.slot - 10)
+ order by total_count desc, glass_count, abs(t.slot - #{currentSlot})
)
select *
from slot_temp limit 1
</select>
+ <select id="queryCutDrawingByEngineerId" resultType="com.mes.edgstoragecage.entity.vo.CutDrawingVO">
+ with glass_temp as (
+ select * from glass_info where engineer_id = #{engineerId} and pattern_sequence = #{patternSequence}
+ ), cut_drawing_temp as (
+ select t.*,
+ case when t2.glass_id is not null then t2.type
+ when t1.glass_id is not null then t1.state
+ else 0 end as state
+ from glass_temp t
+ left join edg_storage_cage_details t1 on t.glass_id = t1.glass_id
+ left join damage t2 on t.glass_id = t2.glass_id and t2.type in (8,9)
+ )select * from cut_drawing_temp where 1=1
+ <if test="isAll == 1">
+ and state = 0
+ </if>
+
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0