Merge remote-tracking branch 'origin/test' into dev
# Conflicts: # lastleg-service/src/main/java/com/baiyue/lastleg/service/LoadingCompletedConsumer.java # lastleg-service/src/test/java/com/baiyue/lastleg/inboundplan/pda/gateway/HttpWarehouseResourceGatewayTest.java # warehouse-overseas-service/src/main/java/com/baiyue/warehouse/service/WarehousePalletBatchService.java
This commit is contained in:
+2
-1
@@ -23,7 +23,8 @@ public final class WarehousePalletBatchRequests {
|
||||
@NotBlank @Size(max = 128) String inboundPlanNo,
|
||||
@Positive int sequenceNo,
|
||||
@NotBlank @Size(max = 32) String palletType,
|
||||
@Size(max = 128) String fbaWarehouseCode
|
||||
@Size(max = 128) String fbaWarehouseCode,
|
||||
@NotBlank @Size(max = 128) String palletCode
|
||||
) { }
|
||||
|
||||
public record Confirm(
|
||||
|
||||
+4
-2
@@ -83,7 +83,7 @@ public class WarehousePalletBatchService {
|
||||
List<WarehousePalletBatchItemEntity> created = new ArrayList<>();
|
||||
for (WarehousePalletBatchRequests.Item requested : normalized.items()) {
|
||||
Long palletId = resources.createPallet(WarehouseResourceService.PUBLIC_RESOURCE_SCOPE,
|
||||
normalized.warehouseId(), new PalletRequests.SaveRequest(null, requested.palletType(), null,
|
||||
normalized.warehouseId(), new PalletRequests.SaveRequest(requested.palletCode(), requested.palletType(), null,
|
||||
requiredAutoCreatedPalletUnitPrice(), "IDLE", null,
|
||||
"Auto-created for inbound plan " + requested.inboundPlanNo(),
|
||||
requested.fbaWarehouseCode()));
|
||||
@@ -268,11 +268,13 @@ public class WarehousePalletBatchService {
|
||||
if (item.fbaWarehouseCode() != null) {
|
||||
requireMax(item.fbaWarehouseCode().trim(), 128, "FBA warehouse code is too long");
|
||||
}
|
||||
String palletCode = required(item.palletCode(), "Pallet code is required");
|
||||
requireMax(palletCode, 128, "Pallet code is too long");
|
||||
if (!businessKeys.add(businessKey)) throw badRequest("Pallet business key must be unique");
|
||||
if (!sequences.add(item.sequenceNo())) throw badRequest("Pallet sequence must be unique");
|
||||
return new WarehousePalletBatchRequests.Item(item.customerId(), businessKey, inboundPlanNo,
|
||||
item.sequenceNo(), palletType,
|
||||
trim(item.fbaWarehouseCode()));
|
||||
trim(item.fbaWarehouseCode()), palletCode);
|
||||
}).sorted(Comparator.comparingInt(WarehousePalletBatchRequests.Item::sequenceNo)).toList();
|
||||
return new WarehousePalletBatchRequests.EnsureReserved(request.warehouseId(), batchKey, normalized);
|
||||
}
|
||||
|
||||
+2
-1
@@ -34,7 +34,7 @@ components:
|
||||
schemas:
|
||||
BatchItemRequest:
|
||||
type: object
|
||||
required: [customerId, businessKey, inboundPlanNo, sequenceNo, palletType]
|
||||
required: [customerId, businessKey, inboundPlanNo, sequenceNo, palletType, palletCode]
|
||||
properties:
|
||||
customerId: { type: string, pattern: '^[1-9][0-9]*$' }
|
||||
businessKey: { type: string, minLength: 1, maxLength: 100 }
|
||||
@@ -42,6 +42,7 @@ components:
|
||||
sequenceNo: { type: integer, minimum: 1 }
|
||||
palletType: { type: string, minLength: 1, maxLength: 32 }
|
||||
fbaWarehouseCode: { type: string, nullable: true, maxLength: 128 }
|
||||
palletCode: { type: string, minLength: 1, maxLength: 128, description: 头程冻结并已打印的托盘码,海外实体托盘必须原样沿用 }
|
||||
EnsureReservedRequest:
|
||||
type: object
|
||||
required: [warehouseId, batchKey, items]
|
||||
|
||||
Reference in New Issue
Block a user