From 9618cf237f1ceed8bc307ae6fef544c100c70470 Mon Sep 17 00:00:00 2001 From: ogt Date: Thu, 25 Jun 2026 12:02:47 +0800 Subject: [PATCH] fix: hide import table flow from operator copy --- config.py | 2 +- docs/AI_INTELLIGENCE_MODULE_SOT.md | 1 + templates/auto_import_index.html | 4 ++-- templates/system_settings.html | 2 +- tests/test_pchome_revenue_growth_service.py | 6 +++++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/config.py b/config.py index 0aefdce..a487997 100644 --- a/config.py +++ b/config.py @@ -402,7 +402,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '') # ========================================== # 系統版本與路徑 # ========================================== -SYSTEM_VERSION = "V10.668" +SYSTEM_VERSION = "V10.669" LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log') public_url = PUBLIC_URL # 用於模板顯示 diff --git a/docs/AI_INTELLIGENCE_MODULE_SOT.md b/docs/AI_INTELLIGENCE_MODULE_SOT.md index 799e5eb..86e396c 100644 --- a/docs/AI_INTELLIGENCE_MODULE_SOT.md +++ b/docs/AI_INTELLIGENCE_MODULE_SOT.md @@ -745,3 +745,4 @@ POSTGRES_HOST=momo-db | 2026-06-25 | PPT 視覺 QA 頁首不可依 runtime 條件退回描述型長句 | V10.666 起 PPT 視覺 QA 主頁首固定顯示「先確認簡報可預覽、可審核,再把問題交給修復流程」,避免 runtime 已就緒時失去行動導向。 | | 2026-06-25 | 邊角工具頁不可只描述功能,必須說明如何支援 PChome 業績判斷 | V10.667 起 AI 生成歷史、PChome 爬蟲、趨勢資料、用戶管理、外部工具狀態與市場情報停用頁都改為短句,聚焦資料新鮮度、文案回收、權限治理與正式比價流程。 | | 2026-06-25 | 低頻治理頁與舊入口不可出現英文工程狀態或教學句 | V10.668 起 legacy bridge、維護/權限、匯入、設定、通知模板、缺貨管理、登入歷史、系統日誌與 AI 健康檢查頁統一改為繁中短句,聚焦資料可靠、權限守門、供貨風險與部署治理如何支援業績流程。 | +| 2026-06-25 | 匯入頁不可把資料表流程當成使用者主訊息 | V10.669 起雲端匯入與系統匯入完成訊息改說明業績資料新鮮度與更新筆數,不再用「下載→匯入資料庫→刪除」或資料表名稱作為前台重點。 | diff --git a/templates/auto_import_index.html b/templates/auto_import_index.html index 9c8f12f..6c797a1 100644 --- a/templates/auto_import_index.html +++ b/templates/auto_import_index.html @@ -36,7 +36,7 @@
-

系統每 30 分鐘自動檢查 Google Drive → 下載檔案 → 匯入資料庫 → 刪除雲端原檔

+

每 30 分鐘檢查雲端業績檔,讓日報、成長分析與作戰清單保持新鮮。

@@ -367,7 +367,7 @@ const result = await r.json(); if (result.status === 'success') { showAlert('uploadAlert', 'success', - `${result.message}
資料表:${result.table} · 共 ${result.rows} 筆`); + `${result.message}
共更新 ${result.rows} 筆業績資料`); input.value = ''; setTimeout(() => loadJobs(), 1000); } else { diff --git a/templates/system_settings.html b/templates/system_settings.html index 01b1162..517dba7 100644 --- a/templates/system_settings.html +++ b/templates/system_settings.html @@ -237,7 +237,7 @@ function uploadSalesReport() { if (data.table === 'realtime_sales_monthly') { alert('業績報表匯入成功!\n資料表: ' + data.table + '\n共 ' + data.rows + ' 筆資料已累加寫入。'); } else { - alert('匯入操作完成。\n注意: 系統偵測到的資料表名稱為「' + data.table + '」,而非預期的 `realtime_sales_monthly`。\n共寫入 ' + data.rows + ' 筆資料。'); + alert('匯入操作完成。\n系統偵測到資料落點與預期不同,請確認月度分析是否已更新。\n共寫入 ' + data.rows + ' 筆資料。'); } fileInput.value = ''; } else { diff --git a/tests/test_pchome_revenue_growth_service.py b/tests/test_pchome_revenue_growth_service.py index e515eb3..37e6008 100644 --- a/tests/test_pchome_revenue_growth_service.py +++ b/tests/test_pchome_revenue_growth_service.py @@ -740,7 +740,7 @@ def test_governance_and_low_frequency_pages_avoid_engineering_status_copy(): "templates/components/_legacy_bridge_panel.html": ["頁面狀態", "已整併", "業績流程可用"], "templates/403.html": ["權限守門", "未授權操作影響營運資料", "權限控管"], "templates/maintenance.html": ["服務維護", "確認業績、比價與匯入狀態", "台北時間"], - "templates/auto_import_index.html": ["更新日報、成長分析與今日作戰清單", "去重後寫入業績快照"], + "templates/auto_import_index.html": ["更新日報、成長分析與今日作戰清單", "去重後寫入業績快照", "作戰清單保持新鮮", "共更新"], "templates/settings.html": ["比價來源同步", "補齊 MOMO 參考來源"], "templates/system_settings.html": ["營運資料備份", "可回復的業績與設定狀態"], "templates/ai_recommend.html": ["值得主推、調價或補比價", "回到 PChome 銷售動作"], @@ -788,6 +788,10 @@ def test_governance_and_low_frequency_pages_avoid_engineering_status_copy(): "Glass Version", "Gradient Version", "AI 程式碼審查", + "Google Drive →", + "匯入資料庫", + "刪除雲端原檔", + "資料表:", ] legacy_paths = [