package com.njcn.cloud.enums.app;


/**
 * @Description: 指标编码
 * @Author: wr
 * @Date: 2023/11/3 13:57
 */
public enum RateCodeEnum{
	FLICKET_ALLTIME("flickerAllTime", "Flicket_AllTime"),
	FREQ_DEV_OVERTIME("freqDevOvertime", "频率偏差越限"),
	VOLTAGE_DEV_OVERTIME("voltageDevOvertime", "电压偏差越限"),
	UBALANCE_OVERTIME("ubalanceOvertime" ,"电压不平衡越限"),
	FLICKER_OVERTIME("flickerOvertime", "闪变越限"),
	UABERRANCE_OVERTIME("uaberranceOvertime", "电压谐波畸变率越限"),
	UHARM_2_OVERTIME("uharm2Overtime", "2次电压谐波含有率越限"),
	UHARM_3_OVERTIME("uharm3Overtime", "3次电压谐波含有率越限"),
	UHARM_4_OVERTIME("uharm4Overtime", "4次电压谐波含有率越限"),
	UHARM_5_OVERTIME("uharm5Overtime", "5次电压谐波含有率越限"),
	UHARM_6_OVERTIME("uharm6Overtime", "6次电压谐波含有率越限"),
	UHARM_7_OVERTIME("uharm7Overtime", "7次电压谐波含有率越限"),
	UHARM_8_OVERTIME("uharm8Overtime", "8次电压谐波含有率越限"),
	UHARM_9_OVERTIME("uharm9Overtime", "9次电压谐波含有率越限"),
	UHARM_10_OVERTIME("uharm10Overtime", "10次电压谐波含有率越限"),
	UHARM_11_OVERTIME("uharm11Overtime", "11次电压谐波含有率越限"),
	UHARM_12_OVERTIME("uharm12Overtime", "12次电压谐波含有率越限"),
	UHARM_13_OVERTIME("uharm13Overtime", "13次电压谐波含有率越限"),
	UHARM_14_OVERTIME("uharm14Overtime", "14次电压谐波含有率越限"),
	UHARM_15_OVERTIME("uharm15Overtime", "15次电压谐波含有率越限"),
	UHARM_16_OVERTIME("uharm16Overtime", "16次电压谐波含有率越限"),
	UHARM_17_OVERTIME("uharm17Overtime", "17次电压谐波含有率越限"),
	UHARM_18_OVERTIME("uharm18Overtime", "18次电压谐波含有率越限"),
	UHARM_19_OVERTIME("uharm19Overtime", "19次电压谐波含有率越限"),
	UHARM_20_OVERTIME("uharm20Overtime", "20次电压谐波含有率越限"),
	UHARM_21_OVERTIME("uharm21Overtime", "21次电压谐波含有率越限"),
	UHARM_22_OVERTIME("uharm22Overtime", "22次电压谐波含有率越限"),
	UHARM_23_OVERTIME("uharm23Overtime", "23次电压谐波含有率越限"),
	UHARM_24_OVERTIME("uharm24Overtime", "24次电压谐波含有率越限"),
	UHARM_25_OVERTIME("uharm25Overtime", "25次电压谐波含有率越限"),
	IHARM_2_OVERTIME("iharm2Overtime", "2次电流谐波幅值越限"),
	IHARM_3_OVERTIME("iharm3Overtime", "3次电流谐波幅值越限"),
	IHARM_4_OVERTIME("iharm4Overtime", "4次电流谐波幅值越限"),
	IHARM_5_OVERTIME("iharm5Overtime", "5次电流谐波幅值越限"),
	IHARM_6_OVERTIME("iharm6Overtime", "6次电流谐波幅值越限"),
	IHARM_7_OVERTIME("iharm7Overtime", "7次电流谐波幅值越限"),
	IHARM_8_OVERTIME("iharm8Overtime", "8次电流谐波幅值越限"),
	IHARM_9_OVERTIME("iharm9Overtime", "9次电流谐波幅值越限"),
	IHARM_10_OVERTIME("iharm10Overtime", "10次电流谐波幅值越限"),
	IHARM_11_OVERTIME("iharm11Overtime", "11次电流谐波幅值越限"),
	IHARM_12_OVERTIME("iharm12Overtime", "12次电流谐波幅值越限"),
	IHARM_13_OVERTIME("iharm13Overtime", "13次电流谐波幅值越限"),
	IHARM_14_OVERTIME("iharm14Overtime", "14次电流谐波幅值越限"),
	IHARM_15_OVERTIME("iharm15Overtime", "15次电流谐波幅值越限"),
	IHARM_16_OVERTIME("iharm16Overtime", "16次电流谐波幅值越限"),
	IHARM_17_OVERTIME("iharm17Overtime", "17次电流谐波幅值越限"),
	IHARM_18_OVERTIME("iharm18Overtime", "18次电流谐波幅值越限"),
	IHARM_19_OVERTIME("iharm19Overtime", "19次电流谐波幅值越限"),
	IHARM_20_OVERTIME("iharm20Overtime", "20次电流谐波幅值越限"),
	IHARM_21_OVERTIME("iharm21Overtime", "21次电流谐波幅值越限"),
	IHARM_22_OVERTIME("iharm22Overtime", "22次电流谐波幅值越限"),
	IHARM_23_OVERTIME("iharm23Overtime", "23次电流谐波幅值越限"),
	IHARM_24_OVERTIME("iharm24Overtime", "24次电流谐波幅值越限"),
	IHARM_25_OVERTIME("iharm25Overtime", "25次电流谐波幅值越限");

	private String code;

	private String type;

	RateCodeEnum(String code, String type){
		this.code = code;
		this.type = type;
	}

	public String getCode() {
		return code;
	}

	public String getType() {
		return type;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public void setType(String type) {
		this.type = type;
	}

	public static String getMsgByCode(String code){
		for (RateCodeEnum typeCodeEnum : RateCodeEnum.values()) {
			if (typeCodeEnum.code==code) {
				return typeCodeEnum.type;
			}
		}
		return "";
	}

	public static String getCodeByMsg(String type){
		for (RateCodeEnum typeCodeEnum : RateCodeEnum.values()) {
			if (typeCodeEnum.type.equals(type)) {
				return typeCodeEnum.code;
			}
		}
		return "";
	}

}