|
|
|
@ -14,6 +14,101 @@ public class MesEnumUtil {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Mes 对象结构是否保存
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum ORGANIZATION_INIT_DATA {
|
|
|
|
|
|
|
|
|
|
MES_CONFIG("MesConfig", "MES_CONFIG", "配置表"),
|
|
|
|
|
MES_NUMBER_RULE("MesNumberRule", "MES_NUMBER_RULE", "编码规则表"),
|
|
|
|
|
MES_STEP("MesStep", "MES_STEP", "工步"),
|
|
|
|
|
MES_STEP_PARAM("MesStepParam", "MES_STEP_PARAM", "工步参数表"),
|
|
|
|
|
MES_PCN_SYNC_CFG("MesPcnSyncCfg", "MES_PCN_SYNC_CFG", "同步配置"),
|
|
|
|
|
MES_BUTTON_STATUS("MesButtonStatus", "MES_BUTTON_STATUS", "按钮状态配置表"),
|
|
|
|
|
MES_WORK_CELL_PARAM("MesWorkCellParam", "MES_WORK_CELL_PARAM", "工作单元参数"),
|
|
|
|
|
MES_STATUS_CFG("MesStatusCfg", "MES_STATUS_CFG", "状态配置"),
|
|
|
|
|
MES_EVENT("MesEvent", "MES_EVENT", "事件清单"),
|
|
|
|
|
MES_METHOD("MesMethod", "MES_METHOD", "方法清单"),
|
|
|
|
|
MES_ACTION("MesAction", "MES_ACTION", "动作"),
|
|
|
|
|
MES_EVENT_ACTION("MesEventAction", "MES_EVENT_ACTION", "事件动作配置"),
|
|
|
|
|
MES_ACTION_METHOD("MesActionMethod", "MES_ACTION_METHOD", "动作方法配置");
|
|
|
|
|
|
|
|
|
|
private String value;
|
|
|
|
|
private String code;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
ORGANIZATION_INIT_DATA(String value, String code, String description) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.code = code;
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getValue() {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return description;
|
|
|
|
|
}
|
|
|
|
|
// 根据value返回枚举类型,主要在switch中使用
|
|
|
|
|
public static ORGANIZATION_INIT_DATA getByValue(String value) {
|
|
|
|
|
for (ORGANIZATION_INIT_DATA mesInsertExcel : values()) {
|
|
|
|
|
if (mesInsertExcel.getValue().equals(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.equals(val)) {
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Mes 对象结构是否保存
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum OBJECT_CFG_IS_SAVE {
|
|
|
|
|
|
|
|
|
|
SAVE(1, "存储"),
|
|
|
|
|
NO_SAVE(2, "不存储");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
OBJECT_CFG_IS_SAVE(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)
|
|
|
|
|