feat(schedule): 增加库存源选项描述字段与站点ID支持

This commit is contained in:
hugo committed 2026-07-10 00:48:27 +08:00
1 parent f4e74f7b07
commit 8b1efbedb9
37 files changed
+8488 -4126

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
"""
scripts/rpa/dsv_driver.py
用途:DSV 360 库存 RPA 对外编排入口(session → 导航 → 导出)。
依赖:dsv_report_export。
逻辑:freight_rpa_worker 在 source_type=dsv360 时仅调用本模块公开函数。
"""
from __future__ import annotations
from typing import Any
from dsv_report_export import (
ensure_dsv_session,
export_dsv_inventory_source,
prepare_dsv_batch_export_step,
)
def download_dsv360_inventory(page: Any, trigger: dict[str, Any], source: dict[str, Any]) -> Any:
"""
单票 trigger 的 DSV 360 导出。
核心逻辑:ensure session → 导航至参数页 → 填参并导出 Excel。
"""
entry_url = str(source.get("entry_url") or "").strip()
if not entry_url:
raise RuntimeError("DSV360 inventory source missing entry_url")
ensure_dsv_session(page, entry_url)
return export_dsv_inventory_source(page, trigger, source)