fix: support id-only overseas destinations

This commit is contained in:
2026-08-24 22:51:33 +08:00
parent 0e73a79479
commit 1e8d85c714
6 changed files with 39 additions and 13 deletions
@@ -188,8 +188,11 @@ public class InboundStockReceiptService {
if (packages <= 0 || pallet.getWarehousePalletId() == null) {
throw conflict("Stock-in requires picked packages and an assigned warehouse pallet");
}
String destinationCode = required(first(line.getDestinationWarehouseCode(), order.getFbaWarehouseCode()),
"Destination warehouse code is required for stock-in");
String destinationCode = first(line.getDestinationWarehouseCode(), order.getFbaWarehouseCode());
if (destinationCode == null && trim(line.getDestinationWarehouseId()) == null) {
throw conflict("Destination warehouse ID or code is required for stock-in");
}
if (destinationCode == null) destinationCode = "";
String operationKey = "PDA_STOCK_IN:" + task.getId() + ":" + allocation.getId() + ":" + sku.skuCode();
String overseasWarehouseId = required(order.getOverseasWarehouseId(),
"Actual overseas warehouse is required for stock-in");