yun-zuoyi
柯裕 6 years ago
commit 913dcae75f

@ -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);
}
}
/**

@ -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);
}
}
}

@ -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;
}
}
}

@ -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);}

@ -1440,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");
MOVEMENT(20, "MOVEMENT"),
ASN(30, "ASN");
private int value;
private String description;

@ -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<BfDataObjectProperty> propertyList;
}

@ -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;

@ -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;

@ -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;
}

@ -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<SqlColumnModel> columnlist ;
}

@ -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=NC70=,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")
@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;
}

Loading…
Cancel
Save