diff --git a/pom.xml b/pom.xml
index d49efbdfb..01c8d42be 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,6 +11,7 @@
ruoyi
http://www.ruoyi.vip
若依管理系统
+ jar
UTF-8
@@ -54,19 +55,13 @@
0.9.1
1.2.75
5.5.6
+ 2.2.7
-
-
-
-
-
-
-
@@ -74,13 +69,6 @@
-
-
-
-
-
-
-
@@ -100,30 +88,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -138,39 +102,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -184,16 +120,6 @@
-
-
-
-
-
-
-
-
- jar
-
@@ -306,6 +232,13 @@
hutool-captcha
${hutool.version}
+
+
+ com.alibaba
+ easyexcel
+ ${easyexcel.verion}
+
+
diff --git a/src/main/java/cn/iocoder/dashboard/framework/dict/config/DictConfiguration.java b/src/main/java/cn/iocoder/dashboard/framework/dict/config/DictConfiguration.java
new file mode 100644
index 000000000..d2ff54d10
--- /dev/null
+++ b/src/main/java/cn/iocoder/dashboard/framework/dict/config/DictConfiguration.java
@@ -0,0 +1,18 @@
+package cn.iocoder.dashboard.framework.dict.config;
+
+import cn.iocoder.dashboard.framework.dict.core.service.DictDataFrameworkService;
+import cn.iocoder.dashboard.framework.dict.core.util.DictUtils;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class DictConfiguration {
+
+ @Bean
+ @SuppressWarnings("InstantiationOfUtilityClass")
+ public DictUtils dictUtils(DictDataFrameworkService service) {
+ DictUtils.init(service);
+ return new DictUtils();
+ }
+
+}
diff --git a/src/main/java/cn/iocoder/dashboard/framework/dict/core/util/DictUtils.java b/src/main/java/cn/iocoder/dashboard/framework/dict/core/util/DictUtils.java
index 6e8fe2164..bb329ed21 100644
--- a/src/main/java/cn/iocoder/dashboard/framework/dict/core/util/DictUtils.java
+++ b/src/main/java/cn/iocoder/dashboard/framework/dict/core/util/DictUtils.java
@@ -1,6 +1,7 @@
package cn.iocoder.dashboard.framework.dict.core.util;
import cn.iocoder.dashboard.framework.dict.core.service.DictDataFrameworkService;
+import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dict.SysDictDataDO;
import lombok.extern.slf4j.Slf4j;
/**
@@ -16,4 +17,12 @@ public class DictUtils {
log.info("[init][初始化 DictUtils 成功]");
}
+ public static SysDictDataDO getDictDataFromCache(String type, String value) {
+ return service.getDictDataFromCache(type, value);
+ }
+
+ public static SysDictDataDO parseDictDataFromCache(String type, String label) {
+ return service.getDictDataFromCache(type, label);
+ }
+
}
diff --git a/src/main/java/cn/iocoder/dashboard/framework/excel/Excel.java b/src/main/java/cn/iocoder/dashboard/framework/excel/Excel.java
index 6b793269d..490a01b74 100644
--- a/src/main/java/cn/iocoder/dashboard/framework/excel/Excel.java
+++ b/src/main/java/cn/iocoder/dashboard/framework/excel/Excel.java
@@ -11,6 +11,7 @@ import java.math.BigDecimal;
*
* @author ruoyi
*/
+@Deprecated
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Excel {
diff --git a/src/main/java/cn/iocoder/dashboard/framework/excel/Excels.java b/src/main/java/cn/iocoder/dashboard/framework/excel/Excels.java
index 3264f7148..ad767b596 100644
--- a/src/main/java/cn/iocoder/dashboard/framework/excel/Excels.java
+++ b/src/main/java/cn/iocoder/dashboard/framework/excel/Excels.java
@@ -10,6 +10,7 @@ import java.lang.annotation.Target;
*
* @author ruoyi
*/
+@Deprecated
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Excels
diff --git a/src/main/java/cn/iocoder/dashboard/framework/excel/core/annotations/DictFormat.java b/src/main/java/cn/iocoder/dashboard/framework/excel/core/annotations/DictFormat.java
new file mode 100644
index 000000000..ae3144016
--- /dev/null
+++ b/src/main/java/cn/iocoder/dashboard/framework/excel/core/annotations/DictFormat.java
@@ -0,0 +1,19 @@
+package cn.iocoder.dashboard.framework.excel.core.annotations;
+
+import cn.iocoder.dashboard.modules.system.enums.dict.DictTypeEnum;
+
+import java.lang.annotation.*;
+
+/**
+ * 字典格式化
+ *
+ * 实现将字典数据的值,格式化成字典数据的标签
+ */
+@Target({ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface DictFormat {
+
+ DictTypeEnum value();
+
+}
diff --git a/src/main/java/cn/iocoder/dashboard/framework/excel/core/convert/DictConvert.java b/src/main/java/cn/iocoder/dashboard/framework/excel/core/convert/DictConvert.java
new file mode 100644
index 000000000..1a65505d9
--- /dev/null
+++ b/src/main/java/cn/iocoder/dashboard/framework/excel/core/convert/DictConvert.java
@@ -0,0 +1,64 @@
+package cn.iocoder.dashboard.framework.excel.core.convert;
+
+
+import cn.hutool.core.convert.Convert;
+import cn.iocoder.dashboard.framework.dict.core.util.DictUtils;
+import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat;
+import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dict.SysDictDataDO;
+import cn.iocoder.dashboard.modules.system.enums.dict.DictTypeEnum;
+import com.alibaba.excel.converters.Converter;
+import com.alibaba.excel.enums.CellDataTypeEnum;
+import com.alibaba.excel.metadata.CellData;
+import com.alibaba.excel.metadata.GlobalConfiguration;
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public class DictConvert implements Converter