新增接口,根据订单推荐采购计划

This commit is contained in:
JR
2025-07-18 17:23:51 +08:00
parent 58bdd266dc
commit 043b0e8b79
12 changed files with 112 additions and 4 deletions

View File

@@ -13,5 +13,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remark" column="remark"/>
</resultMap>
<select id="listByProductId" resultType="com.klp.domain.WmsProductBom">
SELECT bom_id, product_id, raw_material_id, quantity, unit, remark
FROM wms_product_bom
WHERE product_id = #{productId}
and del_flag = 0
</select>
</mapper>

View File

@@ -20,5 +20,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by"/>
</resultMap>
<select id="getStockByItemId" resultType="java.math.BigDecimal">
select sum(quantity) as quantity from wms_stock
where item_id = #{rawMaterialId} and item_type = 'raw_material' and del_flag = 0
</select>
</mapper>