diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/org/dromara/common/excel/core/ExcelDownHandler.java b/ruoyi-common/ruoyi-common-excel/src/main/java/org/dromara/common/excel/core/ExcelDownHandler.java index 52bfebcb..db4fecca 100644 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/org/dromara/common/excel/core/ExcelDownHandler.java +++ b/ruoyi-common/ruoyi-common-excel/src/main/java/org/dromara/common/excel/core/ExcelDownHandler.java @@ -128,6 +128,9 @@ public class ExcelDownHandler implements SheetWriteHandler { } } } + if (CollUtil.isEmpty(dropDownOptions)) { + return; + } dropDownOptions.forEach(everyOptions -> { // 如果传递了下拉框选择器参数 if (!everyOptions.getNextOptions().isEmpty()) { diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/org/dromara/common/excel/utils/ExcelUtil.java b/ruoyi-common/ruoyi-common-excel/src/main/java/org/dromara/common/excel/utils/ExcelUtil.java index 00a78eae..329911d1 100644 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/org/dromara/common/excel/utils/ExcelUtil.java +++ b/ruoyi-common/ruoyi-common-excel/src/main/java/org/dromara/common/excel/utils/ExcelUtil.java @@ -196,10 +196,8 @@ public class ExcelUtil { // 合并处理器 builder.registerWriteHandler(new CellMergeStrategy(list, true)); } - if (CollUtil.isNotEmpty(options)) { - // 添加下拉框操作 - builder.registerWriteHandler(new ExcelDownHandler(options)); - } + // 添加下拉框操作 + builder.registerWriteHandler(new ExcelDownHandler(options)); builder.doWrite(list); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysClientVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysClientVo.java index 04d28422..a3b415df 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysClientVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysClientVo.java @@ -81,7 +81,7 @@ public class SysClientVo implements Serializable { /** * 状态(0正常 1停用) */ - @ExcelProperty(value = "状态", converter = ExcelDictConvert.class) + @ExcelProperty(value = "状态", index = 7, converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "0=正常,1=停用") private String status; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysConfigVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysConfigVo.java index 946f3df9..c4b610c3 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysConfigVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysConfigVo.java @@ -53,7 +53,7 @@ public class SysConfigVo implements Serializable { /** * 系统内置(Y是 N否) */ - @ExcelProperty(value = "系统内置", converter = ExcelDictConvert.class) + @ExcelProperty(value = "系统内置", index = 4, converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "sys_yes_no") private String configType; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysDeptVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysDeptVo.java index ca5bca4a..71f75d23 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysDeptVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysDeptVo.java @@ -78,7 +78,7 @@ public class SysDeptVo implements Serializable { /** * 部门状态(0正常 1停用) */ - @ExcelProperty(value = "部门状态", converter = ExcelDictConvert.class) + @ExcelProperty(value = "部门状态", index = 5, converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "sys_normal_disable") private String status; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysDictDataVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysDictDataVo.java index 6c34d0c9..2879eb0d 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysDictDataVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysDictDataVo.java @@ -69,14 +69,14 @@ public class SysDictDataVo implements Serializable { /** * 是否默认(Y是 N否) */ - @ExcelProperty(value = "是否默认", converter = ExcelDictConvert.class) + @ExcelProperty(value = "是否默认", index = 5, converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "sys_yes_no") private String isDefault; /** * 状态(0正常 1停用) */ - @ExcelProperty(value = "状态", converter = ExcelDictConvert.class) + @ExcelProperty(value = "状态", index = 6, converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "sys_normal_disable") private String status; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysDictTypeVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysDictTypeVo.java index 9277a0cf..245d50fc 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysDictTypeVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysDictTypeVo.java @@ -47,7 +47,7 @@ public class SysDictTypeVo implements Serializable { /** * 状态(0正常 1停用) */ - @ExcelProperty(value = "状态", converter = ExcelDictConvert.class) + @ExcelProperty(value = "状态", index = 3, converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "sys_normal_disable") private String status; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysLogininforVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysLogininforVo.java index abe5fd7d..06338386 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysLogininforVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysLogininforVo.java @@ -48,7 +48,7 @@ public class SysLogininforVo implements Serializable { /** * 登录状态(0成功 1失败) */ - @ExcelProperty(value = "登录状态", converter = ExcelDictConvert.class) + @ExcelProperty(value = "登录状态", index = 2, converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "sys_common_status") private String status; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysOperLogVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysOperLogVo.java index 145e11c5..95c1ad30 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysOperLogVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysOperLogVo.java @@ -47,7 +47,7 @@ public class SysOperLogVo implements Serializable { /** * 业务类型(0其它 1新增 2修改 3删除) */ - @ExcelProperty(value = "业务类型", converter = ExcelDictConvert.class) + @ExcelProperty(value = "业务类型", index = 2, converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "sys_oper_type") private Integer businessType; @@ -71,7 +71,7 @@ public class SysOperLogVo implements Serializable { /** * 操作类别(0其它 1后台用户 2手机端用户) */ - @ExcelProperty(value = "操作类别", converter = ExcelDictConvert.class) + @ExcelProperty(value = "操作类别", index = 5, converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "0=其它,1=后台用户,2=手机端用户") private Integer operatorType; @@ -120,7 +120,7 @@ public class SysOperLogVo implements Serializable { /** * 操作状态(0正常 1异常) */ - @ExcelProperty(value = "状态", converter = ExcelDictConvert.class) + @ExcelProperty(value = "状态", index = 13, converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "sys_common_status") private Integer status; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysPostVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysPostVo.java index e3ad4ccd..d24c457d 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysPostVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysPostVo.java @@ -54,7 +54,7 @@ public class SysPostVo implements Serializable { /** * 状态(0正常 1停用) */ - @ExcelProperty(value = "状态", converter = ExcelDictConvert.class) + @ExcelProperty(value = "状态", index = 4, converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "sys_normal_disable") private String status; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysRoleVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysRoleVo.java index ce8442cc..3dc5639a 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysRoleVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysRoleVo.java @@ -53,7 +53,7 @@ public class SysRoleVo implements Serializable { /** * 数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限) */ - @ExcelProperty(value = "数据范围", converter = ExcelDictConvert.class) + @ExcelProperty(value = "数据范围", index = 4, converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限") private String dataScope; @@ -72,7 +72,7 @@ public class SysRoleVo implements Serializable { /** * 角色状态(0正常 1停用) */ - @ExcelProperty(value = "角色状态", converter = ExcelDictConvert.class) + @ExcelProperty(value = "角色状态", index = 7, converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "sys_normal_disable") private String status; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysTenantPackageVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysTenantPackageVo.java index a413d63f..b8a64804 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysTenantPackageVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysTenantPackageVo.java @@ -58,7 +58,7 @@ public class SysTenantPackageVo implements Serializable { /** * 状态(0正常 1停用) */ - @ExcelProperty(value = "状态", converter = ExcelDictConvert.class) + @ExcelProperty(value = "状态", index = 5, converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "0=正常,1=停用") private String status; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysTenantVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysTenantVo.java index ad4cbb48..3c8d5a70 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysTenantVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysTenantVo.java @@ -8,6 +8,7 @@ import org.dromara.common.excel.annotation.ExcelDictFormat; import org.dromara.common.excel.convert.ExcelDictConvert; import org.dromara.system.domain.SysTenant; +import java.io.Serial; import java.io.Serializable; import java.util.Date; @@ -22,6 +23,7 @@ import java.util.Date; @AutoMapper(target = SysTenant.class) public class SysTenantVo implements Serializable { + @Serial private static final long serialVersionUID = 1L; /** @@ -105,7 +107,7 @@ public class SysTenantVo implements Serializable { /** * 租户状态(0正常 1停用) */ - @ExcelProperty(value = "租户状态", converter = ExcelDictConvert.class) + @ExcelProperty(value = "租户状态", index = 13, converter = ExcelDictConvert.class) @ExcelDictFormat(readConverterExp = "0=正常,1=停用") private String status; diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysUserExportVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysUserExportVo.java index e6f256e0..9b9d2255 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysUserExportVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysUserExportVo.java @@ -59,14 +59,14 @@ public class SysUserExportVo implements Serializable { /** * 用户性别 */ - @ExcelProperty(value = "用户性别", converter = ExcelDictConvert.class) + @ExcelProperty(value = "用户性别", index = 6, converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "sys_user_sex") private String sex; /** * 帐号状态(0正常 1停用) */ - @ExcelProperty(value = "帐号状态", converter = ExcelDictConvert.class) + @ExcelProperty(value = "帐号状态", index = 7, converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "sys_normal_disable") private String status;