From 2c6196c40b915f250ceba0ce4ea23540471e4168 Mon Sep 17 00:00:00 2001 From: dadiyang Date: Wed, 7 Oct 2026 01:37:07 +0800 Subject: [PATCH] fix(erp):采购/销售统计取数补 status=20(已审核)过滤——未审核出库单创建即计入今日收入、入库单反审核后统计仍含该单,与库存/应收"审核后确认"口径不一致 --- yudao-module-erp/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml | 6 ++++-- yudao-module-erp/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/yudao-module-erp/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml b/yudao-module-erp/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml index a88fb3a..2dce510 100644 --- a/yudao-module-erp/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml +++ b/yudao-module-erp/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml @@ -13,7 +13,8 @@ AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()} - AND deleted = 0) - + AND deleted = 0 + AND status = 20) - (SELECT IFNULL(SUM(total_price), 0) FROM erp_purchase_return WHERE return_time >= #{beginTime} @@ -23,7 +24,8 @@ AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()} - AND deleted = 0) + AND deleted = 0 + AND status = 20) \ No newline at end of file diff --git a/yudao-module-erp/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml b/yudao-module-erp/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml index 3e04ee7..db89efa 100644 --- a/yudao-module-erp/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml +++ b/yudao-module-erp/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml @@ -13,7 +13,8 @@ AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()} - AND deleted = 0) - + AND deleted = 0 + AND status = 20) - (SELECT IFNULL(SUM(total_price), 0) FROM erp_sale_return WHERE return_time >= #{beginTime} @@ -23,7 +24,8 @@ AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()} - AND deleted = 0) + AND deleted = 0 + AND status = 20) \ No newline at end of file -- libgit2 0.21.4