From 2e5ab2cdcd685a0fb3b1c511d51e8916449c4253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E5=86=9B=E8=B6=85?= Date: Thu, 16 Jul 2020 13:05:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=A1=E7=A0=81=E5=A4=96=E4=B8=8A=E7=BA=BF?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B5=8B=E5=80=BC=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/MesPcnEnumUtil.java | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java index a9d036e..df68d86 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java @@ -4378,4 +4378,49 @@ public class MesPcnEnumUtil { return tmp; } } + + /** + * 选配类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum OPTION_TYPE { + OPTION(10, "选配件"), + BOM_DISASSEMBLY(20, "BOM拆解"); + + private int value; + private String description; + + OPTION_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; + } + + 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; + } + } }