fix: hide completed receiving containers

This commit is contained in:
2026-09-03 10:08:57 +08:00
parent 59add49408
commit 7359fbc093
2 changed files with 19 additions and 2 deletions
@@ -190,6 +190,18 @@ class ReceivingContainerServiceBehaviorTest {
assertThat(service.candidates("7", 100L)).extracting("containerNo").containsExactly("CONT-A");
}
@Test
void candidatesHideCompletedContainers() {
InboundPlan completed = plan("CONT-A");
completed.setStatus("COMPLETED");
when(plans.selectList(any())).thenReturn(List.of(completed));
when(lines.selectList(any())).thenReturn(List.of(line("FBA")));
when(orders.selectList(any())).thenReturn(List.of(
containerOrder(1L, "100", "CONT-A", "BOOKING-A", "IN-1")));
assertThat(service.candidates("7", 100L)).isEmpty();
}
@Test
void partialContainerPlansRemainVisibleAndPrepareIsHardRejected() {
InboundPlan firstPlan = plan("CONT-A");