diff --git a/src/main/java/com/utopiaindustries/service/BarcodeService.java b/src/main/java/com/utopiaindustries/service/BarcodeService.java index ad699c0..0001d9b 100644 --- a/src/main/java/com/utopiaindustries/service/BarcodeService.java +++ b/src/main/java/com/utopiaindustries/service/BarcodeService.java @@ -217,6 +217,10 @@ public class BarcodeService { String concatenatedIds = bundles.stream() .map(bundle -> String.valueOf(bundle.getId())) .collect(Collectors.joining("\\")); + int totalWrappedQuantity = bundles.stream() + .mapToInt(e->e.getWrapQuantity().intValue()) + .sum(); + this.drawCenteredText(g2d, "Total-Pieces: " + totalWrappedQuantity, detailFont, x, y, pageWidth, cols, stickerSize.getMarginTop() + 270, stickerSize.getMarginLeft()); this.drawCenteredText(g2d, "Sub-Bundles: " + concatenatedIds, detailFont, x, y, pageWidth, cols, stickerSize.getMarginTop() + 290, stickerSize.getMarginLeft()); } @@ -226,11 +230,11 @@ public class BarcodeService { bufferedImages.add(a4Image); } saveA4ImageToPDF(bufferedImages,bundlePath); - try { - printPDF(bundleIpAddress, bundlePath); - } catch (Exception e) { - e.printStackTrace(); - } +// try { +// printPDF(bundleIpAddress, bundlePath); +// } catch (Exception e) { +// e.printStackTrace(); +// } } public void printPDF(String printerIP, String pdfFilePath) throws Exception {