From a087e928c19c6ba94a892ea4e1f235fea98fca58 Mon Sep 17 00:00:00 2001 From: BKadirkhodjaev Date: Wed, 4 Dec 2024 18:12:49 +0500 Subject: [PATCH] [MODORDERS-1209]. Update piece status validation --- .../java/org/folio/service/claiming/ClaimingService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/folio/service/claiming/ClaimingService.java b/src/main/java/org/folio/service/claiming/ClaimingService.java index d3c3c614b..4a492e222 100644 --- a/src/main/java/org/folio/service/claiming/ClaimingService.java +++ b/src/main/java/org/folio/service/claiming/ClaimingService.java @@ -96,7 +96,7 @@ public Future sendClaims(ClaimingCollection claimingCollection, return groupPieceIdsByVendorId(pieceIds, requestContext) .compose(pieceIdsByVendorIds -> { if (CollectionUtils.isEmpty(pieceIdsByVendorIds)) { - return Future.succeededFuture(createEmptyClaimingResults("Cannot find pieces with Expected status to process")); + return Future.succeededFuture(createEmptyClaimingResults("Cannot find pieces with LATE status to process")); } return createJobsByVendor(config, pieceIdsByVendorIds, requestContext); }); @@ -129,8 +129,8 @@ private Future>> groupPieceIdsByVendorId(List p } private Future> createVendorPiecePair(Pair piecePoLinePairs, Piece piece, RequestContext requestContext) { - if (Objects.nonNull(piece) && !piece.getReceivingStatus().equals(Piece.ReceivingStatus.EXPECTED)) { - logger.info("createVendorPiecePair:: Ignoring processing of a piece not in expected state, piece id: {}", piece.getId()); + if (Objects.nonNull(piece) && !piece.getReceivingStatus().equals(Piece.ReceivingStatus.LATE)) { + logger.info("createVendorPiecePair:: Ignoring processing of a piece not in LATE state, piece id: {}", piece.getId()); return Future.succeededFuture(); } return purchaseOrderLineService.getOrderLineById(piecePoLinePairs.getLeft(), requestContext)