fix(lastleg): inspect occupied pallets for PDA queries

This commit is contained in:
2026-09-08 23:34:12 +08:00
parent 3e15ad6b5b
commit 0c984e8f5f
7 changed files with 68 additions and 12 deletions
@@ -41,7 +41,7 @@ public class PdaWarehouseService {
}
public PdaWarehouseResponses.Pallet pallet(long warehouseId, PdaWarehouseRequests.Scan request) {
WarehouseResourceGateway.WarehousePalletReference pallet = warehouse.resolvePallet(code(request.code()));
WarehouseResourceGateway.WarehousePalletReference pallet = warehouse.inspectPallet(code(request.code()));
if (pallet == null) throw notFound("Warehouse pallet was not found");
if (pallet.warehouseId() != warehouseId) throw conflict("Pallet belongs to another overseas warehouse");
WarehouseResourceGateway.WarehouseLocationReference location = warehouse.resolveLocation(warehouseId,