fix: reject missing receiving pallet

This commit is contained in:
2026-08-27 19:27:59 +08:00
parent 2b7f66cb04
commit ec8f84c1c0
@@ -257,6 +257,7 @@ public class ReceivingContainerService {
String customerId = session.getCustomerId();
InboundRef ref = requireInbound(customerId, session.getContainerNo(), request.inboundCode());
WarehouseResourceGateway.WarehousePalletReference pallet = warehouse.resolvePallet(request.palletCode());
if (pallet == null) throw notFound("Pallet was not found");
validatePallet(ref, pallet);
return new ReceivingContainerResponses.PalletResolved(pallet.palletNo(), pallet.warehouseId(), pallet.status(),
pallet.fbaWarehouseCode(), ref.line().getInboundCode(), destinationType(ref.line(), ref.order()), true);