From d56756e9e5f7c168693fbb9a666b85da75dfb2ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E5=86=9B=E8=B6=85?= Date: Wed, 26 Feb 2020 11:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=BB=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E3=80=81=E5=8C=BA=E5=9F=9F=E3=80=81=E5=8C=BA=E6=AE=B5=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/PtlEnumUtil.java | 85 +++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlEnumUtil.java index 01a5863..072df9e 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlEnumUtil.java @@ -307,7 +307,7 @@ public class PtlEnumUtil { private String value; private String description; - PTL_PART_TYPE(String value, String description) { + private PTL_PART_TYPE(String value, String description) { this.value = value; this.description = description; } @@ -340,4 +340,87 @@ public class PtlEnumUtil { return tmp; } } + + /** + * 任务类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PTL_TASK_TYPE { + JIT_TASK("10", "JIT任务"), + BILL_TASK("20", "单据任务"), + SINGLE_POINT_TASK("30", "单点任务"); + + private String value; + private String description; + + private PTL_TASK_TYPE(String value, String description) { + this.value = value; + this.description = description; + } + + public String getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value.equals(val)) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static String descriptionOfValue(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(val)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + + /** + * 任务状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PTL_TASK_STATUS { + CREATE(10, "创建"), + EXECUTION(20, "执行中"), + COMPLETE(30, "完成"), + CANCEL(40, "取消"); + + private int value; + private String description; + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + private PTL_TASK_STATUS(int value, String description) { + this.value = value; + this.description = 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; + } + } }