Commit 2c6196c40b915f250ceba0ce4ea23540471e4168

Authored by dadiyang
1 parent 3a6150f5

fix(erp):采购/销售统计取数补 status=20(已审核)过滤——未审核出库单创建即计入今日收入、入库单反审核后统计仍含该单,与库存/应收"审核后确认"口径不一致

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