From 307f07e7ed00349077761012d15b4af5a804efc1 Mon Sep 17 00:00:00 2001 From: "yunhao.wang" Date: Tue, 12 Mar 2019 18:37:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9D=A1=E7=A0=81=E8=A7=84=E5=88=99?= =?UTF-8?q?=E7=AE=A1=E7=90=86=20=E5=BE=AE=E6=9C=8D=E6=9D=A1=E7=A0=81?= =?UTF-8?q?=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/platform/bean/SysBarcodeRule.java | 52 ++++++++++++++++++++++ .../i3plus/pojo/platform/bean/SysOrderNoRule.java | 2 +- .../repository/SysBarcodeRuleRepository.java | 14 ++++++ .../i3plus/pojo/platform/sqlpack/CoreHqlPack.java | 30 +++++++++++++ 4 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysBarcodeRule.java create mode 100644 modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/SysBarcodeRuleRepository.java 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 From 24b38fefb057bbf3931e19deebd28ca52d41ffa4 Mon Sep 17 00:00:00 2001 From: crish <570360737@qq.com> Date: Wed, 13 Mar 2019 09:04:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=85=A5=E5=BA=93=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/WmsEnumUtil.java | 74 +++++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) 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 c22bdc9..4824e46 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 @@ -957,6 +957,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=在途 */ @@ -968,8 +1002,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; @@ -1239,6 +1274,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; + } + } /** * 质检业务类型