mirror of
https://github.com/yangzongzhuan/RuoYi-Cloud.git
synced 2025-09-06 21:20:55 +00:00
优化导出对象的子列表为空会出现[]问题
This commit is contained in:
@@ -784,6 +784,10 @@ public class ExcelUtil<T>
|
|||||||
{
|
{
|
||||||
cellValue = RegExUtils.replaceFirst(cellValue, FORMULA_REGEX_STR, "\t$0");
|
cellValue = RegExUtils.replaceFirst(cellValue, FORMULA_REGEX_STR, "\t$0");
|
||||||
}
|
}
|
||||||
|
if (value instanceof Collection && StringUtils.equals("[]", cellValue))
|
||||||
|
{
|
||||||
|
cellValue = StringUtils.EMPTY;
|
||||||
|
}
|
||||||
cell.setCellValue(StringUtils.isNull(cellValue) ? attr.defaultValue() : cellValue + attr.suffix());
|
cell.setCellValue(StringUtils.isNull(cellValue) ? attr.defaultValue() : cellValue + attr.suffix());
|
||||||
}
|
}
|
||||||
else if (ColumnType.NUMERIC == attr.cellType())
|
else if (ColumnType.NUMERIC == attr.cellType())
|
||||||
|
Reference in New Issue
Block a user