Commit 7e18819d3d6f77b84e4c8980355118def9f8b20d
Committed by
GitHub
Merge pull request #1321 from dadiyang/fix/erp-statistics-approved-only
[BUG] ERP 统计看板:采购/销售统计取数补「已审核」过滤——未审核即计入、反审核后仍计入
Showing
2 changed files
with
8 additions
and
4 deletions
yudao-module-erp/src/main/resources/mapper/statistics/ErpPurchaseStatisticsMapper.xml
| @@ -13,7 +13,8 @@ | @@ -13,7 +13,8 @@ | ||
| 13 | <if test="@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId() != null"> | 13 | <if test="@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId() != null"> |
| 14 | AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()} | 14 | AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()} |
| 15 | </if> | 15 | </if> |
| 16 | - AND deleted = 0) - | 16 | + AND deleted = 0 |
| 17 | + AND status = 20) - | ||
| 17 | (SELECT IFNULL(SUM(total_price), 0) | 18 | (SELECT IFNULL(SUM(total_price), 0) |
| 18 | FROM erp_purchase_return | 19 | FROM erp_purchase_return |
| 19 | WHERE return_time >= #{beginTime} | 20 | WHERE return_time >= #{beginTime} |
| @@ -23,7 +24,8 @@ | @@ -23,7 +24,8 @@ | ||
| 23 | <if test="@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId() != null"> | 24 | <if test="@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId() != null"> |
| 24 | AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()} | 25 | AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()} |
| 25 | </if> | 26 | </if> |
| 26 | - AND deleted = 0) | 27 | + AND deleted = 0 |
| 28 | + AND status = 20) | ||
| 27 | </select> | 29 | </select> |
| 28 | 30 | ||
| 29 | </mapper> | 31 | </mapper> |
| 30 | \ No newline at end of file | 32 | \ No newline at end of file |
yudao-module-erp/src/main/resources/mapper/statistics/ErpSaleStatisticsMapper.xml
| @@ -13,7 +13,8 @@ | @@ -13,7 +13,8 @@ | ||
| 13 | <if test="@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId() != null"> | 13 | <if test="@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId() != null"> |
| 14 | AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()} | 14 | AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()} |
| 15 | </if> | 15 | </if> |
| 16 | - AND deleted = 0) - | 16 | + AND deleted = 0 |
| 17 | + AND status = 20) - | ||
| 17 | (SELECT IFNULL(SUM(total_price), 0) | 18 | (SELECT IFNULL(SUM(total_price), 0) |
| 18 | FROM erp_sale_return | 19 | FROM erp_sale_return |
| 19 | WHERE return_time >= #{beginTime} | 20 | WHERE return_time >= #{beginTime} |
| @@ -23,7 +24,8 @@ | @@ -23,7 +24,8 @@ | ||
| 23 | <if test="@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId() != null"> | 24 | <if test="@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId() != null"> |
| 24 | AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()} | 25 | AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getTenantId()} |
| 25 | </if> | 26 | </if> |
| 26 | - AND deleted = 0) | 27 | + AND deleted = 0 |
| 28 | + AND status = 20) | ||
| 27 | </select> | 29 | </select> |
| 28 | 30 | ||
| 29 | </mapper> | 31 | </mapper> |
| 30 | \ No newline at end of file | 32 | \ No newline at end of file |