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;

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

	   public String n_abl_eq;//[A/B类]
       public void setN_abl_eq(String n_abl_eq) {
            this.n_abl_eq=n_abl_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("abl");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_abl_eq);
            this.getCondition().add(searchField);
       }
	   public String n_hpds_eq;//[号牌底色]
       public void setN_hpds_eq(String n_hpds_eq) {
            this.n_hpds_eq=n_hpds_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("hpds");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_hpds_eq);
            this.getCondition().add(searchField);
       }
	   public String n_cidname_like;//[车险单名称]
       public void setN_cidname_like(String n_cidname_like) {
            this.n_cidname_like=n_cidname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("cidname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_cidname_like);
            this.getCondition().add(searchField);
       }
	   public String n_qdlx_eq;//[渠道类型]
       public void setN_qdlx_eq(String n_qdlx_eq) {
            this.n_qdlx_eq=n_qdlx_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("qdlx");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_qdlx_eq);
            this.getCondition().add(searchField);
       }
	   public String n_cldl_eq;//[车辆大类]
       public void setN_cldl_eq(String n_cldl_eq) {
            this.n_cldl_eq=n_cldl_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("cldl");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_cldl_eq);
            this.getCondition().add(searchField);
       }
	   public String n_syxdqfs_eq;//[商业险短期方式]
       public void setN_syxdqfs_eq(String n_syxdqfs_eq) {
            this.n_syxdqfs_eq=n_syxdqfs_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("syxdqfs");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_syxdqfs_eq);
            this.getCondition().add(searchField);
       }
	   public String n_syxz_eq;//[使用性质]
       public void setN_syxz_eq(String n_syxz_eq) {
            this.n_syxz_eq=n_syxz_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("syxz");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_syxz_eq);
            this.getCondition().add(searchField);
       }
	   public String n_cllxms_eq;//[车辆类型描述]
       public void setN_cllxms_eq(String n_cllxms_eq) {
            this.n_cllxms_eq=n_cllxms_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("cllxms");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_cllxms_eq);
            this.getCondition().add(searchField);
       }
	   public String n_ywly_eq;//[业务来源]
       public void setN_ywly_eq(String n_ywly_eq) {
            this.n_ywly_eq=n_ywly_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("ywly");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_ywly_eq);
            this.getCondition().add(searchField);
       }
	   public String n_hpzl_eq;//[号牌种类]
       public void setN_hpzl_eq(String n_hpzl_eq) {
            this.n_hpzl_eq=n_hpzl_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("hpzl");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_hpzl_eq);
            this.getCondition().add(searchField);
       }
	   public String n_jqxdqfs_eq;//[交强险短期方式]
       public void setN_jqxdqfs_eq(String n_jqxdqfs_eq) {
            this.n_jqxdqfs_eq=n_jqxdqfs_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("jqxdqfs");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_jqxdqfs_eq);
            this.getCondition().add(searchField);
       }
	   public String n_clzl_eq;//[车辆种类]
       public void setN_clzl_eq(String n_clzl_eq) {
            this.n_clzl_eq=n_clzl_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("clzl");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_clzl_eq);
            this.getCondition().add(searchField);
       }
       @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
	   public Timestamp n_cdrq_gtandeq;//[初登日期]
       public void setN_cdrq_gtandeq(Timestamp n_cdrq_gtandeq) {
            this.n_cdrq_gtandeq=n_cdrq_gtandeq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("cdrq");
            searchField.setCondition(SearchFieldType.GTANDEQ);
            searchField.setValue(n_cdrq_gtandeq);
            this.getCondition().add(searchField);
       }
       @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
	   public Timestamp n_cdrq_ltandeq;//[初登日期]
       public void setN_cdrq_ltandeq(Timestamp n_cdrq_ltandeq) {
            this.n_cdrq_ltandeq=n_cdrq_ltandeq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("cdrq");
            searchField.setCondition(SearchFieldType.LTANDEQ);
            searchField.setValue(n_cdrq_ltandeq);
            this.getCondition().add(searchField);
       }
	   public String n_cpxhname_eq;//[厂牌型号]
       public void setN_cpxhname_eq(String n_cpxhname_eq) {
            this.n_cpxhname_eq=n_cpxhname_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("cpxhname");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_cpxhname_eq);
            this.getCondition().add(searchField);
       }
	   public String n_cpxhname_like;//[厂牌型号]
       public void setN_cpxhname_like(String n_cpxhname_like) {
            this.n_cpxhname_like=n_cpxhname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("cpxhname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_cpxhname_like);
            this.getCondition().add(searchField);
       }
	   public String n_orgusername_eq;//[归属业务员]
       public void setN_orgusername_eq(String n_orgusername_eq) {
            this.n_orgusername_eq=n_orgusername_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("orgusername");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_orgusername_eq);
            this.getCondition().add(searchField);
       }
	   public String n_orgusername_like;//[归属业务员]
       public void setN_orgusername_like(String n_orgusername_like) {
            this.n_orgusername_like=n_orgusername_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("orgusername");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_orgusername_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_orguserid_eq;//[人员标识]
       public void setN_orguserid_eq(String n_orguserid_eq) {
            this.n_orguserid_eq=n_orguserid_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("orguserid");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_orguserid_eq);
            this.getCondition().add(searchField);
       }
	   public String n_cpxhid_eq;//[厂牌型号标识]
       public void setN_cpxhid_eq(String n_cpxhid_eq) {
            this.n_cpxhid_eq=n_cpxhid_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("cpxhid");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_cpxhid_eq);
            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 void setQuery(String strQuery)
	{
		 this.query=strQuery;
         if(!org.springframework.util.StringUtils.isEmpty(strQuery)){
           SearchGroupFilter searchGroupFilter=new SearchGroupFilter();
           searchGroupFilter.setSearchGroupType(SearchGroupType.OR);

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

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

           
           
        }
	}
}
