From b95280aba2036ba07c0138eec5b8a59bf263bb79 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 30 May 2024 13:31:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=BC=E5=85=A5Excel?= =?UTF-8?q?=E6=97=B6=E8=AE=BE=E7=BD=AEdictType=E5=B1=9E=E6=80=A7=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E6=9F=A5=E7=BC=93=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/utils/poi/ExcelUtil.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 8c339b54c..e46dec08f 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 @@ -471,7 +471,12 @@ public class ExcelUtil } else if (StringUtils.isNotEmpty(attr.dictType())) { - val = reverseDictByExp(Convert.toStr(val), attr.dictType(), attr.separator()); + if (!sysDictMap.containsKey(attr.dictType() + val)) + { + String dictValue = reverseDictByExp(Convert.toStr(val), attr.dictType(), attr.separator()); + sysDictMap.put(attr.dictType() + val, dictValue); + } + val = sysDictMap.get(attr.dictType() + val); } else if (!attr.handler().equals(ExcelHandlerAdapter.class)) {