完善财务全量验收链路
This commit is contained in:
+15
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user