diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java index d8774609..ef15802b 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java @@ -103,13 +103,13 @@ public class R implements Serializable this.data = data; } - public Boolean isError() + public static Boolean isError(R ret) { - return !isSuccess(); + return !isSuccess(ret); } - public Boolean isSuccess() + public static Boolean isSuccess(R ret) { - return R.SUCCESS == getCode(); + return R.SUCCESS == ret.getCode(); } } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index d6876412..6137c869 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -694,17 +694,19 @@ public class ExcelUtil // 得到导出对象. T vo = (T) list.get(i); Collection subList = null; - if (isSubListValue(vo)) + if (isSubList()) { - subList = getListCellValue(vo); - subMergedLastRowNum = subMergedLastRowNum + subList.size(); + if (isSubListValue(vo)) + { + subList = getListCellValue(vo); + subMergedLastRowNum = subMergedLastRowNum + subList.size(); + } + else + { + subMergedFirstRowNum++; + subMergedLastRowNum++; + } } - else - { - subMergedFirstRowNum++; - subMergedLastRowNum++; - } - int column = 0; for (Object[] os : fields) {