diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/MeetingReviewTypeEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/MeetingReviewTypeEnum.java new file mode 100644 index 0000000..3ffd01d --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/enumeration/MeetingReviewTypeEnum.java @@ -0,0 +1,45 @@ +package com.ningdatech.pmapi.meeting.entity.enumeration; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.Arrays; + +/** + *
+ * MeetingReviewTypeEnum + *
+ * + * @author WendyYang + * @since 16:32 2023/3/15 + */ +@Getter +@AllArgsConstructor +public enum MeetingReviewTypeEnum { + + /** + * 会议评审类型 + */ + PRELIMINARY_SCHEME_REVIEW("初步方案评审", "1"), + + CONSTRUCTION_SCHEME_REVIEW("建设方案评审", "2"), + + ACCEPTANCE_SCHEME_REVIEW("验收方案评审", "3"), + + DEPT_JOIN_REVIEW("部门联审", "4"); + + private final String value; + private final String code; + + public boolean eq(String code) { + return this.getCode().equals(code); + } + + public static MeetingReviewTypeEnum getByCode(String code) { + return Arrays.stream(values()) + .filter(w -> w.getCode().equals(code)) + .findFirst() + .orElseThrow(() -> new IllegalArgumentException("无效的会议评审类型编码")); + } + +}