异常发送消息
parent
f7f56bb43e
commit
f84ade0111
@ -0,0 +1,221 @@
|
||||
package com.foreverwin.mesnac.common.enums;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author zhaojiawei
|
||||
* @Since 2021-08-19
|
||||
*/
|
||||
public enum AnomalyConstant {
|
||||
;
|
||||
public enum Status {
|
||||
STATUS1("N","新建"),
|
||||
STATUS2("X","响应中"),
|
||||
STATUS3("F","方案确认"),
|
||||
STATUS4("J","纠防确认"),
|
||||
STATUS5("Q","取消"),
|
||||
STATUS6("G","关闭");
|
||||
|
||||
private String code;
|
||||
private String msg;
|
||||
|
||||
Status(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public static String msg(String code) {
|
||||
Status[] statuses = values();
|
||||
for (Status status : statuses) {
|
||||
if (status.getCode().equals(code)) {
|
||||
return status.getMsg();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
|
||||
public enum Type{
|
||||
Type1("Q","其他"),
|
||||
Type2("Z","质量"),
|
||||
Type3("S","设备");
|
||||
|
||||
private String code;
|
||||
private String msg;
|
||||
|
||||
Type(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public static String msg(String code) {
|
||||
Type[] types = values();
|
||||
for (Type type : types) {
|
||||
if (type.getCode().equals(code)) {
|
||||
return type.getMsg();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
|
||||
public enum Discover{
|
||||
Discover1("Z","自制"),
|
||||
Discover2("W","外协"),
|
||||
Discover3("D","到货"),
|
||||
Discover4("K","客户");
|
||||
|
||||
|
||||
private String code;
|
||||
private String msg;
|
||||
|
||||
Discover(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public static String msg(String code) {
|
||||
Discover[] discovers = values();
|
||||
for (Discover discover : discovers) {
|
||||
if (discover.getCode().equals(code)) {
|
||||
return discover.getMsg();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
|
||||
public enum ReportFrom{
|
||||
ReportFrom1("B","自报"),
|
||||
ReportFrom2("J","质检"),
|
||||
ReportFrom3("R","设备人员"),
|
||||
ReportFrom4("Z","设备自动"),
|
||||
ReportFrom5("C","维修自查"),
|
||||
ReportFrom6("Y","工艺");
|
||||
|
||||
|
||||
|
||||
private String code;
|
||||
private String msg;
|
||||
|
||||
ReportFrom(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public static String msg(String code) {
|
||||
ReportFrom[] reportFroms = values();
|
||||
for (ReportFrom reportFrom : reportFroms) {
|
||||
if (reportFrom.getCode().equals(code)) {
|
||||
return reportFrom.getMsg();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
|
||||
public enum ShutDown{
|
||||
ShutDown1("Y","是"),
|
||||
ShutDown2("N","否");
|
||||
|
||||
|
||||
|
||||
private String code;
|
||||
private String msg;
|
||||
|
||||
ShutDown(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public static String msg(String code) {
|
||||
ShutDown[] shutDowns = values();
|
||||
for (ShutDown shutDown : shutDowns) {
|
||||
if (shutDown.getCode().equals(code)) {
|
||||
return shutDown.getMsg();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue