# RowCategoryEnum.java

    package cloud.wconnect.finance.cons.pl;

    import lombok.AllArgsConstructor;
    import lombok.Getter;

    /**
     * M3 Row 分类枚举类
     * Formula、Item、Blank Line、Text、Separator、Page Break、Group Sub-Total、Item Sub-Total
     *
     * @author lichen
     * @date 2025/9/26
     */
    @Getter
    @AllArgsConstructor
    public enum RowCategoryEnum {

        FORMULA("Formula"),

        ITEM("Item"),

        BLANK_LINE("Blank Line"),

        TEXT("Text"),

        SEPARATOR("Separator"),

        PAGE_BREAK("Page Break"),

        GROUP_SUBTOTAL("Group Sub-Total"),

        ITEM_SUBTOTAL("Item Sub-Total");

        private final String value;

        /**
         * 根据row 分类判断是否需要计算指标
         *
         * @param rowCategory row 分类
         * @return boolean
         * @author lichen
         * @date 2025/9/27
         */
        public static boolean needCalculation(String rowCategory) {
            return ITEM.getValue().equals(rowCategory)
                    || GROUP_SUBTOTAL.getValue().equals(rowCategory)
                    || ITEM_SUBTOTAL.getValue().equals(rowCategory)
                    || FORMULA.getValue().equals(rowCategory);
        }
    }