From 156b515497d0872ae0406229861cc54fa59526df Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 18 Nov 2020 09:26:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DSWEB=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/SwebEnumUtil.java | 106 ++++++++++----------- .../i3plus/pojo/sweb/bean/SwebPurchaseOrderSn.java | 6 +- 2 files changed, 58 insertions(+), 54 deletions(-) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SwebEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SwebEnumUtil.java index 2184f9a..a130b9b 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SwebEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SwebEnumUtil.java @@ -136,6 +136,59 @@ public class SwebEnumUtil { } /** + * 单据条码状态(PO/DOC_MOVE) + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum ORDER_SN_STATUS { + CREATE(10, "N", "创建"), + RECEIPTED(20, "R", "已完成"), + CANCEL(30, "C", "行取消"), + PRINTED(40, "C", "已打印"); + + private int value; + private String code; + private String description; + + ORDER_SN_STATUS(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getCode() { + return code; + } + + 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; + } + } + + /** * PO订单来源 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -706,59 +759,6 @@ public class SwebEnumUtil { } /** - * 单据条码状态(PO/DOC_MOVE) - */ - @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum ORDER_SN_STATUS { - CREATE(10, "N", "创建"), - RECEIPTED(20, "R", "已完成"), - CANCEL(30, "C", "行取消"), - PRINTED(40, "C", "已打印"); - - private int value; - private String code; - private String description; - - ORDER_SN_STATUS(int value, String code, String description) { - this.value = value; - this.code = code; - this.description = description; - } - - public int getValue() { - return value; - } - - public String getDescription() { - return description; - } - - public String getCode() { - return code; - } - - 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; - } - } - - /** * 条码类型 10=实物条码,20=虚拟条码 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) diff --git a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrderSn.java b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrderSn.java index 3466256..0b95c97 100644 --- a/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrderSn.java +++ b/modules/i3plus-pojo-sweb/src/main/java/cn/estsh/i3plus/pojo/sweb/bean/SwebPurchaseOrderSn.java @@ -59,6 +59,10 @@ public class SwebPurchaseOrderSn extends BaseBean { @Column(name = "UNIT") private String unit; + @Column(name = "SN_STATUS") + @ApiParam(value = "SN状态", example = "1") + private Integer snStatus; + @Column(name = "BOX_QTY") @ColumnDefault("0") @ApiParam(value = "箱数", example = "0") @@ -66,7 +70,7 @@ public class SwebPurchaseOrderSn extends BaseBean { @Column(name = "SERIAL_NO") @ApiParam(value = "序列号") - private String serialNo; + private Integer serialNo; @Column(name = "SN") @ApiParam(value = "箱条码")