From d57b34decf204e4a1d0d5da9a259fdef55608cd5 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期二, 24 十二月 2024 14:30:50 +0800
Subject: [PATCH] 1、大理片笼漏提代码

---
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
index 15dcb15..aa85103 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
@@ -131,6 +131,15 @@
             and state !=101
         </where>
     </update>
+    <update id="updateDeviceIdBySlot">
+        update big_storage_cage_details t inner join big_storage_cage t1 on t.slot = t1.slot
+        set t.device_id = t1.device_id
+        where t.slot in (
+        <foreach collection="list" item="item" separator=",">
+            #{item}
+        </foreach>
+        )
+    </update>
 
     <select id="selectTemperingGlassCount" resultMap="temperingGlassCount">
         with glass_info_temp as (
@@ -227,13 +236,18 @@
     <select id="queryLackGlassInfo" resultMap="glassInfoLackDTO">
         WITH glass_info_temp AS (SELECT *
                                  FROM glass_info
-                                 WHERE engineer_id = #{engineerId} AND tempering_layout_id = #{temperingLayoutId}),
+                                 WHERE engineer_id = #{engineerId}
+                                   AND tempering_layout_id = #{temperingLayoutId}),
              big_details_temp AS (SELECT *
                                   FROM big_storage_cage_details
-                                  WHERE state = 100 AND engineer_id = #{engineerId} AND tempering_layout_id =  #{temperingLayoutId}),
+                                  WHERE state = 100
+                                    AND engineer_id = #{engineerId}
+                                    AND tempering_layout_id = #{temperingLayoutId}),
              damage_temp AS (SELECT *
                              FROM damage
-                             WHERE type IN (8, 9) AND engineer_id = #{engineerId} AND tempering_layout_id =  #{temperingLayoutId}),
+                             WHERE type IN (8, 9)
+                               AND engineer_id = #{engineerId}
+                               AND tempering_layout_id = #{temperingLayoutId}),
              result_lack AS (SELECT t.*
                              FROM glass_info_temp t
                                       LEFT JOIN big_details_temp t1 ON t.glass_id = t1.glass_id
@@ -252,4 +266,11 @@
         SELECT *
         FROM result
     </select>
+    <select id="querybigStorageCageDetail" resultType="com.mes.base.entity.vo.BigStorageVO">
+        SELECT SLOT, COUNT(1) AS COUNT
+        FROM BIG_STORAGE_CAGE_DETAILS
+        where state in (100, 102, 103, 104)
+        group by SLOT
+        ORDER BY SLOT
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0