From fdb9cccfe8d9132738404fee3f6d6818bd1d3fde Mon Sep 17 00:00:00 2001 From: jameszow Date: Thu, 7 Dec 2023 21:44:06 +0800 Subject: [PATCH 01/12] fix: add salePrice and purchasePrice in product stock mapper file --- .../mapper_xml/product/ProductStockMapper.xml | 12 +++++++----- .../wansenai/vo/product/ProductStockKeepUnitVO.java | 6 ++++++ .../com/wansenai/vo/report/ProductStockSkuVO.java | 9 +++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/core/dao/src/main/resources/mapper_xml/product/ProductStockMapper.xml b/core/dao/src/main/resources/mapper_xml/product/ProductStockMapper.xml index 32d858f6..7116ae40 100644 --- a/core/dao/src/main/resources/mapper_xml/product/ProductStockMapper.xml +++ b/core/dao/src/main/resources/mapper_xml/product/ProductStockMapper.xml @@ -16,11 +16,13 @@ + + SELECT sku.id, p.id AS productId, p.product_category_id, p.product_name, p.product_model, p.product_standard, p.product_color, - sku.product_bar_code, sku.multi_attribute, sku.product_unit, sku.retail_price, p.product_manufacturer, + sku.product_bar_code, sku.multi_attribute, sku.product_unit, sku.retail_price, sku.sale_price, sku.purchase_price, p.product_manufacturer, pc.category_name, ps.current_stock_quantity, ps.warehouse_id FROM product_stock AS ps LEFT JOIN product_sku AS sku ON sku.id = ps.product_sku_id @@ -59,7 +61,7 @@ SELECT ps.id, p.product_name, p.id AS productId, p.product_model, p.product_standard, p.product_color,sku.product_bar_code, p.product_weight, p.warehouse_shelves, - sku.product_unit, sku.retail_price AS unit_price, p.product_manufacturer,pc.category_name AS product_category_name, + sku.product_unit, sku.retail_price, sku.sale_price, sku.purchase_price, p.product_manufacturer,pc.category_name AS product_category_name, ps.current_stock_quantity AS current_stock, ps.init_stock_quantity AS initial_stock, w.warehouse_name, w.id AS warehouseId, ROUND((ps.current_stock_quantity * sku.retail_price), 2) AS stock_amount FROM product_stock AS ps @@ -96,7 +98,7 @@