From aebe7422801a906ce637c718ce13bc7431aac0b2 Mon Sep 17 00:00:00 2001 From: wangjie Date: Thu, 22 Aug 2019 17:04:23 -0700 Subject: [PATCH] =?UTF-8?q?mes=E6=9E=9A=E4=B8=BE=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=85=B3=E9=94=AE=E4=BB=B6=E6=9D=A1=E7=A0=81=E8=A7=84=E5=88=99?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=A8=A1=E5=9D=97=E7=9A=84=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/MesEnumUtil.java | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java index 08f41a9..0c9da50 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java @@ -12,6 +12,42 @@ import com.fasterxml.jackson.annotation.JsonFormat; public class MesEnumUtil { /** + * 关键件条码规则信息绑定规则 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum BIND_RULE { + + COOPERATION_PART(0, "外协件"), + SELF_CONTROL_PART(1, "自制件"); + + private int value; + private String description; + + BIND_RULE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + 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; + } + } + + /** * 质量状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT)