diff --git a/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonManageQueue.java b/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonManageQueue.java index 6f0f112..82ff8c5 100644 --- a/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonManageQueue.java +++ b/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonManageQueue.java @@ -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 statusCodeList; diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/AndonEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/AndonEnumUtil.java index 7699fbe..627a36c 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/AndonEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/AndonEnumUtil.java @@ -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 - 三级