This commit is contained in:
2026-08-21 10:43:25 +08:00
parent d5e9ba6d4c
commit e17f03e596
55 changed files with 775 additions and 173 deletions
@@ -104,6 +104,19 @@ class DispatchServiceTest {
verify(orders, never()).updateById(any(DispatchOrder.class));
}
@Test
void platformDetailFindsDispatchGloballyAndLoadsItemsWithRecordCustomer() {
DispatchOrder dispatch = new DispatchOrder();
dispatch.setId(1L);
dispatch.setCustomerId("200");
dispatch.setDispatchNo("PC1");
when(orders.findAnyByDispatchNo("PC1")).thenReturn(dispatch);
service.detail(null, "PC1");
verify(items).findByDispatchOrder("200", 1L);
}
private DispatchPalletCandidate candidate(long planPalletId, Long warehousePalletId, String destination) {
return new DispatchPalletCandidate(1L, planPalletId, warehousePalletId, 2L, "WH-1", "Overseas warehouse", "LMO1", "LMO1", "RK1",
"LIP1-P001", destination, destination, destination, destination, 12,