update 优化 excel 导出字典默认转为下拉框

feature/model
疯狂的狮子Li 1 year ago
parent 0c09adfe0a
commit 1cabccc9a8

@ -128,6 +128,9 @@ public class ExcelDownHandler implements SheetWriteHandler {
}
}
}
if (CollUtil.isEmpty(dropDownOptions)) {
return;
}
dropDownOptions.forEach(everyOptions -> {
// 如果传递了下拉框选择器参数
if (!everyOptions.getNextOptions().isEmpty()) {

@ -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);
}

@ -82,7 +82,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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -107,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;

@ -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;

Loading…
Cancel
Save