二期内容提交

This commit is contained in:
2026-08-04 17:29:36 +08:00
parent b7d36d4766
commit 3292f2c597
6 changed files with 10 additions and 4 deletions
@@ -20,6 +20,7 @@ public class InboundPalletAllocationEntity {
private Long inboundId;
private Integer allocationNo;
private Long warehouseId;
private Long warehouseResourceTenantId;
private Long palletId;
private String palletCode;
private BigDecimal palletCapacityCbm;
@@ -22,7 +22,8 @@ public class InboundPalletAllocationRepository {
}
@Transactional
public void replace(long tenantId, long inboundId, long warehouseId, BigDecimal capacity,
public void replace(long tenantId, long inboundId, long warehouseId, long warehouseResourceTenantId,
BigDecimal capacity,
BatchResult result) {
Map<Long, String> reservationNos = mapper.selectList(new LambdaQueryWrapper<InboundPalletAllocationEntity>()
.eq(InboundPalletAllocationEntity::getTenantId, tenantId)
@@ -39,6 +40,7 @@ public class InboundPalletAllocationRepository {
value.setInboundId(inboundId);
value.setAllocationNo(source.allocationNo());
value.setWarehouseId(warehouseId);
value.setWarehouseResourceTenantId(warehouseResourceTenantId);
value.setPalletId(source.palletId());
value.setPalletCode(source.palletCode());
value.setPalletCapacityCbm(capacity);
@@ -49,14 +49,14 @@ public class MeasurementLocationOccupationService {
properties.getDefaultPalletCapacityCbm(), "STANDARD",
LocalDateTime.now().plus(properties.getReservationTtl()), true))),
"测量完成后库位预占失败");
allocations.replace(tenantId, inboundId, warehouseId,
allocations.replace(tenantId, inboundId, warehouseId, resourceTenantId,
properties.getDefaultPalletCapacityCbm(), reserved);
try {
WarehousePalletLocationClient.BatchResult occupied = requireSuccess(call(() -> warehouse.confirm(
internalToken, new WarehousePalletLocationClient.ConfirmRequest(resourceTenantId, warehouseId,
SOURCE_SERVICE, inboundId, operatorId, volume,
properties.getDefaultPalletCapacityCbm()))), "测量完成后库位占用失败");
allocations.replace(tenantId, inboundId, warehouseId,
allocations.replace(tenantId, inboundId, warehouseId, resourceTenantId,
properties.getDefaultPalletCapacityCbm(), occupied);
} catch (RuntimeException failure) {
try {