优化
This commit is contained in:
+2
-1
@@ -43,7 +43,8 @@ public interface WarehousePalletLocationClient {
|
||||
BigDecimal totalVolumeCbm, BigDecimal palletCapacityCbm, String palletType,
|
||||
LocalDateTime expiresAt, boolean measurementCompleted) {}
|
||||
record ConfirmRequest(long tenantId, long warehouseId, String sourceService, long businessId,
|
||||
long operatorId, BigDecimal totalVolumeCbm, BigDecimal palletCapacityCbm) {}
|
||||
long operatorId, BigDecimal totalVolumeCbm, BigDecimal palletCapacityCbm,
|
||||
int packageCount) {}
|
||||
record ReleaseRequest(long tenantId, String sourceService, long businessId, long operatorId,
|
||||
String reason) {}
|
||||
record SelectiveReleaseRequest(long tenantId, String sourceService, long businessId,
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class MeasurementLocationOccupationService {
|
||||
WarehousePalletLocationClient.BatchResult occupied = requireSuccess(call(() -> warehouse.confirm(
|
||||
internalToken, new WarehousePalletLocationClient.ConfirmRequest(resourceTenantId, warehouseId,
|
||||
SOURCE_SERVICE, inboundId, operatorId, volume,
|
||||
properties.getDefaultPalletCapacityCbm()))), "测量完成后库位占用失败");
|
||||
properties.getDefaultPalletCapacityCbm(), packageCount))), "测量完成后库位占用失败");
|
||||
allocations.replace(tenantId, inboundId, warehouseId, resourceTenantId,
|
||||
properties.getDefaultPalletCapacityCbm(), packageCount, occupied);
|
||||
} catch (RuntimeException failure) {
|
||||
|
||||
+2
@@ -65,6 +65,7 @@ class MeasurementLocationOccupationServiceTest {
|
||||
verify(warehouse).confirm(org.mockito.ArgumentMatchers.eq("internal-token"), confirm.capture());
|
||||
assertThat(confirm.getValue().tenantId()).isEqualTo(PLATFORM_RESOURCE_TENANT);
|
||||
assertThat(confirm.getValue().businessId()).isEqualTo(INBOUND);
|
||||
assertThat(confirm.getValue().packageCount()).isEqualTo(20);
|
||||
|
||||
verify(allocations, times(2)).replace(
|
||||
org.mockito.ArgumentMatchers.eq(BUSINESS_TENANT),
|
||||
@@ -96,6 +97,7 @@ class MeasurementLocationOccupationServiceTest {
|
||||
ArgumentCaptor.forClass(WarehousePalletLocationClient.ConfirmRequest.class);
|
||||
verify(warehouse).confirm(org.mockito.ArgumentMatchers.eq("internal-token"), confirm.capture());
|
||||
assertThat(confirm.getValue().tenantId()).isEqualTo(PLATFORM_RESOURCE_TENANT);
|
||||
assertThat(confirm.getValue().packageCount()).isEqualTo(20);
|
||||
|
||||
verify(allocations, times(2)).replace(
|
||||
org.mockito.ArgumentMatchers.eq(BUSINESS_TENANT),
|
||||
|
||||
Reference in New Issue
Block a user