From 45fdcd991698acd65c079a9e57a2192b4a662b52 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Tue, 22 Oct 2024 14:02:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E6=89=93=E8=BF=90?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WarehouseWaybillController.java | 2 +- .../impl/WarehouseWaybillServiceImpl.java | 21 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java index b0b00e91b..a7858ef1a 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java @@ -432,7 +432,7 @@ public class WarehouseWaybillController extends BladeController { */ @PostMapping("/printBatch") @ApiOperationSupport(order = 2) - @ApiOperation(value = "批量打印 配送单") + @ApiOperation(value = "批量打印 ") public R>> printBatch(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @ApiParam(value = "打印类型", required = true) @RequestParam String tempId) { try { log.info(">>>>>>>>>>>>>>>>>> printBatch {}",ids); diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java index 0a3d9d9e2..9e709f825 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java @@ -803,20 +803,25 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl warehouseWayBillDetails = null; if (i == num) { - warehouseWayBillDetails = detailList.subList(i * 4, detailList.size()); + warehouseWayBillDetails = detailList.subList((i-1) * 4, detailList.size()); } else { - warehouseWayBillDetails = detailList.subList(i * 4, 4); + warehouseWayBillDetails = detailList.subList((i-1)* 4, 4); + } + if(!warehouseWayBillDetails.isEmpty()){ + + PrintPreviewVO printPreviewVO = buildPrintWallet(warehouseWaybillEntity, warehouseWayBillDetails, template,num,i); + list.add(printPreviewVO); } - PrintPreviewVO printPreviewVO = buildPrintWallet(warehouseWaybillEntity, warehouseWayBillDetails, template,num,i); - list.add(printPreviewVO); } } @@ -987,8 +992,8 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl