From d25615e159231b46aab5415759cc15d32e3d8b85 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期三, 26 六月 2024 16:05:33 +0800
Subject: [PATCH] 升级sqlserver依赖,移除多余依赖
---
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml | 47 ++++++++++++++++++++++++++++-------------------
1 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
index 967696b..df344d2 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
@@ -44,26 +44,35 @@
AND layer = #{layer}
</select>
- <select id="queryWorkStationNotIn" resultMap="downGlassInfo">
- SELECT T.*,
- T1.*
+ <select id="queryWorkStationIsIn" resultMap="downGlassInfo">
+ SELECT T.*
+ <if test="isDownload == null and isDownload == true ">
+ ,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
- 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 T2.GLASS_ID IS NULL
+ 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
+ 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">
+ AND T2.GLASS_ID IS NULL
+ </if>
+ <if test="isDownload == true">
+ AND T2.GLASS_ID IS not NULL
+ </if>
+ </where>
order by t.count desc
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0