package cn.cecep.talroad.vo.query;

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


/**
 * 固定源产排治--执行报告--水泥-生产单元运行情况对象 b_stat_table_zxbg_sn_production
 *
 * @author szhpt
 * @date 2023-08-01*/
@ApiModel(value = "固定源产排治--执行报告--水泥-生产单元运行情况")
@EqualsAndHashCode(callSuper = false)
@Data
public class BStatTableZxbgSnProductionQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private Long id;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "执行报告类型，0：月报，1：季报，2：年报")
    private String zxbgType;
    @ApiModelProperty(value = "执行报告周期")
    private String zxbgPeriod;
    @ApiModelProperty(value = "主要生产单元")
    private String mainProductionUnit;
    @ApiModelProperty(value = "生产设施名称")
    private String productionFacilities;
    @ApiModelProperty(value = "名称")
    private String name;
    @ApiModelProperty(value = "数量")
    private String quantity;
    @ApiModelProperty(value = "单位")
    private String unit;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "创建时间")
    private String createTime;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BStatTableZxbgSnProduction> createLambdaQueryWrapper(BStatTableZxbgSnProductionQuery query) {
        QueryWrapper<BStatTableZxbgSnProduction> 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.getZxbgType()), "zxbg_type", query.getZxbgType());
        wrapper.eq(ObjectUtil.isNotNull(query.getZxbgPeriod()), "zxbg_period", query.getZxbgPeriod());
        wrapper.eq(ObjectUtil.isNotNull(query.getMainProductionUnit()), "main_production_unit", query.getMainProductionUnit());
        wrapper.eq(ObjectUtil.isNotNull(query.getProductionFacilities()), "production_facilities", query.getProductionFacilities());
        wrapper.eq(ObjectUtil.isNotNull(query.getName()), "name", query.getName());
        wrapper.eq(ObjectUtil.isNotNull(query.getQuantity()), "quantity", query.getQuantity());
        wrapper.eq(ObjectUtil.isNotNull(query.getUnit()), "unit", query.getUnit());
        wrapper.eq(ObjectUtil.isNotNull(query.getRemark()), "remark", query.getRemark());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateTime()), "create_time", query.getCreateTime());
        return wrapper;
        }
}
