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

import java.util.Date;

import cn.cecep.talroad.common.core.utils.StringUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.cecep.talroad.domain.analysis.SRaActionReportsAuditResult;
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_result
 *
 * @author szhpt
 * @date 2023-04-11*/
@ApiModel(value = "执行报告规范性审核结果")
@EqualsAndHashCode(callSuper = false)
@Data
public class SRaActionReportsAuditResultQuery extends PageQuery
{

//    @ApiModelProperty(value = "id")
//    private String id;

//    @ApiModelProperty(value = "企业id")
//    private String factoryId;
//    @ApiModelProperty(value = "报告期;字典bus_executive_report：年：2023 月：2023-02 日： 2023-02-01")
//    private String reportTime;
//    @ApiModelProperty(value = "排污许可证编号")
//    private String pollDisLicenseCode;
//    @ApiModelProperty(value = "执行报告提交")
//    private Date reportSubmissionTime;
//    @ApiModelProperty(value = "审核时间")
//    private Date auditTime;
//    @ApiModelProperty(value = "排污单位基本信息表")
//    private String factoryBasicInfo;
//    @ApiModelProperty(value = "污染防治设施正常情况汇总表--废水污染防治设施")
//    private String waterPreventionFacilities;
//    @ApiModelProperty(value = "污染防治设施正常情况汇总表--废气污染防治设施")
//    private String gasPreventionFacilities;
//    @ApiModelProperty(value = "污染防治设施异常情况汇总表--废气/废水防治设施")
//    private String preventionFacilities;
//    @ApiModelProperty(value = "污染防治设施-异常情况汇总表")
//    private String abnormalSituation;
//    @ApiModelProperty(value = "(正常监测时段)有组织废气污染物排放浓度监测数据统计表")
//    private String organizedGasMonitoringData;
//    @ApiModelProperty(value = "(正常监测时段)废水污染物排放浓度监测数据统计表")
//    private String waterMonitoringData;
//    @ApiModelProperty(value = "(正常监测时段)超标率")
//    private String exceedingRate;
//    @ApiModelProperty(value = "非正常工况/特殊时段有组织废气污染物监测数据统计表")
//    private String abnormalOrganizedGasMonitoringData;
//    @ApiModelProperty(value = "监测频次合规")
//    private String monitoringFrequency;
//    @ApiModelProperty(value = "实际排放量")
//    private String actualEmissions;
//    @ApiModelProperty(value = "超标排放信息")
//    private String excessiveEmissions;
//    @ApiModelProperty(value = "附图附件-自行监测布点图")
//    private String attachment;
//    @ApiModelProperty(value = "污染物实际排放量计算过程")
//    private String calculationProcess;
//    @ApiModelProperty(value = "备注")
//    private String remark;
//    @ApiModelProperty(value = "核查表下载url")
//    private String checklist;
//    @ApiModelProperty(value = "问题清单下载url")
//    private String questionList;
//    @ApiModelProperty(value = "更新时间")
//    private Date updateTime;
//    @ApiModelProperty(value = "创建时间")
//    private Date createTime;
//    @ApiModelProperty(value = "创建人")
//    private String createBy;
//    @ApiModelProperty(value = "更新人")
//    private String updateBy;

    @ApiModelProperty(value = "执行报告审核记录id")
    private String recordId;

    @ApiModelProperty(value = "排污单位名称")
    private String factoryName;

    @ApiModelProperty(value = "区县名称")
    private String countryName;

    @ApiModelProperty(value = "行业类别")
    private String industryCategory;

    @ApiModelProperty(value = "管理级别")
    private String licenseManType;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<SRaActionReportsAuditResult> createLambdaQueryWrapper(SRaActionReportsAuditResultQuery query) {
        QueryWrapper<SRaActionReportsAuditResult> wrapper = new QueryWrapper<>();
        wrapper.eq("results.record_id",query.getRecordId());
        if(StringUtils.isNotBlank(query.getFactoryName()))wrapper.like("factory.factory_name", query.getFactoryName().trim());
        if(StringUtils.isNotBlank(query.getCountryName()))wrapper.eq("factory.country_name", query.getCountryName());
        if(StringUtils.isNotBlank(query.getIndustryCategory()))wrapper.eq( "factory.industry_category", query.getIndustryCategory());
        if(StringUtils.isNotBlank(query.getLicenseManType()))wrapper.eq( "factory.license_man_type", query.getLicenseManType());
//        wrapper.eq(ObjectUtil.isNotNull(query.getId()), "id", query.getId());
//        wrapper.eq(ObjectUtil.isNotNull(query.getRecordId()), "record_id", query.getRecordId());
//        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryId()), "factory_id", query.getFactoryId());
//        wrapper.eq(ObjectUtil.isNotNull(query.getReportTime()), "report_time", query.getReportTime());
//        wrapper.eq(ObjectUtil.isNotNull(query.getPollDisLicenseCode()), "poll_dis_license_code", query.getPollDisLicenseCode());
//        wrapper.eq(ObjectUtil.isNotNull(query.getReportSubmissionTime()), "report_submission_time", query.getReportSubmissionTime());
//        wrapper.eq(ObjectUtil.isNotNull(query.getAuditTime()), "audit_time", query.getAuditTime());
//        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryBasicInfo()), "factory_basic_info", query.getFactoryBasicInfo());
//        wrapper.eq(ObjectUtil.isNotNull(query.getWaterPreventionFacilities()), "water_prevention_facilities", query.getWaterPreventionFacilities());
//        wrapper.eq(ObjectUtil.isNotNull(query.getGasPreventionFacilities()), "gas_prevention_facilities", query.getGasPreventionFacilities());
//        wrapper.eq(ObjectUtil.isNotNull(query.getPreventionFacilities()), "prevention_facilities", query.getPreventionFacilities());
//        wrapper.eq(ObjectUtil.isNotNull(query.getAbnormalSituation()), "abnormal_situation", query.getAbnormalSituation());
//        wrapper.eq(ObjectUtil.isNotNull(query.getOrganizedGasMonitoringData()), "organized_gas_monitoring_data", query.getOrganizedGasMonitoringData());
//        wrapper.eq(ObjectUtil.isNotNull(query.getWaterMonitoringData()), "water_monitoring_data", query.getWaterMonitoringData());
//        wrapper.eq(ObjectUtil.isNotNull(query.getExceedingRate()), "exceeding_rate", query.getExceedingRate());
//        wrapper.eq(ObjectUtil.isNotNull(query.getAbnormalOrganizedGasMonitoringData()), "abnormal_organized_gas_monitoring_data", query.getAbnormalOrganizedGasMonitoringData());
//        wrapper.eq(ObjectUtil.isNotNull(query.getMonitoringFrequency()), "monitoring_frequency", query.getMonitoringFrequency());
//        wrapper.eq(ObjectUtil.isNotNull(query.getActualEmissions()), "actual_emissions", query.getActualEmissions());
//        wrapper.eq(ObjectUtil.isNotNull(query.getExcessiveEmissions()), "excessive_emissions", query.getExcessiveEmissions());
//        wrapper.eq(ObjectUtil.isNotNull(query.getAttachment()), "attachment", query.getAttachment());
//        wrapper.eq(ObjectUtil.isNotNull(query.getCalculationProcess()), "calculation_process", query.getCalculationProcess());
//        wrapper.eq(ObjectUtil.isNotNull(query.getRemark()), "remark", query.getRemark());
//        wrapper.eq(ObjectUtil.isNotNull(query.getChecklist()), "checklist", query.getChecklist());
//        wrapper.eq(ObjectUtil.isNotNull(query.getQuestionList()), "question_list", query.getQuestionList());
//        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;
        }
}
