完成责任量化功能

This commit is contained in:
2023-07-26 11:20:12 +08:00
parent ae00d7671d
commit c3f8592160
104 changed files with 4709 additions and 1670 deletions

View File

@@ -0,0 +1,52 @@
package com.njcn.advance.enums;
import lombok.Getter;
/**
* @author hongawen
* @version 1.0.0
* @date 2021年04月13日 10:50
*/
@Getter
public enum AdvanceResponseEnum {
ANALYSIS_USER_DATA_ERROR("A0101","解析用采数据内容失败"),
INTERNAL_ERROR("A0101","系统内部异常"),
USER_DATA_EMPTY("A0101","用采数据内容为空"),
USER_DATA_NOT_FOUND("A0101","未找到用采数据"),
RESP_DATA_NOT_FOUND("A0101","未找到责任划分数据"),
WIN_TIME_ERROR("A0101","限值时间小于窗口"),
CALCULATE_INTERVAL_ERROR("A0101","对齐计算间隔值非法"),
RESP_RESULT_DATA_NOT_FOUND("A0101","未找到责任划分缓存数据"),
USER_DATA_P_NODE_PARAMETER_ERROR("A0101","无用采用户或所有用户的完整性均不满足条件"),
RESPONSIBILITY_PARAMETER_ERROR("A0101","调用接口程序计算失败,参数非法")
;
private final String code;
private final String message;
AdvanceResponseEnum(String code, String message) {
this.code = code;
this.message = message;
}
public static String getCodeByMsg(String msg){
for (AdvanceResponseEnum userCodeEnum : AdvanceResponseEnum.values()) {
if (userCodeEnum.message.equalsIgnoreCase(msg)) {
return userCodeEnum.code;
}
}
return "";
}
}