package com.qmth.teachcloud.report.business.bean.result;

import com.qmth.teachcloud.common.annotation.ExcelProperty;
import com.qmth.teachcloud.common.contant.SystemConstant;
import io.swagger.annotations.ApiModelProperty;

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

/**
 * @Date: 2021/6/8.
 */
public class TeachCollegeResult {

    @ExcelProperty(name = "学期", width = 30, index = 1)
    private String semester;

    @ExcelProperty(name = "考试名称", width = 30, index = 2)
    private String examName;

    @ApiModelProperty(value = "科目编码")
    private String courseCode;

    @ApiModelProperty(value = "科目名称")
    private String courseName;

    @ApiModelProperty(value = "学号（密文）")
    private String studentCodeEncoder;

    @ExcelProperty(name = "课程(代码)", width = 40, index = 3)
    private String courseNameCode;

    @ExcelProperty(name = "准考证号", width = 30, index = 4)
    private String ticketNumber;
    @ExcelProperty(name = "学号", width = 30, index = 5)
    private String studentCode;
    @ExcelProperty(name = "姓名", width = 30, index = 6)
    private String name;
    private Boolean current;
    @ExcelProperty(name = "考试类型", width = 30, index = 7)
    private String currentStr;
    @ExcelProperty(name = "客观总分", width = 30, index = 8)
    private BigDecimal objectiveScore;
    @ExcelProperty(name = "主观总分", width = 30, index = 9)
    private BigDecimal subjectiveScore;
    @ExcelProperty(name = "卷面总分", width = 30, index = 10)
    private BigDecimal totalScore;
    @ExcelProperty(name = "赋分总分", width = 30, index = 11)
    private BigDecimal assignedScore;
    private String clazzCode;
    @ExcelProperty(name = "班级", width = 30, index = 12)
    private String clazzName;
    @ExcelProperty(name = "开课学院", width = 30, index = 13)
    private String teachCollegeName;
    @ExcelProperty(name = "考查学院", width = 30, index = 14)
    private String inspectCollegeName;
    @ExcelProperty(name = "任课老师", width = 30, index = 15)
    private String teacherName;

    public String getSemester() {
        return semester;
    }

    public void setSemester(String semester) {
        this.semester = semester;
    }

    public String getExamName() {
        return examName;
    }

    public void setExamName(String examName) {
        this.examName = examName;
    }

    public String getCourseCode() {
        return courseCode;
    }

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

    public String getCourseNameCode() {
        if (Objects.nonNull(courseCode) && Objects.nonNull(courseName)) {
            return courseName + "(" + courseCode + ")";
        } else {
            return courseNameCode;
        }
    }

    public void setCourseNameCode(String courseNameCode) {
        this.courseNameCode = courseNameCode;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getTicketNumber() {
        return ticketNumber;
    }

    public void setTicketNumber(String ticketNumber) {
        this.ticketNumber = ticketNumber;
    }

    public String getStudentCode() {
        return studentCode;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Boolean getCurrent() {
        return current;
    }

    public void setCurrent(Boolean current) {
        this.current = current;
    }

    public BigDecimal getObjectiveScore() {
        if (Objects.nonNull(objectiveScore)) {
            return objectiveScore.setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP);
        } else {
            return objectiveScore;
        }
    }

    public void setObjectiveScore(BigDecimal objectiveScore) {
        this.objectiveScore = objectiveScore;
    }

    public BigDecimal getSubjectiveScore() {
        if (Objects.nonNull(subjectiveScore)) {
            return subjectiveScore.setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP);
        } else {
            return subjectiveScore;
        }
    }

    public void setSubjectiveScore(BigDecimal subjectiveScore) {
        this.subjectiveScore = subjectiveScore;
    }

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

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

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

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

    public String getClazzCode() {
        return clazzCode;
    }

    public void setClazzCode(String clazzCode) {
        this.clazzCode = clazzCode;
    }

    public String getClazzName() {
        return clazzName;
    }

    public void setClazzName(String clazzName) {
        this.clazzName = clazzName;
    }

    public String getTeachCollegeName() {
        return teachCollegeName;
    }

    public void setTeachCollegeName(String teachCollegeName) {
        this.teachCollegeName = teachCollegeName;
    }

    public String getInspectCollegeName() {
        return inspectCollegeName;
    }

    public void setInspectCollegeName(String inspectCollegeName) {
        this.inspectCollegeName = inspectCollegeName;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public String getCurrentStr() {
        return currentStr;
    }

    public void setCurrentStr(String currentStr) {
        this.currentStr = currentStr;
    }

    public String getStudentCodeEncoder() {
        return studentCodeEncoder;
    }

    public void setStudentCodeEncoder(String studentCodeEncoder) {
        this.studentCodeEncoder = studentCodeEncoder;
    }
}
