package com.njcn.advance.pojo.vo.assess;

import com.njcn.advance.pojo.po.assess.AssessUser;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * @author wr
 * @description
 * @date 2025/8/20 17:22
 */
@Data
public class AssessResultVO {

    private AssessUser user;

    /**
     * 电压波动结果
     */
    private EvaluationResult fluc;

    /**
     * 闪变评估结果
     */
    private EvaluationResult plt;

    /**
     * 无功设备不运行
     */
    private List<Useless> capOff;

    /**
     * 无功设备全运行
     */
    private List<Useless> capOn;

    /**
     * 三相电压不平衡
     */
    private List<EvaluationResult> unblance;


    /**
     * 谐波电压评估结果
     */
    private List<Harm> harmV;

    /**
     * 谐波电流评估结果
     */
    private List<Harm> harmI;

    @Data
    public static class EvaluationResult {

        @ApiModelProperty("冲击负荷个数")
        private Integer inPactLoadNum;

        @ApiModelProperty("值")
        private BigDecimal data;

        @ApiModelProperty("国标限值")
        private BigDecimal limitData;

        @ApiModelProperty("判断")
        private Boolean isQualified;
    }

    /**
     * 用户无功设备不运行
     */
    @Data
    public static class Useless {

        @ApiModelProperty("百分比")
        private BigDecimal percent;

        @ApiModelProperty("有名值")
        private BigDecimal voltagePercent;

        @ApiModelProperty("电压上偏差限值")
        private BigDecimal capUP;

        @ApiModelProperty("电压下偏差限值")
        private BigDecimal capDown;

        @ApiModelProperty("判断")
        private Boolean isQualified;
    }

    @Data
    public static class Harm {

        @ApiModelProperty("未投入")
        private BigDecimal notInvested;

        @ApiModelProperty("已投入")
        private BigDecimal hasInvested;

        @ApiModelProperty("限值")
        private BigDecimal limitData;

        @ApiModelProperty("未投入判断")
        private Boolean isNotQualified;

        @ApiModelProperty("已投入判断")
        private Boolean isHasQualified;

        @ApiModelProperty("判断")
        private Boolean isQualified;
    }


}
