# GmwrSelloutEfficiencyEnum.java

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

    import lombok.AllArgsConstructor;
    import lombok.Getter;

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

    /**
     * Enum: Sellout Efficiency
     *
     * @author zc
     * @date 2025/02/28
     */
    @Getter
    @AllArgsConstructor
    public enum GmwrSelloutEfficiencyEnum {

        OCC(1, "OCC"),
        OOO_ROOMS(2, "OOO Rooms"),
        ROOM_SOLD(3, "Room Sold"),
        ROOM_UNSOLD(4, "Room Unsold"),
        ROOM_TOTAL(5, "Room Total"),
        OCC_FINAL(6, "OCC Final"),
        SELLOUT_EFFICIENCY(7, "Sellout Efficiency"),
        SELLOUT_EFFICIENCY_WEEKLY(8, "Sellout Efficiency Weekly");

        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<GmwrSelloutEfficiencyEnum> optional = Arrays.stream(GmwrSelloutEfficiencyEnum.values())
                    .filter(item -> item.getCategory() == category).findFirst();
            return optional.isPresent() ? optional.get().getCategoryName() : "";
        }

    }