From 0a055557cb5dbbbd35852d6992d473b67216e6ac Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Tue, 28 Jul 2026 19:11:24 +0800 Subject: [PATCH] feat(storage): expose storedOccupancyId on shelf slot enrichment Enable web-admin batch outbound to call existing remove occupancy API per selected cell. Co-authored-by: Cursor --- backend/app/crud/storage_occupancy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/app/crud/storage_occupancy.py b/backend/app/crud/storage_occupancy.py index 28d84668..d1a5baae 100644 --- a/backend/app/crud/storage_occupancy.py +++ b/backend/app/crud/storage_occupancy.py @@ -282,7 +282,7 @@ def enrich_slots_with_stored_cell_products( tenant_no: str, slots: List[Dict[str, Any]], ) -> List[Dict[str, Any]]: - """为占用格附带在库物品摘要(名称/类型),供库位货架展示。""" + """为占用格附带在库占用 id 与物品摘要(名称/类型),供库位货架展示与批量出库。""" slot_ids = [s.get("id") for s in slots if int(s.get("occupiedCount") or 0) > 0 and s.get("id")] if not slot_ids: return slots @@ -307,6 +307,7 @@ def enrich_slots_with_stored_cell_products( occ = occ_by_slot.get(slot.get("id")) if not occ: continue + slot["storedOccupancyId"] = occ.id slot["storedItemType"] = occ.item_type or "" slot["storedItemCode"] = occ.item_code or "" slot["storedItemName"] = occ.item_name or ""