瀏覽代碼

优化导出对象的子列表判断条件

RuoYi 2 年之前
父節點
當前提交
af7d0a3409
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

@@ -993,7 +993,7 @@ public class ExcelUtil<T>
             {
                 // 创建cell
                 cell = row.createCell(column);
-                if (isSubListValue(vo) && attr.needMerge())
+                if (isSubListValue(vo) && getListCellValue(vo).size() > 1 && attr.needMerge())
                 {
                     CellRangeAddress cellAddress = new CellRangeAddress(subMergedFirstRowNum, subMergedLastRowNum, column, column);
                     sheet.addMergedRegion(cellAddress);