package cn.ibizlab.r7.runtime.core.r7rt_org.filter;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import cn.ibizlab.r7.runtime.util.ISearchFilter;
import cn.ibizlab.r7.runtime.util.domain.DataObj;
import com.fasterxml.jackson.annotation.JsonFormat;
import cn.ibizlab.r7.runtime.util.SearchContext;
import cn.ibizlab.r7.runtime.util.SearchFieldFilter;
import cn.ibizlab.r7.runtime.util.enums.SearchFieldType;
import cn.ibizlab.r7.runtime.util.enums.SearchGroupType;
import cn.ibizlab.r7.runtime.util.SearchGroupFilter;
import lombok.Data;

/**
 * 关系型数据实体[OrgDept] 查询条件对象
 */
@Data
public class OrgDeptSearchContext extends SearchContext {

	   public String n_orgdeptname_like;//[部门名称]
       public void setN_orgdeptname_like(String n_orgdeptname_like) {
            this.n_orgdeptname_like=n_orgdeptname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("orgdeptname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_orgdeptname_like);
            this.getCondition().add(searchField);
       }
	   public String n_porgdeptname_eq;//[部门名称]
       public void setN_porgdeptname_eq(String n_porgdeptname_eq) {
            this.n_porgdeptname_eq=n_porgdeptname_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("porgdeptname");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_porgdeptname_eq);
            this.getCondition().add(searchField);
       }
	   public String n_porgdeptname_like;//[部门名称]
       public void setN_porgdeptname_like(String n_porgdeptname_like) {
            this.n_porgdeptname_like=n_porgdeptname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("porgdeptname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_porgdeptname_like);
            this.getCondition().add(searchField);
       }
	   public String n_orgname_eq;//[组织名称]
       public void setN_orgname_eq(String n_orgname_eq) {
            this.n_orgname_eq=n_orgname_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("orgname");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_orgname_eq);
            this.getCondition().add(searchField);
       }
	   public String n_orgname_like;//[组织名称]
       public void setN_orgname_like(String n_orgname_like) {
            this.n_orgname_like=n_orgname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("orgname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_orgname_like);
            this.getCondition().add(searchField);
       }
	   public String n_orgid_eq;//[组织标识]
       public void setN_orgid_eq(String n_orgid_eq) {
            this.n_orgid_eq=n_orgid_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("orgid");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_orgid_eq);
            this.getCondition().add(searchField);
       }
	   public String n_porgdeptid_eq;//[部门标识]
       public void setN_porgdeptid_eq(String n_porgdeptid_eq) {
            this.n_porgdeptid_eq=n_porgdeptid_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("porgdeptid");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_porgdeptid_eq);
            this.getCondition().add(searchField);
       }

	/**
	 * 启用快速搜索
	 */
	public void setQuery(String strQuery)
	{
		 this.query=strQuery;
         if(!org.springframework.util.StringUtils.isEmpty(strQuery)){
           SearchGroupFilter searchGroupFilter=new SearchGroupFilter();
           searchGroupFilter.setSearchGroupType(SearchGroupType.OR);

           SearchFieldFilter orgdeptname=new SearchFieldFilter();
           orgdeptname.setParam("orgdeptname");
           orgdeptname.setCondition(SearchFieldType.LIKE);
           orgdeptname.setValue(strQuery);
           searchGroupFilter.getCondition().add(orgdeptname);
        this.getCondition().add(searchGroupFilter);   

           
           
        }
	}
}
