feat: finalize dropship pallet print documents

This commit is contained in:
2026-09-14 17:52:01 +08:00
parent b3d74c5441
commit 3910b8fcce
15 changed files with 34 additions and 50 deletions
@@ -274,8 +274,6 @@ class InternalPdfControllerTest {
"documents": [{
"palletNo": "DP-260911-0034",
"destinationWarehouse": "NJDF",
"palletSequence": 1,
"totalPallets": 3,
"barcodeContent": "DP-260911-0034",
"inboundRows": [{
"inboundCode": "NYEXX2609110249",
@@ -27,7 +27,7 @@ class DropshipPalletA4PdfServiceGenerationTest {
@Test
void generatesOneA4PageWithPalletBarcodeAndSkuDetails() throws Exception {
DropshipPalletA4PdfDtos.Document document = new DropshipPalletA4PdfDtos.Document(
"DP-260911-0034", "NJDF", 1, 3, "DP-260911-0034",
"DP-260911-0034", "NJDF", "DP-260911-0034",
List.of(new DropshipPalletA4PdfDtos.InboundRow(
"NYEXX2609110249", "小虫科技", 3, 90)),
List.of(
@@ -64,8 +64,7 @@ class DropshipPalletA4PdfServiceGenerationTest {
"SKU-" + String.format("%03d", index), 2, index * 5, "5-10"));
}
DropshipPalletA4PdfDtos.Document document = new DropshipPalletA4PdfDtos.Document(
"DP-260911-0034", "NJDF", 1, 1,
"DP-260911-0034", inboundRows, rows);
"DP-260911-0034", "NJDF", "DP-260911-0034", inboundRows, rows);
var generated = service.generate(new DropshipPalletA4PdfDtos.Request(
DropshipPalletA4PdfDtos.TEMPLATE,
new DropshipPalletA4PdfDtos.PageSpec(new BigDecimal("210"), new BigDecimal("297")),
@@ -85,7 +84,7 @@ class DropshipPalletA4PdfServiceGenerationTest {
rows.add(new DropshipPalletA4PdfDtos.SkuRow("SKU-" + index, 1, 1, "1"));
}
DropshipPalletA4PdfDtos.Document document = new DropshipPalletA4PdfDtos.Document(
"DP-260911-0034", "NJDF", 1, 1, "DP-260911-0034",
"DP-260911-0034", "NJDF", "DP-260911-0034",
List.of(new DropshipPalletA4PdfDtos.InboundRow("INBOUND", "客户", 35, 35)), rows);
assertThatThrownBy(() -> service.generate(new DropshipPalletA4PdfDtos.Request(