zhoushihao
2024-06-26 79cddf75458ebc5d8855f66ea9bf9ef073327b03
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
@@ -44,9 +44,11 @@
          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,
@@ -63,7 +65,14 @@
                 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
        <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>