Commit 7e18819d3d6f77b84e4c8980355118def9f8b20d

Authored by 芋道源码
Committed by GitHub
2 parents 0ab406ee 2c6196c4

Merge pull request #1321 from dadiyang/fix/erp-statistics-approved-only

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