add Total Pieces in master bundle barcode
parent
fb4a856d04
commit
2409930d90
|
@ -217,6 +217,10 @@ public class BarcodeService {
|
||||||
String concatenatedIds = bundles.stream()
|
String concatenatedIds = bundles.stream()
|
||||||
.map(bundle -> String.valueOf(bundle.getId()))
|
.map(bundle -> String.valueOf(bundle.getId()))
|
||||||
.collect(Collectors.joining("\\"));
|
.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());
|
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);
|
bufferedImages.add(a4Image);
|
||||||
}
|
}
|
||||||
saveA4ImageToPDF(bufferedImages,bundlePath);
|
saveA4ImageToPDF(bufferedImages,bundlePath);
|
||||||
try {
|
// try {
|
||||||
printPDF(bundleIpAddress, bundlePath);
|
// printPDF(bundleIpAddress, bundlePath);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void printPDF(String printerIP, String pdfFilePath) throws Exception {
|
public void printPDF(String printerIP, String pdfFilePath) throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue