package com.qmth.teachcloud.report.business.bean.dto.excel;

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

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

/**
 * @Description: TAExamCourseDto
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/6/17
 */
public class TAExamCourseExportDto implements Serializable {

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

    @ExcelProperty(name = "开课学院", width = 30, index = 2)
    private String teachCollegeName;

    @ExcelProperty(name = "考查学院", width = 30, index = 3)
    private Integer inspectCollegeCount;

    @ExcelProperty(name = "有效人数", width = 30, index = 4)
    private Integer realityCount;

    @ExcelProperty(name = "应届占比(人数)", width = 50, index = 5)
    private String currentRealityRate;

    @ExcelProperty(name = "非应届占比(人数)", width = 50, index = 6)
    private String pastRealityRate;

    @ExcelProperty(name = "缺考", width = 30, index = 7)
    private Integer absentCount;

    @ExcelProperty(name = "总体平均分-赋分前", width = 50, index = 8)
    private BigDecimal avgScoreBefore;

    @ExcelProperty(name = "总体不及格率(人数)-赋分前", width = 50, index = 9)
    private String notPassRateBefore;

    @ExcelProperty(name = "应届平均分-赋分前", width = 50, index = 10)
    private BigDecimal currentAvgScoreBefore;

    @ExcelProperty(name = "应届不及格率(人数)-赋分前", width = 50, index = 11)
    private String currentNotPassRateBefore;

    @ExcelProperty(name = "赋分系数", width = 30, index = 12)
    private String coefficient;

    @ExcelProperty(name = "总体平均分-赋分后", width = 50, index = 13)
    private BigDecimal avgScoreAfter;

    @ExcelProperty(name = "总体不及格率(人数)-赋分后", width = 50, index = 14)
    private String notPassRateAfter;

    @ExcelProperty(name = "应届平均分-赋分后", width = 50, index = 15)
    private BigDecimal currentAvgScoreAfter;

    @ExcelProperty(name = "应届不及格率(人数)-赋分后", width = 50, index = 16)
    private String currentNotPassRateAfter;

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

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

    @ApiModelProperty(value = "应届实际考试人数")
    private Integer currentRealityCount;

    @ApiModelProperty(value = "往届实际考试人数")
    private Integer pastRealityCount;

    @ApiModelProperty(value = "不通过人数(赋分前)")
    private Integer notPassCountBefore;

    @ApiModelProperty(value = "应届不通过人数(赋分前)")
    private Integer currentNotPassCountBefore;

    @ApiModelProperty(value = "不通过人数(赋分后)")
    private Integer notPassCountAfter;

    @ApiModelProperty(value = "应届不通过人数(赋分后)")
    private Integer currentNotPassCountAfter;

    public Integer getPastRealityCount() {
        return pastRealityCount;
    }

    public void setPastRealityCount(Integer pastRealityCount) {
        this.pastRealityCount = pastRealityCount;
    }

    public Integer getCurrentRealityCount() {
        return currentRealityCount;
    }

    public void setCurrentRealityCount(Integer currentRealityCount) {
        this.currentRealityCount = currentRealityCount;
    }

    public String getCourseCode() {
        return courseCode;
    }

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

    public String getCourseName() {
        return courseName;
    }

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

    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 getTeachCollegeName() {
        return teachCollegeName;
    }

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

    public Integer getInspectCollegeCount() {
        return inspectCollegeCount;
    }

    public void setInspectCollegeCount(Integer inspectCollegeCount) {
        this.inspectCollegeCount = inspectCollegeCount;
    }

    public Integer getRealityCount() {
        return realityCount;
    }

    public void setRealityCount(Integer realityCount) {
        this.realityCount = realityCount;
    }

    public String getCurrentRealityRate() {
        if (Objects.nonNull(currentRealityRate)) {
            return new BigDecimal(currentRealityRate).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + currentRealityCount + ")";
        } else {
            return currentRealityRate;
        }
    }

    public void setCurrentRealityRate(String currentRealityRate) {
        this.currentRealityRate = currentRealityRate;
    }

    public String getPastRealityRate() {
        if (Objects.nonNull(pastRealityRate)) {
            return new BigDecimal(pastRealityRate).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + pastRealityCount + ")";
        } else {
            return pastRealityRate;
        }
    }

    public void setPastRealityRate(String pastRealityRate) {
        this.pastRealityRate = pastRealityRate;
    }

    public Integer getAbsentCount() {
        return absentCount;
    }

    public void setAbsentCount(Integer absentCount) {
        this.absentCount = absentCount;
    }

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

    public void setAvgScoreBefore(BigDecimal avgScoreBefore) {
        this.avgScoreBefore = avgScoreBefore;
    }

    public String getNotPassRateBefore() {
        if (Objects.nonNull(notPassRateBefore)) {
            return new BigDecimal(notPassRateBefore).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + notPassCountBefore + ")";
        } else {
            return notPassRateBefore;
        }
    }

    public void setNotPassRateBefore(String notPassRateBefore) {
        this.notPassRateBefore = notPassRateBefore;
    }

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

    public void setCurrentAvgScoreBefore(BigDecimal currentAvgScoreBefore) {
        this.currentAvgScoreBefore = currentAvgScoreBefore;
    }

    public String getCurrentNotPassRateBefore() {
        if (Objects.nonNull(currentNotPassRateBefore)) {
            return new BigDecimal(currentNotPassRateBefore).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + currentNotPassCountBefore + ")";
        } else {
            return currentNotPassRateBefore;
        }
    }

    public void setCurrentNotPassRateBefore(String currentNotPassRateBefore) {
        this.currentNotPassRateBefore = currentNotPassRateBefore;
    }

    public String getCoefficient() {
        return coefficient;
    }

    public void setCoefficient(String coefficient) {
        this.coefficient = coefficient;
    }

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

    public void setAvgScoreAfter(BigDecimal avgScoreAfter) {
        this.avgScoreAfter = avgScoreAfter;
    }

    public String getNotPassRateAfter() {
        if (Objects.nonNull(notPassRateAfter)) {
            return new BigDecimal(notPassRateAfter).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + notPassCountAfter + ")";
        } else {
            return notPassRateAfter;
        }
    }

    public void setNotPassRateAfter(String notPassRateAfter) {
        this.notPassRateAfter = notPassRateAfter;
    }

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

    public void setCurrentAvgScoreAfter(BigDecimal currentAvgScoreAfter) {
        this.currentAvgScoreAfter = currentAvgScoreAfter;
    }

    public String getCurrentNotPassRateAfter() {
        if (Objects.nonNull(currentNotPassRateAfter)) {
            return new BigDecimal(currentNotPassRateAfter).setScale(SystemConstant.FINAL_SCALE, BigDecimal.ROUND_HALF_UP) + "(" + currentNotPassCountAfter + ")";
        } else {
            return currentNotPassRateAfter;
        }
    }

    public void setCurrentNotPassRateAfter(String currentNotPassRateAfter) {
        this.currentNotPassRateAfter = currentNotPassRateAfter;
    }

    public Integer getNotPassCountBefore() {
        return notPassCountBefore;
    }

    public void setNotPassCountBefore(Integer notPassCountBefore) {
        this.notPassCountBefore = notPassCountBefore;
    }

    public Integer getCurrentNotPassCountBefore() {
        return currentNotPassCountBefore;
    }

    public void setCurrentNotPassCountBefore(Integer currentNotPassCountBefore) {
        this.currentNotPassCountBefore = currentNotPassCountBefore;
    }

    public Integer getNotPassCountAfter() {
        return notPassCountAfter;
    }

    public void setNotPassCountAfter(Integer notPassCountAfter) {
        this.notPassCountAfter = notPassCountAfter;
    }

    public Integer getCurrentNotPassCountAfter() {
        return currentNotPassCountAfter;
    }

    public void setCurrentNotPassCountAfter(Integer currentNotPassCountAfter) {
        this.currentNotPassCountAfter = currentNotPassCountAfter;
    }
}
