From 670c66f36b2cff5ad4eadb3afb106273d8a64088 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期一, 16 十二月 2024 09:22:27 +0800
Subject: [PATCH] 卧式理片进片最小尺寸判断,玻璃id替换添加打标条件,卧转立启动逻辑优化

---
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
index 4028900..8865de3 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
@@ -13,6 +13,7 @@
         <result column="engineer_id" property="engineerId"/>
         <result column="tempering_layout_id" property="temperingLayoutId"/>
         <result column="slot" property="slot"/>
+        <result column="glass_count" property="glassCount"/>
         <result column="max_sequence" property="maxSequence"/>
         <result column="min_sequence" property="minSequence"/>
         <result column="remain_width" property="remainWidth"/>
@@ -46,17 +47,16 @@
                  INNER JOIN ENGINEERING T4 ON T2.ENGINEER_ID=T4.ENGINEER_ID
         ORDER BY T4.ID, T2.TEMPERING_LAYOUT_ID
     </select>
-
     <select id="queryTemperingOccupySlot" resultMap="temperingLayoutDTO">
         SELECT ENGINEER_ID,
                TEMPERING_LAYOUT_ID,
                COUNT(DISTINCT SLOT) as SLOT_COUNT
         FROM BIG_STORAGE_CAGE_DETAILS
-        WHERE STATE = 100
+        WHERE STATE = 100 AND TEMPERING_LAYOUT_ID!=0
         GROUP BY ENGINEER_ID,
                  TEMPERING_LAYOUT_ID
         HAVING SLOT_COUNT &gt;= #{count}
-        ORDER BY SLOT_COUNT DESC
+        ORDER BY ID DESC
     </select>
     <select id="queryGlassMaxAndMin" resultMap="slotSequenceDTO">
         SELECT T.*,
@@ -65,11 +65,13 @@
                  SELECT ENGINEER_ID,
                         TEMPERING_LAYOUT_ID,
                         SLOT,
+                        count(*)                     as glass_count,
                         MAX(TEMPERING_FEED_SEQUENCE) AS MAX_SEQUENCE,
                         MIN(TEMPERING_FEED_SEQUENCE) AS MIN_SEQUENCE
                  FROM BIG_STORAGE_CAGE_DETAILS
                  WHERE ENGINEER_ID = #{engineerId}
                    AND TEMPERING_LAYOUT_ID = #{temperingLayoutId}
+                   AND STATE = 100
                  GROUP BY ENGINEER_ID,
                           TEMPERING_LAYOUT_ID,
                           SLOT
@@ -89,12 +91,13 @@
                 (#{item.glassId}, #{item.targetSlot})
             </foreach>
             )
+            and state!=101
         </where>
     </update>
 
     <select id="selectTemperingGlassCount" resultType="java.util.Map">
         select a.engineer_id,a.tempering_layout_id,count2,count1,count2-count1 as count3,count(c.glass_id) as count4 from
-            (select engineer_id,tempering_layout_id,count(*) as count1 from big_storage_cage_details where state=100 group by engineer_id,tempering_layout_id) as a
+            (select engineer_id,tempering_layout_id,count(*) as count1 from big_storage_cage_details where state=100 and tempering_layout_id!=0 group by engineer_id,tempering_layout_id) as a
                 left join
             (select engineer_id,tempering_layout_id,count(*) as count2 from glass_info group by engineer_id,tempering_layout_id) as b
             on a.engineer_id=b.engineer_id and a.tempering_layout_id=b.tempering_layout_id

--
Gitblit v1.8.0