# GmwrMonthlyOtbPaceEnum.java

    package cloud.wconnect.workperformance.cons.gmwr.monthlyotbpace;

    import lombok.AllArgsConstructor;
    import lombok.Getter;

    import java.util.Arrays;
    import java.util.Optional;

    /**
     * Enum: Monthly OTB Pace
     *
     * @author zc
     * @date 2025/02/28
     */
    @Getter
    @AllArgsConstructor
    public enum GmwrMonthlyOtbPaceEnum {

        TRANSIENT(1, "Transient"),
        GROUP_DEF_TEN(2, "Group (Def/Ten)"),
        CONTRACT(3, "Contract"),
        TOTAL(4, "TOTAL"),
        VAR_TO_LW(5, "VAR. TO LW");

        private final int category;

        private final String categoryName;

        /**
         * 获取分类名称
         *
         * @param category 分类
         * @return java.lang.String
         * @author zc
         * @date 2025/2/28
         */
        public static String getCategoryName(int category) {
            Optional<GmwrMonthlyOtbPaceEnum> optional = Arrays.stream(GmwrMonthlyOtbPaceEnum.values())
                    .filter(item -> item.getCategory() == category).findFirst();
            return optional.isPresent() ? optional.get().getCategoryName() : "";
        }

    }