From 576743ed18bf51fe2618a15e976edd1178f9df36 Mon Sep 17 00:00:00 2001 From: alwaysfrin <39822157+alwaysfrin@users.noreply.github.com> Date: Fri, 8 Mar 2019 17:56:20 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=EF=BC=8C=E5=8A=A8=E6=80=81=E5=AF=B9=E8=B1=A1=E5=B7=A5?= =?UTF-8?q?=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/dynamic/DynamicEntity.java | 204 ++++++++++++++++++++- 1 file changed, 195 insertions(+), 9 deletions(-) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java index 2fcee00..c8006b8 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicEntity.java @@ -1,7 +1,21 @@ package cn.estsh.i3plus.pojo.base.dynamic; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import lombok.Getter; +import lombok.Setter; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.Serializable; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; /** * @Description : 基础动态对象,包含方法、参数等 @@ -10,24 +24,46 @@ import org.apache.commons.lang3.builder.ReflectionToStringBuilder; * @CreateDate : 2019-01-24 15:56 * @Modify: **/ -public class DynamicEntity extends BaseBean { +public class DynamicEntity extends BaseBean implements Serializable { + + public static final Logger LOGGER = LoggerFactory.getLogger(DynamicEntity.class); + public String tableName; + /*private String uri; private String method; - private String uri; private Object[] args; private Object result; private String operator; - private String appName; + private String appName;*/ + + public List propertyList; + + public DynamicEntity(){ + try { + this.setPropertyList(new ArrayList<>()); + initDynamic(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public DynamicEntity(String tableName){ + this.tableName = tableName; + } + + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } /** * 获取当前对象 * - * @param method - * @param uri - * @param args - * @param result * @return - */ + *//* public DynamicEntity get(String method, String uri, Object[] args, Object result, String operator, String appName) { setMethod(method); setUri(uri); @@ -84,10 +120,160 @@ public class DynamicEntity extends BaseBean { public void setAppName(String appName) { this.appName = appName; + }*/ + + /** + * 初始化属性,以便动态加载 + * @throws InvocationTargetException + * @throws IllegalAccessException + * @throws NoSuchMethodException + */ + public void initDynamic() { + Field[] fields = this.getClass().getDeclaredFields(); + + Method setMethod = null; + String setMethodName,propName; + Object fieldVal = null; + + for(Field f : fields) { + propName = f.getName().replace("$cglib_prop_", ""); + if(!"LOGGER".equals(propName) && !"propertyList".equals(propName)) { + this.getPropertyList().add(propName); //添加到属性list中 + + setMethodName = "set" + propName.substring(0,1).toUpperCase() + propName.substring(1); + + f.setAccessible(true); + try { + fieldVal = f.get(this); + } catch (IllegalAccessException e) { + fieldVal = null; + } + + if(fieldVal == null) { + if (f.getType() == Integer.class) { + fieldVal = 0; + } else if (f.getType() == Long.class) { + fieldVal = 0L; + } else if (f.getType() == Float.class) { + fieldVal = 0.0f; + } else if (f.getType() == Double.class) { + fieldVal = 0.0d; + } else { + fieldVal = ""; + } + } + + try { + setMethod = this.getClass().getDeclaredMethod(setMethodName, new Class[]{f.getType()}); + setMethod.invoke(this, fieldVal); + } catch (NoSuchMethodException e) { + LOGGER.error("没有方法:{}", setMethodName, e); + } catch (IllegalAccessException e) { + LOGGER.error("入参出错:{}:{}:{}", f, f.getType(), fieldVal, e); + } catch (InvocationTargetException e) { + LOGGER.error("方法返回出错:{}", setMethodName, e); + } + } + } } @Override public String toString() { - return ReflectionToStringBuilder.toString(this); + String result = "{"; + + Object fieldVal = null; + Field[] fields = this.getClass().getDeclaredFields(); + String fieldName; + for(Field f : fields) { + fieldName = f.getName().replace("$cglib_prop_", ""); + if(!"LOGGER".equals(fieldName) && !"propertyList".equals(fieldName)) { + f.setAccessible(true); + fieldVal = new Object(); + try { + fieldVal = f.get(this); + } catch (IllegalAccessException e) { + fieldVal = null; + } + + if (fieldVal == null) { + if (f.getType() == Integer.class || f.getType() == Long.class) { + fieldVal = 0; + } else if (f.getType() == Float.class || f.getType() == Double.class) { + fieldVal = 0.0; + } else { + fieldVal = ""; + } + } + + result += "\"" + fieldName + "\":\"" + fieldVal + "\","; + } + } + if(fields.length > 0) { + result = result.substring(0,result.length()-1); + } + + result += "}"; + + return result; + } + + /** + * 根据属性名,设置属性值 + * @param propName + * @param val + * @throws InvocationTargetException + * @throws IllegalAccessException + * @throws NoSuchMethodException + */ + public void setDynProperty(String propName,Object val){ + //初始化set方法 + String setMethodName = "set" + propName.substring(0, 1).toUpperCase() + propName.substring(1); + //获取方法 + Method setMethod = null; + try { + setMethod = this.getClass().getDeclaredMethod(setMethodName, new Class[]{val.getClass()}); + setMethod.invoke(this, val); + } catch (NoSuchMethodException e) { + LOGGER.error("没有方法:{}",setMethodName,e); + } catch (IllegalAccessException e) { + LOGGER.error("入参出错:{}:{}",val,val.getClass(),e); + } catch (InvocationTargetException e) { + LOGGER.error("方法返回出错:{}",setMethodName,e); + } + } + + /** + * 获取属性值 + * @param propName + * @return + * @throws NoSuchMethodException + * @throws InvocationTargetException + * @throws IllegalAccessException + */ + public Object getDynProperty(String propName){ + //初始化set方法 + String setMethodName = "get" + propName.substring(0,1).toUpperCase() + propName.substring(1); + + try { + //获取方法 + Method getMethod = this.getClass().getDeclaredMethod(setMethodName); + //实现方法 + return getMethod.invoke(this); + } catch (NoSuchMethodException e) { + LOGGER.error("没有方法:{}:{}",setMethodName,propName,e); + } catch (IllegalAccessException e) { + LOGGER.error("没有方法:{}:{}",setMethodName,propName,e); + } catch (InvocationTargetException e) { + LOGGER.error("方法返回出错:{}",setMethodName,e); + } + return null; + } + + public List getPropertyList() { + return propertyList; + } + + public void setPropertyList(List propertyList) { + this.propertyList = propertyList; } } From dcdaece309e6533e8de0441c8403d6126f55511d Mon Sep 17 00:00:00 2001 From: alwaysfrin <39822157+alwaysfrin@users.noreply.github.com> Date: Fri, 8 Mar 2019 17:57:14 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../estsh/i3plus/pojo/form/bean/BfDataObject.java | 45 ++++++++++++++++++ .../pojo/form/bean/BfDataObjectProperty.java | 53 ++++++++++++++++++++++ .../i3plus/pojo/form/bean/BfDataObjectRefer.java | 43 ++++++++++++++++++ 3 files changed, 141 insertions(+) create mode 100644 modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObject.java create mode 100644 modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObjectProperty.java create mode 100644 modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObjectRefer.java diff --git a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObject.java b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObject.java new file mode 100644 index 0000000..c7a668f --- /dev/null +++ b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObject.java @@ -0,0 +1,45 @@ +package cn.estsh.i3plus.pojo.form.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +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 : alwaysfrin + * @CreateDate : 2019-02-27 10:53 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="bf_data_object") +@Api(value="数据对象表",description = "用来存储动态对象的相关属性") +public class BfDataObject extends BaseBean { + + @Column(name="NAME") + @ApiParam(value ="中文名称") + private String objectName; + + @Column(name="TABLE_NAME") + @ApiParam(value ="表名") + private String tableName; + + @Column(name="is_view") + @ApiParam(value ="是否视图",access = "判断是否是视图,如果不是视图,则是表名") + //EnunmUtil.TRUE_OR_FALSE + private int isView; +} diff --git a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObjectProperty.java b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObjectProperty.java new file mode 100644 index 0000000..e67c549 --- /dev/null +++ b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObjectProperty.java @@ -0,0 +1,53 @@ +package cn.estsh.i3plus.pojo.form.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +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 : alwaysfrin + * @CreateDate : 2019-02-27 10:53 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="bf_data_object_property") +@Api(value="数据对象属性表",description = "数据对象的属性明细表") +public class BfDataObjectProperty extends BaseBean { + + @Column(name="DATA_OBJECT_ID") + @ApiParam(value ="数据对象ID" , example = "-1") + @JsonSerialize(using = ToStringSerializer.class) + //外键关联数据对象主键 + private Long dataObjectId; + + @Column(name="PROP_NAME") + @ApiParam(value ="属性中文名称") + private String propName; + + @Column(name="PROP_OBJECT_NAME") + @ApiParam(value ="对象中的属性名") + //在动态对象中的属性名 + private String propObjectName; + + @Column(name="PROP_COLUMN_NAME") + @ApiParam(value ="属性字段名") + //属性在数据库中的字段名 + private String propColumnName; + +} diff --git a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObjectRefer.java b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObjectRefer.java new file mode 100644 index 0000000..4caa374 --- /dev/null +++ b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObjectRefer.java @@ -0,0 +1,43 @@ +package cn.estsh.i3plus.pojo.form.bean; + +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 : alwaysfrin + * @CreateDate : 2019-02-27 10:53 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="bf_data_object") +@Api(value="数据对象表",description = "用来存储动态对象的相关属性") +public class BfDataObjectRefer extends BaseBean { + + @Column(name="NAME") + @ApiParam(value ="中文名称") + private String objectName; + + @Column(name="TABLE_NAME") + @ApiParam(value ="表名") + private String tableName; + + @Column(name="is_view") + @ApiParam(value ="是否视图",access = "判断是否是视图,如果不是视图,则是表名") + //EnunmUtil.TRUE_OR_FALSE + private int isView; +} From e4600e1c01ef5205fed2da0e4557e0bd504878c0 Mon Sep 17 00:00:00 2001 From: Silliter Date: Tue, 12 Mar 2019 16:59:19 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E7=A7=BB=E5=8A=A8=E4=BF=A1=E6=81=AF=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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..958a11f 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 @@ -1846,6 +1846,16 @@ public class WmsEnumUtil { 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 String getDescription() { return description; } @@ -1882,5 +1892,15 @@ public class WmsEnumUtil { 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; + } } } From e1825eac407473e7d86d727cce07b2d01c3a3ba8 Mon Sep 17 00:00:00 2001 From: "gragon.xu" Date: Tue, 12 Mar 2019 17:40:06 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BA=A4=E6=98=93=E5=A4=84=E7=90=86?= =?UTF-8?q?=E7=BB=84=E4=BB=B6ALL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/WmsEnumUtil.java | 41 ++++++++++++++++++++++ .../i3plus/pojo/wms/bean/WmsDocMovementMaster.java | 4 --- 2 files changed, 41 insertions(+), 4 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..beb3cb1 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 @@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; * @Modify: **/ public class WmsEnumUtil { + /** * 拆分规则 */ @@ -1883,4 +1884,44 @@ public class WmsEnumUtil { return description; } } + + /** + * 库存交易记录生成标记 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum TRANS_QUAN_GENERAL_TAG { + MINUS(-1, "MINUS", "一条:负"), ZERO(0, "ZERO", "一条:0"), PLUS(1, "PLUS", "一条:正"), TWO(2, "TWO", "两条:一正一负"); + + private String code; + private String description; + int value; + + TRANS_QUAN_GENERAL_TAG(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 TRANS_QUAN_GENERAL_TAG codeOf(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + return values()[i]; + } + } + return null; + } + } } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementMaster.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementMaster.java index 2755a0e..6d6e141 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementMaster.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementMaster.java @@ -101,8 +101,4 @@ public class WmsDocMovementMaster extends BaseBean { @Column(name = "PRIORITY") @ApiParam(value = "优先级", example = "1") public Integer priority; - - @Transient - @ApiParam(value = "移库单明细集合") - private List wmsDocMovementDetailsList; } From 307f07e7ed00349077761012d15b4af5a804efc1 Mon Sep 17 00:00:00 2001 From: "yunhao.wang" Date: Tue, 12 Mar 2019 18:37:37 +0800 Subject: [PATCH 5/5] =?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