Skip to content

Commit

Permalink
[MODORDERS-1209]. Update piece status validation
Browse files Browse the repository at this point in the history
  • Loading branch information
BKadirkhodjaev committed Dec 4, 2024
1 parent 6e8e2f7 commit a087e92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/folio/service/claiming/ClaimingService.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public Future<ClaimingResults> 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);
});
Expand Down Expand Up @@ -129,8 +129,8 @@ private Future<Map<String, List<String>>> groupPieceIdsByVendorId(List<String> p
}

private Future<Pair<String, String>> createVendorPiecePair(Pair<String, String> 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)
Expand Down

0 comments on commit a087e92

Please sign in to comment.