refactor: rename expected_undelivered to compare
git mv expected_undelivered.py -> compare.py; update the 3 importers (store/runtime/router) to import compare. All public names (main, write_site_file, _read_business_dates) unchanged. Also add the Tier 2 plan doc. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -34,9 +34,7 @@ from inbound_verify.domain import (
|
||||
_site_cfg,
|
||||
) # 站点 / 文件名配置(单一来源)
|
||||
|
||||
from inbound_verify import (
|
||||
expected_undelivered as eu,
|
||||
) # _read_business_dates(比对侧业务日期读取)
|
||||
from inbound_verify import compare # _read_business_dates(比对侧业务日期读取)
|
||||
|
||||
SCHEMA_PATH = os.path.join(BASE_DIR, "schema.sql")
|
||||
|
||||
@@ -111,7 +109,7 @@ def init_schema():
|
||||
|
||||
# ============================== 解析辅助 ==============================
|
||||
|
||||
# 实到单号列 / 基号列映射(口径取自 expected_undelivered):
|
||||
# 实到单号列 / 基号列映射(口径取自 domain,与 STATIONS 对齐):
|
||||
# piece = 实到表里「每件」的单号列(扫描单号 / 子单号 / 复合串)
|
||||
# waybill = 与应到运单号对齐的干净列(中通无干净列,由 piece 复合串 v[:-8] 推导)
|
||||
# scan_time = 扫描时间列(缺失则不填,原始值仍在 raw)
|
||||
@@ -214,7 +212,7 @@ def _raw_row(row):
|
||||
def _read_business_dates():
|
||||
"""从状态库读各站本次业务日期(与报告口径一致;读不到返回空 dict)。"""
|
||||
try:
|
||||
return eu._read_business_dates(ALL_SITES + ["百世"]) or {}
|
||||
return compare._read_business_dates(ALL_SITES + ["百世"]) or {}
|
||||
except Exception as e:
|
||||
print(f">> [warn] 读取业务日期失败(不影响入库): {e}")
|
||||
return {}
|
||||
|
||||
Reference in New Issue
Block a user