From 2935442d9bdb795fecaa704d3bce2f6249b208d4 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 25 十二月 2024 16:12:48 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/HangZhouMes

---
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml
index 9755b8f..aae437f 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 (
@@ -44,13 +45,13 @@
         inner join size_max_temp t2 on t.width = t2.width and t.height = t2.height
         <where>
             <if test="width != 0">
-                t.width = #{width}
+                and t.width = #{width}
             </if>
             <if test="height != 0">
-                t.height = #{height}
+                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

--
Gitblit v1.8.0