package com.fzzy.igds.dzhwk.constant; /** * 设备位置 */ public enum DeviceLocation { L_01("01", "01-正面"), L_02("02", "02-背面"), L_03("03", "03-左侧"), L_04("04", "04-右侧"), L_05("05", "05-仓内"); private String code; private String msg; DeviceLocation(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 (DeviceLocation.L_01.getCode().equals(code)) return DeviceLocation.L_01.getMsg(); if (DeviceLocation.L_02.getCode().equals(code)) return DeviceLocation.L_02.getMsg(); if (DeviceLocation.L_03.getCode().equals(code)) return DeviceLocation.L_03.getMsg(); if (DeviceLocation.L_04.getCode().equals(code)) return DeviceLocation.L_04.getMsg(); if (DeviceLocation.L_05.getCode().equals(code)) return DeviceLocation.L_05.getMsg(); return "未配置"; } }