This commit is contained in:
2026-08-15 10:09:04 +08:00
parent 233f8f312d
commit c6d7fb0d84
4 changed files with 4 additions and 9 deletions
@@ -584,10 +584,9 @@ public class LoadingPickService {
.filter(value -> detailInboundId.equals(value.inboundId())).findFirst().orElse(null);
var inbound = owner == null || owner.tenantId() == null || owner.inboundId() == null
? null : repository.inbound(owner.tenantId(), owner.inboundId());
var plan = smartLoadingRepository.plan(task.getLoadingPlanId());
return new Task(task.getId(), task.getLoadingPlanId(), task.getContainerBookingId(),
owner == null ? null : owner.inboundId(), inbound == null ? null : inbound.version(),
plan == null ? null : plan.getVersion(), task.getCabinetNo(),
inbound == null ? null : inbound.version(), task.getCabinetNo(),
booking == null ? null : booking.getContainerNo(), task.getTaskStatus(),
workflowStatus, task.getVersion(), assignment, review, items);
}
@@ -131,7 +131,7 @@ components:
containerBookingId: {type: integer, format: int64}
inboundId: {type: integer, format: int64, description: Stable inbound identity selected from the task item; evidence identity is taskId+inboundId+loadingPlanId+containerBookingId}
inboundVersion: {type: integer, minimum: 0, description: Current fl_inbound_order.version for inboundId; never inferred from PDA task version}
loadingVersion: {type: integer, minimum: 0, description: Current fl_loading_plan.version for loadingPlanId; used as the loading/evidence concurrency snapshot}
loadingVersion: {type: integer, minimum: 0, description: Compatibility alias of inboundVersion from the same fl_inbound_order row; /loading/complete uses this inbound loading-stage version}
cabinetNo: {type: string}
currentContainerNo: {type: string, nullable: true, description: Mutable transport display field; changing it never resynchronizes the task or item versions and it is never task identity}
taskStatus: {type: string, enum: [LOADING, COMPLETED]}
@@ -35,7 +35,7 @@ class PdaConvergenceOpenApiContractTest {
.contains("without using containerNo as an association key")
.contains("evidence identity is taskId+inboundId+loadingPlanId+containerBookingId")
.contains("Current fl_inbound_order.version for inboundId")
.contains("Current fl_loading_plan.version for loadingPlanId")
.contains("Compatibility alias of inboundVersion from the same fl_inbound_order row")
.contains("CompleteLoadingRequest");
String taskLookup = yaml.substring(
@@ -242,15 +242,11 @@ class LoadingPickServiceTest {
new LoadingPickItemMapper.InboundOwner(101L, 50L)));
when(repository.inbound(101L, 50L)).thenReturn(
new LoadingInboundMapper.Snapshot(50L, 101L, "LOADING", 7));
var plan = new com.baiyue.firstleg.entity.LoadingPlanEntity();
plan.setId(10L); plan.setVersion(11);
when(smartLoadingRepository.plan(10L)).thenReturn(plan);
var result = service.task(20L, 101L);
assertThat(result.inboundId()).isEqualTo(50L);
assertThat(result.inboundVersion()).isEqualTo(7);
assertThat(result.loadingVersion()).isEqualTo(11);
assertThat(result.loadingVersion()).isEqualTo(7);
assertThat(result.loadingPlanId()).isEqualTo(10L);
assertThat(result.containerBookingId()).isEqualTo(99L);
}