feat: 推荐采购加返回字段:需求库存在途

This commit is contained in:
JR
2025-07-30 10:23:12 +08:00
parent 5c42bf666a
commit bdb201e015
4 changed files with 43 additions and 3 deletions

View File

@@ -31,5 +31,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${ew.customSqlSegment}
</select>
<select id="getByRawMaterialIdAndOnTheWay" resultType="java.math.BigDecimal">
select sum(wpd.quantity)
from wms_purchase_plan_detail wpd
where wpd.raw_material_id = #{rawMaterialId}
and wpd.status = 1
and wpd.del_flag = 0
</select>
</mapper>