package com.sinosig.core.external.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;

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

	   public String n_bm_like;//[别名]
       public void setN_bm_like(String n_bm_like) {
            this.n_bm_like=n_bm_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("bm");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_bm_like);
            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_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 BigDecimal n_xcgzj_eq;//[新车购置价]
       public void setN_xcgzj_eq(BigDecimal n_xcgzj_eq) {
            this.n_xcgzj_eq=n_xcgzj_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("xcgzj");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_xcgzj_eq);
            this.getCondition().add(searchField);
       }
	   public String n_ssnf_eq;//[上市年份]
       public void setN_ssnf_eq(String n_ssnf_eq) {
            this.n_ssnf_eq=n_ssnf_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("ssnf");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_ssnf_eq);
            this.getCondition().add(searchField);
       }
	   public Double n_hdzzl_eq;//[核定载质量]
       public void setN_hdzzl_eq(Double n_hdzzl_eq) {
            this.n_hdzzl_eq=n_hdzzl_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("hdzzl");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_hdzzl_eq);
            this.getCondition().add(searchField);
       }
	   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_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 Integer n_hdzk_eq;//[核定载客]
       public void setN_hdzk_eq(Integer n_hdzk_eq) {
            this.n_hdzk_eq=n_hdzk_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("hdzk");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_hdzk_eq);
            this.getCondition().add(searchField);
       }
	   public String n_pp_like;//[品牌]
       public void setN_pp_like(String n_pp_like) {
            this.n_pp_like=n_pp_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("pp");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_pp_like);
            this.getCondition().add(searchField);
       }
	   public String n_cxdm_like;//[车型代码]
       public void setN_cxdm_like(String n_cxdm_like) {
            this.n_cxdm_like=n_cxdm_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("cxdm");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_cxdm_like);
            this.getCondition().add(searchField);
       }
	   public String n_cx_like;//[车系]
       public void setN_cx_like(String n_cx_like) {
            this.n_cx_like=n_cx_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("cx");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_cx_like);
            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 cpxhname=new SearchFieldFilter();
           cpxhname.setParam("cpxhname");
           cpxhname.setCondition(SearchFieldType.LIKE);
           cpxhname.setValue(strQuery);
           searchGroupFilter.getCondition().add(cpxhname);
        this.getCondition().add(searchGroupFilter);   

           
           
        }
	}
}
