package com.sinosig.core.module.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 com.sinosig.util.ISearchFilter;
import com.sinosig.util.domain.DataObj;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sinosig.util.SearchContext;
import com.sinosig.util.SearchFieldFilter;
import com.sinosig.util.enums.SearchFieldType;
import com.sinosig.util.enums.SearchGroupType;
import com.sinosig.util.SearchGroupFilter;
import lombok.Data;

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

	   public String n_syxtbydname_like;//[商业险特别约定名称]
       public void setN_syxtbydname_like(String n_syxtbydname_like) {
            this.n_syxtbydname_like=n_syxtbydname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("syxtbydname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_syxtbydname_like);
            this.getCondition().add(searchField);
       }
	   public String n_tbydkname_eq;//[特别约定库名称]
       public void setN_tbydkname_eq(String n_tbydkname_eq) {
            this.n_tbydkname_eq=n_tbydkname_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("tbydkname");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_tbydkname_eq);
            this.getCondition().add(searchField);
       }
	   public String n_tbydkname_like;//[特别约定库名称]
       public void setN_tbydkname_like(String n_tbydkname_like) {
            this.n_tbydkname_like=n_tbydkname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("tbydkname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_tbydkname_like);
            this.getCondition().add(searchField);
       }
	   public String n_tbydkid_eq;//[特别约定库标识]
       public void setN_tbydkid_eq(String n_tbydkid_eq) {
            this.n_tbydkid_eq=n_tbydkid_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("tbydkid");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_tbydkid_eq);
            this.getCondition().add(searchField);
       }
	   public String n_cidid_eq;//[车险单标识]
       public void setN_cidid_eq(String n_cidid_eq) {
            this.n_cidid_eq=n_cidid_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("cidid");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_cidid_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 syxtbydname=new SearchFieldFilter();
           syxtbydname.setParam("syxtbydname");
           syxtbydname.setCondition(SearchFieldType.LIKE);
           syxtbydname.setValue(strQuery);
           searchGroupFilter.getCondition().add(syxtbydname);
        this.getCondition().add(searchGroupFilter);   

           
           
        }
	}
}
