package com.zksy.visualization.domain.response;

import com.dahuatech.icc.oauth.http.IccResponse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author Administrator
 * @version 1.0
 * @project dh-server-micro
 * @description 获取设备能力
 * @date 2024/12/16 15:11:43
 */
@Data
public class AcquisitionDeviceResponse {

        @ApiModelProperty(value = "如果传入设备编码，那么该值便返回传入的设备编码，否则由paas自动生成随机字符")
        private String deviceIdFromPaas;

        @ApiModelProperty(value = "串口1波特率")
        private int serialCaud1;

        @ApiModelProperty(value = "串口2波特率")
        private int serialCaud2;

        @ApiModelProperty(value = "串口3波特率")
        private int serialCaud3;

        @ApiModelProperty(value = "串口4波特率")
        private int serialCaud4;

        @ApiModelProperty(value = "MAC地址")
        private String macAddress;

        @ApiModelProperty(value = "设备序列号")
        private String deviceSn;

        @ApiModelProperty(value = "空开数量")
        private int airSwitchAmount;

        @ApiModelProperty(value = "空开集合列表")
        private List<AirSwitch> airSwitchList;

        @ApiModelProperty(value = "电表集合列表")
        private List<MeterVo> meterVoList;
    @Data
    public class MeterVo {

        @ApiModelProperty(value = "电表唯一标识符")
        private String devId;

        @ApiModelProperty(value = "通道编码")
        private String channelCode;

        @ApiModelProperty(value = "电表名称")
        private String meterName;
    }

    @Data
    public class AirSwitch {

        @ApiModelProperty(value = "空开序号")
        private String devIdFromDevice;

        @ApiModelProperty(value = "如果传入通道编码，那么该值便返回传入的通道编码，否则由paas自动生成随机字符")
        private String channelIdFromPaas;

        @ApiModelProperty(value = "空开类型")
        private String airSwitchCategory;

        @ApiModelProperty(value = "空开型号")
        private String airSwitchModel;

        @ApiModelProperty(value = "地址码")
        private int addressCode;

        @ApiModelProperty(value = "额定电流")
        private int ratedCurrent;

        @ApiModelProperty(value = "漏检漏保能力，设备端返回LJAS、LBAS、PTAS或无")
        private String capability;

        @ApiModelProperty(value = "通道序列号，唯一，用于区分不同空开")
        private String serialNumber;

        @ApiModelProperty(value = "阈值对象")
        private ReturnResult returnResult;
    }

    @Data
    public class ReturnResult {

        @ApiModelProperty(value = "电流")
        private ElectricCurrent electricCurrent;

        @ApiModelProperty(value = "漏电流")
        private Leakage leakage;

        @ApiModelProperty(value = "开关功率")
        private Power power;

        @ApiModelProperty(value = "开关温度")
        private Temperature temperature;

        @ApiModelProperty(value = "开关电压")
        private Voltage voltage;

        @ApiModelProperty(value = "空开使能")
        private Ability ability;
    }

    @Data
    public class ElectricCurrent {

        @ApiModelProperty(value = "A相过流预警阈值")
        private double overCurrentWaringAx;

        @ApiModelProperty(value = "B相过流预警阈值")
        private double overCurrentWaringBx;

        @ApiModelProperty(value = "C相过流预警阈值")
        private double overCurrentWaringCx;

        @ApiModelProperty(value = "A相过流报警阈值")
        private double overCurrentAlarmAx;

        @ApiModelProperty(value = "B相过流报警阈值")
        private double overCurrentAlarmBx;

        @ApiModelProperty(value = "C相过流报警阈值")
        private double overCurrentAlarmCx;
    }

    @Data
    public class Leakage {

        @ApiModelProperty(value = "漏电预警阈值")
        private double leakageWaring;

        @ApiModelProperty(value = "漏电报警阈值")
        private double leakageAlarm;
    }

    @Data
    public class Power {

        @ApiModelProperty(value = "A相过载报警阈值")
        private int overloadAlarmAx;

        @ApiModelProperty(value = "B相过载报警阈值")
        private int overloadAlarmBx;

        @ApiModelProperty(value = "C相过载报警阈值")
        private int overloadAlarmCx;

        @ApiModelProperty(value = "A相过载预警阈值")
        private int overloadWaringAx;

        @ApiModelProperty(value = "B相过载预警阈值")
        private int overloadWaringBx;

        @ApiModelProperty(value = "C相过载预警阈值")
        private int overloadWaringCx;
    }

    @Data
    public class Temperature {

        @ApiModelProperty(value = "A相开关温度预警阈值")
        private double temperatureWaringAx;

        @ApiModelProperty(value = "B相开关温度预警阈值")
        private double temperatureWaringBx;

        @ApiModelProperty(value = "C相开关温度预警阈值")
        private double temperatureWaringCx;

        @ApiModelProperty(value = "零相开关温度预警阈值")
        private double temperatureWaringLx;

        @ApiModelProperty(value = "A相开关温度报警阈值")
        private double temperatureAlarmAx;

        @ApiModelProperty(value = "B相开关温度报警阈值")
        private double temperatureAlarmBx;

        @ApiModelProperty(value = "C相开关温度报警阈值")
        private double temperatureAlarmCx;

        @ApiModelProperty(value = "零相开关温度报警阈值")
        private double temperatureAlarmLx;

        @ApiModelProperty(value = "A相温度上升预警时间阈值")
        private int temperatureUpTimeWaringAx;

        @ApiModelProperty(value = "B相温度上升预警时间阈值")
        private int temperatureUpTimeWaringBx;

        @ApiModelProperty(value = "C相温度上升预警时间阈值")
        private int temperatureUpTimeWaringCx;

        @ApiModelProperty(value = "零相温度上升预警时间阈值")
        private int temperatureUpTimeWaringLx;

        @ApiModelProperty(value = "A相温度上升预警温度阈值")
        private double temperatureUpTemperatureWaringAx;

        @ApiModelProperty(value = "B相温度上升预警温度阈值")
        private double temperatureUpTemperatureWaringBx;

        @ApiModelProperty(value = "C相温度上升预警温度阈值")
        private double temperatureUpTemperatureWaringCx;

        @ApiModelProperty(value = "零相温度上升预警温度阈值")
        private double temperatureUpTemperatureWaringLx;
    }

    @Data
    public class Voltage {

        @ApiModelProperty(value = "A相过压预警阈值")
        private int overVoltageWaringAx;

        @ApiModelProperty(value = "B相过压预警阈值")
        private int overVoltageWaringBx;

        @ApiModelProperty(value = "C相过压预警阈值")
        private int overVoltageWaringCx;

        @ApiModelProperty(value = "A相过压报警阈值")
        private int overVoltageAlarmAx;

        @ApiModelProperty(value = "B相过压报警阈值")
        private int overVoltageAlarmBx;

        @ApiModelProperty(value = "C相过压报警阈值")
        private int overVoltageAlarmCx;

        @ApiModelProperty(value = "A相欠压预警阈值")
        private int underVoltageWaringAx;

        @ApiModelProperty(value = "B相欠压预警阈值")
        private int underVoltageWaringBx;

        @ApiModelProperty(value = "C相欠压预警阈值")
        private int underVoltageWaringCx;

        @ApiModelProperty(value = "A相欠压报警阈值")
        private int underVoltageAlarmAx;

        @ApiModelProperty(value = "B相欠压报警阈值")
        private int underVoltageAlarmBx;

        @ApiModelProperty(value = "C相欠压报警阈值")
        private int underVoltageAlarmCx;
    }

    @Data
    public class Ability {

        @ApiModelProperty(value = "缺相报警使能（0：关，1：开）")
        private int lackPhaseAlarmAbility;

        @ApiModelProperty(value = "缺相报警动作使能（0：关，1：开）")
        private int lackPhaseAlarmLinkageModel;

        @ApiModelProperty(value = "欠压报警使能（0：关，1：开）")
        private int underVoltageAlarmAbility;

        @ApiModelProperty(value = "欠压报警动作使能（0：关，1：开）")
        private int underVoltageAlarmLinkageModel;

        @ApiModelProperty(value = "三相不平衡报警使能（0：关，1：开）")
        private int unbalancedPhaseAlarmAbility;

        @ApiModelProperty(value = "三相不平衡报警动作使能（0：关，1：开）")
        private int unbalancedPhaseAlarmLinkageModel;

        @ApiModelProperty(value = "漏电报警使能（0：关，1：开）")
        private int leakageAlarmAbility;

        @ApiModelProperty(value = "漏电报警动作使能（0：关，1：开）")
        private int leakageAlarmLinkageModel;

        @ApiModelProperty(value = "过压报警使能（0：关，1：开）")
        private int overVoltageAlarmAbility;

        @ApiModelProperty(value = "过压报警动作使能（0：关，1：开）")
        private int overVoltageAlarmLinkageModel;

        @ApiModelProperty(value = "过载报警使能（0：关，1：开）")
        private int overloadAlarmAbility;

        @ApiModelProperty(value = "过载报警动作使能（0：关，1：开）")
        private int overloadAlarmLinkageModel;

        @ApiModelProperty(value = "打火报警使能（0：关，1：开）")
        private int igniteAlarmAbility;

        @ApiModelProperty(value = "打火报警动作使能（0：关，1：开）")
        private int igniteAlarmLinkageModel;

        @ApiModelProperty(value = "欠压预警使能（0：关，1：开）")
        private int underVoltageWaringAbility;

        @ApiModelProperty(value = "漏电预警使能（0：关，1：开）")
        private int leakageWaringAbility;

        @ApiModelProperty(value = "过压预警使能（0：关，1：开）")
        private int overVoltageWaringAbility;

        @ApiModelProperty(value = "过载预警使能（0：关，1：开）")
        private int overloadWaringAbility;
    }
}
