feat: complete overseas customer and PDA workflows

This commit is contained in:
2026-09-04 12:59:37 +08:00
parent a274d029bb
commit 54cb9ceade
60 changed files with 1598 additions and 277 deletions
@@ -60,7 +60,7 @@ public interface InboundPalletAllocationMapper extends BaseMapper<InboundPalletA
UPDATE fl_inbound_pallet_allocation
SET picked_package_count = picked_package_count + #{count},
/* Keep the snapshot confirmed until the atomic warehouse release
succeeds. markReleased is the single owner of this transition;
succeeds. markBlockReleased is the single owner of this transition;
changing it here makes the subsequent idempotent release update
affect zero rows and surfaces as S0500 from PDA pick. */
allocation_status = 'CONFIRMED',
@@ -93,9 +93,9 @@ public interface InboundPalletAllocationMapper extends BaseMapper<InboundPalletA
@Update("""
UPDATE fl_inbound_pallet_allocation
SET allocation_status='RELEASED', slot_status='RELEASED', updated_at=CURRENT_TIMESTAMP(3)
SET allocation_status = 'RELEASED', slot_status = 'RELEASED', updated_at = CURRENT_TIMESTAMP(3)
WHERE tenant_id=#{tenantId} AND inbound_id=#{inboundId} AND block_id=#{blockId}
AND allocation_status='CONFIRMED'
AND allocation_status = 'CONFIRMED'
""")
int markBlockReleased(@Param("tenantId") long tenantId, @Param("inboundId") long inboundId,
@Param("blockId") long blockId);
@@ -1,6 +1,6 @@
openapi: 3.0.3
info:
title: 柏悦二期 FBA 计费 API
title: 柏悦入库测量与计费 FBA 计费 API
version: 2.0.0
description: 业务成功和失败均使用 HTTP 200;仅响应体 code 为字符串 "200" 时表示成功。
security:
@@ -161,10 +161,10 @@ class PdaSplitSettlementSqlContractTest {
long.class, long.class, long.class)
.getAnnotation(Update.class).value()[0];
assertThat(release)
.contains("allocation_status='RELEASED'")
.contains("slot_status='RELEASED'")
.contains("allocation_status = 'RELEASED'")
.contains("slot_status = 'RELEASED'")
.contains("block_id=#{blockId}")
.contains("allocation_status='CONFIRMED'");
.contains("allocation_status = 'CONFIRMED'");
String transfer = InboundPalletAllocationMapper.class.getMethod("markBlockTransferred",
long.class, long.class, long.class)
@@ -183,7 +183,7 @@ class Phase3FinalUnifiedSqlContractTest {
.contains("存在缺失中文注释的业务表")
.contains("存在缺失中文注释的业务字段")
.doesNotContain("CREATE PROCEDURE upgrade_column_comment");
assertThat(count(sql, "CALL queue_table_comment(")).isEqualTo(145);
assertThat(count(sql, "CALL queue_table_comment(")).isEqualTo(147);
assertThat(count(sql, "CALL queue_column_comment(")).isGreaterThanOrEqualTo(2374);
assertThat(sql)
.contains("CALL queue_column_comment('baiyue_firstleg', 'fl_inbound_fee_detail', 'supplier_id'")
@@ -201,8 +201,6 @@ class PdaPickSettlementServiceTest {
.thenReturn(List.of(new MeasurementItemRow(51L, 61L, 41L, 4)));
when(allocations.lockConfirmed(10001L, 31L))
.thenReturn(List.of(allocation(1L, 1, 501L, 4)));
when(warehouse.settle(eq("internal-token"), any())).thenReturn(ApiResponse.success(
new WarehousePalletLocationClient.SettlementResult(List.of(released(91L, 501L)), List.of())));
writes(0, 4);
service.settle(1L, 9L, "operator");