【bug:6483】

yun-zuoyi
王杰 6 years ago
parent 407fdbf217
commit 3c3de49512

@ -375,21 +375,21 @@ public class MesEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_MATCH_TYPE { public enum MES_MATCH_TYPE {
ORGANIZATION("10", "工厂"), ORGANIZATION(10, "工厂"),
PART("20", "物料"), PART(20, "物料"),
CUST_CODE("30", "客户代码"), CUST_CODE(30, "客户代码"),
CUST_PART_NO("40", "客户物料号"), CUST_PART_NO(40, "客户物料号"),
WORK_CENTER("50", "产线"); WORK_CENTER(50, "产线");
private String value; private int value;
private String description; private String description;
MES_MATCH_TYPE(String value, String description) { MES_MATCH_TYPE(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
public String getValue() { public int getValue() {
return value; return value;
} }
@ -397,7 +397,7 @@ public class MesEnumUtil {
return description; return description;
} }
public static String valueOfDescription(String val) { public static String valueOfDescription(int val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) { if (values()[i].value == val) {
@ -414,19 +414,19 @@ public class MesEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_CODE_TYPE { public enum MES_CODE_TYPE {
SERIAL_SN("10", "过程条码"), SERIAL_SN(10, "过程条码"),
PRODUCT_SN("20", "产品条码"), PRODUCT_SN(20, "产品条码"),
PACK_SN("30", "包装条码"); PACK_SN(30, "包装条码");
private String value; private int value;
private String description; private String description;
MES_CODE_TYPE(String value, String description) { MES_CODE_TYPE(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
public String getValue() { public int getValue() {
return value; return value;
} }
@ -434,7 +434,7 @@ public class MesEnumUtil {
return description; return description;
} }
public static String valueOfDescription(String val) { public static String valueOfDescription(int val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) { if (values()[i].value == val) {

@ -142,21 +142,21 @@ public class MesPcnEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_MATCH_TYPE { public enum MES_MATCH_TYPE {
ORGANIZATION("10", "工厂"), ORGANIZATION(10, "工厂"),
PART("20", "物料"), PART(20, "物料"),
CUST_CODE("30", "客户代码"), CUST_CODE(30, "客户代码"),
CUST_PART_NO("40", "客户物料号"), CUST_PART_NO(40, "客户物料号"),
WORK_CENTER("50", "产线"); WORK_CENTER(50, "产线");
private String value; private int value;
private String description; private String description;
MES_MATCH_TYPE(String value, String description) { MES_MATCH_TYPE(int value, String description) {
this.value = value; this.value = value;
this.description = description; this.description = description;
} }
public String getValue() { public int getValue() {
return value; return value;
} }
@ -164,7 +164,7 @@ public class MesPcnEnumUtil {
return description; return description;
} }
public static String valueOfDescription(String val) { public static String valueOfDescription(int val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) { if (values()[i].value == val) {
@ -175,9 +175,9 @@ public class MesPcnEnumUtil {
} }
// 根据value返回枚举类型,主要在switch中使用 // 根据value返回枚举类型,主要在switch中使用
public static MES_MATCH_TYPE getByValue(String value) { public static MES_MATCH_TYPE getByValue(int value) {
for (MES_MATCH_TYPE mesMatchType : values()) { for (MES_MATCH_TYPE mesMatchType : values()) {
if (mesMatchType.getValue().equals(value)) { if (mesMatchType.getValue() == value) {
return mesMatchType; return mesMatchType;
} }
} }

@ -75,15 +75,15 @@ public class MesPart extends BaseBean {
@Column(name = "PROCESS_MATCH_TYPE") @Column(name = "PROCESS_MATCH_TYPE")
@ApiParam("过程编码匹配类型") @ApiParam("过程编码匹配类型")
private String processMatchType; private Integer processMatchType;
@Column(name = "PACKAGE_MATCH_TYPE") @Column(name = "PACKAGE_MATCH_TYPE")
@ApiParam("包装编码匹配类型") @ApiParam("包装编码匹配类型")
private String packageMatchType; private Integer packageMatchType;
@Column(name = "PRODUCT_MATCH_TYPE") @Column(name = "PRODUCT_MATCH_TYPE")
@ApiParam("产品编码匹配类型") @ApiParam("产品编码匹配类型")
private String productMatchType; private Integer productMatchType;
@Transient @Transient
@ApiParam("分类名称") @ApiParam("分类名称")

@ -79,13 +79,13 @@ public class MesPart extends BaseBean {
@Column(name = "PROCESS_MATCH_TYPE") @Column(name = "PROCESS_MATCH_TYPE")
@ApiParam("过程编码匹配类型") @ApiParam("过程编码匹配类型")
private String processMatchType; private Integer processMatchType;
@Column(name = "PACKAGE_MATCH_TYPE") @Column(name = "PACKAGE_MATCH_TYPE")
@ApiParam("包装编码匹配类型") @ApiParam("包装编码匹配类型")
private String packageMatchType; private Integer packageMatchType;
@Column(name = "PRODUCT_MATCH_TYPE") @Column(name = "PRODUCT_MATCH_TYPE")
@ApiParam("产品编码匹配类型") @ApiParam("产品编码匹配类型")
private String productMatchType; private Integer productMatchType;
} }

@ -30,11 +30,11 @@ public class MesProductEncodeCfg extends BaseBean {
@Column(name = "CODE_TYPE") @Column(name = "CODE_TYPE")
@ApiParam("编码类型") @ApiParam("编码类型")
private String codeType; private Integer codeType;
@Column(name = "MATCH_TYPE") @Column(name = "MATCH_TYPE")
@ApiParam("匹配类型") @ApiParam("匹配类型")
private String matchType; private Integer matchType;
@Column(name = "MATCH_VALUE") @Column(name = "MATCH_VALUE")
@ApiParam("匹配值") @ApiParam("匹配值")

Loading…
Cancel
Save