package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.BEnterpriseIrEesType;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;


/**
 * 知识库-生态环境标准-分类对象 b_enterprise_ir_ees_type
 *
 * @author szhpt
 * @date 2023-03-14*/
@ApiModel(value = "知识库-生态环境标准-分类")
@EqualsAndHashCode(callSuper = false)
@Data
public class BEnterpriseIrEesTypeQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private String id;
    @ApiModelProperty(value = "分类编码;主类编码以10开头，如水环境 101，大气环境102；子类编码为父类编码加序号如水环境质量10101，水污染物排放10102")
    private String eesClassify;
    @ApiModelProperty(value = "分类名称")
    private String eesType;
    @ApiModelProperty(value = "分类级别")
    private String eesName;
    @ApiModelProperty(value = "分类父编码，主类父编码默认为0")
    private String eesTitle;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BEnterpriseIrEesType> createLambdaQueryWrapper(BEnterpriseIrEesTypeQuery query) {
        QueryWrapper<BEnterpriseIrEesType> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getId()), "id", query.getId());
        wrapper.eq(ObjectUtil.isNotNull(query.getEesClassify()), "ees_classify", query.getEesClassify());
        wrapper.eq(ObjectUtil.isNotNull(query.getEesType()), "ees_type", query.getEesType());
        wrapper.eq(ObjectUtil.isNotNull(query.getEesName()), "ees_name", query.getEesName());
        wrapper.eq(ObjectUtil.isNotNull(query.getEesTitle()), "ees_title", query.getEesTitle());
        return wrapper;
        }
}
