From 6e2cf7095181c9a9d6e79ea14d833baff56953e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=95=8F?= <962239776@qq.com> Date: Wed, 17 Jul 2019 10:03:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E4=BD=8D=E6=A0=A1=E9=AA=8C=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/WmsEnumUtil.java | 59 ++++++++++++++++++++++ 1 file changed, 59 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 633422a..797e08e 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 @@ -2962,4 +2962,63 @@ public class WmsEnumUtil { return tmp; } } + + /** + * 库位校验源库位目标库位参数 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SRC_DEST_LOCATE { + SRC(10, "SRC", "源库位"), + DEST(20, "DEST", "目标库位"); + + private int value; + private String code; + private String description; + + SRC_DEST_LOCATE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public static SRC_DEST_LOCATE codeOf(int value) { + for (int i = 0; i < values().length; i++) { + if (values()[i].value==(value)) { + return values()[i]; + } + } + return null; + } + public String getDescription() { + return description; + } + + public String getCode() { + return code; + } + + 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; + } + + public static int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } } \ No newline at end of file