package com.yeejoin.amos.boot.module.jxiop.biz.constants;

import com.sun.javafx.logging.PulseLogger;
import org.checkerframework.checker.units.qual.C;

import java.util.*;

public class CommonConstans {
    //光伏发电量系数
    public static final Double pvGenPoweActor = 0.000001;
    public static final Double pvGenPoweActorDay = 1.0;
    public static final Double pvGenPoweActorYear = 0.0001;
    public static final Double pvGenPoweActorCurrentData = 0.0001;
    //    风电站：
//            （日/月/年）发电量=场站所有风机（日/月/年）发电量总和
//            装机容量=场站所有风机装机容量总和
//
//    光伏站：
//            （日/月/年）发电量=场站所有逆变器（日/月/年）发电量总和
//            装机容量=场站所有逆变器装机容量总和
//
//    通用：
//           ◎节省标准煤：发电量0.410
//            ◎节省千克原煤：发电量0.559810
//            ◎减排千克“二氧化碳”：发电量0.99710
//            ◎减排千克“碳粉尘”：发电量0.27210
//            ◎减排千克二氧化硫：发电量0.0310
//            ◎减排千克氮氧化物：发电量0.01510
    // 二氧化碳
    public static final Double carbonDioxide = 0.997 * 10;
    //标准煤
    public static final Double standardCoal = 0.4 * 10;
    //炭粉尘减排量
    public static final Double toner = 0.272 * 10;
    //二氧化硫减排量
    public static final Double sulfurDioxide = 0.03 * 10;
    //氮氧化物减排量
    public static final Double oxynitride = 0.015 * 10;
    //千克转吨
    public static final Double kgToT = 0.001;
    //吨转万吨
    public static final Double tToWT = 0.0001;
    //万Kwh转MV
    public static final Integer wkwhToMv = 10;
    //kw转MV
    public static final Double kwToMv = 0.001;


//    正常运行	发电状态=1
//    告警运行	报警状态=1
//    正常停机	停机状态=1
//    故障停机	故障状态=1
//    限功率
//    待机状态	待机状态=1
//    维护状态	维护状态=1
//    通讯中断

    public static final HashMap<String, String> fanStatus = new HashMap<String, String>() {
        {
            put("发电状态", "正常运行");
            put("报警状态", "报警运行");
            put("停机状态", "停机状态");
            put("故障状态", "故障状态");
            put("待机状态", "待机状态");
            put("维护状态", "维护状态");
            put("限功率", "限功率");
            put("通讯中断", "通讯中断");
        }
    };
//    正常运行	运行=1
//    正常停机	停机=1
//    限功率	限额运行=1
//    限电停机	降额运行=1
//    告警运行	告警运行=1
//    故障停机	故障停机=1
//    待机状态	待机=1
//    通讯中断	通讯故障=1

    public static final HashMap<String, String> pvStatus = new HashMap<String, String>() {

        {
            put("运行", "正常运行");
            put("停机", "正常停机");
            put("限额运行", "限功率");
            put("降额运行", "限电停机");
            put("告警运行", "告警运行");
            put("故障停机", "故障停机");
            put("待机", "待机状态");
            put("通讯故障", "通讯中断");
        }

    };
    //es EquipIndexName 查绚关键字
    public static final String QueryStringEquipmentIndexName = "equipmentIndexName.keyword";
    //es EquipIndexName 查绚关键字
    public static final String QueryStringEquipmentIndexNameNotKeyword = "equipmentIndexName";
    
    public static final String QueryStringEquipmentSpecificNameNotKeyword = "equipmentSpecificName.keyword";
    //es gatewayId 查绚关键字
    public static final String QueryStringGateWayId = "gatewayId.keyword";
    public static final String QueryStringFrontMoudle = "frontModule.keyword";
    public static final String QueryStringSystemType = "systemType";
    public static final String QueryStringSystemTypeKeyword = "systemType.keyword";
    public static final String QueryStringEquipmentNumber = "equipmentNumber";
    public static final String QueryStringEquipmentNumberKeyword = "equipmentNumber.keyword";
    public static final String QueryStringValue = "value";
    public static final String QueryStringValueKeyword = "value.keyword";

    public static final String QueryStringValueLabel = "valueLabel";
    public static final String QueryStringValueLabelKeyword = "valueLabel.keyword";
    public static final String QueryStringDataType = "dataType";
    public static final String QueryStringDisplayName = "displayName";
    public static final String QueryStringDisplayNameKeyword = "displayName.keyword";
    public static final String QueryStringIsAlarm = "isAlarm";
    public static final String QueryStringIsAlarmKeyword = "isAlarm.keyword";
    public static final String Twodecimalplaces = "%.2f";
    public static final String Threedecimalplaces = "%.3f";
    public static final String Fourdecimalplaces = "%.4f";
    public static final String QueryStringFrontMoudleNotKeyWord = "frontModule";
    //泰和的发电量数据
    public static final List<String> taiHeGenIndicator = new ArrayList<>(Arrays.asList("泰和日发电量总和", "泰和月发电量总和", "泰和年发电量总和"));
    public static final String taiHeGenIndicatorDay = "泰和日发电量总和";
    public static final String taiHeGenIndicatorMonth = "泰和月发电量总和";
    public static final String taiHeGenIndicatorYear = "泰和年发电量总和";

    public static final String taiheActivePowerPoint = "南瑞光差保护_313P";
    public static final String taiheIrradiationPonit = "WTX-801_25_WTX-801_总辐射";
    public static final String xiazaoActivePowerPoint = "220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值";
    public static final String xiazaoWindSpeedrPoint = "瞬时风速";

    public static final List<String> xiazaoElectricityMeter = new ArrayList<>(Arrays.asList("夏雩线212主表", "夏雩线212副表", "1号主变高压侧201", "1号主变低压侧301",
            "35kV集电Ⅰ线311", "35kV集电Ⅱ线312", "35kV集电Ⅲ线313", "35kV集电Ⅳ线314", "35kV集电V线315", "35kV#1SVG316", "35kV#1SVG317", "35kV#1接地变307"));
    public static final List<String> taiheElectricityMeter = new ArrayList<>(Arrays.asList("前光Ⅰ线", "前光Ⅱ线", "消弧线圈兼接地变", "#1SVG", "前万线"));


    public static final HashMap<String, List<String>> xiazaoElectricityMeterPointSort = new HashMap<String, List<String>>() {
        {
            put("夏雩线212主表", Arrays.asList("威胜电量采集WFET2000S_v3.002夏雩线主表正向总有功P+", "威胜电量采集WFET2000S_v3.002夏雩线主表反向总有功P-", "威胜电量采集WFET2000S_v3.002夏雩线主表正向总无功Q+", "威胜电量采集WFET2000S_v3.002夏雩线主表反向总无功Q-"));
            put("夏雩线212副表", Arrays.asList("威胜电量采集WFET2000S_v3.002夏雩线副表正向总有功P+", "威胜电量采集WFET2000S_v3.002夏雩线副表反向总有功P-", "威胜电量采集WFET2000S_v3.002夏雩线副表正向总无功Q+", "威胜电量采集WFET2000S_v3.002夏雩线副表反向总无功Q-"));
            put("1号主变高压侧201", Arrays.asList("威胜电量采集WFET2000S_v3.002#1主变高压侧正向总有功P+", "威胜电量采集WFET2000S_v3.002#1主变高压侧反向总有功P-", "威胜电量采集WFET2000S_v3.002#1主变高压侧正向总无功Q+", "威胜电量采集WFET2000S_v3.002#1主变高压侧反向总无功Q-"));
            put("1号主变低压侧301", Arrays.asList("威胜电量采集WFET2000S_v3.002#1主变低压侧正向总有功P+", "威胜电量采集WFET2000S_v3.002#1主变低压侧反向总有功P-", "威胜电量采集WFET2000S_v3.002#1主变低压侧正向总无功Q+", "威胜电量采集WFET2000S_v3.002#1主变低压侧反向总无功Q-"));
            put("35kV集电Ⅰ线311", Arrays.asList("威胜电量采集WFET2000S_v3.002集电I线正向总有功P+", "威胜电量采集WFET2000S_v3.002集电I线反向总有功P-", "威胜电量采集WFET2000S_v3.002集电I线正向总无功Q+", "威胜电量采集WFET2000S_v3.002集电I线反向总无功Q-"));
            put("35kV集电Ⅱ线312", Arrays.asList("威胜电量采集WFET2000S_v3.002集电II线正向总有功P+", "威胜电量采集WFET2000S_v3.002集电II线反向总有功P-", "威胜电量采集WFET2000S_v3.002集电II线正向总无功Q+", "威胜电量采集WFET2000S_v3.002集电II线反向总无功Q-"));
            put("35kV集电Ⅲ线313", Arrays.asList("威胜电量采集WFET2000S_v3.002集电III线正向总有功P+", "威胜电量采集WFET2000S_v3.002集电III线反向总有功P-", "威胜电量采集WFET2000S_v3.002集电III线正向总无功Q+", "威胜电量采集WFET2000S_v3.002集电III线反向总无功Q-"));
            put("35kV集电Ⅳ线314", Arrays.asList("威胜电量采集WFET2000S_v3.002集电IV线正向总有功P+", "威胜电量采集WFET2000S_v3.002集电IV线反向总有功P-", "威胜电量采集WFET2000S_v3.002集电IV线正向总无功Q+", "威胜电量采集WFET2000S_v3.002集电IV线反向总无功Q-"));
            put("35kV集电V线315", Arrays.asList("威胜电量采集WFET2000S_v3.002集电V线正向总有功P+", "威胜电量采集WFET2000S_v3.002集电V线反向总有功P-", "威胜电量采集WFET2000S_v3.002集电V线正向总无功Q+", "威胜电量采集WFET2000S_v3.002集电V线反向总无功Q-"));
            put("35kV#1SVG316", Arrays.asList("威胜电量采集WFET2000S_v3.002#1SVG正向总有功P+", "威胜电量采集WFET2000S_v3.002#1SVG反向总有功P-", "威胜电量采集WFET2000S_v3.002#1SVG正向总无功Q+", "威胜电量采集WFET2000S_v3.002#1SVG反向总无功Q-"));
            put("35kV#1SVG317", Arrays.asList("威胜电量采集WFET2000S_v3.002#2SVG正向总有功P+", "威胜电量采集WFET2000S_v3.002#2SVG反向总有功P-", "威胜电量采集WFET2000S_v3.002#2SVG正向总无功Q+", "威胜电量采集WFET2000S_v3.002#2SVG反向总无功Q-"));
            put("35kV#1接地变307", Arrays.asList("威胜电量采集WFET2000S_v3.002站用接地变正向总有功P+", "威胜电量采集WFET2000S_v3.002站用接地变反向总有功P-", "威胜电量采集WFET2000S_v3.002站用接地变正向总无功Q+", "威胜电量采集WFET2000S_v3.002站用接地变反向总无功Q-"));
        }
    };
    public static final HashMap<String, List<String>> taiheElectricityMeterPointSort = new HashMap<String, List<String>>() {
        {
            put("前光Ⅰ线", Arrays.asList("314前光Ⅰ线保测_总正向有功电度", "314前光Ⅰ线保测_总反向有功电度", "314前光Ⅰ线保测_总感性无功电度", "314前光Ⅰ线保测_总容性无功电度"));
            put("前光Ⅱ线", Arrays.asList("315前光Ⅱ线保测_总正向有功电度", "315前光Ⅱ线保测_总反向有功电度", "315前光Ⅱ线保测_总感性无功电度", "315前光Ⅱ线保测_总容性无功电度"));
            put("消弧线圈兼接地变", Arrays.asList("311#1消弧线圈_总正向有功电度", "311#1消弧线圈_总反向有功电度", "311#1消弧线圈_总感性无功电度", "311#1消弧线圈_总容性无功电度"));
            put("#1SVG", Arrays.asList("312#1SVG_总正向有功电度", "312#1SVG_总反向有功电度", "312#1SVG_总感性无功电度", "312#1SVG_总容性无功电度"));
            put("前万线", Arrays.asList("313光差保护_总正向有功电度", "313光差保护_总反向有功电度", "313光差保护_总感性无功电度", "313光差保护_总容性无功电度"));
        }
    };
}
