zhoushihao
2025-03-29 1d1f0ea560eb664f4506cef4ffe7f70d76475552
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
@@ -174,8 +174,8 @@
        total_count,
        real_count,
        ifnull(damage_count, 0) as damage_count,
        total_count - real_count - ifnull(damage_count, 0) as lack_count
        case when total_count - real_count - ifnull(damage_count, 0) < 0 then 0 else
        total_count - real_count - ifnull(damage_count, 0) end as lack_count
        from big_details_temp t
        inner join glass_info_temp t1 on t.engineer_id = t1.engineer_id and
        t.tempering_layout_id = t1.tempering_layout_id
@@ -268,7 +268,8 @@
    </select>
    <select id="querybigStorageCageDetail" resultType="com.mes.base.entity.vo.BigStorageVO">
        select bsc.device_id, bsc.slot, count(bscd.glass_id) as count
        from big_storage_cage bsc left join big_storage_cage_details bscd
        from big_storage_cage bsc
                 left join big_storage_cage_details bscd
        on bsc.slot=bscd.slot and bscd.state in (100, 102, 103, 104)
        group by bsc.device_id, bsc.slot
        order by bsc.device_id, bsc.slot