feat(shipping-notice): 新增库存确认来源接口及相关逻辑

This commit is contained in:
hugo committed 2026-07-13 21:53:45 +08:00
1 parent a31735b689
commit 0a9bd6415d
69 files changed
+8442 -775

No files matched your search

@@ -331,6 +331,20 @@ def serialize_task(task: ShippingTask, projection: TaskProjection) -> dict[str,
"rpa_runtime": rpa_runtime_mode(step_payload.get("last_inventory_rpa_runtime") if isinstance(step_payload, dict) else None),
"rpa_inventory_source": step_payload.get("rpa_inventory_source") if isinstance(step_payload, dict) else None,
"inventory_source_resolution": step_payload.get("inventory_source_resolution") if isinstance(step_payload, dict) else None,
"destination_code": task.destination_code,
"destination_city": task.destination_city,
"destination_country": task.destination_country,
"warehouse_hint": task.warehouse_hint,
"inventory_source_code": task.inventory_source_code,
"inventory_source_type": task.inventory_source_type,
"inventory_site_id": task.inventory_site_id,
"inventory_warehouse_id": task.inventory_warehouse_id,
"inventory_source_status": task.inventory_source_status,
"inventory_source_method": task.inventory_source_method,
"inventory_source_config_version": task.inventory_source_config_version,
"inventory_routing_fingerprint": task.inventory_routing_fingerprint,
"inventory_source_confirmed_at": task.inventory_source_confirmed_at.isoformat() if task.inventory_source_confirmed_at else None,
"inventory_source_confirmed_by": task.inventory_source_confirmed_by,
"inventory_snapshot": _serialize_inventory_snapshot(task),
"shortage": task.shortage_json,
"line_results": task.line_results_json or [],