完善财务全量验收链路

This commit is contained in:
2026-08-12 13:24:17 +08:00
parent 505e834536
commit d2704f68a6
11 changed files with 295 additions and 44 deletions
@@ -57,6 +57,21 @@ class FinanceCostSnapshotServiceTest {
.hasMessageContaining("柜次不存在");
}
@Test
void resolvesLegacyContainerBookingIdToLoadingPlan() {
var plan = new LoadingPlanEntity();
plan.setId(88L);
plan.setContainerBookingId(99L);
when(repository.plan(99L)).thenReturn(null);
when(repository.planByBooking(99L)).thenReturn(plan);
when(repository.items(88L)).thenReturn(List.of(item(10L, 101L, 1001L, "1.25")));
var snapshot = service.container(10L, 99L);
assertThat(snapshot.containerId()).isEqualTo(99L);
assertThat(snapshot.orders()).hasSize(1);
}
private LoadingPlanItemEntity item(long customerId, long orderId, long inboundId, String volume) {
var item = new LoadingPlanItemEntity();
item.setAccountId(customerId);