fix: enforce pickup-ready receiving candidates
This commit is contained in:
+3
-2
@@ -113,6 +113,7 @@ public class ReceivingContainerService {
|
||||
return grouped.entrySet().stream()
|
||||
.map(entry -> readiness(entry.getKey(), entry.getValue(), planFacts, lineFacts, overseasWarehouseId))
|
||||
.filter(Objects::nonNull)
|
||||
.filter(ContainerReadiness::shippingReady)
|
||||
.filter(value -> !reservedByOthers.contains(activeContainerKey(value.containerNo())))
|
||||
.map(value -> candidate(value, current)).toList();
|
||||
}
|
||||
@@ -479,7 +480,7 @@ public class ReceivingContainerService {
|
||||
inboundValues.stream().mapToInt(ReceivingContainerResponses.Inbound::totalPackages).sum(),
|
||||
inboundValues.stream().mapToInt(ReceivingContainerResponses.Inbound::receivedPackages).sum());
|
||||
return new ContainerReadiness(sourceContainerBookingId, containerNo, totalOrders, inboundCodes,
|
||||
totalOrders - inboundCodes, planCount, plannedOrders, pending, allPlansReady, operable,
|
||||
totalOrders - inboundCodes, planCount, plannedOrders, pending, allPlansReady, shippingReady, operable,
|
||||
blockReason, arrival, factHash, totals);
|
||||
}
|
||||
|
||||
@@ -982,7 +983,7 @@ public class ReceivingContainerService {
|
||||
private record ContainerReadiness(String sourceContainerBookingId, String containerNo,
|
||||
int totalOrderCount, int inboundCodeCount, int missingInboundCodeCount,
|
||||
int planCount, int plannedInboundCodeCount, int pendingPlanCount,
|
||||
boolean allPlansReady, boolean operable, String blockReason,
|
||||
boolean allPlansReady, boolean shippingReady, boolean operable, String blockReason,
|
||||
LocalDateTime plannedArrivalAt, String factHash, Totals totals) { }
|
||||
private record PrepareCommand(String containerNo, String idempotencyKey) { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user