package cn.cecep.talroad.vo.query.analysis;

import java.math.BigDecimal;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.cecep.talroad.domain.analysis.SRaActionReportsAudit;
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;


/**
 * 执行报告规范性审核对象 s_ra_action_reports_audit
 *
 * @author szhpt
 * @date 2023-04-11*/
@ApiModel(value = "执行报告规范性审核")
@EqualsAndHashCode(callSuper = false)
@Data
public class SRaActionReportsAuditQuery extends PageQuery
{

    @ApiModelProperty(value = "id")
    private String id;
    @ApiModelProperty(value = "执行报告类型;字典bus_executive_report（大写：y 年报 s 季报 m 月报 d 日报）")
    private String reportType;
    @ApiModelProperty(value = "报告期;年：2023 月：2023-02 日： 2023-02-01   季度：202301")
    private String reportTime;
    @ApiModelProperty(value = "应提交企业数量")
    private Long totalEnterprises;
    @ApiModelProperty(value = "已提交企业数量")
    private Long submittedEnterprises;
    @ApiModelProperty(value = "提交率")
    private BigDecimal submissionRate;
    @ApiModelProperty(value = "未提交企业清单")
    private String nonSubmittedEnterprisesUrl;
    @ApiModelProperty(value = "规范性审核;审核状态：1 审核中   9 审核完成")
    private Long auditStatus;
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "创建人")
    private String createBy;
    @ApiModelProperty(value = "更新人")
    private String updateBy;

    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<SRaActionReportsAudit> createLambdaQueryWrapper(SRaActionReportsAuditQuery query) {
        QueryWrapper<SRaActionReportsAudit> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getId()), "id", query.getId());
        wrapper.eq(ObjectUtil.isNotNull(query.getReportType()), "report_type", query.getReportType());
        wrapper.eq(ObjectUtil.isNotNull(query.getReportTime()), "report_time", query.getReportTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getTotalEnterprises()), "total_enterprises", query.getTotalEnterprises());
        wrapper.eq(ObjectUtil.isNotNull(query.getSubmittedEnterprises()), "submitted_enterprises", query.getSubmittedEnterprises());
        wrapper.eq(ObjectUtil.isNotNull(query.getSubmissionRate()), "submission_rate", query.getSubmissionRate());
        wrapper.eq(ObjectUtil.isNotNull(query.getNonSubmittedEnterprisesUrl()), "non_submitted_enterprises_url", query.getNonSubmittedEnterprisesUrl());
        wrapper.eq(ObjectUtil.isNotNull(query.getAuditStatus()), "audit_status", query.getAuditStatus());
        wrapper.eq(ObjectUtil.isNotNull(query.getUpdateTime()), "update_time", query.getUpdateTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateTime()), "create_time", query.getCreateTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateBy()), "create_by", query.getCreateBy());
        wrapper.eq(ObjectUtil.isNotNull(query.getUpdateBy()), "update_by", query.getUpdateBy());
        return wrapper;
        }
}
