|
|
|
@ -803,20 +803,25 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
|
|
|
|
|
|
|
|
|
|
if (ObjectUtils.isNotEmpty(detailList)) { |
|
|
|
|
// 得到需要打印的页面数量
|
|
|
|
|
int num = detailList.size() / 4; |
|
|
|
|
int num = (int) Math.ceil((double) detailList.size() / 4);; |
|
|
|
|
|
|
|
|
|
for (int i = 0; i <= num; i++) { |
|
|
|
|
// int totalPages = (int) Math.ceil((double) totalItems / itemsPerPage);
|
|
|
|
|
|
|
|
|
|
for (int i = 1; i <= num; i++) { |
|
|
|
|
// 需要从detailList每次循环获取到4个数据
|
|
|
|
|
List<WarehouseWayBillDetail> 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<WarehouseWaybil
|
|
|
|
|
map.put("合计件数", sumNumber); |
|
|
|
|
map.put("合计重量", formatToTwoDecimalPlaces(sumWEIGHT)); |
|
|
|
|
map.put("合计体积", formatToTwoDecimalPlaces(sumVOLUME)); |
|
|
|
|
map.put("t", total+1); |
|
|
|
|
map.put("n", num+1); |
|
|
|
|
map.put("t", total); |
|
|
|
|
map.put("n", num); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String popHtml = TemplateUtil.popTemplate("运单", map, html); |
|
|
|
|