From e95543888fce8eb09d1d7d140158514ae1b93ff5 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期一, 29 七月 2024 13:50:32 +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..24eca61 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 LIMIT 1
</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