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 <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-07-28 19:11:24 +08:00
1 parent d4c927a8b9
commit 0a055557cb
1 file changed
+2 -1
+2 -1
View File
@@ -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 ""