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

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.teachcloud.common.contant.SystemConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;

/**
 * <p>
 * 参考课程考生成绩维度表
 * </p>
 *
 * @author wangliang
 * @since 2021-06-01
 */
@ApiModel(value = "TAExamCourseRecord对象", description = "参考课程考生成绩维度表")
public class TAExamCourseRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id")
    private Long id;

    @ApiModelProperty(value = "学校id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "school_id")
    private Long schoolId;

    @ApiModelProperty(value = "基础考生成绩记录表id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "exam_record_id")
    private Long examRecordId;

    @ApiModelProperty(value = "赋分后成绩")
    @TableField(value = "assigned_score")
    private BigDecimal assignedScore;

    @ApiModelProperty(value = "百分位等级")
    @TableField(value = "percent_grade")
    private Integer percentGrade;

    @ApiModelProperty(value = "得分水平 ABCDE")
    @TableField(value = "score_level")
    private String scoreLevel;

    @ApiModelProperty(value = "该学生成绩在学院中的排名（赋分）")
    @TableField(value = "col_rank")
    private Integer colRank;

    @ApiModelProperty(value = "该学生成绩排名所在的等级（col_rank）")
    @TableField(value = "rank_level")
    private String rankLevel;

    @ApiModelProperty(value = "超过本院占比（赋分）")
    @TableField(value = "over_college_rate")
    private BigDecimal overCollegeRate;

    @ApiModelProperty(value = "标准回归系数")
    @TableField(value = "standardized_coefficients")
    private BigDecimal standardizedCoefficients;

    @ApiModelProperty(value = "考试id")
    @TableField(value = "exam_id")
    private Long examId;

    @ApiModelProperty(value = "课程编号")
    @TableField(value = "course_code")
    private String courseCode;

    @ApiModelProperty(value = "试卷id")
    @TableField(value = "paper_id")
    private Long paperId;

    @ApiModelProperty(value = "试卷类型")
    @TableField(value = "paper_type")
    private String paperType;

    @ApiModelProperty(value = "学生id")
    @TableField(value = "student_id")
    private Long studentId;

    @ApiModelProperty(value = "学生编号")
    @TableField(value = "student_code")
    private String studentCode;

    @ApiModelProperty(value = "教师id")
    @TableField(value = "teacher_id")
    private Long teacherId;

    @ApiModelProperty(value = "班级id")
    @TableField(value = "clazz_id")
    private Long clazzId;

    @ApiModelProperty(value = "开课学院id")
    @TableField(value = "teach_college_id")
    private Long teachCollegeId;

    @ApiModelProperty(value = "考查学院id")
    @TableField(value = "inspect_college_id")
    private Long inspectCollegeId;

    @ApiModelProperty(value = "专业id")
    @TableField(value = "major_id")
    private Long majorId;

    @ApiModelProperty(value = "卷面成绩")
    @TableField(value = "total_score")
    private BigDecimal totalScore;

    @ApiModelProperty(value = "是否缺考")
    @TableField(value = "absent")
    private Boolean absent;

    @ApiModelProperty(value = "是否应届")
    @TableField(value = "student_current")
    private Boolean studentCurrent;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getExamRecordId() {
        return examRecordId;
    }

    public void setExamRecordId(Long examRecordId) {
        this.examRecordId = examRecordId;
    }

    public BigDecimal getAssignedScore() {
        if (Objects.nonNull(assignedScore)) {
            return assignedScore.setScale(SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
        } else {
            return assignedScore;
        }
    }

    public void setAssignedScore(BigDecimal assignedScore) {
        this.assignedScore = assignedScore;
    }

    public Integer getPercentGrade() {
        return percentGrade;
    }

    public void setPercentGrade(Integer percentGrade) {
        this.percentGrade = percentGrade;
    }

    public String getScoreLevel() {
        return scoreLevel;
    }

    public void setScoreLevel(String scoreLevel) {
        this.scoreLevel = scoreLevel;
    }

    public Integer getColRank() {
        return colRank;
    }

    public void setColRank(Integer colRank) {
        this.colRank = colRank;
    }

    public String getRankLevel() {
        return rankLevel;
    }

    public void setRankLevel(String rankLevel) {
        this.rankLevel = rankLevel;
    }

    public BigDecimal getOverCollegeRate() {
        if (Objects.nonNull(overCollegeRate)) {
            return overCollegeRate.setScale(SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
        } else {
            return overCollegeRate;
        }
    }

    public void setOverCollegeRate(BigDecimal overCollegeRate) {
        this.overCollegeRate = overCollegeRate;
    }

    public BigDecimal getStandardizedCoefficients() {
        if (Objects.nonNull(standardizedCoefficients)) {
            return standardizedCoefficients.setScale(SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
        } else {
            return standardizedCoefficients;
        }
    }

    public void setStandardizedCoefficients(BigDecimal standardizedCoefficients) {
        this.standardizedCoefficients = standardizedCoefficients;
    }

    public Long getExamId() {
        return examId;
    }

    public void setExamId(Long examId) {
        this.examId = examId;
    }

    public String getCourseCode() {
        return courseCode;
    }

    public void setCourseCode(String courseCode) {
        this.courseCode = courseCode;
    }

    public Long getPaperId() {
        return paperId;
    }

    public void setPaperId(Long paperId) {
        this.paperId = paperId;
    }

    public String getPaperType() {
        return paperType;
    }

    public void setPaperType(String paperType) {
        this.paperType = paperType;
    }

    public Long getStudentId() {
        return studentId;
    }

    public void setStudentId(Long studentId) {
        this.studentId = studentId;
    }

    public String getStudentCode() {
        return studentCode;
    }

    public void setStudentCode(String studentCode) {
        this.studentCode = studentCode;
    }

    public Long getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(Long teacherId) {
        this.teacherId = teacherId;
    }

    public Long getClazzId() {
        return clazzId;
    }

    public void setClazzId(Long clazzId) {
        this.clazzId = clazzId;
    }

    public Long getTeachCollegeId() {
        return teachCollegeId;
    }

    public void setTeachCollegeId(Long teachCollegeId) {
        this.teachCollegeId = teachCollegeId;
    }

    public Long getInspectCollegeId() {
        return inspectCollegeId;
    }

    public void setInspectCollegeId(Long inspectCollegeId) {
        this.inspectCollegeId = inspectCollegeId;
    }

    public Long getMajorId() {
        return majorId;
    }

    public void setMajorId(Long majorId) {
        this.majorId = majorId;
    }

    public BigDecimal getTotalScore() {
        if (Objects.nonNull(totalScore)) {
            return totalScore.setScale(SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
        } else {
            return totalScore;
        }
    }

    public void setTotalScore(BigDecimal totalScore) {
        this.totalScore = totalScore;
    }

    public Boolean getAbsent() {
        return absent;
    }

    public void setAbsent(Boolean absent) {
        this.absent = absent;
    }

    public Boolean getStudentCurrent() {
        return studentCurrent;
    }

    public void setStudentCurrent(Boolean studentCurrent) {
        this.studentCurrent = studentCurrent;
    }

    public Long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Long schoolId) {
        this.schoolId = schoolId;
    }
}
