package cn.ibizlab.humanresource.core.humanresource.filter;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;

import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;


import cn.ibizlab.humanresource.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.humanresource.core.humanresource.domain.HRPost;
/**
 * 关系型数据实体[HRPost] 查询条件对象
 */
@Slf4j
@Data
public class HRPostSearchContext extends QueryWrapperContext<HRPost> {

	private String n_hrpostname_like;//[职位]
	public void setN_hrpostname_like(String n_hrpostname_like) {
        this.n_hrpostname_like = n_hrpostname_like;
        if(!ObjectUtils.isEmpty(this.n_hrpostname_like)){
            this.getSearchCond().like("hrpostname", n_hrpostname_like);
        }
    }
	private String n_hrdutyid_eq;//[职务标识]
	public void setN_hrdutyid_eq(String n_hrdutyid_eq) {
        this.n_hrdutyid_eq = n_hrdutyid_eq;
        if(!ObjectUtils.isEmpty(this.n_hrdutyid_eq)){
            this.getSearchCond().eq("hrdutyid", n_hrdutyid_eq);
        }
    }
	private String n_hrdutyname_eq;//[职务]
	public void setN_hrdutyname_eq(String n_hrdutyname_eq) {
        this.n_hrdutyname_eq = n_hrdutyname_eq;
        if(!ObjectUtils.isEmpty(this.n_hrdutyname_eq)){
            this.getSearchCond().eq("hrdutyname", n_hrdutyname_eq);
        }
    }
	private String n_hrdutyname_like;//[职务]
	public void setN_hrdutyname_like(String n_hrdutyname_like) {
        this.n_hrdutyname_like = n_hrdutyname_like;
        if(!ObjectUtils.isEmpty(this.n_hrdutyname_like)){
            this.getSearchCond().like("hrdutyname", n_hrdutyname_like);
        }
    }
	private String n_posttype_eq;//[职位类型]
	public void setN_posttype_eq(String n_posttype_eq) {
        this.n_posttype_eq = n_posttype_eq;
        if(!ObjectUtils.isEmpty(this.n_posttype_eq)){
            this.getSearchCond().eq("posttype", n_posttype_eq);
        }
    }
	private String n_hrorganizationid_eq;//[组织]
	public void setN_hrorganizationid_eq(String n_hrorganizationid_eq) {
        this.n_hrorganizationid_eq = n_hrorganizationid_eq;
        if(!ObjectUtils.isEmpty(this.n_hrorganizationid_eq)){
            this.getSearchCond().eq("hrorganizationid", n_hrorganizationid_eq);
        }
    }
	private String n_hrorganizationname_eq;//[部门]
	public void setN_hrorganizationname_eq(String n_hrorganizationname_eq) {
        this.n_hrorganizationname_eq = n_hrorganizationname_eq;
        if(!ObjectUtils.isEmpty(this.n_hrorganizationname_eq)){
            this.getSearchCond().eq("hrorganizationname", n_hrorganizationname_eq);
        }
    }
	private String n_hrorganizationname_like;//[部门]
	public void setN_hrorganizationname_like(String n_hrorganizationname_like) {
        this.n_hrorganizationname_like = n_hrorganizationname_like;
        if(!ObjectUtils.isEmpty(this.n_hrorganizationname_like)){
            this.getSearchCond().like("hrorganizationname", n_hrorganizationname_like);
        }
    }

    /**
	 * 启用快速搜索
	 */
	public void setQuery(String query)
	{
		 this.query=query;
		 if(!StringUtils.isEmpty(query)){
            this.getSearchCond().and( wrapper ->
                     wrapper.like("hrpostname", query)   
            );
		 }
	}
}



