package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.common.core.utils.StringUtils;
import cn.cecep.talroad.domain.BMainActionReports;
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_action_reports
 *
 * @author szhpt
 * @date 2023-01-11*/
@ApiModel(value = "执行报告")
@EqualsAndHashCode(callSuper = false)
@Data
public class BMainActionReportsQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private String id;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "报告类型")
    private String reportsType;
    @ApiModelProperty(value = "报告期")
    private String reportsTime;
    @ApiModelProperty(value = "执行报告")
    private String reportsFile;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<BMainActionReports> createLambdaQueryWrapper(BMainActionReportsQuery query) {
        QueryWrapper<BMainActionReports> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotEmpty(query.getId()), "id", query.getId());
        wrapper.eq(StringUtils.isNotEmpty(query.getFactoryId()), "factory_id", query.getFactoryId());
        wrapper.eq(StringUtils.isNotEmpty(query.getReportsType()), "reports_type", query.getReportsType());
        wrapper.eq(StringUtils.isNotEmpty(query.getReportsTime()), "reports_time", query.getReportsTime());
        wrapper.eq(StringUtils.isNotEmpty(query.getReportsFile()), "reports_file", query.getReportsFile());
        return wrapper;
        }
}
