中介类型修改

This commit is contained in:
wkc
2026-01-29 13:39:47 +08:00
parent 2c146c026a
commit 1b043fa2d6
36 changed files with 4373 additions and 145 deletions

View File

@@ -0,0 +1,73 @@
package com.ruoyi.common.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* EasyExcel字典下拉框注解
* 用于在生成Excel模板时为字段添加基于若依字典数据的下拉框
*
* 使用示例:
* <pre>
* &#64;DictDropdown(dictType = "sys_user_sex")
* &#64;ExcelProperty(value = "性别", index = 2)
* private String gender;
* </pre>
*
* @author ruoyi
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface DictDropdown {
/**
* 字典类型编码,对应若依框架字典管理中的字典类型
* 如sys_user_sex、sys_normal_disable等
*
* @return 字典类型编码
*/
String dictType();
/**
* 下拉框显示内容类型
* LABEL: 显示字典标签(如:男、女)
* VALUE: 显示字典键值0、1
*
* @return 显示类型
*/
DisplayType displayType() default DisplayType.LABEL;
/**
* 是否仅允许选择下拉框中的值
* true: 只能从下拉框中选择
* false: 可以手动输入其他值
*
* @return 是否仅允许选择
*/
boolean strict() default true;
/**
* 隐藏Sheet的名称用于存储大量下拉选项
* 当下拉选项超过Excel字符限制时会创建隐藏Sheet存储选项
*
* @return 隐藏Sheet名称
*/
String hiddenSheetName() default "dict_hidden";
/**
* 显示类型枚举
*/
enum DisplayType {
/**
* 显示字典标签
*/
LABEL,
/**
* 显示字典键值
*/
VALUE
}
}