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; + } + } }