|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package cn.estsh.i3plus.pojo.base.enumutil;
|
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Description :
|
|
|
|
@ -350,14 +351,16 @@ public class MesPcnEnumUtil {
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum WORK_CENTER_RUNNING_STATUS {
|
|
|
|
|
|
|
|
|
|
RUNNING(1, "开线"),
|
|
|
|
|
STOPPED(2, "停线");
|
|
|
|
|
RUNNING(1, "start", "开线"),
|
|
|
|
|
STOPPED(2, "stop", "停线");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String code;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
WORK_CENTER_RUNNING_STATUS(int value, String description) {
|
|
|
|
|
WORK_CENTER_RUNNING_STATUS(int value, String code, String description) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.code = code;
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -365,6 +368,10 @@ public class MesPcnEnumUtil {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getCode() {
|
|
|
|
|
return code;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return description;
|
|
|
|
|
}
|
|
|
|
@ -378,6 +385,16 @@ public class MesPcnEnumUtil {
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -386,10 +403,10 @@ public class MesPcnEnumUtil {
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum WC_CHECK_TYPE {
|
|
|
|
|
|
|
|
|
|
PERSON(10, "person", "人"),
|
|
|
|
|
EQUIPMENT(20, "equipment", "机"),
|
|
|
|
|
MATERIAL(30, "material", "料"),
|
|
|
|
|
ROUTE(40, "route", "法"),
|
|
|
|
|
PERSON(10, "people", "人"),
|
|
|
|
|
EQUIPMENT(20, "equipments", "设备"),
|
|
|
|
|
MATERIAL(30, "materials", "物料"),
|
|
|
|
|
ROUTE(40, "routes", "工艺"),
|
|
|
|
|
ONLINE_SIGNAL(50, "onlineSignal", "开线信号");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
@ -423,6 +440,16 @@ public class MesPcnEnumUtil {
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -498,4 +525,639 @@ public class MesPcnEnumUtil {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 设备连接类型
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum EQP_CONNECT_TYPE {
|
|
|
|
|
|
|
|
|
|
PLC(10, "PLC"),
|
|
|
|
|
DB(20, "DB"),
|
|
|
|
|
OTHER(30, "OTHER");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
EQP_CONNECT_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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 数据库操作类型 开线检查的模块
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum DB_OPERATION_TYPE {
|
|
|
|
|
|
|
|
|
|
INSERT(10, "insert", "新增"),
|
|
|
|
|
SELECT(20, "select", "查询"),
|
|
|
|
|
UPDATE(30, "update", "更新");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String code;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
DB_OPERATION_TYPE(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 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 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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 数据库连接方式
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum DATA_SOURCE_TYPE {
|
|
|
|
|
SOURCE_MARIA_DB(10, "MariaDB", "MariaDB 10.1","com.mysql.jdbc.Driver",3306,null),
|
|
|
|
|
SOURCE_SQL_SERVER(20, "SQL Server", "SQL Server 2017","com.microsoft.sqlserver.jdbc.SQLServerDriver",1433,"dbo"),
|
|
|
|
|
SOURCE_ORACLE(30, "Oracle", "Oralce 12C","oracle.jdbc.driver.OracleDriver",1521,null),
|
|
|
|
|
SOURCE_POSTGRE_SQL(40, "PostgreSql", "PostgreSql 10.5","org.postgresql.Driver",5432,"public");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String code;
|
|
|
|
|
private String description;
|
|
|
|
|
private String driverClassName;
|
|
|
|
|
private int defaultPort;
|
|
|
|
|
private String defaultSchemaPattern;
|
|
|
|
|
|
|
|
|
|
private DATA_SOURCE_TYPE (int value, String code, String description,String driverClassName,int port,String defaultSchemaPattern) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.code = code;
|
|
|
|
|
this.description = description;
|
|
|
|
|
this.driverClassName = driverClassName;
|
|
|
|
|
this.defaultPort = port;
|
|
|
|
|
this.defaultSchemaPattern = defaultSchemaPattern;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getCode() {
|
|
|
|
|
return code;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDriverClassName() {
|
|
|
|
|
return driverClassName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getDefaultPort() {
|
|
|
|
|
return defaultPort;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDefaultSchemaPattern() {
|
|
|
|
|
return defaultSchemaPattern;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)) {
|
|
|
|
|
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 DATA_SOURCE_TYPE 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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getJDBCUrl(String database,String host,Integer port){
|
|
|
|
|
if(this.getValue() == SOURCE_MARIA_DB.getValue()){
|
|
|
|
|
return getJDBCUrlMySQL(database,host,port);
|
|
|
|
|
}else if(this.getValue() == SOURCE_ORACLE.getValue()){
|
|
|
|
|
return getJDBCUrlOracle(database,host,port);
|
|
|
|
|
}else if(this.getValue() == SOURCE_POSTGRE_SQL.getValue()){
|
|
|
|
|
return getJDBCUrlPostgreSQL(database,host,port);
|
|
|
|
|
}else if(this.getValue() == SOURCE_SQL_SERVER.getValue()){
|
|
|
|
|
return getJDBCUrlSQLServer(database,host,port);
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static DATA_SOURCE_TYPE getDataSourceURL(String databaseProductName){
|
|
|
|
|
if(StringUtils.isNotBlank(databaseProductName)){
|
|
|
|
|
if(databaseProductName.indexOf(":mysql:") != -1){
|
|
|
|
|
return SOURCE_MARIA_DB;
|
|
|
|
|
}else if(databaseProductName.indexOf(":oracle:") != -1){
|
|
|
|
|
return SOURCE_ORACLE;
|
|
|
|
|
}else if(databaseProductName.indexOf(":postgresql:") != -1){
|
|
|
|
|
return SOURCE_POSTGRE_SQL;
|
|
|
|
|
}else if(databaseProductName.indexOf(":sqlserver:") != -1){
|
|
|
|
|
return SOURCE_SQL_SERVER;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String getJDBCUrlMySQL(String database,String host,Integer port){
|
|
|
|
|
return "jdbc:mysql://"+host+":"+port+"/"+database+"?autoReconnect=true&useSSL=false&characterEncoding=utf-8";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String getJDBCUrlOracle(String database,String host,Integer port){
|
|
|
|
|
return "jdbc:oracle:thin:@"+host+":"+port+":"+database;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String getJDBCUrlPostgreSQL(String database,String host,Integer port){
|
|
|
|
|
return "jdbc:postgresql://"+host+":"+port+"/"+database;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String getJDBCUrlSQLServer(String database,String host,Integer port){
|
|
|
|
|
return "jdbc:sqlserver://" + host + ":" + port + ";database=" + database;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MesPlanOrder实体对应的status值 计划状态
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum PLAN_ORDER_STATUS {
|
|
|
|
|
|
|
|
|
|
CREATE(10, "CREATED", "创建"),
|
|
|
|
|
DE_COMPOSE_ING(20, "DE_COMPOSE_ING", "分解中"),
|
|
|
|
|
DE_COMPOSE_ED(30, "DE_COMPOSE_ED", "分解完成"),
|
|
|
|
|
CLOSE(40, "CLOSE", "关闭");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String code;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
PLAN_ORDER_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 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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MesWorkOrder实体对应的workOrderStatus值 工单状态
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum WORK_ORDER_STATUS {
|
|
|
|
|
|
|
|
|
|
CREATE(10, "创建"),
|
|
|
|
|
LANDED(20, "下达"),
|
|
|
|
|
OPEN(30, "启动"),
|
|
|
|
|
PAUSE(40, "暂停"),
|
|
|
|
|
CANCEL(50, "取消"),
|
|
|
|
|
CLOSE(60, "关闭");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
WORK_ORDER_STATUS(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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MesWorkOrder实体对应的workOrderType值 工单类型
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum WORK_ORDER_TYPE {
|
|
|
|
|
|
|
|
|
|
STANDARD_ORDER(10, "标准工单"),
|
|
|
|
|
BTS_ORDER(20, "BTS工单"),
|
|
|
|
|
ATTEMPT_ORDER(30, "试制工单");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
WORK_ORDER_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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MesPlanOrder实体对应的planType值 计划类型
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum PLAN_ORDER_TYPE {
|
|
|
|
|
|
|
|
|
|
STANDARD_ORDER(10, "标准");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
PLAN_ORDER_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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Integer descriptionOfValue(String description) {
|
|
|
|
|
Integer tmp = null;
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
if (values()[i].description.equals(description)) {
|
|
|
|
|
tmp = values()[i].value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MesPlanOrder实体对应的source值 计划来源
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum PALN_ORDER_SOURCE {
|
|
|
|
|
|
|
|
|
|
MES("MES", "来源于MES"),
|
|
|
|
|
SAP("SAP", "来源于SAP");
|
|
|
|
|
|
|
|
|
|
private String value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
PALN_ORDER_SOURCE(String value, String description) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String 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.equals(val)) {
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MesWorkOrder实体对应的source值 计划来源
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum WORK_ORDER_SOURCE {
|
|
|
|
|
|
|
|
|
|
MES("MES", "来源于MES"),
|
|
|
|
|
AMES("AMES", "来源于AMES"),
|
|
|
|
|
SAP("SAP", "来源于SAP"),
|
|
|
|
|
CREATE("CREATE", "手工新增"),
|
|
|
|
|
RESOLVE("RESOLVE", "计划分解");
|
|
|
|
|
|
|
|
|
|
private String value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
WORK_ORDER_SOURCE(String value, String description) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String 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.equals(val)) {
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MesQueueOrder实体对应的status值 队列主表状态
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum QUEUE_ORDER_STATUS {
|
|
|
|
|
|
|
|
|
|
NORMAL(10, "正常"),
|
|
|
|
|
ONLINE(20, "已上线"),
|
|
|
|
|
OFFLINE(30, "已下线"),
|
|
|
|
|
CLOSE(40, "已关闭"),
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
QUEUE_ORDER_STATUS(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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MesQueueOrderDetail实体对应的status值 队列详情状态
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum QUEUE_ORDER_DETAIL_STATUS {
|
|
|
|
|
|
|
|
|
|
NORMAL(10, "正常"),
|
|
|
|
|
CLOSE(20, "关闭");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
QUEUE_ORDER_DETAIL_STATUS(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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MesPartCategory实体对应的categoryType值 条码表条码质量状态
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum PART_CATEGORY_TYPE {
|
|
|
|
|
|
|
|
|
|
CATEGORY_ONE("Category1", "类型1"),
|
|
|
|
|
CATEGORY_TWO("Category2", "类型2"),
|
|
|
|
|
CATEGORY_THREE("Category3", "类型3");
|
|
|
|
|
|
|
|
|
|
private String value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
PART_CATEGORY_TYPE(String value, String description) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getValue() {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static String valueOfDescription(String val) {
|
|
|
|
|
String tmp = null;
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
if (val.equals(values()[i].value)) {
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MesWorkOrder实体对应的approvalStatus值 审批状态
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum WORK_ORDER_APPROVAL_STATUS {
|
|
|
|
|
|
|
|
|
|
WAIT_APPROVAL(10, "待审批"),
|
|
|
|
|
COMPLETE_APPROVAL(20, "已审批"),
|
|
|
|
|
REJECT_APPROVAL(30, "驳回");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
WORK_ORDER_APPROVAL_STATUS(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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static String valueOfDescription2(int val) {
|
|
|
|
|
String tmp = null;
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
if (values()[i].value == val) {
|
|
|
|
|
tmp = values()[i].description.equals("已审批") ? "审批" : values()[i].description;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|