From a057b7a4b94b77e91e5d3a1e7a2296c79446815f Mon Sep 17 00:00:00 2001
From: runphp <runphp@qq.com>
Date: Thu, 29 Sep 2022 18:16:11 +0800
Subject: [PATCH] fix: 改为静态方法, isError和isSuccess方法会被json序列化 isError和isSuccess会被json序列化 `{"error":false,"success":true}`

---
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java
index 2279c50..681f6cd 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java
@@ -681,7 +681,6 @@
             if (!headerStyles.containsKey(key))
             {
                 CellStyle style = wb.createCellStyle();
-                style = wb.createCellStyle();
                 style.cloneStyleFrom(styles.get("data"));
                 style.setAlignment(HorizontalAlignment.CENTER);
                 style.setVerticalAlignment(VerticalAlignment.CENTER);
@@ -715,7 +714,6 @@
             if (!styles.containsKey(key))
             {
                 CellStyle style = wb.createCellStyle();
-                style = wb.createCellStyle();
                 style.setAlignment(excel.align());
                 style.setVerticalAlignment(VerticalAlignment.CENTER);
                 style.setBorderRight(BorderStyle.THIN);
@@ -866,7 +864,7 @@
             {
                 // 创建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);

--
Gitblit v1.9.3