package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.BMainHazardousSolidWaste;
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_main_hazardous_solid_waste
 *
 * @author szhpt
 * @date 2023-01-10*/
@ApiModel(value = "固体废物基础信息")
@EqualsAndHashCode(callSuper = false)
@Data
public class BMainHazardousSolidWasteQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private String id;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "固体废物类别")
    private String solidWasteType;
    @ApiModelProperty(value = "固体废物名称")
    private String solidWasteName;
    @ApiModelProperty(value = "代码")
    private String solidWasteCode;
    @ApiModelProperty(value = "危险特性")
    private String hazardousCharacteristics;
    @ApiModelProperty(value = "类别")
    private String category;
    @ApiModelProperty(value = "物理性状")
    private String physicalCharacteristics;
    @ApiModelProperty(value = "产生环节")
    private String productionLink;
    @ApiModelProperty(value = "去向")
    private String whereAbouts;
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BMainHazardousSolidWaste> createLambdaQueryWrapper(BMainHazardousSolidWasteQuery query) {
        QueryWrapper<BMainHazardousSolidWaste> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getId()), "id", query.getId());
        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryId()), "factory_id", query.getFactoryId());
        wrapper.eq(ObjectUtil.isNotNull(query.getSolidWasteType()), "solid_waste_type", query.getSolidWasteType());
        wrapper.eq(ObjectUtil.isNotNull(query.getSolidWasteName()), "solid_waste_name", query.getSolidWasteName());
        wrapper.eq(ObjectUtil.isNotNull(query.getSolidWasteCode()), "solid_waste_code", query.getSolidWasteCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getHazardousCharacteristics()), "hazardous_characteristics", query.getHazardousCharacteristics());
        wrapper.eq(ObjectUtil.isNotNull(query.getCategory()), "category", query.getCategory());
        wrapper.eq(ObjectUtil.isNotNull(query.getPhysicalCharacteristics()), "physical_characteristics", query.getPhysicalCharacteristics());
        wrapper.eq(ObjectUtil.isNotNull(query.getProductionLink()), "production_link", query.getProductionLink());
        wrapper.eq(ObjectUtil.isNotNull(query.getWhereAbouts()), "where_abouts", query.getWhereAbouts());
        wrapper.eq(ObjectUtil.isNotNull(query.getRemark()), "remark", query.getRemark());
        return wrapper;
        }
}
