wangfei
2024-10-21 8785b6b5ee9298308752b53bf546953ae49b8c88
hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/mapper/RawGlassStorageDetailsMapper.xml
File was renamed from hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/rawglassdetails/mapper/xml/RawGlassStorageDetailsMapper.xml
@@ -3,17 +3,22 @@
<mapper namespace="com.mes.rawglassdetails.mapper.RawGlassStorageDetailsMapper">
    <select id="listBySlotState" resultType="java.lang.Integer">
        select t.slot
        from raw_glass_storage_station t
        inner JOIN raw_glass_storage_details t1
        on t.slot = t1.slot_id and t.enable_state = 1
        and t.slot in
        <foreach collection="leftingStation" item="item" open='(' close=')' separator=','>
            #{item}
        </foreach>
        and t1.state not in
        SELECT
        T.SLOT
        FROM
        RAW_GLASS_STORAGE_STATION T
        LEFT JOIN RAW_GLASS_STORAGE_DETAILS AS T1 ON T.DEVICE_ID = T1.DEVICE_ID
        AND T.SLOT = T1.SLOT
        AND T1.STATE IN
        <foreach collection="state" item="item" open='(' close=')' separator=','>
            #{item}
        </foreach>
        WHERE
        T.ENABLE_STATE = 1
        AND T.DEVICE_ID IN
        <foreach collection="leftingStation" item="item" open='(' close=')' separator=','>
            #{item}
        </foreach>
        AND T1.SLOT IS NULL
    </select>
</mapper>