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

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


/**
 * 多源排放量汇总对象 s_ra_multi_source
 *
 * @author szhpt
 * @date 2023-06-03*/
@ApiModel(value = "多源排放量汇总")
@EqualsAndHashCode(callSuper = false)
@Data
public class SRaMultiSourceQuery extends PageQuery
{

    @ApiModelProperty(value = "数据主键")
    private String dataId;
    @ApiModelProperty(value = "企业主键")
    private String factoryId;
    @ApiModelProperty(value = "企业名称")
    private String factoryName;
    @ApiModelProperty(value = "行业类别名称(多个使用'、'拼接)")
    private String industryCategoryName;
    @ApiModelProperty(value = "行业类别编码(多个使用'、'拼接)")
    private String industryCategoryCode;
    @ApiModelProperty(value = "所在区县名称")
    private String districtName;
    @ApiModelProperty(value = "所在区县编码")
    private String districtCode;
    @ApiModelProperty(value = "污染物类型(1废气、2废水)")
    private String pollutantsType;
    @ApiModelProperty(value = "污染物名称")
    private String pollutantsName;
    @ApiModelProperty(value = "污染物编码")
    private String pollutantsCode;
    @ApiModelProperty(value = "监测时间")
    private String monitorTime;
    @ApiModelProperty(value = "排口编号")
    private String outletCode;
    @ApiModelProperty(value = "排口类型(1主要排口、2一般排口)")
    private String outletType;
    @ApiModelProperty(value = "监测点名称")
    private String moitorName;
    @ApiModelProperty(value = "监测类型(1自动监测、2手工检测)")
    private String monitorType;
    @ApiModelProperty(value = "监测点id")
    private String monitorId;
    @ApiModelProperty(value = "许可排放量（kg）")
    private String permission;
    @ApiModelProperty(value = "许可修约量（kg）")
    private String permissionAmendments;
    @ApiModelProperty(value = "在线排放量（kg）")
    private String online;
    @ApiModelProperty(value = "在线修约量（kg）")
    private String onlineAmendments;
    @ApiModelProperty(value = "数据标记启炉，停炉，焖炉，生产设施故障，停运，国发非正常工况标记,无效数据是否用修约量计算")
    private String dataFlag;
    @ApiModelProperty(value = "入库时间")
    private String createTime;
    @ApiModelProperty(value = "无效数据是否用修约量计算(1是,0否)")
    private String invalidDataCalculated;
    @ApiModelProperty(value = "监测开始时间")
    private String monitorStartTime;
    @ApiModelProperty(value = "监测截至时间")
    private String monitorEndTime;
    private List<String> dataFlagArr;
    @ApiModelProperty(value = "多源数据类型1:许可2:在线")
    private String sourceType;

    private List<String> regionCodes;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<SRaMultiSource> createLambdaQueryWrapper(SRaMultiSourceQuery query) {
        QueryWrapper<SRaMultiSource> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getDataId()), "data_id", query.getDataId());
        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryId()), "factory_id", query.getFactoryId());
        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryName()), "factory_name", query.getFactoryName());
        wrapper.eq(ObjectUtil.isNotNull(query.getIndustryCategoryName()), "industry_category_name", query.getIndustryCategoryName());
        wrapper.eq(ObjectUtil.isNotNull(query.getIndustryCategoryCode()), "industry_category_code", query.getIndustryCategoryCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getDistrictName()), "district_name", query.getDistrictName());
        wrapper.eq(ObjectUtil.isNotNull(query.getDistrictCode()), "district_code", query.getDistrictCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsType()), "pollutants_type", query.getPollutantsType());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsName()), "pollutants_name", query.getPollutantsName());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantsCode()), "pollutants_code", query.getPollutantsCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getMonitorTime()), "monitor_time", query.getMonitorTime());
        wrapper.eq(ObjectUtil.isNotNull(query.getOutletCode()), "outlet_code", query.getOutletCode());
        wrapper.eq(ObjectUtil.isNotNull(query.getOutletType()), "outlet_type", query.getOutletType());
        wrapper.eq(ObjectUtil.isNotNull(query.getMoitorName()), "moitor_name", query.getMoitorName());
        wrapper.eq(ObjectUtil.isNotNull(query.getMonitorType()), "monitor_type", query.getMonitorType());
        wrapper.eq(ObjectUtil.isNotNull(query.getMonitorId()), "monitor_id", query.getMonitorId());
        wrapper.eq(ObjectUtil.isNotNull(query.getPermission()), "permission", query.getPermission());
        wrapper.eq(ObjectUtil.isNotNull(query.getPermissionAmendments()), "permission_amendments", query.getPermissionAmendments());
        wrapper.eq(ObjectUtil.isNotNull(query.getOnline()), "online", query.getOnline());
        wrapper.eq(ObjectUtil.isNotNull(query.getOnlineAmendments()), "online_amendments", query.getOnlineAmendments());
        wrapper.eq(ObjectUtil.isNotNull(query.getDataFlag()), "data_flag", query.getDataFlag());
        wrapper.eq(ObjectUtil.isNotNull(query.getCreateTime()), "create_time", query.getCreateTime());
        return wrapper;
        }
}
