百世应到/实到基数(应扫/已扫)原仅在 state_store(单值、无历史)。新增百世专用聚合表 baishi_daily_stats(site+business_date UPSERT),baishi 下载时抓到基数直接落库(store.upsert_baishi_daily_stats,一步,不绕 state_store→store)。state_store 双写保留以兼容旧 Excel 汇总(process_baishi),后续统一清理。 真机端到端验证通过:PG (2026-07-31, 194, 186, 8),state_store 一致。 Co-Authored-By: Claude <noreply@anthropic.com>
- store.get_existing_handover_nos: query PG expected_record.handover_no - inject dedup skip before submitting export in zto/yunda/anneng/shunxin - shunxin reads RTS handover_no from waybill-list view (method 1) - force-redownload switch threaded via task_spec -> dispatch -> impl - schema: add idx_expected_handover index Co-Authored-By: Claude <noreply@anthropic.com>
- 新增 db_store.py:解析 downloads/ 下各站应到/实到/未到 Excel,幂等 UPSERT 入库(统一核心列 + raw JSONB 兜底,单号按文本存) - 新增 schema.sql:三表(expected/actual/undelivered_record),隔离到专用 schema inbound_verify(CREATE SCHEMA + search_path) - 韵达实到业务清洗:抛弃「交接单号」为空行 + 按子单号去重 - 同步 config.example.yaml(postgres 配置)与 requirements.txt(psycopg[binary]) 本次仅手动入库管道;自动挂载到下载流程留待后续。 Co-Authored-By: Claude <noreply@anthropic.com>