Skip to content

Commit

Permalink
SD-1973 Fix UC3 issue by changing update logic (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
palatsangeetha authored Jan 31, 2025
1 parent 5ad972a commit 740287e
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.*;
Expand Down Expand Up @@ -178,11 +177,11 @@ private ObjectNode sendUpdatedShippingInstructions(String sir, String documentRe

static ObjectNode updateShippingInstructions(ObjectNode si) {
var seal = si.required("utilizedTransportEquipments").required(0).required("seals").path(0);
var newSealNumber = "NSL13388";
if (newSealNumber.equals(seal.required("number").asText())) {
// Ensure we do a change in case we do multiple UC3 in the same run
newSealNumber = "NSL13386";
}
var newSealNumber =
UUID.randomUUID()
.toString()
.substring(0, 8)
.toUpperCase(); // adding a different seal number for each UC3
((ObjectNode)seal).put("number", newSealNumber);
return si;
}
Expand Down

0 comments on commit 740287e

Please sign in to comment.