From 74de1dc68a2b0608d62c056b37c56b2a116f2379 Mon Sep 17 00:00:00 2001 From: ogt Date: Mon, 20 Apr 2026 20:38:04 +0800 Subject: [PATCH] fix: add python-pptx to requirements + fix BCG empty name filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - requirements.txt: 加入 python-pptx(ADR-014 PPT 系統必要依賴,前次漏加) - openclaw_bot_routes.py: BCG SQL 補 brand_name/area_name IS NOT NULL 過濾 Co-Authored-By: Claude Sonnet 4.6 --- requirements.txt | 3 ++- routes/openclaw_bot_routes.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4d0f58f..1c3b003 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,4 +22,5 @@ beautifulsoup4 lxml prometheus-client python-telegram-bot[job-queue] -paramiko # ADR-013: AIOps SSH 跳板修復 \ No newline at end of file +paramiko # ADR-013: AIOps SSH 跳板修復 +python-pptx # ADR-014: PPT 簡報系統 \ No newline at end of file diff --git a/routes/openclaw_bot_routes.py b/routes/openclaw_bot_routes.py index 30880ab..6993821 100644 --- a/routes/openclaw_bot_routes.py +++ b/routes/openclaw_bot_routes.py @@ -967,6 +967,8 @@ def query_vendor_bcg_data(yr: int = None, mo: int = None) -> dict: SUM(profit_amt_curr) AS profit FROM monthly_summary_analysis WHERE sales_amt_curr > 0 + AND brand_name IS NOT NULL AND brand_name != '' + AND area_name IS NOT NULL AND area_name != '' {yr_filter} {mo_filter} GROUP BY brand_name, area_name ORDER BY sales DESC LIMIT 100