fix: align ppt auto generation targets
All checks were successful
CD Pipeline / deploy (push) Successful in 1m4s

This commit is contained in:
OoO
2026-05-18 14:39:43 +08:00
parent 45af902b63
commit b8ca756090
4 changed files with 32 additions and 12 deletions

View File

@@ -244,6 +244,8 @@ def build_defined_ppt_jobs(
promo_prev_end = (target_dt - timedelta(days=7)).strftime("%Y/%m/%d")
promo_arg = f"{promo_start}-{target}"
promo_compare_arg = f"近7日:{promo_start}-{target}|前7日:{promo_prev_start}-{promo_prev_end}"
strategy_label = f"{month_label} 月策略(截至 {target_dt.strftime('%m/%d')}"
strategy_arg = f"{month_start}-{target}"
job_map = {
"daily": PPTAutoJob("daily", "每日日報", "daily", target, target, target, {
@@ -267,8 +269,8 @@ def build_defined_ppt_jobs(
"ttm": PPTAutoJob("ttm", "TTM 滾動 12 月", "ttm", "", target, ttm_label, {
"report_type": "ttm", "period": ttm_label,
}),
"strategy": PPTAutoJob("strategy", "策略(月)", "strategy", month_arg, target, f"{month_label} 月策略", {
"report_type": "strategy", "start": month_start, "end": month_end, "label": f"{month_label} 月策略",
"strategy": PPTAutoJob("strategy", "策略(月)", "strategy", strategy_arg, target, strategy_label, {
"report_type": "strategy", "start": month_start, "end": target, "label": strategy_label,
}),
"competitor": PPTAutoJob("competitor", "競品(月)", "competitor", "monthly", target, f"{month_label} 月比較", {
"report_type": "competitor", "start": month_start, "end": target, "label": f"{month_label} 月比較",
@@ -297,7 +299,7 @@ def build_defined_ppt_jobs(
"new_product": PPTAutoJob("new_product", "新品追蹤", "new_product", "30", target, "近 30 天", {
"report_type": "new_product", "days": 30,
}),
"market_intel": PPTAutoJob("market_intel", "市場情報", "market_intel", "", target, week_label, {
"market_intel": PPTAutoJob("market_intel", "市場情報", "market_intel", week_label, target, week_label, {
"report_type": "market_intel", "week": week_label,
}),
"price_elasticity": PPTAutoJob("price_elasticity", "價格甜蜜點", "price_elasticity", "90", target, "全平台近 90 天", {