package cn.ibizlab.r7.runtime.core.r7rt_base.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;

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

	   public String n_datasourcetype_eq;//[数据来源]
       public void setN_datasourcetype_eq(String n_datasourcetype_eq) {
            this.n_datasourcetype_eq=n_datasourcetype_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("datasourcetype");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_datasourcetype_eq);
            this.getCondition().add(searchField);
       }
	   public String n_userrolename_like;//[用户角色名称]
       public void setN_userrolename_like(String n_userrolename_like) {
            this.n_userrolename_like=n_userrolename_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("userrolename");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_userrolename_like);
            this.getCondition().add(searchField);
       }
	   public String n_userroletype_eq;//[用户角色类型]
       public void setN_userroletype_eq(String n_userroletype_eq) {
            this.n_userroletype_eq=n_userroletype_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("userroletype");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_userroletype_eq);
            this.getCondition().add(searchField);
       }
	   public String n_systemname_eq;//[系统名称]
       public void setN_systemname_eq(String n_systemname_eq) {
            this.n_systemname_eq=n_systemname_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("systemname");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_systemname_eq);
            this.getCondition().add(searchField);
       }
	   public String n_systemname_like;//[系统名称]
       public void setN_systemname_like(String n_systemname_like) {
            this.n_systemname_like=n_systemname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("systemname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_systemname_like);
            this.getCondition().add(searchField);
       }
	   public String n_systemid_eq;//[业务系统标识]
       public void setN_systemid_eq(String n_systemid_eq) {
            this.n_systemid_eq=n_systemid_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("systemid");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_systemid_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 userrolename=new SearchFieldFilter();
           userrolename.setParam("userrolename");
           userrolename.setCondition(SearchFieldType.LIKE);
           userrolename.setValue(strQuery);
           searchGroupFilter.getCondition().add(userrolename);
        this.getCondition().add(searchGroupFilter);   

           
           
        }
	}
}
