|
|
@@ -0,0 +1,34 @@
|
|
|
+package com.yunfeiyun.agmp.iot.common.enums.warn;
|
|
|
+
|
|
|
+import com.yunfeiyun.agmp.common.utils.StringUtils;
|
|
|
+
|
|
|
+public enum IotWarnTouchCondition {
|
|
|
+ ANY("0","任一指标满足"),
|
|
|
+ ALL("1","多指标同时满足");
|
|
|
+
|
|
|
+ private String code;
|
|
|
+ private String content;
|
|
|
+
|
|
|
+ IotWarnTouchCondition(String code,String content){
|
|
|
+ this.code = code;
|
|
|
+ this.content = content;
|
|
|
+ }
|
|
|
+ public String getContent(){
|
|
|
+ return this.content;
|
|
|
+ }
|
|
|
+ public String getCode(){
|
|
|
+ return this.code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public IotWarnTouchCondition findByCode(String code){
|
|
|
+ if(StringUtils.isEmpty(code)){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ for(IotWarnTouchCondition iotWarnTouchCondition : IotWarnTouchCondition.values()){
|
|
|
+ if(iotWarnTouchCondition.code.equals(code)){
|
|
|
+ return iotWarnTouchCondition;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+}
|