diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicBean.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicBean.java index 577139e..cb05869 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicBean.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/dynamic/DynamicBean.java @@ -46,7 +46,9 @@ public class DynamicBean { * @param value */ public void setValue(String property, Object value) { - beanMap.put(property, value); + if(!beanMap.containsKey(property)){ + beanMap.put(property, value); + } } /** 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 c8006b8..f9437db 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 @@ -14,6 +14,7 @@ import java.lang.reflect.Method; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.Map; @@ -158,20 +159,41 @@ public class DynamicEntity extends BaseBean implements Serializable { fieldVal = 0.0f; } else if (f.getType() == Double.class) { fieldVal = 0.0d; - } else { + } else if (f.getType() == String.class) { + fieldVal = ""; + }else if (f.getType() == Character.class) { + fieldVal = ""; + }else if (f.getType() == Boolean.class) { + fieldVal = true; + }else if (f.getType() == Byte.class) { + fieldVal = 0; + }else if (f.getType() == Date.class) { + fieldVal = new Date(); + }else { fieldVal = ""; } } try { setMethod = this.getClass().getDeclaredMethod(setMethodName, new Class[]{f.getType()}); + System.out.println("Method Name:" + setMethod.getName() + "\t\t Value : " + fieldVal); setMethod.invoke(this, fieldVal); + } catch (ClassCastException e) { + e.printStackTrace(); + LOGGER.error("ClassCastException :{}", setMethodName, e); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + LOGGER.error("IllegalArgumentException :{}", setMethodName, e); } catch (NoSuchMethodException e) { LOGGER.error("没有方法:{}", setMethodName, e); } catch (IllegalAccessException e) { LOGGER.error("入参出错:{}:{}:{}", f, f.getType(), fieldVal, e); } catch (InvocationTargetException e) { LOGGER.error("方法返回出错:{}", setMethodName, e); + }catch (RuntimeException e) { + LOGGER.error("RuntimeException :{}", setMethodName, e); + }catch (Exception e) { + LOGGER.error("Exception :{}", setMethodName, e); } } } diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockFormEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockFormEnumUtil.java index b3661b7..6cef54a 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockFormEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockFormEnumUtil.java @@ -1,6 +1,9 @@ package cn.estsh.i3plus.pojo.base.enumutil; import com.fasterxml.jackson.annotation.JsonFormat; +import javafx.scene.chart.Chart; + +import java.util.Date; /** * @Description : 模块表单枚举类 @@ -54,7 +57,7 @@ public class BlockFormEnumUtil { public static int codeOfValue(String code) { int tmp = 1; for (int i = 0; i < values().length; i++) { - if (values()[i].code.equals(code)) { + if (values()[i].code.equals(code.toLowerCase())) { tmp = values()[i].value; } } @@ -93,6 +96,87 @@ public class BlockFormEnumUtil { } /** + * 原数据状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum FORM_TABLE_STATUS { + SYNCHRONOUS_UNDONE(1, "未完成", "未同步"), + SYNCHRONOUS_COMPLETE(2, "已完成", "已同步"); + + private int value; + private String code; + private String description; + + private FORM_TABLE_STATUS(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 String valueOfCode(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code.toLowerCase())) { + tmp = values()[i].value; + } + } + return tmp; + } + + public static String valueOfDescription(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 FORM_TABLE_STATUS valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** * 行信息 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -724,7 +808,7 @@ public class BlockFormEnumUtil { * 虚拟类型信息 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum PROPERTY_VIRTUAL_TYPE { + public enum PROPERTY_VIRTUAL_OPERATE_TYPE { STRING_SPLICE(10, "SPLICE", "字符串拼接"), NUM_ADD(20, "ADD", "加法计算"), NUM_LESS(30, "MIN", "减法计算"), @@ -735,7 +819,7 @@ public class BlockFormEnumUtil { private String code; private String description; - private PROPERTY_VIRTUAL_TYPE(int value, String code, String description) { + private PROPERTY_VIRTUAL_OPERATE_TYPE(int value, String code, String description) { this.value = value; this.code = code; this.description = description; @@ -783,7 +867,7 @@ public class BlockFormEnumUtil { return tmp; } - public static PROPERTY_VIRTUAL_TYPE valueOf(int val) { + public static PROPERTY_VIRTUAL_OPERATE_TYPE valueOf(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { if (values()[i].value == val) { @@ -809,24 +893,28 @@ public class BlockFormEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum PROPERTY_TYPE { - STRING(10, "String", "字符串"), - CHAR(11, "Character", "单字符"), - INTEGER(20, "Integer", "短整型"), - LONG(21, "Long", "长整型"), - DOUBLE(30, "Double", "大浮点型"), - FLOAT(31, "Float", "小浮点型"), - BOOLEAN(40, "Boolean", "布尔值"), - BYTE(50, "Byte", "字节"), - DATE(60, "Date", "日期"); + STRING(10, "String", "字符串", "java.lang.String", String.class), + CHAR(11, "Character", "单字符", "java.lang.Character", Character.class), + INTEGER(20, "Integer", "短整型", "java.lang.Integer", Integer.class), + LONG(21, "Long", "长整型", "java.lang.Long", Long.class), + DOUBLE(30, "Double", "大浮点型", "java.lang.Double", Double.class), + FLOAT(31, "Float", "小浮点型", "java.lang.Float", Float.class), + BOOLEAN(40, "Boolean", "布尔值", "java.lang.Boolean", Boolean.class), + BYTE(50, "Byte", "字节", "java.lang.Byte", Byte.class), + DATE(60, "Date", "日期", "java.sql.Timestamp", Date.class); private int value; private String code; private String description; + private String classPath; + private Class clzFullName; - private PROPERTY_TYPE(int value, String code, String description) { + private PROPERTY_TYPE(int value, String code, String description,String classPath,Class clzFullName) { this.value = value; this.code = code; this.description = description; + this.classPath = classPath; + this.clzFullName = clzFullName; } public int getValue() { @@ -851,6 +939,16 @@ public class BlockFormEnumUtil { return tmp; } + public static Class valueOfClzFullName(int val) { + Class tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].clzFullName; + } + } + return tmp; + } + public static int codeOfValue(String code) { int tmp = 1; for (int i = 0; i < values().length; i++) { @@ -861,6 +959,16 @@ public class BlockFormEnumUtil { return tmp; } + public static int codeOfClassPath(String classPath) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].classPath.equals(classPath)) { + tmp = values()[i].value; + } + } + return tmp; + } + public static String valueOfDescription(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { @@ -881,6 +989,16 @@ public class BlockFormEnumUtil { return null; } + public static PROPERTY_TYPE indexOf(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (val.indexOf(values()[i].value) >= 0) { + return values()[i]; + } + } + return null; + } + public static String codeOfDescription(String code) { String tmp = null; for (int i = 0; i < values().length; i++) { @@ -1479,4 +1597,5 @@ public class BlockFormEnumUtil { return tmp; } } + } 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 b3ce5ec..ed2f951 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 @@ -153,6 +153,15 @@ public class CommonEnumUtil { } return tmp; } + + public static int descOf(boolean desc) { + return desc ? TRUE_OR_FALSE.TRUE.getValue() : TRUE_OR_FALSE.FALSE.getValue(); + } + + public static int descOf(int desc) { + return desc == 0 ? TRUE_OR_FALSE.TRUE.getValue() : TRUE_OR_FALSE.FALSE.getValue(); + } + public static String valueOfDescription(int val) {return valueOf(val);} public static int descriptionOfValue(String desc) {return descOf(desc);} 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 2d479ab..9ac8347 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 @@ -180,57 +180,6 @@ public class WmsEnumUtil { } /** - * 主表信息 单据来源 - */ - @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum ORDER_SRC { - MNU(10, "MNU", "手工"), - ERP(20, "ERP", "ERP接口"); - - private int value; - private String code; - private String description; - - ORDER_SRC(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; - } - } - - /** * 主表信息 单据类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -425,69 +374,6 @@ public class WmsEnumUtil { } } - /** - * 消息队列,队列名称 - * 1: success_queue - * 2: fail_queue - */ - @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum QUEUE_NAME { - - SUCCESS_QUEUE(1, "wms_success_queue", "成功消息队列"), - PENDING_QUEUE(2, "wms_pending_queue", "待处理消息队列"); - - private int value; - private String name; - private String description; - - QUEUE_NAME(int value, String name, String description) { - this.value = value; - this.name = name; - this.description = description; - } - - public int getValue() { - return value; - } - - public String getName() { - return name; - } - - public String getDescription() { - return description; - } - - public static String valueOfCode(int val) { - String tmp = null; - for (int i = 0; i < values().length; i++) { - if (values()[i].value == val) { - tmp = values()[i].name; - } - } - return tmp; - } - - public static String valueOfDescription(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 String codeOfDescription(String code) { - String tmp = null; - for (int i = 0; i < values().length; i++) { - if (values()[i].name.equals(code)) { - tmp = values()[i].description; - } - } - return tmp; - } - } /** * 产品入库的产品状态 @@ -1293,41 +1179,6 @@ 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; - } - } /** * 质检业务类型 @@ -1589,8 +1440,8 @@ public class WmsEnumUtil { @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum PRINT_ORDER_TYPE { PO(10, "PO"), - ASN(30, "ASN"), - MOVEMENT(20, "MOVEMENT"); + ASN(20, "ASN"), + MOVEMENT(30, "MOVEMENT"); private int value; private String description; @@ -2253,4 +2104,57 @@ public class WmsEnumUtil { return description; } } + + /** + * NC处理 操作类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum NC_HANDLE_BUSI_TYPE { + RECEPTION(10, "RECEPTION", "让步接收"), + SCRAP(20, "SCRAP", "报废"), + QUARANTINE(30, "QUARANTINE", "隔离"), + BACK_QUARANTINE(40, "BACK_QUARANTINE", "反隔离"); + + private int value; + private String code; + private String description; + + NC_HANDLE_BUSI_TYPE(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; + } + } } 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 index 788fd21..4953b67 100644 --- 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 @@ -43,10 +43,14 @@ public class BfDataObject extends BaseBean { @ApiParam(value ="数据表名") private String objectTableName; - @Column(name="OBJECT_CONTENT") + @Column(name="OBJECT_CONTENT",columnDefinition="TEXT") @ApiParam(value ="数据内容") private String objectContent; + @Column(name="OBJECT_STATUS") + @ApiParam(value ="表状态(是否同步)") + private Integer objectStatus; + @Column(name="OBJECT_TYPE") @ApiParam(value ="数据类型") private Integer objectType; @@ -63,4 +67,5 @@ public class BfDataObject extends BaseBean { @ApiParam(value = "数据对象属性") @AnnoOutputColumn(hidden = true) private List propertyList; + } 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 index 5f6c074..fbedb77 100644 --- 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 @@ -64,6 +64,10 @@ public class BfDataObjectProperty extends BaseBean { @ApiParam(value ="属性类型") private Integer propertyType; + @Column(name="PROPERTY_TYPE_NAME_RDD") + @ApiParam(value ="属性类型名称") + private String propertyTypeNameRdd; + @Column(name="PROPERTY_DESCRIPTION") @ApiParam(value ="属性描述") private String propertyDescription; diff --git a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElementPropertyVirtual.java b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElementPropertyVirtual.java index 01ccdb7..00e71ce 100644 --- a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElementPropertyVirtual.java +++ b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElementPropertyVirtual.java @@ -38,7 +38,7 @@ public class BfElementPropertyVirtual extends BaseBean { @JsonSerialize(using = ToStringSerializer.class) private Long elementId; - @Column(name = "PROPERTY_VIRTUAL_TYPE") + @Column(name = "PROPERTY_VIRTUAL_OPERATE_TYPE") @ApiParam(value = "虚拟元素类型") private Integer propertyVirtualType; diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/SqlColumnModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/SqlColumnModel.java new file mode 100644 index 0000000..9c50dec --- /dev/null +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/SqlColumnModel.java @@ -0,0 +1,57 @@ +package cn.estsh.i3plus.pojo.model.form; + +import io.swagger.annotations.ApiParam; +import lombok.Data; + +/** + * @Description : + * @Reference : + * @Author : Adair Peng + * @CreateDate : 2019-03-22 17:17 + * @Modify: + **/ +@Data +public class SqlColumnModel { +// isAutoIncrement true isNullable 0 isSigned true getColumnDisplaySize 11 getColumnLabel id getColumnName id getSchemaName getPrecision 11 getScale 0 getTableName test getColumnType 4 getColumnTypeName INT getColumnClassName java.lang.Integer +// isAutoIncrement false isNullable 1 isSigned false getColumnDisplaySize 50 getColumnLabel name getColumnName name getSchemaName getPrecision 50 getScale 0 getTableName test getColumnType 12 getColumnTypeName VARCHAR getColumnClassName java.lang.String +// isAutoIncrement false isNullable 1 isSigned true getColumnDisplaySize 11 getColumnLabel age getColumnName age getSchemaName getPrecision 11 getScale 0 getTableName test getColumnType 4 getColumnTypeName INT getColumnClassName java.lang.Integer +// isAutoIncrement false isNullable 1 isSigned false getColumnDisplaySize 19 getColumnLabel date_time getColumnName date_time getSchemaName getPrecision 19 getScale 0 getTableName test getColumnType 93 getColumnTypeName TIMESTAMP getColumnClassName java.sql.Timestamp +// isAutoIncrement false isNullable 0 isSigned true getColumnDisplaySize 11 getColumnLabel test_num_not_null getColumnName test_num_not_null getSchemaName getPrecision 11 getScale 0 getTableName test getColumnType 4 getColumnTypeName INT getColumnClassName java.lang.Integer +// isAutoIncrement false isNullable 1 isSigned true getColumnDisplaySize 11 getColumnLabel test_unique getColumnName test_unique getSchemaName getPrecision 11 getScale 0 getTableName test getColumnType 4 getColumnTypeName INT getColumnClassName java.lang.Integer +// isAutoIncrement false isNullable 1 isSigned true getColumnDisplaySize 11 getColumnLabel test_comment getColumnName test_comment getSchemaName getPrecision 11 getScale 0 getTableName test getColumnType 4 getColumnTypeName INT getColumnClassName java.lang.Integer +// isAutoIncrement false isNullable 1 isSigned false getColumnDisplaySize 500 getColumnLabel test_string_1000 getColumnName test_string_1000 getSchemaName getPrecision 500 getScale 0 getTableName test getColumnType 12 getColumnTypeName VARCHAR getColumnClassName java.lang.String +// isAutoIncrement false isNullable 1 isSigned true getColumnDisplaySize 4 getColumnLabel test_double getColumnName test_double getSchemaName getPrecision 4 getScale 2 getTableName test getColumnType 8 getColumnTypeName DOUBLE getColumnClassName java.lang.Double + // 是否自增 + @ApiParam(value = "是否自增") + private Integer isAutoIncrement; + // 是否允许为空 + @ApiParam(value = "是否允许为空") + private Integer isNullable; + // 是否是对象 + @ApiParam(value = "是否是对象") + private Integer isSigned; + // 字段名称 + @ApiParam(value = "字段名称") + private String columnName; + // 字段长度 + @ApiParam(value = "字段长度") + private Integer precision; + // 字段精确长度 + @ApiParam(value = "字段精确长度") + private Integer scale; + // 字段类型编号 + @ApiParam(value = "字段类型编号") + private Integer columnType; + // 字段类型名称 + @ApiParam(value = "字段类型名称") + private String columnTypeName; + // 字段Java 类型 + @ApiParam(value = "字段Java 类型") + private String columnClassName; + // 字段Java 类型 + @ApiParam(value = "枚举:BlockFormEnumUtil.PROPERTY_TYPE") + private Integer columnClassType; + + + +} diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/SqlCreateDllModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/SqlCreateDllModel.java new file mode 100644 index 0000000..ac7da8e --- /dev/null +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/SqlCreateDllModel.java @@ -0,0 +1,31 @@ +package cn.estsh.i3plus.pojo.model.form; + +import io.swagger.annotations.ApiParam; +import lombok.Data; + +import java.util.List; +import java.util.Objects; + +/** + * @Description : + * @Reference : + * @Author : Adair Peng + * @CreateDate : 2019-03-22 16:40 + * @Modify: + **/ +@Data +public class SqlCreateDllModel { + + private String tableCat; + private String tableSchem; + private String tableName; + private Integer tableType; + private String tableTypeName; + private String remarks; + private String typeCat; + private String typeName; + private String selfReferencingColName; + private String refGeneration; + + List columnlist ; +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsASNMaster.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsASNMaster.java index 739b65d..c61f2c7 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsASNMaster.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsASNMaster.java @@ -69,4 +69,20 @@ public class WmsASNMaster extends BaseBean { @ApiParam("ASN详情列表") @Transient public List asnMasterDetailsList; + + @Transient + @ApiParam(value = "发运单号") + private String shipOrderNo; + + @Transient + @ApiParam(value = "打印时间") + private String printDate; + + @Transient + @ApiParam(value = "发货人") + private String sendUser; + + @Transient + @ApiParam(value = "发货日期") + private String sendDate; } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java index caaad9d..afe6d77 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java @@ -12,6 +12,7 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; +import javax.persistence.Transient; /** * @Description :移库单明细实体(用于转储类业务) @@ -138,4 +139,12 @@ public class WmsDocMovementDetails extends BaseBean { @Column(name = "DEST_AREA_NO") @ApiParam("目的库存地代码") public String destAreaNo; + + @Transient + @ApiParam("推荐批次") + private String recommondLot; + + @Transient + @ApiParam("推荐库位") + private String recommondLocateNo; } 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 72e0030..56da324 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 @@ -112,4 +112,20 @@ public class WmsDocMovementMaster extends BaseBean { @Column(name = "IS_PART") @ApiParam(value = "是否散件") private Integer isPart; + + @Transient + @ApiParam(value = "发运单号") + private String shipOrderNo; + + @Transient + @ApiParam(value = "打印时间") + private String printDate; + + @Transient + @ApiParam(value = "发货人") + private String sendUser; + + @Transient + @ApiParam(value = "发货日期") + private String sendDate; } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsLocate.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsLocate.java index f847e67..f5eabd7 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsLocate.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsLocate.java @@ -21,85 +21,85 @@ import javax.persistence.Table; **/ @Data @Entity -@Table(name="WMS_LOCATE") +@Table(name = "WMS_LOCATE") @DynamicInsert @DynamicUpdate @EqualsAndHashCode(callSuper = true) -@Api(value="库位表",description = "库位表") +@Api(value = "库位表", description = "库位表") public class WmsLocate extends BaseBean { - @Column(name="LOCATE_NO") - @ApiParam(value ="库位代码") + @Column(name = "LOCATE_NO") + @ApiParam(value = "库位代码") private String locateNo; - @Column(name="LOCATE_NAME") - @ApiParam(value ="库位名称") + @Column(name = "LOCATE_NAME") + @ApiParam(value = "库位名称") private String locateName; /** * 库位类型:10=收货库,20=基础库,30=机动库,40=组合库,50=线边库,60=NC库,70=溢料,80=在途库位 */ - @Column(name="LOCATE_TYPE") - @ApiParam(value ="库位类型") + @Column(name = "LOCATE_TYPE") + @ApiParam(value = "库位类型") private Integer locateType; - @Column(name="WH_NO") - @ApiParam(value ="仓库代码") + @Column(name = "WH_NO") + @ApiParam(value = "仓库代码") private String whNo; - @Column(name="ZONE_NO") - @ApiParam(value ="存储区代码") + @Column(name = "ZONE_NO") + @ApiParam(value = "存储区代码") private String zoneNo; - @Column(name="X") - @ApiParam(value ="X", example = "-1") + @Column(name = "X") + @ApiParam(value = "X", example = "-1") private Integer x; - @Column(name="Y") - @ApiParam(value ="Y", example = "-1") + @Column(name = "Y") + @ApiParam(value = "Y", example = "-1") private Integer y; - @Column(name="Z") - @ApiParam(value ="Z", example = "-1") + @Column(name = "Z") + @ApiParam(value = "Z", example = "-1") private Integer z; - @Column(name="SEQ") - @ApiParam(value ="序号", example = "-1") + @Column(name = "SEQ") + @ApiParam(value = "序号", example = "-1") private Integer seq; - @Column(name="STATUS") - @ApiParam(value ="库位状态", example = "-1") + @Column(name = "STATUS") + @ApiParam(value = "库位状态", example = "-1") private Integer status; - @Column(name="MAX_PACKAGE_QTY") - @ApiParam(value ="最大包装数量", example = "-1") + @Column(name = "MAX_PACKAGE_QTY") + @ApiParam(value = "最大包装数量", example = "-1") private Integer maxPackageQty; - @Column(name="MAX_PART_QTY") - @ApiParam(value ="最大零件数量", example = "-1") - private Integer maxPartQty; + @Column(name = "MAX_PART_QTY") + @ApiParam(value = "最大零件数量", example = "-1") + private Double maxPartQty; - @Column(name="STOCK_UNIT") - @ApiParam(value ="存放单位") + @Column(name = "STOCK_UNIT") + @ApiParam(value = "存放单位") private String stockUnit; - @Column(name="LINE_CODE") - @ApiParam(value ="生产线") + @Column(name = "LINE_CODE") + @ApiParam(value = "生产线") private String lineCode; - @Column(name="BOX_QTY") - @ApiParam(value ="箱数", example = "-1") + @Column(name = "BOX_QTY") + @ApiParam(value = "箱数", example = "-1") private Integer boxQty; - @Column(name="PART_QTY") - @ApiParam(value ="零件数", example = "-1") - private Integer partQty; + @Column(name = "PART_QTY") + @ApiParam(value = "零件数", example = "-1") + private Double partQty; public Integer getMaxPackageQty() { return this.maxPackageQty == null ? 0 : this.maxPackageQty; } - public Integer getMaxPartQty() { + public Double getMaxPartQty() { return this.maxPartQty == null ? 0 : this.maxPartQty; } @@ -107,7 +107,8 @@ public class WmsLocate extends BaseBean { return this.boxQty == null ? 0 : this.boxQty; } - public Integer getPartQty() { + public Double getPartQty() { return this.partQty == null ? 0 : this.partQty; } + } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsLocatePart.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsLocatePart.java index fa26efe..bb0d888 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsLocatePart.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsLocatePart.java @@ -51,4 +51,12 @@ public class WmsLocatePart extends BaseBean{ @Column(name = "MIN") @ApiParam(value = "最小值", example = "0") private Double min; + + @Column(name = "IS_GENERATE_PICKLIST") + @ApiParam(value = "是否生成领料单", example = "2") + private Integer isGeneratePicklist; + + public Integer getIsGeneratePicklist() { + return this.isGeneratePicklist == null ? 0 : this.isGeneratePicklist; + } } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMaster.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMaster.java index a1bc44b..1d95450 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMaster.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMaster.java @@ -87,4 +87,20 @@ public class WmsPOMaster extends BaseBean { @ApiParam("PO明细列表信息") @Transient public List poDetailList; + + @Transient + @ApiParam(value = "发运单号") + private String shipOrderNo; + + @Transient + @ApiParam(value = "打印时间") + private String printDate; + + @Transient + @ApiParam(value = "发货人") + private String sendUser; + + @Transient + @ApiParam(value = "发货日期") + private String sendDate; } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMasterDetails.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMasterDetails.java index 364199b..6377255 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMasterDetails.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPOMasterDetails.java @@ -12,6 +12,7 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; +import javax.persistence.Transient; /** * @Description : PO订单明细信息 @@ -45,6 +46,8 @@ public class WmsPOMasterDetails extends BaseBean { @ApiParam(value = "需求数量", example = "0") public Double qty; + public Double getQty(){ return this.qty == null ? 0 : this.qty; } + @Column(name = "UNIT") @ApiParam("单位") public String unit; @@ -58,21 +61,29 @@ public class WmsPOMasterDetails extends BaseBean { @ApiParam(value = "条码打印数量", example = "0") public Double printQty; + public Double getPrintQty(){ return this.printQty == null ? 0 : this.printQty; } + @Column(name = "RC_QTY") @ColumnDefault("0") @ApiParam(value = "收货数量", example = "0") public Double rcQty; + public Double getRcQty(){ return this.rcQty == null ? 0 : this.rcQty; } + @Column(name = "PASS_QTY") @ColumnDefault("0") @ApiParam(value = "质检合格数量", example = "0") public Double passQty; + public Double getPassQty(){ return this.passQty == null ? 0 : this.passQty; } + @Column(name = "NG_QTY") @ColumnDefault("0") @ApiParam(value = "质检不合格数量", example = "0") public Double ngQty; + public Double getNgQty(){ return this.ngQty == null ? 0 : this.ngQty; } + @Column(name = "PLAN_DATE") @ApiParam("计划交货日期") public String planDate; @@ -81,9 +92,9 @@ public class WmsPOMasterDetails extends BaseBean { @ApiParam("计划交货时间") public String planTime; - @Column(name = "ERP_WH_NO") + @Column(name = "ERP_AREA_NO") @ApiParam("默认收货库存地") - public String erpWhNo; + public String erpAreaNo; /** * 状态:10 N=正常,20 C=行取消 @@ -102,4 +113,11 @@ public class WmsPOMasterDetails extends BaseBean { @Column(name = "IS_FREE") @ApiParam(value = "是否免费", example = "1") public Integer isFree; + + @Transient + @ApiParam(value = "散件收货输入数量", example = "0") + public Double inputRcQty; + + + public Double getInputRcQty(){ return this.inputRcQty == null ? 0 : this.inputRcQty; } } 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 48154b2..f0746fc 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 @@ -107,6 +107,10 @@ public class WmsPart extends BaseBean { @ApiParam(value ="批次校验规则") private String lotCheckRule; + @Column(name="SN_CONTROL") + @ApiParam(value ="是否条码管理",example = "1") + private Integer snControl; + @Column(name="IN_LOCATE_NO") @ApiParam(value ="默认入库库位") private String inLocateNo; diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTaskDetails.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTaskDetails.java index 0834489..34b8db4 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTaskDetails.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTaskDetails.java @@ -85,6 +85,13 @@ public class WmsTaskDetails extends BaseBean { @ApiParam(value = "状态", example = "1") private Integer itemStatus; + public Integer getItemStatus(){ + if(itemStatus == null) { + return null; + } + return itemStatus.intValue(); + } + @Column(name = "SRC_ZONE_NO") @ApiParam(value = "源存储区代码") private String srcZoneNo; diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java index c3d8101..5eb33ca 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/sqlpack/WmsHqlPack.java @@ -152,6 +152,31 @@ public class WmsHqlPack { } /** + * PO订单主表信息 分页查询(散件) + * + * @param wmsPOMaster + * @return + */ + public static String packHqlWmsPOMasterPart(WmsPOMaster wmsPOMaster) { + StringBuffer result = new StringBuffer(); + + //查询参数封装 + HqlPack.getInPack(String.join(",", WmsEnumUtil.RC_ORDER_STATUS.CREATE.getValue() + "", + WmsEnumUtil.RC_ORDER_STATUS.RECEIPT.getValue() + ""),"poStatus",result); + HqlPack.getNumEqualPack(wmsPOMaster.getIsPart(),"isPart", result); + HqlPack.getStringEqualPack(wmsPOMaster.getOrderNo(), "orderNo", result); + HqlPack.getStringEqualPack(wmsPOMaster.getPoType(), "poType", result); + HqlPack.getNumEqualPack(wmsPOMaster.getPoStatus(), "poStatus", result); + HqlPack.getStringEqualPack(wmsPOMaster.getVendorNo(), "vendorNo", result); + HqlPack.getStringEqualPack(wmsPOMaster.getSrc(), "src", result); + HqlPack.getStringEqualPack(wmsPOMaster.getIsAsn(), "isAsn", result); + + getStringBuilderPack(wmsPOMaster, result); + + return result.toString(); + } + + /** * 物流路线子表查询条件封装 * * @param routingCode