fix container customer snapshot schema migration

This commit is contained in:
2026-08-24 13:36:38 +08:00
committed by liuyihe
parent fe4eb0b593
commit b72dd54b80
23 changed files with 368 additions and 49 deletions
@@ -49,6 +49,16 @@ class PalletAllocatorTest {
.map(PalletAllocator.AllocationDraft::plannedPackageCount).toList());
}
@Test
void keepsAtLeastTheFirstLegRecommendedPalletCount() {
PalletAllocator.Result result = PalletAllocator.allocate(List.of(
new PalletAllocator.LineInput(1L, "WH-A", new BigDecimal("1.5000"), 6, 3)));
assertEquals(3, result.pallets().size());
assertEquals(6, result.allocations().stream()
.mapToInt(PalletAllocator.AllocationDraft::plannedPackageCount).sum());
}
private PalletAllocator.Result allocate(String volume) {
return PalletAllocator.allocate(List.of(
new PalletAllocator.LineInput(1L, "WH-A", new BigDecimal(volume),