优化
This commit is contained in:
@@ -148,6 +148,27 @@ class ContainerServiceTest {
|
||||
org.mockito.ArgumentMatchers.eq("admin"), any());
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("PDA任务创建后替换真实柜号不重同步任务明细")
|
||||
void doesNotResynchronizeExistingPdaTaskWhenContainerNumberChanges() {
|
||||
ContainerBookingEntity current = booking("EDITING", 2);
|
||||
LoadingPlanEntity plan = new LoadingPlanEntity();
|
||||
plan.setId(31L);
|
||||
plan.setPlanStatus("EDITING");
|
||||
plan.setPreloadPushedAt(LocalDateTime.of(2026, 8, 11, 20, 0));
|
||||
when(repository.find(11L)).thenReturn(current);
|
||||
when(repository.updateTransport(11L, "MSCU7654321", "V002", 2, 9L, "admin"))
|
||||
.thenReturn(1);
|
||||
when(smartLoadingRepository.planByBooking(11L)).thenReturn(plan);
|
||||
when(loadingPickRepository.taskByPlan(31L)).thenReturn(new LoadingPickTaskEntity());
|
||||
|
||||
service.updateTransport(11L, 9L, "admin",
|
||||
new TransportUpdateRequest("MSCU7654321", "V002", 2));
|
||||
|
||||
verify(loadingPickService, never()).begin(anyLong(), any(), anyLong(), any(), any());
|
||||
verify(smartLoadingRepository, never()).items(31L);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("PDA任务创建后禁止清空真实集装箱号")
|
||||
void rejectsClearingContainerNumberAfterPdaTaskStarts() {
|
||||
|
||||
Reference in New Issue
Block a user