This commit is contained in:
2026-08-17 14:50:00 +08:00
parent a34b5d5ba0
commit 4abcb2b80f
6 changed files with 31 additions and 10 deletions
@@ -79,7 +79,7 @@ class LoadingPickServiceTest {
booking.setContainerNo("CSLU1234567");
booking.setSourceType("SIMULATION");
booking.setRecordStatus("ACTIVE");
when(smartLoadingRepository.booking(99L)).thenReturn(booking);
when(repository.activeBookingByTask(20L)).thenReturn(booking);
}
@Test
@@ -228,6 +228,7 @@ class LoadingPickServiceTest {
when(repository.taskByCabinet("CAB-001", 101L)).thenReturn(task);
when(repository.taskByPlan(10L, 101L)).thenReturn(task);
when(smartLoadingRepository.booking(40L)).thenReturn(booking);
when(repository.activeBookingByTask(20L)).thenReturn(booking);
when(repository.items(20L, 101L)).thenReturn(List.of());
when(repository.cartonLabels(20L)).thenReturn(List.of());
@@ -272,13 +273,8 @@ class LoadingPickServiceTest {
@Test
void taskDetailRejectsMergedContainerSource() {
LoadingPickTaskEntity task = task();
ContainerBookingEntity merged = new ContainerBookingEntity();
merged.setId(99L);
merged.setSourceType("OCEAN_BOOKING");
merged.setRecordStatus("MERGED");
merged.setMergedIntoContainerBookingId(88L);
when(repository.task(20L)).thenReturn(task);
when(smartLoadingRepository.booking(99L)).thenReturn(merged);
when(repository.activeBookingByTask(20L)).thenReturn(null);
when(repository.items(20L, 101L)).thenReturn(List.of());
when(repository.cartonLabels(20L)).thenReturn(List.of());