自动化立体仓库 - WMS系统
chen.llin
2025-12-24 f7ac54f86129a2d4875c7107a84556849c3d8c2a
src/main/resources/mapper/ManLocDetlMapper.xml
@@ -313,4 +313,22 @@
        where node_id = #{nodeId} ;
    </update>
    <!-- 批量查询库存数量 -->
    <select id="queryStockAnfmeBatch" resultType="com.zy.asrs.entity.result.StockQtyDTO">
        SELECT
            matnr,
            ISNULL(batch, '') as batch,
            SUM(anfme) as stockQty
        FROM man_loc_detl
        WHERE 1=1
        <if test="matnrBatchList != null and matnrBatchList.size > 0">
            AND (
            <foreach collection="matnrBatchList" item="item" separator=" OR ">
                (matnr + '_' + ISNULL(batch, '') = #{item})
            </foreach>
            )
        </if>
        GROUP BY matnr, ISNULL(batch, '')
    </select>
</mapper>