From be354e6dd3b97453359da6657445932ffa42fcfb Mon Sep 17 00:00:00 2001 From: jimmy <1622218722@qq.com> Date: Thu, 15 Nov 2018 19:11:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/WmsEnumUtil.java | 55 ++++++++++++++++++++++ 1 file changed, 55 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 1507622..7566c76 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 @@ -346,4 +346,59 @@ public class WmsEnumUtil { return tmp; } } + + /** + * 库位类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum LOCATE_TYPE { + COLLECT_LOCATE(10, "I", "收货库"), + BASICS_LOCATE(20, "P", "基础库"), + maneuver_LOCATE(30, "R", "机动库"), + COMBINATION_LOCATE(40, "D", "组合库"), + LINE_LOCATE(50, "L", "线边库"), + NC_LOCATE(60, "N", "NC库"); + + private int value; + private String code; + private String description; + + LOCATE_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + 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; + } + } }