package com.zd.system.api.domain;

/**
 * @Author: zhoupan
 * @Date: 2021/11/11/15:57
 * @Description:
 */
public class SubQueryConfig {

    /**
     * 查询模式  通过ID查询不应用该功能
     */
    private mode queryMode=mode.none;

    /**
     * 是否查询基础信息，如果为false  ,addr属性配置不起作用，按false对待。
     */
    private Boolean baseInfo=true;

    /**
     * 是否查询安全牌信息
     */
    private Boolean safeInfo =false;

    /**
     * 是否查询安全负责人信息
     */
    private Boolean safePhone =false;
    /**
     * 是否查询危险等级
     */
    private Boolean dangerLevel =false;

    /**
     * 转换字典学科类型
     */
    private Boolean conversionDictSubName =false;

    /**
     * 是否查询地址
     */
    private Boolean addr =false;

    /**
     * 是否查询传感器测点功能：记着是测点功能不是传感器 ，以后传感器仍可以和实物对应
     */
    private Boolean sensorFunction=false;

    /**
     * 是否初始化传感器测点功能值：依赖sensorFunction为True时有效
     */
    private Boolean initSensorFunctionValue=false;

    /**
     * 是否初始化传感器测点预警：依赖sensorFunction为True时有效
     * @return
     */
    private Boolean initWarnSensorFunction=false;

    /**
     * 是否初始化危险源
     */
    private Boolean initDangerCount=false;

    /**
     * 是否查询设备
     */
    private Boolean hardware=false;

    /**
     * 列表查询模板
     */
    public static final SubQueryConfig subQueryConfigList;

    /**
     * 预警： 实验室详情查询模板
     */
    public static final SubQueryConfig subQueryConfigWran;



    static {

        subQueryConfigWran = new SubQueryConfig();
        subQueryConfigWran.setBaseInfo(false);
        subQueryConfigWran.setHardware(true);
        subQueryConfigWran.setSafeInfo(true);
        subQueryConfigWran.setAddr(false);
        subQueryConfigWran.setSensorFunction(true);
        subQueryConfigWran.setInitWarnSensorFunction(true);
        subQueryConfigWran.setInitSensorFunctionValue(true);
        subQueryConfigWran.setDangerLevel(false);
        subQueryConfigWran.setInitDangerCount(true);

        subQueryConfigList = new SubQueryConfig();
        subQueryConfigList.setBaseInfo(true);
        subQueryConfigList.setHardware(false);
        subQueryConfigList.setQueryMode(mode.data_business);
        subQueryConfigList.setSafeInfo(false);
        subQueryConfigList.setAddr(true);
        subQueryConfigList.setSensorFunction(true);
        subQueryConfigList.setInitWarnSensorFunction(true);
        subQueryConfigList.setInitSensorFunctionValue(true);
        subQueryConfigList.setDangerLevel(true);


    }

    public Boolean getInitDangerCount() {
        return initDangerCount;
    }

    public void setInitDangerCount(Boolean initDangerCount) {
        this.initDangerCount = initDangerCount;
    }

    public Boolean getHardware() {
        return hardware;
    }

    public void setHardware(Boolean hardware) {
        this.hardware = hardware;
    }

    public Boolean getSafeInfo() {
        return safeInfo;
    }

    public void setSafeInfo(Boolean safeInfo) {
        this.safeInfo = safeInfo;
    }

    public Boolean getInitSensorFunctionValue() {
        return initSensorFunctionValue;
    }

    public void setInitSensorFunctionValue(Boolean initSensorFunctionValue) {
        this.initSensorFunctionValue = initSensorFunctionValue;
    }

    public Boolean getInitWarnSensorFunction() {
        return initWarnSensorFunction;
    }

    public void setInitWarnSensorFunction(Boolean initWarnSensorFunction) {
        this.initWarnSensorFunction = initWarnSensorFunction;
    }

    public Boolean getSensorFunction() {
        return sensorFunction;
    }

    public void setSensorFunction(Boolean sensorFunction) {
        this.sensorFunction = sensorFunction;
    }

    public Boolean getBaseInfo() {
        return baseInfo;
    }

    public void setBaseInfo(Boolean baseInfo) {
        this.baseInfo = baseInfo;
    }

    public Boolean getAddr() {
        return addr;
    }

    public void setAddr(Boolean addr) {
        this.addr = addr;
    }

    public mode getQueryMode() {
        return queryMode;
    }

    public void setQueryMode(mode queryMode) {
        this.queryMode = queryMode;
    }

    public Boolean getSafePhone() {
        return safePhone;
    }

    public void setSafePhone(Boolean safePhone) {
        this.safePhone = safePhone;
    }

    public Boolean getDangerLevel() {
        return dangerLevel;
    }

    public void setDangerLevel(Boolean dangerLevel) {
        this.dangerLevel = dangerLevel;
    }

    public Boolean getConversionDictSubName() {
        return conversionDictSubName;
    }

    public void setConversionDictSubName(Boolean conversionDictSubName) {
        this.conversionDictSubName = conversionDictSubName;
    }

    public static enum mode{
        //无权限
        none,
        //数据权限
        data,
        //业务权限
        business,
        //数据和业务权限
        data_business;
    }
}
