核心信息提取

This commit is contained in:
2024-06-19 08:31:51 +08:00
parent 0140a1166d
commit 9a9af5db5d
31 changed files with 507 additions and 133 deletions

View File

@@ -2,6 +2,8 @@ package com.njcn.supervision.enums;
import lombok.Getter;
import java.util.Arrays;
@Getter
public enum ProblemTypeEnum {
@@ -18,4 +20,12 @@ public enum ProblemTypeEnum {
this.code = code;
this.name = name;
}
public static String getNameByCode(Integer code) {
ProblemTypeEnum problemTypeEnumTemp = Arrays.stream(ProblemTypeEnum.values())
.filter(problemTypeEnum -> problemTypeEnum.getCode().equals(code))
.findAny()
.orElse(PLAN);
return problemTypeEnumTemp.getName();
}
}