From d7ff7a248a50fb215c545f36360179c9d1ed60dc Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期二, 13 五月 2025 14:36:08 +0800
Subject: [PATCH] 添加生产统计查询页面

---
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml
index 5d7d496..af01a6f 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml
@@ -50,6 +50,9 @@
             <if test="height != 0">
                 and t.height = #{height}
             </if>
+            <if test="cell == 2">
+                and t.thickness &lt; #{maxThickness}
+            </if>
         </where>
         order by total_count desc, glass_count, abs(t.slot - #{currentSlot})
         )
@@ -93,18 +96,19 @@
             AND t1.state = 100
             AND t1.device_id = #{deviceId}
             <if test="width != 0">
-                and t.width = #{width}
+                and t1.width = #{width}
             </if>
             <if test="height != 0">
-                and t.height = #{height}
+                and t1.height = #{height}
             </if>
             <if test="cell == 1">
-                and #{minOneFirstLength} &lt;= GREATEST(t.width, t.width)
-                and #{minOneSecondLength} &lt;= least(t.width, t.width)
+                and #{minOneFirstLength} &lt;= GREATEST(t1.width, t1.height)
+                and #{minOneSecondLength} &lt;= least(t1.width, t1.height)
             </if>
             <if test="cell == 2">
-                and #{maxTwoFirstLength} &gt;= GREATEST(t.width, t.width)
-                and #{maxTwoSecondLength} &gt;= least(t.width, t.width)
+                and #{maxTwoFirstLength} &gt;= GREATEST(t1.width, t1.height)
+                and #{maxTwoSecondLength} &gt;= least(t1.width, t1.height)
+                and t1.thickness &lt; #{maxThickness}
             </if>
         </where>
         ORDER BY abs(t.slot - #{currentCell})

--
Gitblit v1.8.0