use of com.bc.pmpheep.back.po.MaterialExtension in project pmph by BCSquad.
the class ExcelHelper method fillDecExtensionVODataPlus.
private ColumnProperties fillDecExtensionVODataPlus(List<MaterialExtension> extensions, List<DecExtensionVO> decExtensionVOs, Row row, ColumnProperties properties) {
int colCount = properties.getColCount();
int[] maxLength = properties.getMaxLength();
if (CollectionUtil.isEmpty(decExtensionVOs)) {
for (MaterialExtension extension : extensions) {
row.createCell(colCount++);
}
} else {
for (MaterialExtension extension : extensions) {
for (DecExtensionVO vo : decExtensionVOs) {
if (vo.getExtensionId().equals(extension.getId())) {
Cell cell = row.createCell(colCount++);
String content = vo.getContent();
if (StringUtil.notEmpty(content)) {
cell.setCellValue(content);
maxLength[colCount - 1] = content.length();
} else {
maxLength[colCount - 1] = 2;
}
break;
}
}
}
}
properties.setColCount(colCount);
properties.setMaxLength(maxLength);
return properties;
}
Aggregations