package com.fzzy.igds.dzhwk.constant; /** * 物联网拓展设备类型枚举类 */ public enum DeviceIotType { TYPE_01("01", "01-温湿度"), TYPE_02("02", "02-液位计"); private String code; private String msg; DeviceIotType(String code, String msg) { this.code = code; this.msg = msg; } public String getCode() { return code; } public String getMsg() { return msg; } public static String getMsg(String code) { if(null == code) return null; if(DeviceIotType.TYPE_01.getCode().equals(code)) return DeviceIotType.TYPE_01.getMsg(); if(DeviceIotType.TYPE_02.getCode().equals(code)) return DeviceIotType.TYPE_02.getMsg(); return "其他"; } }