From 3b3ddd581a6de2201e7f6a2eb591bdd8621b6dc1 Mon Sep 17 00:00:00 2001 From: wangjie Date: Fri, 23 Aug 2019 17:58:27 +0800 Subject: [PATCH] =?UTF-8?q?mest=E6=9D=A1=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=E8=A7=84=E5=88=99=E6=9C=80=E5=A4=A7=E5=80=BC=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=BE=AA=E7=8E=AF=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/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 e140fef..3dbbb91 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 { /** + * mes条码生成规则最大值后是否循环 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum NUMBER_RULE_ISCYCLE { + + TRUE(1, "是"), + FALSE(2, "否"); + + private int value; + private String description; + + NUMBER_RULE_ISCYCLE(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)