From 65ae6084f552c035eb5640afbd8f73e6054e3b6c Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期二, 16 七月 2024 21:15:53 +0800
Subject: [PATCH] 1、大理片:fixbug:大理片出片逻辑修改,钢化版图是否到齐:sql逻辑问题,包含人工出片任务,造成钢化版图是否到齐需要获取已出片的玻璃,造成已出笼的玻璃会重复计算并准备生成钢化任务,但获取的玻璃信息为空,造成插入钢化表异常。且排除已出笼的钢化版图较复杂(暂不关联钢化小片表),目前解决方案:把所有到齐的钢化版图数据查出来,排除笼内玻璃为空的 2、移除已配置完mapperscan已扫描仍有@Mapper注解的

---
 hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml |   31 +++++++++++++------------------
 1 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
index df344d2..1930840 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
@@ -10,7 +10,7 @@
     <resultMap id="downGlassInfo" type="com.mes.downworkstation.entity.dto.DownGlassInfoDTO">
         <result column="flow_card_id" property="flowCardId"/>
         <result column="layer" property="layer"/>
-        <result column="count" property="count"/>
+        <result column="racks_number" property="racksNumber"/>
         <collection property="glassInfoList" ofType="com.mes.glassinfo.entity.GlassInfo">
             <id column="id" property="id"/>
             <result column="flow_card_id" property="flowCardId"/>
@@ -45,34 +45,29 @@
     </select>
 
     <select id="queryWorkStationIsIn" resultMap="downGlassInfo">
-        SELECT T.*
-        <if test="isDownload == null and isDownload == true ">
+        SELECT
+        T.FLOW_CARD_ID,
+        T.LAYER,
+        T.RACKS_NUMBER
+        <if test="!isDownload">
             ,T1.*
         </if>
-        FROM (
-        SELECT T.FLOW_CARD_ID,
-        T.LAYER,
-        COUNT(T.LAYER) AS COUNT
         FROM
-        DOWN_GLASS_INFO T
-        INNER JOIN DOWN_WORKSTATION T1
-        ON T.FLOW_CARD_ID = T1.FLOW_CARD_ID
-        AND T.LAYER = T1.LAYER
-        GROUP BY
-        T.FLOW_CARD_ID,
-        T.LAYER
-        ) T
+        DOWN_WORKSTATION T
         INNER JOIN GLASS_INFO T1 ON T.FLOW_CARD_ID = T1.FLOW_CARD_ID
         AND T.LAYER = T1.LAYER
         LEFT JOIN DOWN_GLASS_INFO T2 ON T1.GLASS_ID = T2.GLASS_ID
         <where>
-            <if test="isDownload == null or isDownload == false">
+            <if test="!isDownload">
                 AND T2.GLASS_ID IS NULL
             </if>
-            <if test="isDownload == true">
+            <if test="isDownload">
                 AND T2.GLASS_ID IS not NULL
             </if>
         </where>
-        order by t.count desc
+        ORDER BY
+        T.RACKS_NUMBER DESC,
+        T1.TEMPERING_LAYOUT_ID,
+        T1.TEMPERING_FEED_SEQUENCE DESC
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0