|
|
|
@ -13,13 +13,205 @@ public class MesEnumUtil {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* mes 操作类型
|
|
|
|
|
* mes 工位类型
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum MES_IS_REPEAT {
|
|
|
|
|
|
|
|
|
|
REPEATABLE(1, "可重复"),
|
|
|
|
|
NOT_REPEAT(2, "不可重复");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
MES_IS_REPEAT(int value, String description) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 根据value返回枚举类型,主要在switch中使用
|
|
|
|
|
public static MES_IS_REPEAT getByValue(int value) {
|
|
|
|
|
for (MES_IS_REPEAT mesInsertExcel : values()) {
|
|
|
|
|
if (mesInsertExcel.getValue() == value) {
|
|
|
|
|
return mesInsertExcel;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_WORK_CELL_TYPE {
|
|
|
|
|
|
|
|
|
|
NORMAL(1, "正常"),
|
|
|
|
|
REWORK(2, "返修");
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 根据value返回枚举类型,主要在switch中使用
|
|
|
|
|
public static MES_WORK_CELL_TYPE getByValue(int value) {
|
|
|
|
|
for (MES_WORK_CELL_TYPE mesInsertExcel : values()) {
|
|
|
|
|
if (mesInsertExcel.getValue() == value) {
|
|
|
|
|
return mesInsertExcel;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* pcn 动作类型
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum MES_ACTION_TYPE {
|
|
|
|
|
|
|
|
|
|
BIND(1, "绑定"),
|
|
|
|
|
UNTYING(2, "解绑");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
MES_ACTION_TYPE(int value, String description) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 根据value返回枚举类型,主要在switch中使用
|
|
|
|
|
public static MES_ACTION_TYPE getByValue(int value) {
|
|
|
|
|
for (MES_ACTION_TYPE mesInsertExcel : values()) {
|
|
|
|
|
if (mesInsertExcel.getValue() == value) {
|
|
|
|
|
return mesInsertExcel;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* pcn 是否是关键件
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum MES_IS_KEY {
|
|
|
|
|
|
|
|
|
|
IS_KEY(1, "是"),
|
|
|
|
|
NO_KEY(2, "否");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
MES_IS_KEY(int value, String description) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 根据value返回枚举类型,主要在switch中使用
|
|
|
|
|
public static MES_IS_KEY getByValue(int value) {
|
|
|
|
|
for (MES_IS_KEY mesInsertExcel : values()) {
|
|
|
|
|
if (mesInsertExcel.getValue() == value) {
|
|
|
|
|
return mesInsertExcel;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_REPAIR_STATUS {
|
|
|
|
|
|
|
|
|
|
REPAIRED(1, "已维修"),
|
|
|
|
|
NO_REPAIR(2, "未维修");
|
|
|
|
|
NO_REPAIR(2, "待维修");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
@ -66,7 +258,11 @@ public class MesEnumUtil {
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum MES_OPERATE_TYPE {
|
|
|
|
|
|
|
|
|
|
MES_QUALITY_JUDGEMENT(10, "质量判定");
|
|
|
|
|
WORKSTATION_SCAN(1, "工位扫描"),
|
|
|
|
|
QUALITY_JUDGEMENT(2, "质量判定"),
|
|
|
|
|
MATERIAL_DISMANTLING(3, "物料拆解"),
|
|
|
|
|
REWORK(4, "返修作业"),
|
|
|
|
|
WORKSTATION_MONITORING(5, "工位监控");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
@ -791,7 +987,8 @@ public class MesEnumUtil {
|
|
|
|
|
|
|
|
|
|
PASS(1, "合格"),
|
|
|
|
|
FAIL(2, "不合格"),
|
|
|
|
|
SCRAP(3, "报废");
|
|
|
|
|
SCRAP(3, "报废"),
|
|
|
|
|
DISMANTLED(4, "已拆解");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|