技术监督模板、文件(批量)上传

This commit is contained in:
Lee
2023-03-30 16:22:05 +08:00
parent 0efaa37d87
commit 0dc06679d8
17 changed files with 211 additions and 342 deletions

View File

@@ -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;
}
}

View File

@@ -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;
}
}