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

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

	   public String n_sblb_eq;//[申报类别]
       public void setN_sblb_eq(String n_sblb_eq) {
            this.n_sblb_eq=n_sblb_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("sblb");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_sblb_eq);
            this.getCondition().add(searchField);
       }
	   public String n_sdfs_eq;//[送达方式]
       public void setN_sdfs_eq(String n_sdfs_eq) {
            this.n_sdfs_eq=n_sdfs_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("sdfs");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_sdfs_eq);
            this.getCondition().add(searchField);
       }
	   public String n_imname_like;//[标题]
       public void setN_imname_like(String n_imname_like) {
            this.n_imname_like=n_imname_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("imname");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_imname_like);
            this.getCondition().add(searchField);
       }
	   public String n_shfs_eq;//[审核方式]
       public void setN_shfs_eq(String n_shfs_eq) {
            this.n_shfs_eq=n_shfs_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("shfs");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_shfs_eq);
            this.getCondition().add(searchField);
       }
	   public String n_sblx_eq;//[申报类型]
       public void setN_sblx_eq(String n_sblx_eq) {
            this.n_sblx_eq=n_sblx_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("sblx");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_sblx_eq);
            this.getCondition().add(searchField);
       }
	   public String n_imwfstate_eq;//[工作流状态]
       public void setN_imwfstate_eq(String n_imwfstate_eq) {
            this.n_imwfstate_eq=n_imwfstate_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("imwfstate");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_imwfstate_eq);
            this.getCondition().add(searchField);
       }
	   public String n_hjcd_eq;//[缓急程度]
       public void setN_hjcd_eq(String n_hjcd_eq) {
            this.n_hjcd_eq=n_hjcd_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("hjcd");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_hjcd_eq);
            this.getCondition().add(searchField);
       }
	   public String n_wfstep_eq;//[重要事项审批步骤]
       public void setN_wfstep_eq(String n_wfstep_eq) {
            this.n_wfstep_eq=n_wfstep_eq;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("wfstep");
            searchField.setCondition(SearchFieldType.EQ);
            searchField.setValue(n_wfstep_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 imname=new SearchFieldFilter();
           imname.setParam("imname");
           imname.setCondition(SearchFieldType.LIKE);
           imname.setValue(strQuery);
           searchGroupFilter.getCondition().add(imname);
        this.getCondition().add(searchGroupFilter);   

           
           
        }
	}
}
