|
|
@@ -1,57 +0,0 @@
|
|
|
-package com.yunfeiyun.agmp.iot.common.enums;
|
|
|
-
|
|
|
-/**
|
|
|
- * 管式墒情 预警数据项
|
|
|
- */
|
|
|
-public enum EnumWarnDataitemGssq {
|
|
|
- SOIL_TEMPRATURE("soil_temperature", "土壤温度"),
|
|
|
- SOIL_TEMPRATURE_10("soil_temperature_10", "10厘米土壤温度"),
|
|
|
- SOIL_TEMPRATURE_20("soil_temperature_20","20厘米土壤温度"),
|
|
|
- SOIL_TEMPRATURE_30("soil_temperature_30","30厘米土壤温度"),
|
|
|
- SOIL_TEMPRATURE_40("soil_temperature_40","40厘米土壤温度"),
|
|
|
- SOIL_HUMIDITY("soil_humidity", "土壤湿度"),
|
|
|
- SOIL_HUMIDITY_10("soil_humidity_10", "10厘米土壤湿度"),
|
|
|
- SOIL_HUMIDITY_20("soil_humidity_20","20厘米土壤湿度"),
|
|
|
- SOIL_HUMIDITY_30("soil_humidity_30","30厘米土壤湿度"),
|
|
|
- SOIL_HUMIDITY_40("soil_humidity_40","40厘米土壤湿度");
|
|
|
-
|
|
|
- private final String code;
|
|
|
- private final String name;
|
|
|
-
|
|
|
- EnumWarnDataitemGssq(String code, String name)
|
|
|
- {
|
|
|
- this.code = code;
|
|
|
- this.name = name;
|
|
|
- }
|
|
|
-
|
|
|
- public String getCode()
|
|
|
- {
|
|
|
- return code;
|
|
|
- }
|
|
|
-
|
|
|
- public String getName()
|
|
|
- {
|
|
|
- return name;
|
|
|
- }
|
|
|
-
|
|
|
- public boolean equal(String code){
|
|
|
- return this.code.equals(code);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 根据code查找
|
|
|
- * @param code 枚举code
|
|
|
- * @return 枚举对象
|
|
|
- */
|
|
|
- public static EnumWarnDataitemGssq findEnumByCode(String code) {
|
|
|
- for (EnumWarnDataitemGssq item : EnumWarnDataitemGssq.values()) {
|
|
|
- if (item.getCode().equals(code)) {
|
|
|
- return item;
|
|
|
- }
|
|
|
- }
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-}
|