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;

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

	   public String n_healthcheckid_like;//[HEALTHCHECKID]
       public void setN_healthcheckid_like(String n_healthcheckid_like) {
            this.n_healthcheckid_like=n_healthcheckid_like;
            SearchFieldFilter searchField = new SearchFieldFilter();
            searchField.setParam("healthcheckid");
            searchField.setCondition(SearchFieldType.LIKE);
            searchField.setValue(n_healthcheckid_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 healthcheckid=new SearchFieldFilter();
           healthcheckid.setParam("healthcheckid");
           healthcheckid.setCondition(SearchFieldType.LIKE);
           healthcheckid.setValue(strQuery);
           searchGroupFilter.getCondition().add(healthcheckid);
        this.getCondition().add(searchGroupFilter);   

           
           
        }
	}
}
