From 0c974f504446bd7fdf54938199cc0b786d756c5d Mon Sep 17 00:00:00 2001 From: lihongjie0209 Date: Sat, 22 Feb 2025 12:53:42 +0800 Subject: [PATCH] =?UTF-8?q?feat(warehouseReceipt):=20=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E6=8C=89=E4=BB=93=E5=BA=93=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在入库单数量、入库单明细数量、入库商品种数、入库商品数量和入库商品总价的查询中添加了仓库 ID 筛选条件 - 新增 warehouseIds 参数,当其有内容时,将筛选指定仓库的数据 --- .../service/WarehouseReceiptService.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/main/java/cn/lihongjie/coal/warehouseReceipt/service/WarehouseReceiptService.java b/src/main/java/cn/lihongjie/coal/warehouseReceipt/service/WarehouseReceiptService.java index c1f45ce3..813cf3fa 100644 --- a/src/main/java/cn/lihongjie/coal/warehouseReceipt/service/WarehouseReceiptService.java +++ b/src/main/java/cn/lihongjie/coal/warehouseReceipt/service/WarehouseReceiptService.java @@ -1002,6 +1002,10 @@ from ( <#if unitIds?has_content> and gs.unit_id in :unitIds + + <#if warehouseIds?has_content> + and d.warehouse_id in :warehouseIds + ) as "入库单数量", @@ -1051,6 +1055,9 @@ from ( <#if unitIds?has_content> and gs.unit_id in :unitIds + <#if warehouseIds?has_content> + and d.warehouse_id in :warehouseIds + ) as "入库单明细数量", (select count(distinct d.goods_id) @@ -1098,7 +1105,9 @@ from ( <#if unitIds?has_content> and gs.unit_id in :unitIds - + <#if warehouseIds?has_content> + and d.warehouse_id in :warehouseIds + ) as "入库商品种数", (select round(sum(d.number)::::numeric, 2) @@ -1146,6 +1155,10 @@ from ( <#if unitIds?has_content> and gs.unit_id in :unitIds + <#if warehouseIds?has_content> + and d.warehouse_id in :warehouseIds + + ) as "入库商品数量", (select round(sum(d.amount)::::numeric, 2) @@ -1194,6 +1207,10 @@ from ( <#if unitIds?has_content> and gs.unit_id in :unitIds + + <#if warehouseIds?has_content> + and d.warehouse_id in :warehouseIds + ) as "入库商品总价"