cuikaidong
2025-06-12 44e283b774bb1168d0c17dfe5070a1ca8e2274cd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package org.jeecg.common.util.jsonschema.validate;
 
import java.util.HashMap;
import java.util.Map;
 
import org.jeecg.common.util.jsonschema.CommonProperty;
 
import com.alibaba.fastjson.JSONObject;
 
/**
 * 字典属性
 * @author 86729
 *
 */
public class DictProperty extends CommonProperty {
    
    private static final long serialVersionUID = 3786503639885610767L;
    
    //字典三属性
    private String dictCode;
    private String dictTable;
    private String dictText;
    
    public String getDictCode() {
        return dictCode;
    }
 
    public void setDictCode(String dictCode) {
        this.dictCode = dictCode;
    }
 
    public String getDictTable() {
        return dictTable;
    }
 
    public void setDictTable(String dictTable) {
        this.dictTable = dictTable;
    }
 
    public String getDictText() {
        return dictText;
    }
 
    public void setDictText(String dictText) {
        this.dictText = dictText;
    }
 
    public DictProperty() {}
    
    /**
     *  构造器
     */
    public DictProperty(String key,String title,String dictTable,String dictCode,String dictText) {
        this.type = "string";
        this.view = "sel_search";
        this.key = key;
        this.title = title;
        this.dictCode = dictCode;
        this.dictTable= dictTable;
        this.dictText= dictText;
    }
    
    @Override
    public Map<String, Object> getPropertyJson() {
        Map<String,Object> map = new HashMap<>();
        map.put("key",getKey());
        JSONObject prop = getCommonJson();
        if(dictCode!=null) {
            prop.put("dictCode",dictCode);
        }
        if(dictTable!=null) {
            prop.put("dictTable",dictTable);
        }
        if(dictText!=null) {
            prop.put("dictText",dictText);
        }
        map.put("prop",prop);
        return map;
    }
 
    //TODO 重构问题:数据字典 只是字符串类的还是有存储的数值类型?只有字符串请跳过这个 只改前端
}