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;
|
}
|
}
|
}
|