【1092 返厂返修增加枚举】

yun-zuoyi
jokelone 6 years ago
parent d99ad6c44a
commit a5609d97fb

@ -13,6 +13,79 @@ import org.apache.commons.lang3.StringUtils;
public class MesPcnEnumUtil {
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_WORK_CELL_TYPE {
NORMAL(10, "正常"),
REWORK(20, "返修");
private int value;
private String description;
MES_WORK_CELL_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
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;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_PRODUCE_SN_RESULT {
OK(10, "OK");
private int value;
private String description;
MES_PRODUCE_SN_RESULT(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
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;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)

@ -95,6 +95,14 @@ public class MesProcessBom extends BaseBean {
@ApiParam("显示颜色")
private String color;
@Transient
@ApiParam("关键件代码")
private String keyBarCode;
@Transient
@ApiParam("产品条码")
private String serialNumber;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;

@ -73,4 +73,15 @@ public class MesQcCheckStandard extends BaseBean {
@ApiParam("检测值")
private String checkValue;
public MesQcCheckStandard(String partNo, String workCenterCode, String workCellCode, Integer checkType, String checkItem, String checkStandard, String checkGuide, String checkFrequency, String partName) {
this.partNo = partNo;
this.workCenterCode = workCenterCode;
this.workCellCode = workCellCode;
this.checkType = checkType;
this.checkItem = checkItem;
this.checkStandard = checkStandard;
this.checkGuide = checkGuide;
this.checkFrequency = checkFrequency;
this.partName = partName;
}
}

Loading…
Cancel
Save