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.FactoryReportingManifest;
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_manifest
 *
 * @author szhpt
 * @date 2023-05-09*/
@ApiModel(value = "企业信息上报任务清单")
@EqualsAndHashCode(callSuper = false)
@Data
public class FactoryReportingManifestQuery extends PageQuery
{

    @ApiModelProperty(value = "企业名称")
    private String factoryName;
    @ApiModelProperty(value = "统一社会信用代码")
    private String uscCode;
    @ApiModelProperty(value = "所属行业")
    private String industryCategory;
    @ApiModelProperty(value = "联系人")
    private String contact;
    @ApiModelProperty(value = "联系电话")
    private String contactPhone;
    @ApiModelProperty(value = "主键")
    private String fmId;
    @ApiModelProperty(value = "创建时间")
    private String createTime;
    @ApiModelProperty(value = "factory_reporting_task表关联id")
    private String frId;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<FactoryReportingManifest> createLambdaQueryWrapper(FactoryReportingManifestQuery query) {
        QueryWrapper<FactoryReportingManifest> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryName()), "factory_name", query.getFactoryName());
        wrapper.eq(ObjectUtil.isNotNull(query.getUscCode()), "usc_code", query.getUscCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getIndustryCategory()), "industry_category", query.getIndustryCategory());
        wrapper.eq(ObjectUtil.isNotNull(query.getContact()), "contact", query.getContact());
        wrapper.eq(ObjectUtil.isNotNull(query.getContactPhone()), "contact_phone", query.getContactPhone());
        wrapper.eq(ObjectUtil.isNotNull(query.getFmId()), "fm_id", query.getFmId());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateTime()), "create_time", query.getCreateTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getFrId()), "fr_id", query.getFrId());
        return wrapper;
        }
}
