package com.jsowell.thirdparty.platform.domain;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * 充换电站用能统计信息
 *
 * @author Lemon
 * @Date 2024/6/12 15:14:07
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class SupStationStatsInfo {
    @JSONField(name = "StationID")
    private String stationId;

    @JSONField(name = "OperatorID")
    private String operatorId;

    @JSONField(name = "EquipmentOwnerID")
    private String equipmentOwnerId;

    /**
     * 站点分类
     * 1：充电站
     * 2：换电站
     * 3：充换电一体站
     */
    @JSONField(name = "StationClassification")
    private Integer stationClassification;

    /**
     * 统计开始时间
     */
    @JSONField(name = "StartTime")
    private String startTime;

    /**
     * 统计结束时间
     */
    @JSONField(name = "EndTime")
    private String endTime;

    /**
     * 充换电站累计用电量
     */
    @JSONField(name = "StationElectricity")
    private BigDecimal stationElectricity;

    /**
     * 充换电站累计充电量
     */
    @JSONField(name = "StationTotalChargeEnergy")
    private BigDecimal stationTotalChargeEnergy;

    /**
     * 充换电站累计其他电量
     */
    @JSONField(name = "StationTotalOtherEnergy")
    private BigDecimal stationTotalOtherEnergy;

    /**
     * 充换电站累计换电次数
     */
    @JSONField(name = "StationTotalSwapChargeNum")
    private Integer stationTotalSwapChargeNum;

    /**
     * 充换电站累计充电次数
     */
    @JSONField(name = "StationTotalChargeNum")
    private Integer stationTotalChargeNum;

    /**
     * 充换电站累计充电时长
     */
    @JSONField(name = "StationTotalChargeTime")
    private Integer stationTotalChargeTime;

    /**
     * 充换电站累计换电时长
     */
    @JSONField(name = "StationTotalSwapTime")
    private Integer stationTotalSwapTime;

    /**
     * 充换电站累计告警数量
     */
    @JSONField(name = "StationTotalWarningNum")
    private Integer stationTotalWarningNum;

    /**
     * 充电设备运行统计信息列表
     */
    @JSONField(name = "EquipmentStatsInfos")
    private List<EquipmentStatsInfo> equipmentStatsInfos;


    @Data
    public static class EquipmentStatsInfo{

        /**
         * 充电设备编码
         */
        @JSONField(name = "EquipmentID")
        private String equipmentId;

        /**
         * 设备分类
         * 1：车辆充电设备
         * 2：换电站内的电池箱充电设备
         */
        @JSONField(name = "EquipmentClassification")
        private Integer equipmentClassification;

        /**
         * 充电设备累计电量
         */
        @JSONField(name = "EquipmentElectricity")
        private BigDecimal equipmentElectricity;

        /**
         * 充电设备累计充电时长
         */
        @JSONField(name = "EquipmentTotalChargeTime")
        private Integer equipmentTotalChargeTime;

        /**
         * 充电设备累计充电次数
         */
        @JSONField(name = "EquipmentTotalChargeNum")
        private Integer equipmentTotalChargeNum;

        /**
         * 充电设备累计告警数量
         */
        @JSONField(name = "EquipmentTotalWarningNum")
        private Integer equipmentTotalWarningNum;

        /**
         * 充电设备接口运行统计信息列表
         */
        @JSONField(name = "ConnectorStatsInfos")
        private List<ConnectorStatsInfo> connectorStatsInfos;

        @Data
        public static class ConnectorStatsInfo{

            /**
             * 充电设备接口编码
             * 1：车辆充电设备
             * 2：换电站内的电池箱充电设备
             */
            @JSONField(name = "ConnectorID")
            private String connectorId;

            /**
             * 设备分类
             */
            @JSONField(name = "EquipmentClassification")
            private Integer equipmentClassification;

            /**
             * 充电设备接口累计电量
             */
            @JSONField(name = "ConnectorElectricity")
            private BigDecimal connectorElectricity;

            /**
             * 充电设备接口累计充电时长
             */
            @JSONField(name = "ConnectorTotalChargeTime")
            private Integer connectorTotalChargeTime;

            /**
             * 充电设备接口累计充电次数
             */
            @JSONField(name = "ConnectorTotalChargeNum")
            private Integer connectorTotalChargeNum;

            /**
             * 充电设备接口累计告警数量
             */
            @JSONField(name = "ConnectorTotalWarningNum")
            private Integer connectorTotalWarningNum;

        }


    }
}
