package cn.cecep.talroad.vo.query;

import cn.cecep.talroad.common.core.domain.query.PageQuery;
import cn.cecep.talroad.domain.PcControlRequirements;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;


/**
 * 管控要求对象 pc_control_requirements
 *
 * @author szhpt
 * @date 2023-01-10*/
@ApiModel(value = "管控要求")
@EqualsAndHashCode(callSuper = false)
@Data
public class PcControlRequirementsQuery extends PageQuery
{

    @ApiModelProperty(value = "主键id")
    private String id;
    @ApiModelProperty(value = "企业id")
    private String factoryId;
    @ApiModelProperty(value = "排口id")
    private String outletId;
    @ApiModelProperty(value = "污染物种类id")
    private String pollutantId;
    @ApiModelProperty(value = "国家或地方污染物排放标准名")
    private String pollutantStandardName;
    /**
     *
     * @Title: getQueryWrapper
     * @Description: 查询参数组装
     * @param: @return
     * @return: QueryWrapper<BasIndustry>
     * @throws
     */
    public static QueryWrapper<PcControlRequirements> createLambdaQueryWrapper(PcControlRequirementsQuery query) {
        QueryWrapper<PcControlRequirements> wrapper = new QueryWrapper<>();
        wrapper.eq(ObjectUtil.isNotNull(query.getId()), "id", query.getId());
        wrapper.eq(ObjectUtil.isNotNull(query.getFactoryId()), "factory_id", query.getFactoryId());
        wrapper.eq(ObjectUtil.isNotNull(query.getOutletId()), "outlet_id", query.getOutletId());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantId()), "pollutant_id", query.getPollutantId());
        wrapper.eq(ObjectUtil.isNotNull(query.getPollutantStandardName()), "pollutant_standard_name", query.getPollutantStandardName());
        wrapper.orderByAsc("id");
        return wrapper;
    }

    @ApiModel(value = "排污许可-废气有组织排放要求query")
    @Data
    public static class PwxkGasOrg {
        @ApiModelProperty(value = "企业查询条件")
        private PcFactoryQuery.SearchVo searchVo;

        @ApiModelProperty(value = "排放口编号")
        private String outletCode;

        @ApiModelProperty(value = "排放口名称")
        private String outletName;

        @ApiModelProperty(value = "排口类型 1:主要排口, 2:一般排口")
        private String outletTypes;

        @ApiModelProperty(value = "污染物种类")
        private List<String> pollutantNames;

        @ApiModelProperty(value = "国家或地方污染物排放标准名")
        private String pollutantStandardName;

        @ApiModelProperty(value = "监测设施 自动/手工")
        private String monitoringFacilities;
    }

    @ApiModel(value = "排污许可-废气无组织排放要求query")
    @Data
    public static class PwxkGasNoOrg {
        @ApiModelProperty(value = "企业查询条件")
        private PcFactoryQuery.SearchVo searchVo;

        @ApiModelProperty(value = "排放口编号")
        private String outletCode;

        @ApiModelProperty(value = "污染物种类")
        private List<String> pollutantNames;

        @ApiModelProperty(value = "国家或地方污染物排放标准名")
        private String pollutantStandardName;

        @ApiModelProperty(value = "监测设施 自动/手工")
        private String monitoringFacilities;
    }

    @ApiModel(value = "排污许可-废水直接排口排放要求query")
    @Data
    public static class PwxkWaterDirect {
        @ApiModelProperty(value = "企业查询条件")
        private PcFactoryQuery.SearchVo searchVo;

        @ApiModelProperty(value = "排放口编号")
        private String outletCode;

        @ApiModelProperty(value = "排放口名称")
        private String outletName;

        @ApiModelProperty(value = "排口类型 1:主要排口, 2:一般排口")
        private String outletTypes;

        @ApiModelProperty(value = "排水去向")
        private List<String> directionDrainage;

        @ApiModelProperty(value = "排放规律")
        private List<String> dischargeLaw;

        @ApiModelProperty(value = "受纳自然水体信息-名称")
        private String receivingWaterName;

        @ApiModelProperty(value = "受纳自然水体信息-功能目标")
        private String receivingWaterObjective;

        @ApiModelProperty(value = "国家或地方污染物排放标准名")
        private String pollutantStandardName;

        @ApiModelProperty(value = "污染物种类")
        private List<String> pollutantNames;

        @ApiModelProperty(value = "监测设施 自动/手工")
        private String monitoringFacilities;
    }

    @ApiModel(value = "排污许可-废水间接排口排放要求query")
    @Data
    public static class PwxkWaterIndirect {
        @ApiModelProperty(value = "企业查询条件")
        private PcFactoryQuery.SearchVo searchVo;

        @ApiModelProperty(value = "排放口编号")
        private String outletCode;

        @ApiModelProperty(value = "排放口名称")
        private String outletName;

        @ApiModelProperty(value = "排口类型 1:主要排口, 2:一般排口")
        private String outletTypes;

        @ApiModelProperty(value = "排水去向")
        private List<String> directionDrainage;

        @ApiModelProperty(value = "排放规律")
        private List<String> dischargeLaw;

        @ApiModelProperty(value = "受纳污水处理厂名称")
        private String treatmentPlantAcceptedName;

        @ApiModelProperty(value = "国家或地方污染物排放标准名")
        private String pollutantStandardName;

        @ApiModelProperty(value = "污染物种类")
        private List<String> pollutantNames;

        @ApiModelProperty(value = "监测设施 自动/手工")
        private String monitoringFacilities;
    }

}
