feat(warehouseReceipt): 统计结果按仓库筛选

- 在入库单数量、入库单明细数量、入库商品种数、入库商品数量和入库商品总价的查询中添加了仓库 ID 筛选条件
- 新增 warehouseIds 参数,当其有内容时,将筛选指定仓库的数据
This commit is contained in:
2025-02-22 12:53:42 +08:00
parent 5cd919308d
commit 0c974f5044

View File

@@ -1002,6 +1002,10 @@ from (
<#if unitIds?has_content>
and gs.unit_id in :unitIds
</#if>
<#if warehouseIds?has_content>
and d.warehouse_id in :warehouseIds
</#if>
) as "入库单数量",
@@ -1051,6 +1055,9 @@ from (
<#if unitIds?has_content>
and gs.unit_id in :unitIds
</#if>
<#if warehouseIds?has_content>
and d.warehouse_id in :warehouseIds
</#if>
) as "入库单明细数量",
(select count(distinct d.goods_id)
@@ -1098,7 +1105,9 @@ from (
<#if unitIds?has_content>
and gs.unit_id in :unitIds
</#if>
<#if warehouseIds?has_content>
and d.warehouse_id in :warehouseIds
</#if>
) as "入库商品种数",
(select round(sum(d.number)::::numeric, 2)
@@ -1146,6 +1155,10 @@ from (
<#if unitIds?has_content>
and gs.unit_id in :unitIds
</#if>
<#if warehouseIds?has_content>
and d.warehouse_id in :warehouseIds
</#if>
) as "入库商品数量",
(select round(sum(d.amount)::::numeric, 2)
@@ -1194,6 +1207,10 @@ from (
<#if unitIds?has_content>
and gs.unit_id in :unitIds
</#if>
<#if warehouseIds?has_content>
and d.warehouse_id in :warehouseIds
</#if>
) as "入库商品总价"