zjh
2025-02-21 2c785c3d4513daea9deb5c7edbb17a9f17111d25
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
package com.ltkj.tduck.struct;
 
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
 
import java.util.List;
 
/**
 * @author : wangqing
 * @description : 数据过滤对象结构
 * @create :  2021/10/13 14:49
 **/
@Data
public class FormDataFilterStruct {
    /**
     * or and 逻辑连接符号
     */
    RelEnum rel;
 
    /**
     * 过滤条件
     */
    List<Condition> conditionList;
 
    @Getter
    @AllArgsConstructor
    public enum QueryMethodEnum {
        /**
         * 等于
         */
        EQ,
        /**
         * 不等于
         */
        NE,
        /**
         * 包含
         */
        INCLUDE,
        /**
         * 不包含
         */
        NOT_INCLUDE,
        /**
         * 为空
         */
        IS_NULL,
        /**
         * 不为空
         */
        NOT_NULL,
        /**
         * ;
         * 大于
         */
        GT,
        /**
         * ;
         * 大于等于
         */
        GE,
        /**
         * 小于
         */
        LT,
        /**
         * 小于等于
         */
        LE,
        /**
         * 范围
         */
        RANGE,
        /**
         * 时间范围
         */
        TIME_RANGE;
 
    }
 
    /**
     * 默认值类型枚举
     */
    public enum DefaultValueTypeEnum {
        /**
         * 字符串
         */
        STRING,
        /***
         * 数组
         */
        ARRAY
    }
 
 
    /**
     * 默认值类型枚举
     */
    public enum RelEnum {
        AND,
        OR
    }
 
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    // 忽略前端传的未定义参数
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Condition {
        private String formItemId;
        private QueryMethodEnum method;
        private Object value;
        private DefaultValueTypeEnum defaultValueType;
    }
}