zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
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
package cn.autoform.bean.seache;
 
import cn.autoform.bean.form.CpnType;
import cn.autoform.util.tool.ObjectUtil;
import cn.autoform.util.tool.RequestContext;
import lombok.Data;
 
@Data
public class SeacheConditions {
 
    /**
     * key
     */
    public static final String PARAM_KEY = "search";
    
    /**
     * 控件类型
     */
    private CpnType type;
    
    /**
     * 控件别名
     */
    private String fieldName;
    
    /**
     * 左值
     */
    private Object valueLeft;
    
    /**
     * 右值
     */
    private Object valueRight;
 
    public SeacheConditions(CpnType type, String fieldName, Object valueLeft, Object valueRight) {
        super();
        this.type = type;
        this.fieldName = fieldName;
        this.valueLeft = valueLeft;
        this.valueRight = valueRight;
    }
 
    public SeacheConditions() {
        super();
    }
 
    public String getFieldName() {
        if(ObjectUtil.empty(RequestContext.getFormId())) {
            return fieldName;
        }else{
            return RequestContext.getFormName(RequestContext.getTenantId(), RequestContext.getFormId()) + "." + fieldName;
        }
    }
}