自动化立体仓库 - WMS系统
1
zhang
2025-09-13 25c7cdf3ea9c4e63f16bbb52ce40e28bc65dc87c
src/main/resources/mapper/BasCrnpMapper.xml
@@ -25,7 +25,28 @@
        <result column="emp_in" property="empIn" />
        <result column="tank_qty" property="tankQty" />
        <result column="tank_qty1" property="tankQty1" />
        <result column="origin" property="origin" />
    </resultMap>
    <select id="getCrnLaneWayInfo" resultType="com.zy.asrs.entity.CrnLaneWayInfoDto">
        select
            crn.crn_no crnNo ,
            crn.crn_sts crnSts,
            case when crn.crn_err != 0 then 1 else 0 end as crnErr,
            count(loc.loc_no) count,
           count(case when loc.loc_sts = 'F' then 1 end) stockQty,
           count(case when loc.loc_sts = 'D' then 1 end) emptyPalletQty,
           count(case when loc.loc_sts = 'O' then 1 end) emptySlotQty,
           count(case when loc.loc_sts != 'O' and loc.loc_sts != 'D' and loc.loc_sts != 'F' then 1 end) otherQty
        from
            asr_bas_crnp crn
        left join asr_loc_mast loc on
            crn.crn_no = loc.crn_no
        group by
            crn.crn_no,
            crn.crn_sts,
            crn.crn_err
        order by
            crn.crn_no
    </select>
</mapper>