技术监督模板、文件(批量)上传
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.njcn.process.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum FormworkTypeEnum {
|
||||
ALARM_TICKET(0, "预/告警单模板"),
|
||||
RECTIFY_TICKET(1, "整改通知反馈单模板");
|
||||
private final Integer code;
|
||||
|
||||
private final String message;
|
||||
|
||||
FormworkTypeEnum(Integer code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public static FormworkTypeEnum getFormworkTypeEnumByCode(Integer code) {
|
||||
for (FormworkTypeEnum formworkTypeEnum : FormworkTypeEnum.values()) {
|
||||
if (formworkTypeEnum.getCode().equals(code)) {
|
||||
return formworkTypeEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,27 @@
|
||||
package com.njcn.process.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@Getter
|
||||
public enum TicketTypeEnum {
|
||||
ALARM_TICKET(0, "预/告警单"),
|
||||
FEEDBACK(1, "反馈单"),
|
||||
TEST_REPORT(2, "测试报告"),
|
||||
REVISE_NOTICE(3, "整改通知单"),
|
||||
REVISE_FEEDBACK(4, "整改通知反馈单");
|
||||
|
||||
|
||||
ALARM_TICKET("alarm_ticket", "预/告警单"),
|
||||
FEEDBACK("feedback", "反馈单"),
|
||||
TEST_REPORT("test_report", "测试报告"),
|
||||
REVISE_NOTICE("revise_notice", "整改通知单"),
|
||||
REVISE_FEEDBACK("revise_feedback", "整改通知反馈单");
|
||||
|
||||
private final String code;
|
||||
private final Integer code;
|
||||
|
||||
private final String message;
|
||||
|
||||
TicketTypeEnum(String code, String message) {
|
||||
TicketTypeEnum(Integer code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public static TicketTypeEnum getTicketTypeEnumByCode(String code) {
|
||||
public static TicketTypeEnum getTicketTypeEnumByCode(Integer code) {
|
||||
for (TicketTypeEnum ticketTypeEnum : TicketTypeEnum.values()) {
|
||||
if (StringUtils.equals(code, ticketTypeEnum.getCode())) {
|
||||
if (ticketTypeEnum.getCode().equals(code)) {
|
||||
return ticketTypeEnum;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user