|
|
|
@ -3126,8 +3126,8 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
|
boolean isFirstRow = (i == 0); |
|
|
|
Object cartonQty = eorder.get("box_qty") != null |
|
|
|
? ((BigDecimal) eorder.get("box_qty")).setScale(0, RoundingMode.HALF_UP) : ""; |
|
|
|
// 合箱时F列箱数只在首行写值,后续行留空,配合按箱合并后居中(有托/无托相同) |
|
|
|
eorder.put("noCartons", isFirstRow ? cartonQty : ""); |
|
|
|
// 无托合箱:F列箱数只写首行,后续行留空,配合按箱合并居中;有托时箱数不合并,每行都写箱数 |
|
|
|
eorder.put("noCartons", (!hasPalletData && !isFirstRow) ? "" : cartonQty); |
|
|
|
eorder.put("qty_percarton", eorder.get("rolls")!=null?((BigDecimal)eorder.get("rolls")).setScale(0, RoundingMode.HALF_UP):""); |
|
|
|
// 托盘数:一个托盘对应多个箱,仅在该托盘第一条明细显示,其他行留空,后续按托盘合并 |
|
|
|
boolean showPalletQty = StringUtils.isNotEmpty(palletSeqNo) && !displayedPalletSeqSet.contains(palletSeqNo); |
|
|
|
@ -3166,12 +3166,10 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
|
template.addMergeRegion(boxStartIndex, boxEndIndex, 9); |
|
|
|
// 毛重列(K列,索引10) |
|
|
|
template.addMergeRegion(boxStartIndex, boxEndIndex, 10); |
|
|
|
// 合箱:F列箱数按箱合并居中(有托时A列仍是托号,不能按箱合并A列) |
|
|
|
if (boxEndIndex > boxStartIndex) { |
|
|
|
// 无托合箱:A列箱号、F列箱数按箱合并居中;有托时A列是托号、F列箱数都不按箱合并 |
|
|
|
if (!hasPalletData && boxEndIndex > boxStartIndex) { |
|
|
|
template.addMergeRegion(boxStartIndex, boxEndIndex, 5); |
|
|
|
if (!hasPalletData) { |
|
|
|
template.addMergeRegion(boxStartIndex, boxEndIndex, 0); |
|
|
|
} |
|
|
|
template.addMergeRegion(boxStartIndex, boxEndIndex, 0); |
|
|
|
} |
|
|
|
} |
|
|
|
// 托盘数列按托盘(seq_no)跨箱合并:一个托盘下多个箱共享同一托盘数 |
|
|
|
|