订单看板bug修改

This commit is contained in:
2025-07-22 15:28:13 +08:00
parent d2183c2da5
commit 8c1e60f226

View File

@@ -41,7 +41,7 @@ public interface WmsProductMapper extends BaseMapperPlus<WmsProductMapper, WmsPr
// 订单物料分析(只分析库存量和销售销量)
@Select("SELECT p.product_name AS materialName, SUM(od.quantity) AS usedCount, " +
"(SELECT IFNULL(SUM(stock_quantity),0) FROM wms_stock s WHERE s.product_id = p.product_id) AS stockCount, " +
"(SELECT IFNULL(SUM(quantity),0) FROM wms_stock s WHERE s.item_type='product' AND s.item_id = p.product_id AND s.del_flag=0) AS stockCount, " +
"0 AS purchaseCycle " +
"FROM wms_order_detail od JOIN wms_product p ON od.product_id = p.product_id " +
"GROUP BY p.product_name")