修复Excels导入时无法获取到dictType字典值问题(I7M4PW)

This commit is contained in:
RuoYi 2023-08-21 15:46:37 +08:00
parent d58942c506
commit 27bcef5021
2 changed files with 4 additions and 3 deletions

View File

@ -72,8 +72,9 @@ public class SysUser extends BaseEntity
/** 部门对象 */
@Excels({
@Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
@Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
@Excel(name = "部门名称", targetAttr = "deptName"),
@Excel(name = "部门负责人", targetAttr = "leader"),
@Excel(name = "部门状态", targetAttr = "status", dictType = "sys_normal_disable")
})
private SysDept dept;

View File

@ -464,7 +464,7 @@ public class ExcelUtil<T>
{
propertyName = field.getName() + "." + attr.targetAttr();
}
else if (StringUtils.isNotEmpty(attr.readConverterExp()))
if (StringUtils.isNotEmpty(attr.readConverterExp()))
{
val = reverseByExp(Convert.toStr(val), attr.readConverterExp(), attr.separator());
}