|
|
|
@ -2544,12 +2544,11 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
|
/** |
|
|
|
* PO号自动分行显示,避免导出后超出单元格范围。 |
|
|
|
*/ |
|
|
|
private String formatPoNoForDisplay(Collection<String> poNoCollection) { |
|
|
|
private String formatPoNoForDisplay(Collection<String> poNoCollection,int maxCharsPerLine) { |
|
|
|
if (poNoCollection == null || poNoCollection.isEmpty()) { |
|
|
|
return ""; |
|
|
|
} |
|
|
|
|
|
|
|
final int maxCharsPerLine = 100; |
|
|
|
StringBuilder result = new StringBuilder(); |
|
|
|
int currentLineLength = 0; |
|
|
|
|
|
|
|
@ -2669,7 +2668,7 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
|
poNoSet.add(customerPO); |
|
|
|
} |
|
|
|
} |
|
|
|
template.addVar("poNo", formatPoNoForDisplay(poNoSet)); |
|
|
|
template.addVar("poNo", formatPoNoForDisplay(poNoSet,100)); |
|
|
|
BigDecimal allPrice = BigDecimal.valueOf(0.0); |
|
|
|
List<Map> ndList = sqlSession.selectList("ecssMapper.searchEcssCoDelNotifyDetailList", notifyHeader); |
|
|
|
if (ndList == null) { |
|
|
|
@ -2795,7 +2794,7 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
|
.map(eorder -> Objects.toString(eorder.get("customerPO"), "").trim()) |
|
|
|
.filter(StringUtils::isNotBlank) |
|
|
|
.collect(Collectors.toCollection(LinkedHashSet::new)); |
|
|
|
template.addVar("poNo", formatPoNoForDisplay(poNoSet)); |
|
|
|
template.addVar("poNo", formatPoNoForDisplay(poNoSet,160)); |
|
|
|
List<Map> list = coDelMapper.selectBoxListTX(notifyHeader); |
|
|
|
// DB中item_no可能是字符串区间(如"127~127"、"2~26"),直接查询顺序可能不稳定,导出前做自然排序 |
|
|
|
sortBoxListBySeqAndItemNo(list); |
|
|
|
@ -3061,7 +3060,7 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
|
.map(eorder -> Objects.toString(eorder.get("customerPO"), "").trim()) |
|
|
|
.filter(StringUtils::isNotBlank) |
|
|
|
.collect(Collectors.toCollection(LinkedHashSet::new)); |
|
|
|
template.addVar("poNo", formatPoNoForDisplay(poNoSet)); |
|
|
|
template.addVar("poNo", formatPoNoForDisplay(poNoSet,160)); |
|
|
|
List<Map> list = coDelMapper.selectBoxListTX(notifyHeader); |
|
|
|
// DB中item_no可能是字符串区间(如"127~127"、"2~26"),直接查询顺序可能不稳定,导出前做自然排序 |
|
|
|
sortBoxListBySeqAndItemNo(list); |
|
|
|
@ -3330,7 +3329,7 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
|
.map(eorder -> Objects.toString(eorder.get("customerPO"), "").trim()) |
|
|
|
.filter(StringUtils::isNotBlank) |
|
|
|
.collect(Collectors.toCollection(LinkedHashSet::new)); |
|
|
|
template.addVar("poNo", formatPoNoForDisplay(poNoSet)); |
|
|
|
template.addVar("poNo", formatPoNoForDisplay(poNoSet,160)); |
|
|
|
List<Map> list = coDelMapper.selectBoxListTX(notifyHeader); |
|
|
|
// DB中item_no可能是字符串区间(如"127~127"、"2~26"),直接查询顺序可能不稳定,导出前做自然排序 |
|
|
|
sortBoxListBySeqAndItemNo(list); |
|
|
|
@ -3599,7 +3598,7 @@ public class CoDelExcelTXServiceImpl implements CoDelExcelTXService { |
|
|
|
} |
|
|
|
boolean showOrderNoFlag = data != null && Boolean.TRUE.equals(data.getShowOrderNoFlag()); |
|
|
|
boolean showInvoiceFlag = data != null && Boolean.TRUE.equals(data.getShowInvoiceFlag()); |
|
|
|
String poNoDisplayText = formatPoNoForDisplay(poNoSet); |
|
|
|
String poNoDisplayText = formatPoNoForDisplay(poNoSet,100); |
|
|
|
if (isShowOrderNoBu(buNo)) { |
|
|
|
poNoDisplayText = showOrderNoFlag ? "PO#"+formatPoNoForHwDesc(poNoSet) : ""; |
|
|
|
} |
|
|
|
|