安灯看板超时统计功能

yun-zuoyi
crish 6 years ago
parent 759f9ee819
commit a294c1ccb0

@ -181,6 +181,10 @@ public class AndonManageQueue extends BaseManageQueue {
@ApiParam(value = "放行说明")
private String openInfo;
@Column(name = "IS_OVER_TIME")
@ApiParam(value = "是否超时")
private Integer overTimeFlag;
@Transient
@ApiParam(value = "安灯状态集合")
private List<String> statusCodeList;

@ -12,6 +12,123 @@ import org.apache.commons.lang3.StringUtils;
**/
public class AndonEnumUtil {
/**
*
* 10 - 20 - 30 -
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum NOTICE_OVER_TIME_FLAG{
CALL(1,"呼叫超时"),
SIGN(2,"响应超时");
private int value;
private String description;
NOTICE_OVER_TIME_FLAG(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 int descriptionOfValue(String val) {
int tmp = -1;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].description, val)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
* 广
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum BROADCAST_CUSTOM_CONDITION {
CALL("{A}","workCenterCode","产线"),
SIGN("{B}","workCellCode","工位"),
RESOLVE("{C}","alarmCode","安灯类型");
private String value;
private String code;
private String description;
BROADCAST_CUSTOM_CONDITION(String value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public String getValue() {
return value;
}
public String getCode(){ return code; }
public String getDescription() {
return description;
}
public static String valueOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].value, val)) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String codeOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].code, val)) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String descriptionOfValue(String desc) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].description, desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String descriptionOfCode(String desc) {
String tmp = "";
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].description, desc)) {
tmp = values()[i].code;
}
}
return tmp;
}
}
/**
*
* 10-20-
*/
@ -517,8 +634,6 @@ public class AndonEnumUtil {
}
}
/**
*
* 10 - 20 - 30 -

Loading…
Cancel
Save