|
|
|
@ -2393,9 +2393,6 @@ public class CoDelExcelServiceImpl implements CoDelExcelService { |
|
|
|
List<Map> checkList = coDelMapper.selectPalletDetailList(boxData); |
|
|
|
// 记录当前箱子对应的exportList起始索引 |
|
|
|
int boxStartIndex = exportList.size(); |
|
|
|
|
|
|
|
// 判断当前箱子所有明细的rolls是否全部为空或0 |
|
|
|
boolean allDetailRollsEmptyOrZero = true; |
|
|
|
// 获取box的rolls |
|
|
|
BigDecimal boxRolls = list.get(m).get("rolls") != null ? |
|
|
|
((BigDecimal) list.get(m).get("rolls")).setScale(0, RoundingMode.HALF_UP) : BigDecimal.ZERO; |
|
|
|
@ -2414,12 +2411,10 @@ public class CoDelExcelServiceImpl implements CoDelExcelService { |
|
|
|
eorder.put("net_weight", isFirstRow ? ((BigDecimal) list.get(m).get("net_weight")).setScale(2, RoundingMode.HALF_UP) : ""); |
|
|
|
|
|
|
|
// rolls处理:如果明细的rolls全部为空或0,则取box的rolls;合箱时合并居中显示 |
|
|
|
if (allDetailRollsEmptyOrZero) { |
|
|
|
// 使用box的rolls,合箱时只在第一行显示(用于合并单元格居中) |
|
|
|
eorder.put("rolls", isFirstRow ? boxRolls : ""); |
|
|
|
if (isFirstRow) { |
|
|
|
rolls = rolls.add(boxRolls); |
|
|
|
} |
|
|
|
// 使用box的rolls,合箱时只在第一行显示(用于合并单元格居中) |
|
|
|
eorder.put("rolls", isFirstRow ? boxRolls : ""); |
|
|
|
if (isFirstRow) { |
|
|
|
rolls = rolls.add(boxRolls); |
|
|
|
} |
|
|
|
EcssCoDelNotifyDetailData nodifyData = notifyDetailMap.get(partNo); |
|
|
|
// 只有RFID需要 |
|
|
|
@ -2456,9 +2451,7 @@ public class CoDelExcelServiceImpl implements CoDelExcelService { |
|
|
|
// 合并毛重列(第7列,索引7) |
|
|
|
template.addMergeRegion(boxStartIndex, boxEndIndex, 7); |
|
|
|
// 如果明细rolls全为空/0,使用box的rolls时需要合并居中显示(第5列,索引5) |
|
|
|
if (allDetailRollsEmptyOrZero) { |
|
|
|
template.addMergeRegion(boxStartIndex, boxEndIndex, 8); |
|
|
|
} |
|
|
|
template.addMergeRegion(boxStartIndex, boxEndIndex, 8); |
|
|
|
} |
|
|
|
totalCartons = totalCartons.add(list.get(m).get("box_qty") !=null? new BigDecimal(list.get(m).get("box_qty").toString()) : BigDecimal.valueOf(0.0)); |
|
|
|
grossWeight = grossWeight.add(list.get(m).get("gross_weight") !=null?new BigDecimal(list.get(m).get("gross_weight").toString()):BigDecimal.valueOf(0.0)); |
|
|
|
|