From b2c549498358d391d5be60f6b468660c38c8cbb8 Mon Sep 17 00:00:00 2001 From: Silliter Date: Wed, 8 May 2019 15:15:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83=E7=B3=BB=E7=BB=9F=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/WmsEnumUtil.java | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java index 768dc10..a7949c1 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java @@ -2187,4 +2187,104 @@ public class WmsEnumUtil { return null; } } + + /** + * 系统参数类型 + * 1.SYSTEM:系统参数 + * 2.BUSI:业务参数 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum WMS_CONFIG_TYPE{ + + SYSTEM(10,"系统参数","系统参数"), + BUSI(20, "业务参数", "业务参数"); + + private int value; + private String name; + private String description; + + WMS_CONFIG_TYPE(int value, String name, String description) { + this.value = value; + this.name = name; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + public static String valueOfCode(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].name; + } + } + return tmp; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].name.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 系统配置值类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum WMS_CONFIG_VALUE_TYPE { + CHECKLIST(10, "可选列表"), + NUMBER(20, "数字"), + STRING(30, "字符串"); + + private int value; + private String description; + + WMS_CONFIG_VALUE_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } }