diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java index b9bdfe9..4b04dd4 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java @@ -2175,4 +2175,122 @@ public class CommonEnumUtil { return tmp; } } + + + /** + * 业务表:库存条码质检状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum STOCK_SN_QC_STATUS { + NORMAL(10, "NORMAL", "合格"), ABNORMAL(20, "ABNORMAL", "不合格"), + ISOLATED(30, "ISOLATED", "隔离"), FRAZE(40, "FRAZE", "报废"); + + private int value; + private String code; + private String description; + + STOCK_SN_QC_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 Integer valueOfDescription(String desc) { + Integer tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + + public static CommonEnumUtil.STOCK_SN_QC_STATUS codeOf(Integer value) { + if (value == null) { + return null; + } else { + for (int i = 0; i < values().length; i++) { + if (values()[i].value == value) { + return values()[i]; + } + } + } + return null; + } + } + + + /** + * 业务表:库存条码状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum STOCK_SN_STATUS { + CREATE(10, "创建"), + QUALITY_CONTROL(20, "质检中"), + PRE_INSTOCK(30, "待入库"), + INSTOCKED(40, "入库"), + PICKED(50, "配料"), + OUT_STOCK(60, "出库"), + SCRAP(70, "报废"), + COMMING(80, "在途"); + + private int value; + private String description; + + STOCK_SN_STATUS(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + 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 Integer valueOfDescription(String desc) { + Integer tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPart.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPart.java index 58f5123..bf1994b 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPart.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPart.java @@ -12,7 +12,11 @@ import org.hibernate.annotations.ColumnDefault; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; -import javax.persistence.*; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Index; +import javax.persistence.Table; +import javax.persistence.Transient; /** * @Description :物料实体 @@ -265,6 +269,14 @@ public class WmsPart extends BaseBean { @DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2) private Double curingTime = 0d; + + @Column(name = "IS_RECYCLE", columnDefinition = "int default 2", nullable = false) + @ApiParam(value = "是否回收", example = "2") + @DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.SELECT, isRequire = 2, entityName = "TRUE_OR_FALSE") + @AnnoOutputColumn(refClass = WmsEnumUtil.TRUE_OR_FALSE.class, refForeignKey = "value", value = "description", hidden = true) + public Integer isRecycle; + + public int getIqcVal() { return this.iqc == null ? 0 : this.iqc.intValue(); } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsStockInitialize.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsStockInitialize.java index 32fddf1..515de40 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsStockInitialize.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsStockInitialize.java @@ -2,6 +2,7 @@ package cn.estsh.i3plus.pojo.wms.bean; import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -33,7 +34,7 @@ public class WmsStockInitialize extends BaseBean { @Column(name = "WH_NO") @ApiParam(value = "仓库代码") - @AnnoOutputColumn + @AnnoOutputColumn(required = false) private String whNo; @Column(name = "ZONE_NO") @@ -53,23 +54,23 @@ public class WmsStockInitialize extends BaseBean { @Column(name = "PART_NAME_RDD") @ApiParam(value = "物料名称") - @AnnoOutputColumn + @AnnoOutputColumn(required = false) private String partNameRdd; @Column(name = "UNIT") @ApiParam(value = "单位") - @AnnoOutputColumn + @AnnoOutputColumn(required = false) private String unit; @Column(name = "QTY", columnDefinition = "decimal(18,8)", nullable = false) @ApiParam(value = "可用数量", example = "0") @ColumnDefault("0") - @AnnoOutputColumn + @AnnoOutputColumn(required = false) private Double qty = 0d; @Column(name = "SNP", columnDefinition = "decimal(18,8)", nullable = false) @ApiParam(value = "标准包装", example = "1") - @AnnoOutputColumn + @AnnoOutputColumn(required = false) private Double snp; @Column(name = "STATUS") @@ -80,4 +81,36 @@ public class WmsStockInitialize extends BaseBean { @AnnoOutputColumn private String currentOrganizeCode; + @Column(name = "SN") + @ApiParam(value = "工装条码") + @AnnoOutputColumn(required = false) + private String sn; + + @Column(name = "QC_STATUS") + @ApiParam(value = "质检状态", example = "0") + @ColumnDefault("10") + @AnnoOutputColumn(refClass = CommonEnumUtil.STOCK_SN_QC_STATUS.class, refForeignKey = "value", value = "description", required = false) + private Integer qcStatus; + + /** + * 条码状态:1=创建,10=质检中,20=待入库,30=入库,40=配料,50=出库,60=报废,70=在途 + */ + @Column(name = "SN_STATUS") + @ApiParam(value = "条码状态", example = "0") + @ColumnDefault("30") + @AnnoOutputColumn(refClass = CommonEnumUtil.STOCK_SN_STATUS.class, refForeignKey = "value", value = "description", required = false) + private Integer snStatus; + + @Column(name = "USE_COUNT", nullable = true) + @ApiParam(value = "领用次数", example = "0") + @ColumnDefault("0") + @AnnoOutputColumn(required = false) + private Integer useCount; + + @Column(name = "SEQ_NO", nullable = true) + @ApiParam(value = "序号", example = "0") + @ColumnDefault("0") + @AnnoOutputColumn(required = false) + private Integer seqNo; + }