diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java index 53dcc76..ca1763a 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java @@ -958,6 +958,40 @@ public class WmsEnumUtil { } /** + * 库存条码表条码质量状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SN_QUALITY_STATUS { + NORMAL(10, "合格"), ABNORMAL(20, "不合格"), ISOLATED(30, "隔离"); + + private int value; + private String description; + + SN_QUALITY_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; + } + } + + /** * 业务表:库存条码状态 * 1=创建,10=质检中,20=待入库,30=入库,40=配料,50=出库,60=报废,70=在途 */ @@ -969,8 +1003,9 @@ public class WmsEnumUtil { INSTOCKED(30, "入库"), PICKED(40, "配料"), OUT_STOCK(50, "出库"), - SCRAPED(60, "报废"), - COMMING(70, "在途"); + FRAZE(60, "冻结"), + SCRAPED(70, "报废"), + COMMING(80, "在途"); private int value; private String description; @@ -1240,6 +1275,41 @@ public class WmsEnumUtil { } } + /** + * 库存移动单明细状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MOVE_DETAIL_STATUS { + CREATE(10, "创建"), + BE_HANDLE(20, "待处理"), + FINISH(30, "已处理"); + + private int value; + private String description; + + MOVE_DETAIL_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; + } + } /** * 质检业务类型 diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysBarcodeRule.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysBarcodeRule.java new file mode 100644 index 0000000..61c82cc --- /dev/null +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysBarcodeRule.java @@ -0,0 +1,52 @@ +package cn.estsh.i3plus.pojo.platform.bean; + +import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description : 条码解析规则 + * @Reference : + * @Author : yunhao + * @CreateDate : 2019-03-12 14:45 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="SYS_BARCODE_RULE") +@Api(value="条码规则",description = "条码规则") +public class SysBarcodeRule extends BaseBean { + + @Column(name = "NAME") + @ApiParam(value = "规则名称") + private String name; + + @Column(name = "BARCODE_RULE_CODE") + @ApiParam(value = "规则代码") + private String barcodeRuleCode; + + @Column(name = "BARCODE_RULE") + @ApiParam(value = "条码规则") + private String barcodeRule; + + @Column(name = "BARCODE_SEPARATOR") + @ApiParam(value = "条码分隔符") + private String barcodeSeparator; + + @Column(name="BARCODE_RULE_DESCRIPTION") + @ApiParam(value ="条码规则描述") + private String barcodeRuleDescription; + +} diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysOrderNoRule.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysOrderNoRule.java index 89e9d29..258e35d 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysOrderNoRule.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysOrderNoRule.java @@ -41,7 +41,7 @@ public class SysOrderNoRule extends BaseBean { @ApiParam(value = "规则代码") private String orderNoRuleCode; - @Column(name = "numberRule") + @Column(name = "ORDER_NO_RULE") @ApiParam(value = "单号规则") private String orderNoRule; diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/SysBarcodeRuleRepository.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/SysBarcodeRuleRepository.java new file mode 100644 index 0000000..d1fd285 --- /dev/null +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/SysBarcodeRuleRepository.java @@ -0,0 +1,14 @@ +package cn.estsh.i3plus.pojo.platform.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.platform.bean.SysBarcodeRule; + +/** + * @Description : 条码规则 + * @Reference : + * @Author : yunhao + * @CreateDate : 2019-03-12 16:02 + * @Modify: + **/ +public interface SysBarcodeRuleRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/sqlpack/CoreHqlPack.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/sqlpack/CoreHqlPack.java index 98afcba..dd792df 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/sqlpack/CoreHqlPack.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/sqlpack/CoreHqlPack.java @@ -635,4 +635,34 @@ public class CoreHqlPack { return result.toString(); } + + /** + * 条码规则代码是否存在 + * @param sysBarcodeRule + * @return + */ + public static String packHqlSysBarcodeRuleCode(SysBarcodeRule sysBarcodeRule){ + StringBuffer result = new StringBuffer(); + + // and + HqlPack.getStringEqualPack(sysBarcodeRule.getBarcodeRuleCode(),"barcodeRuleCode",result); + // not + HqlPack.getNumNOEqualPack(sysBarcodeRule.getId(),"id",result); + + return result.toString(); + } + + /** + * 条码规则复杂查询 + * @param sysBarcodeRule + * @return + */ + public static String packHqlSysBarcodeRule(SysBarcodeRule sysBarcodeRule){ + StringBuffer result = new StringBuffer(); + + HqlPack.getStringLikerPack(sysBarcodeRule.getName(),"name",result); + HqlPack.getStringLikerPack(sysBarcodeRule.getBarcodeRuleCode(),"barcodeRuleCode",result); + + return result.toString(); + } } \ No newline at end of file