feat(file-check): 更新文件检核工具 API Key 配置及相关文档
This commit is contained in:
1 parent
634dee4b81
commit
55cf7ff734
74 files changed
+1525
-1182
No files matched your search
@@ -36,6 +36,7 @@ DATA_START_ROW = 4
|
||||
|
||||
|
||||
def _storage_root() -> Path:
|
||||
"""发货通知文件存储根目录(exports/notice_uploads/inventory_uploads 的父路径)。"""
|
||||
root = str(current_app.config.get("SHIPPING_NOTICE_STORAGE_ROOT") or "").strip()
|
||||
if root:
|
||||
return Path(resolve_backend_relative_path(root))
|
||||
@@ -246,6 +247,15 @@ def _export_filename(task: ShippingTask, ts: str) -> str:
|
||||
|
||||
|
||||
def generate_shipment_excel(task: ShippingTask) -> tuple[str, str]:
|
||||
"""
|
||||
基于任务数据生成货代发货 Excel 并写入 exports 目录。
|
||||
【AI 触发时机】:由 generate_excel Tool 调用;Agent 禁止直接操作文件系统。
|
||||
|
||||
核心逻辑:复制 PVMI/legacy 模板 → 填充 Header/Detail 或 legacy 行 → 返回 (绝对路径, 文件名)。
|
||||
|
||||
Returns:
|
||||
tuple[str, str]: (export_file_path, export_file_name)。
|
||||
"""
|
||||
root = _storage_root() / "exports"
|
||||
root.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
Reference in new issue
Block a user