From 1fc4ae1ff91c8e238cc6048984b43d35dac0f538 Mon Sep 17 00:00:00 2001 From: qianhs Date: Thu, 5 Mar 2020 13:11:38 +0800 Subject: [PATCH] =?UTF-8?q?1,=E5=9B=9E=E9=80=80=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java | 276 +++++++++++++++++++++ 1 file changed, 276 insertions(+) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java index e1fad02..a616aec 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java @@ -1460,4 +1460,280 @@ public class PtlPcnEnumUtil { return tmp; } } + + /** + * 单据主表类型(ASN,PO,MOVE,QC) + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MASTER_ORDER_TYPE { + CREATE(10, "NORMAL", "正常"); + + private int value; + private String code; + private String description; + + MASTER_ORDER_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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 int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + + public static String valueOfDescription(int val) { + return valueOf(val); + } + } + /** + * 区域任务状态(ASN,PO,MOVE,QC) + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MASTER_ORDER_STATUS { + CREATE(10, "CREATE", "创建"), + RECEIPT(20, "IN_PROGRESS", "处理中"), + RECEIPT_FINISH(30, "COMPLETED", "已完成"), + CANCELLED(40, "CANCELLED", "已取消"); + + private int value; + private String code; + private String description; + + MASTER_ORDER_STATUS(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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 int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + + public static String valueOfDescription(int val) { + return valueOf(val); + } + } + /** + * 区域任务类型(ASN,PO,MOVE,QC) + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum AREA_SECTION_TASK_TYPE { + CREATE(10, "CREATE", "JIT任务"), + RECEIPT(20, "IN_PROGRESS", "单据任务"), + RECEIPT_FINISH(30, "COMPLETED", "单点任务"); + + private int value; + private String code; + private String description; + + AREA_SECTION_TASK_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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 int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + + public static String valueOfDescription(int val) { + return valueOf(val); + } + } + /** + * 区域任务状态(ASN,PO,MOVE,QC) + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum AREA_TASK_STATUS { + CREATE(10, "CREATE", "创建"), + RECEIPT(20, "IN_PROGRESS", "处理中"), + RECEIPT_FINISH(30, "COMPLETED", "已完成"); + + private int value; + private String code; + private String description; + + AREA_TASK_STATUS(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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 int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + + public static String valueOfDescription(int val) { + return valueOf(val); + } + } + + /** + * 区域任务类型(ASN,PO,MOVE,QC) + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum AREA_TASK_TYPE { + CREATE(10, "JIT_TASK", "JIT任务"), + RECEIPT(20, "DOCUMENT_TASK", "单据任务"), + RECEIPT_FINISH(30, "SINGLE_POINT_TASK", "单点任务"); + + private int value; + private String code; + private String description; + + AREA_TASK_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + 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 int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + + public static String valueOfDescription(int val) { + return valueOf(val); + } + } }