Commit 6dcdbbb2 by zhouhaibao

fix(report): 修正订单汇总查询条件

- 将订单标志从 'N' 更改为 'Y'
- 添加粒度尺寸类型筛选条件值为 1
1 parent 91b3d594
......@@ -1531,7 +1531,8 @@ def fetch_biz_sql_aggregated(start_date, end_date, biz_type, store_names=None):
# 外层:主表 gopa(子订单级) JOIN go+po+gso(子订单) + LEFT JOIN gopa2(主汇总 order_flag='Y') + LEFT JOIN fee
where_parts = [
"gopa.deleted_flag = 'N'",
"gopa.order_flag = 'N'",
"gopa.order_flag = 'Y'",
"gopa.grain_size_type = 1",
f"go.scene_type = {scene_type}",
f"po.success_date >= '{start_str}'",
f"po.success_date <= '{end_str}'",
......@@ -2276,7 +2277,7 @@ def fetch_light_reform_finance_stats(start_date, end_date, scene_type=1):
GROUP BY ecc.order_code
) fee ON fee.order_code = gopa.order_code
WHERE gopa.deleted_flag = 'N'
AND gopa.order_flag = 'N'
AND gopa.order_flag = 'Y' and gopa.grain_size_type = 1
AND go.scene_type = {scene_type}
AND po.success_date >= '{start_str}'
AND po.success_date <= '{end_str}'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!