use of com.bc.pmpheep.back.vo.ProductType in project pmph by BCSquad.
the class ClicWordHelper method fillProductTypeData.
private XWPFTable fillProductTypeData(XWPFTable table, List<ProductType> productTypeList) {
if (CollectionUtil.isEmpty(productTypeList)) {
return table;
}
/*if (productTypeList.size() > 1) {
int height = table.getRow(1).getHeight();
for (int i = 1; i < productTypeList.size(); i++) {
table.createRow().setHeight(height);
}
}*/
List<XWPFTableRow> rows = table.getRows();
String typeName = "";
for (ProductType productType : productTypeList) {
if (StringUtil.notEmpty(productType.getType_name())) {
typeName = typeName + productType.getType_name() + ", ";
}
}
typeName = typeName.substring(0, typeName.lastIndexOf(","));
if (StringUtil.notEmpty(typeName)) {
// 每次添加一个换行符
rows.get(0).getCell(0).setText(typeName);
}
return table;
}
Aggregations