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.FactoryReportingTask;
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;


/**
 * 企业信息上报任务对象 factory_reporting_task
 *
 * @author szhpt
 * @date 2023-05-09*/
@ApiModel(value = "企业信息上报任务")
@EqualsAndHashCode(callSuper = false)
@Data
public class FactoryReportingTaskQuery extends PageQuery
{

    @ApiModelProperty(value = "主键")
    private String frId;
    @ApiModelProperty(value = "任务名称")
    private String taskName;
    @ApiModelProperty(value = "任务来源")
    private String taskSource;
    @ApiModelProperty(value = "所属区域")
    private String regionName;
    @ApiModelProperty(value = "任务描述")
    private String taskDescription;
    @ApiModelProperty(value = "创建任务时间")
    private String taskTime;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<FactoryReportingTask> createLambdaQueryWrapper(FactoryReportingTaskQuery query) {
        QueryWrapper<FactoryReportingTask> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getFrId()), "fr_id", query.getFrId());
        wrapper.eq(ObjectUtil.isNotNull(query.getTaskName()), "task_name", query.getTaskName());
        wrapper.eq(ObjectUtil.isNotNull(query.getTaskSource()), "task_source", query.getTaskSource());
        wrapper.eq(ObjectUtil.isNotNull(query.getRegionName()), "region_name", query.getRegionName());
        wrapper.eq(ObjectUtil.isNotNull(query.getTaskDescription()), "task_description", query.getTaskDescription());
        wrapper.eq(ObjectUtil.isNotNull(query.getTaskTime()), "task_time", query.getTaskTime());
        return wrapper;
        }
}
