From 709701374e8670f46f3dd882ae4141ede24ba8c4 Mon Sep 17 00:00:00 2001 From: alb3rtino Date: Tue, 24 Oct 2023 14:07:11 +0200 Subject: [PATCH] [UIREC-285] - Update itemRecord with accessionNumber during checkin (#784) --- src/main/java/org/folio/helper/CheckinHelper.java | 4 ++++ .../java/org/folio/service/inventory/InventoryManager.java | 1 + 2 files changed, 5 insertions(+) diff --git a/src/main/java/org/folio/helper/CheckinHelper.java b/src/main/java/org/folio/helper/CheckinHelper.java index 570600787..c561693ec 100644 --- a/src/main/java/org/folio/helper/CheckinHelper.java +++ b/src/main/java/org/folio/helper/CheckinHelper.java @@ -6,6 +6,7 @@ import static java.util.stream.Collectors.toList; import static org.folio.orders.utils.HelperUtils.collectResultsOnSuccess; import static org.folio.rest.core.exceptions.ErrorCodes.ITEM_UPDATE_FAILED; +import static org.folio.service.inventory.InventoryManager.ITEM_ACCESSION_NUMBER; import static org.folio.service.inventory.InventoryManager.ITEM_BARCODE; import static org.folio.service.inventory.InventoryManager.ITEM_CHRONOLOGY; import static org.folio.service.inventory.InventoryManager.ITEM_DISCOVERY_SUPPRESS; @@ -358,6 +359,9 @@ private Future checkinItem(JsonObject itemRecord, CheckInPiece checkinPiec if (StringUtils.isNotEmpty(checkinPiece.getBarcode())) { itemRecord.put(ITEM_BARCODE, checkinPiece.getBarcode()); } + if (StringUtils.isNotEmpty(checkinPiece.getAccessionNumber())) { + itemRecord.put(ITEM_ACCESSION_NUMBER, checkinPiece.getAccessionNumber()); + } if (StringUtils.isNotEmpty(checkinPiece.getCallNumber())) { itemRecord.put(ITEM_LEVEL_CALL_NUMBER, checkinPiece.getCallNumber()); } diff --git a/src/main/java/org/folio/service/inventory/InventoryManager.java b/src/main/java/org/folio/service/inventory/InventoryManager.java index 124d0e10e..3bb87626a 100644 --- a/src/main/java/org/folio/service/inventory/InventoryManager.java +++ b/src/main/java/org/folio/service/inventory/InventoryManager.java @@ -101,6 +101,7 @@ public class InventoryManager { public static final String HOLDING_SOURCE = "sourceId"; public static final String ITEM_HOLDINGS_RECORD_ID = "holdingsRecordId"; public static final String ITEM_BARCODE = "barcode"; + public static final String ITEM_ACCESSION_NUMBER = "accessionNumber"; public static final String ITEM_LEVEL_CALL_NUMBER = "itemLevelCallNumber"; public static final String ITEM_STATUS = "status"; public static final String ITEM_STATUS_NAME = "name";