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>