二期内容提交

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 {
@@ -423,6 +423,7 @@ CREATE TABLE IF NOT EXISTS fl_inbound_pallet_allocation (
inbound_id BIGINT UNSIGNED NOT NULL COMMENT '入库单ID',
allocation_no INT UNSIGNED NOT NULL COMMENT '入库单内分配序号',
warehouse_id BIGINT UNSIGNED NOT NULL COMMENT '仓库服务仓库ID',
warehouse_resource_tenant_id BIGINT UNSIGNED NOT NULL COMMENT '仓储资源所属租户ID',
pallet_id BIGINT UNSIGNED NOT NULL COMMENT '仓库服务托盘ID',
pallet_code VARCHAR(50) NOT NULL COMMENT '托盘编码快照',
pallet_capacity_cbm DECIMAL(18,4) NOT NULL COMMENT '托盘可用容积快照',