From 9f62a50709d7b554ca78973f7a962a38b4bcf421 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期四, 01 八月 2024 14:57:00 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
---
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
index b49e679..2c93d87 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
@@ -44,13 +44,15 @@
</select>
<select id="queryTemperingOccupySlot" resultMap="temperingLayoutDTO">
- SELECT TEMPERING_LAYOUT_ID,
+ SELECT ENGINEER_ID,
+ TEMPERING_LAYOUT_ID,
COUNT(DISTINCT SLOT) as SLOT_COUNT
FROM BIG_STORAGE_CAGE_DETAILS
WHERE STATE = 100
GROUP BY ENGINEER_ID,
TEMPERING_LAYOUT_ID
- HAVING SLOT_COUNT >= #{count} LIMIT 1
+ HAVING SLOT_COUNT >= #{count}
+ ORDER BY SLOT_COUNT DESC
</select>
<select id="queryGlassMaxAndMin" resultMap="slotSequenceDTO">
SELECT T.*,
@@ -71,4 +73,18 @@
INNER JOIN BIG_STORAGE_CAGE T1 ON T.SLOT = T1.SLOT
ORDER BY T.MAX_SEQUENCE DESC
</select>
+
+ <update id="updateBySlot">
+ update big_storage_cage_details
+ <set>
+ state = #{state}
+ </set>
+ <where>
+ (glass_id,slot) in (
+ <foreach collection="list" item="item" separator=",">
+ (#{item.glassId}, #{item.targetSlot})
+ </foreach>
+ )
+ </where>
+ </update>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0