|
|
|
@ -2237,7 +2237,7 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
// 设置纸张大小(A4) |
|
|
|
pageSetup.setPaperSize(PaperSizeType.PAPER_A_4); |
|
|
|
// 设置缩放比例 |
|
|
|
pageSetup.setZoom(90); |
|
|
|
pageSetup.setZoom(85); |
|
|
|
// 设置边距 |
|
|
|
pageSetup.setLeftMargin(0.5); |
|
|
|
pageSetup.setRightMargin(0.5); |
|
|
|
@ -2430,6 +2430,7 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
template.setRangeStyle(true); |
|
|
|
template.setPriceRight(true); |
|
|
|
template.setMoveSeal(true); |
|
|
|
template.setInvoiceLie(data.getShowWeight() != null && data.getShowWeight()); |
|
|
|
template.addVar("remark", stringInput(data.getFpremark())); |
|
|
|
template.addVar("localShipper", notifyHeader.getCustomerName()); |
|
|
|
template.addVar("localShipAddress", notifyHeader.getLocalShipAddress()); |
|
|
|
@ -2456,9 +2457,9 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
template.addVar("shippingMode", stringInput(notifyHeader.getShippingMode())); |
|
|
|
Map<String, EcssCoDelNotifyDetailData> notifyDetailMap = notifyDetailList.stream().collect( |
|
|
|
Collectors.toMap(EcssCoDelNotifyDetailData::getPartNo,e->e)); |
|
|
|
// 装箱明细 |
|
|
|
List<Map> palletDetailList = coDelMapper.exportCoDelPalletDetail(notifyHeader); |
|
|
|
Map<Object, Map> palletMap = palletDetailList.stream().collect(Collectors.toMap( o -> o.get("part_no"), o -> o)); |
|
|
|
// 装箱明细 - 按发货通知单明细item_no分组(用于获取每行的重量) |
|
|
|
List<Map> palletDetailList = coDelMapper.exportCoDelPalletDetailGroupByItemNo(notifyHeader); |
|
|
|
Map<Object, Map> palletMap = palletDetailList.stream().collect(Collectors.toMap( o -> o.get("item_no"), o -> o)); |
|
|
|
// 装箱数据 |
|
|
|
List<EcssCoDelPalletHeaderData> palletHeaderDataList = coDelMapper.searchEcssCoDelPalletHeaderData(notifyHeader);// 总托数 |
|
|
|
int totalPlt = palletHeaderDataList.isEmpty()?0:palletHeaderDataList.get(0).getPalletQty(); |
|
|
|
@ -2476,9 +2477,11 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
for (int i = 0; i < ndList.size(); i++) { |
|
|
|
Map eorder = ndList.get(i); |
|
|
|
String partNo = (String) eorder.get("part_no"); |
|
|
|
Integer itemNo = eorder.get("item_no") != null ? (Integer) eorder.get("item_no") : null; |
|
|
|
eorder.put("row_num", i + 1); |
|
|
|
EcssCoDelNotifyDetailData nodifyData = notifyDetailMap.get(partNo); |
|
|
|
Map pm = palletMap.get(partNo); |
|
|
|
// 根据item_no获取该明细行对应的装箱重量 |
|
|
|
Map pm = itemNo != null ? palletMap.get(itemNo) : null; |
|
|
|
int totalQty = pm!=null && pm.get("total_qty")!=null?Integer.parseInt(pm.get("total_qty").toString()):0; |
|
|
|
String lossratio = ""; |
|
|
|
if (nodifyData!=null && nodifyData.getLossratio()!=null && !StringUtils.isBlank(nodifyData.getLossratio())) { |
|
|
|
|