package com.qmth.teachcloud.report.business.enums;

/**
 * @Description: 教研分析分析计算方法顺序枚举类 - 必须和 AnalyzeForReportService中的计算方法名一致
 * @Author: CaoZixuan
 * @Date: 2022-06-10
 */
public enum DataCalculateSequenceEnum {
    BUILD_ANALYZE_EXAM_COURSE("buildAnalyzeExamCourse", 1, 1),
    BUILD_ANALYZE_EXAM_COURSE_RECORD("buildAnalyzeExamCourseRecord", 2, 1),
    BUILD_ANALYZE_EXAM_COURSE_COLLEGE_INSPECT("buildAnalyzeExamCourseCollegeInspect", 3, 1),
    BUILD_ANALYZE_EXAM_COURSE_CLAZZ("buildAnalyzeExamCourseClazz", 4, 1),
    BUILD_ANALYZE_POINT_SCORE_RATE("buildAnalyzePointScoreRate", 5, 3),
    BUILD_ANALYZE_EXAM_COURSE_COLLEGE_INSPECT_DIO("buildAnalyzeExamCourseCollegeInspectDio", 6, 1),
    BUILD_ANALYZE_EXAM_COURSE_TEACHER_DIO("buildAnalyzeExamCourseTeacherDio", 7, 1),
    BUILD_ANALYZE_PAPER_STRUCT("buildAnalyzePaperStruct", 8, 1),
    BUILD_EXAM_PAPER_DIFFICULT("buildExamPaperDifficult", 9, 1),
    BUILD_EXAM_PAPER_TEACHER_DIFFICULT("buildExamPaperTeacherDifficult", 10, 1),
    BUILD_ANALYZE_EXAM_TOTAL("buildAnalyzeExamTotal", 11, 1),
    BUILD_ANALYZE_EXAM_COURSE_COLLEGE_TEACHER("buildAnalyzeExamCourseCollegeTeacher", 12, 1),
    BUILD_ANALYZE_EXAM_COURSE_TEACHER("buildAnalyzeExamCourseTeacher", 13, 1),
    BUILD_ANALYZE_EXAM_COURSE_TEACHER_COLLEGE_DIO("buildAnalyzeExamCourseTeacherCollegeDio", 14, 1),
    BUILD_ANALYZE_EXAM_COURSE_TEACHER_COLLEGE_DIFFICULT("buildAnalyzeExamCourseTeacherCollegeDifficult", 15, 1),
    BUILD_ANALYZE_COLLEGE_PAPER_STRUCT("buildAnalyzeCollegePaperStruct", 16, 1),
    BUILD_ANALYZE_TEACHER_PAPER_STRUCT("buildAnalyzeTeacherPaperStruct", 17, 1),
    BUILD_ANALYZE_TEACHER_COLLEGE_PAPER_STRUCT("buildAnalyzeTeacherCollegePaperStruct", 18, 1),
    ;
    private final String methodName;
    private final int index;
    private final int weight;

    DataCalculateSequenceEnum(String methodName, int index, int weight) {
        this.methodName = methodName;
        this.index = index;
        this.weight = weight;
    }

    public String getMethodName() {
        return methodName;
    }

    public int getIndex() {
        return index;
    }

    public int getWeight() {
        return weight;
    }

    /**
     * 获取总权重
     * @return 权重
     */
    public static Integer getTotalWeight(){
        int result = 0;
        for (DataCalculateSequenceEnum value : DataCalculateSequenceEnum.values()) {
            result = result + value.getWeight();
        }
        return result;
    }
}