feat(in-transit-transfer): 外部调用切换集成连接器并新增调拨类型与在途仓编码

- 退役 erp_adapter/gateway_adapter:外部查询/写经 capability_client 走集成连接器,端点凭据与并发超时由客户端实例管理
- 域能力代码注册 capabilities:入参出参 Schema、幂等语义与读写标志随域代码版本化,组合根 create_app 幂等注册
- 新增调拨业务类型 transfer_type(在途仓至HUB/HUB维修出/HUB间)冻结枚举,迁移落 CheckConstraint 数据库兜底
- 外部仓库映射新增 in_transit_warehouse_code 拨出库位来源,管理端库存映射页同步维护
- 单据命名外部化:erp_* 字段与索引改称 external_*,单据号格式交由连接器映射,测试数据同步换牌
- 收料归档文件可用性判定收敛 receipt_file_gate 单一事实来源(当天抓取/保留期/清理态)
- 同步 chat 调拨卡片、useChatTransfer、e2e、全套服务/API/Job 测试与域文档
This commit is contained in:
hugo committed 2026-09-23 00:49:38 +08:00
1 parent 31591e663e
commit 9959b06acd
97 files changed
+3525 -1489

No files matched your search

@@ -16,18 +16,19 @@ from tests.services.in_transit_transfer.repo_fakes import make_transfer_deps
def _bulk_file(count: int) -> dict:
"""生成 count 行收料文件(每 Invoice 单行)。"""
"""生成 count 行收料文件(每 Invoice 单行;movement 领域字段键 + 类型1前缀)。"""
rows = []
for index in range(1, count + 1):
rows.append({
"sheet": "Receipt",
"row_no": index,
"invoice_no": f"INV-BULK-{index:04d}",
"material_no": f"MAT-{index:04d}",
"doc_no": f"HOM-BULK-{index:04d}",
"lot_no": f"LOT-BULK-{index:04d}",
"material_code": f"MAT-{index:04d}",
"material_name": "批量物料",
"specification": "T-100",
"receipt_date": "2026-08-05",
"receipt_quantity": "100",
"movement_date": "2026-08-05",
"quantity": "100",
"source_code": "DBS-AWSBI",
})
return {
@@ -41,7 +42,8 @@ def test_bulk_precheck_300_invoices(transfer_db):
"""300 Invoice 预检完成且数量正确;耗时打印参考(不设脆断言)。"""
deps, erp, _ = make_transfer_deps(_bulk_file(300))
for index in range(1, 301):
erp.seed_inventory(f"INV-BULK-{index:04d}", "100")
# 库存种子按 (料号, 拨出库位, 拨出批号) 三元组与文件行一一对应。
erp.seed_stock(f"MAT-{index:04d}", "DBS-TRANSIT", f"LOT-BULK-{index:04d}", "100")
started = time.perf_counter()
summary = create_precheck(source_codes=["DBS-AWSBI"], business_date="2026-08-06", deps=deps)