package com.hdkj.lt.bf.entity.vo;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.hdkj.lt.bf.entity.dto.FhzgPlanTransferSchemeSwitchingSequenceDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

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

/**
 * @Description:
 * @Author: wenhao
 * @Create: 2025/07/09 19:37
 * @Version: 1.0
 */
@Getter
@Setter
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("动画演示数据信息")
@JsonPropertyOrder(value = {"eventSvg", "eventPosition", "transferArea", "beforeTransferLoadRate", "schemeSvg", "switchingSequence", "pathOverviewSwitch", "afterTransferLoadRate"})
public class ShowCartoonDataVO implements Serializable {

    @ApiModelProperty("节点1：计划停电/故障停电/重过载事件")
    private SvgFileVO eventSvg;

    @ApiModelProperty("节点2：计划停电/故障停电/重过载位置")
    private List<BreakerAreaVO> eventPosition;

    @ApiModelProperty("节点3：待转供区域")
    private List<BreakerAreaVO> transferArea;

    @ApiModelProperty("节点4：线路负载计算（转供前负载）")
    private LineLoadRateVO beforeTransferLoadRate;

    @ApiModelProperty("节点5：转供方案计算（切换方案图）")
    private SvgFileVO schemeSvg;

    @ApiModelProperty("节点6：开关操作（开关动作顺序）")
    private List<FhzgPlanTransferSchemeSwitchingSequenceDTO> switchingSequence;

    @ApiModelProperty("节点7：线路重组（获取转供路径）")
    private List<BreakerAreaVO> pathOverviewSwitch;

    @ApiModelProperty("节点8：计算转供后负载")
    private LineLoadRateVO afterTransferLoadRate;

    @Getter
    @Setter
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel("svg图信息")
    public static class SvgFileVO {

        @ApiModelProperty("文件ID")
        private Long fileId;

    }

    @Getter
    @Setter
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel("线路负载信息")
    public static class LineLoadRateVO {

        @ApiModelProperty("本侧线路ID")
        private String lineId;

        @ApiModelProperty("本侧线路负载率")
        private BigDecimal lineLoadRate;

        @ApiModelProperty("对侧线路负载率")
        private List<OppositeLineLoadRateVO> oppositeLineLoadRate;

    }

    @Getter
    @Setter
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel("对侧线路负载信息")
    public static class OppositeLineLoadRateVO {

        @ApiModelProperty("对侧线路ID")
        private String oppositeLineId;

        @ApiModelProperty("对侧线路负载率")
        private BigDecimal oppositeLineLoadRate;

        @ApiModelProperty(value = "是否整线开关；1 是 0 否")
        String isFullLine;

        @ApiModelProperty(value = "开始开关")
        String startSwitch;

        @ApiModelProperty(value = "中间开关")
        List<String> midSwitch;

        @ApiModelProperty(value = "终止开关开关")
        List<String> endSwitch;

    }

}
