引入 PostgreSQL 持久化:到货核销数据入库管道
- 新增 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>
This commit is contained in:
@@ -6,3 +6,4 @@ websocket-client>=1.0.0
|
||||
fastapi>=0.110.0
|
||||
uvicorn>=0.27.0
|
||||
apscheduler>=3.10.0
|
||||
psycopg[binary]>=3.1
|
||||
|
||||
Reference in New Issue
Block a user