feat(in-transit-transfer): 落地证据流重解析并纳入货代与排程配套改动

外部单号进入异动档自然键,圈档按 T-2 成熟封顶,当前归档可单独重解析。同批带上 Crane 禁整页刷新、ODM 白名单降级、排程抽屉与执行记录日期窗,以及 YAML 库存源下线。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
hugoandCursor committed 2026-10-22 00:48:37 +08:00
1 parent 911afa0f73
commit 4c2a7e2a23
145 files changed
+11695 -4214

No files matched your search

@@ -79,9 +79,10 @@ def wecom_fake() -> FakeWeCom:
def patch_source_file_status(monkeypatch):
"""执行文件对账门禁替身工厂:替换 execution_service 的来源文件状态投影。
用途:execute_items 门禁②按去重来源调 resolve_source_file_status(真实查询
收料文件表);单元测试注入替身避免触碰表数据。缺省全部来源投影为
ready 且 sha=dbs 夹具 checksum("d"*64,与 dbs_ready_file 行版本戳同源)。
用途:execute_items 门禁②按 (来源, record_kind) 调 resolve_source_file_status
(真实查询收料/出站文件表);单元测试注入替身避免触碰表数据。缺省全部
来源投影为 ready 且 sha=dbs 夹具 checksum("d"*64,与 dbs_ready_file
行版本戳同源)。record_kind 入参接受但不区分,存量用例仍按来源给 sha。
Args:
mapping: source_code → sha 映射;值为 None 表示该来源无可用文件
@@ -92,7 +93,8 @@ def patch_source_file_status(monkeypatch):
def _patch(mapping: dict[str, str | None] | None = None) -> None:
table = mapping or {}
def _resolve(*, source_code: str) -> dict:
def _resolve(*, source_code: str, record_kind: str = "inbound") -> dict:
del record_kind # 本替身按来源给 sha;出站分流用例自行覆盖本函数。
if source_code in table:
sha = table[source_code]
if sha is None: