package com.qmth.distributed.print.business.bean.result;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.teachcloud.common.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;

import java.io.File;
import java.io.Serializable;
import java.util.Objects;

/**
 * @Description: 成绩同步result
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/11/1
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TSyncExamStudentScoreResult implements Serializable {

    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    Long id;

    @ApiModelProperty(value = "学期id")
    @JsonSerialize(using = ToStringSerializer.class)
    Long semesterId;

    @ExcelProperty(name = "学期", width = 30, index = 1)
    @ApiModelProperty(value = "学期")
    String semesterName;

    @ExcelProperty(name = "考试", width = 30, index = 2)
    @ApiModelProperty(value = "考试")
    String examName;

    @ApiModelProperty(value = "云阅卷考试id")
    @JsonSerialize(using = ToStringSerializer.class)
    Long examId;

    @ApiModelProperty(value = "云阅卷考试编码")
    String examCode;

    @ExcelProperty(name = "姓名", width = 30, index = 3)
    @ApiModelProperty(value = "考生姓名")
    String name;

    @ExcelProperty(name = "学号", width = 30, index = 4)
    @ApiModelProperty(value = "学号")
    String studentCode;

    @ApiModelProperty(value = "准考证号")
    String examNumber;

    @ApiModelProperty(value = "学院id")
    @JsonSerialize(using = ToStringSerializer.class)
    Long orgId;

    @ExcelProperty(name = "院系", width = 30, index = 5)
    @ApiModelProperty(value = "学院名称")
    String orgName;

    @ApiModelProperty(value = "专业id")
    @JsonSerialize(using = ToStringSerializer.class)
    Long majorId;

    @ApiModelProperty(value = "专业名称")
    @ExcelProperty(name = "专业", width = 30, index = 6)
    String majorName;

    @ApiModelProperty(value = "班级id")
    @JsonSerialize(using = ToStringSerializer.class)
    Long clazzId;

    @ExcelProperty(name = "班级", width = 30, index = 7)
    @ApiModelProperty(value = "班级")
    String clazzName;

    @ApiModelProperty(value = "课程编码")
    String courseCode;

    @ExcelProperty(name = "课程名称", width = 30, index = 8)
    @ApiModelProperty(value = "课程名称")
    String courseName;

    @ApiModelProperty(value = "考生状态，1-正常，2-缺考(包含未上传)，3-违纪")
    Integer status;

    @ApiModelProperty(value = "考生状态")
    String statusStr;

    @ApiModelProperty(value = "轨迹图url")
    String trajectoryUrls;

    @ApiModelProperty(value = "轨迹坐标")
    String trajectoryCoordinate;

    @ApiModelProperty(value = "同步时间")
    Long syncTime;

    @ApiModelProperty(value = "原卷url")
    private String sheetUrls;

    @ExcelProperty(name = "成绩总分", width = 30, index = 9)
    @ApiModelProperty(value = "总分")
    private Double totalScore;

    @ApiModelProperty(value = "客观题分数")
    private Double objectiveScore;

    @ApiModelProperty(value = "主观题分数")
    private Double subjectiveScore;

    @ApiModelProperty(value = "阅卷数据")
    private String syncData;

    public String getSyncData() {
        return syncData;
    }

    public void setSyncData(String syncData) {
        this.syncData = syncData;
    }

    public String getExamNumber() {
        return examNumber;
    }

    public void setExamNumber(String examNumber) {
        this.examNumber = examNumber;
    }

    public Long getExamId() {
        return examId;
    }

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

    public String getExamCode() {
        return examCode;
    }

    public void setExamCode(String examCode) {
        this.examCode = examCode;
    }

    public String getSemesterName() {
        return semesterName;
    }

    public void setSemesterName(String semesterName) {
        this.semesterName = semesterName;
    }

    public String getExamName() {
        return examName;
    }

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

    public String getName() {
        return name;
    }

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

    public String getStatusStr() {
        if (Objects.nonNull(getStatus())) {
            String statusStr = null;
            switch (getStatus()) {
                case 1:
                    statusStr = "正常";
                    break;
                case 2:
                    statusStr = "缺考";
                    break;
                default:
                    statusStr = "违纪";
                    break;
            }
            return statusStr;
        } else {
            return statusStr;
        }
    }

    public Long getId() {
        return id;
    }

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

    public Long getSemesterId() {
        return semesterId;
    }

    public void setSemesterId(Long semesterId) {
        this.semesterId = semesterId;
    }

    public String getStudentCode() {
        return studentCode;
    }

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

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public Long getMajorId() {
        return majorId;
    }

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

    public String getMajorName() {
        return majorName;
    }

    public void setMajorName(String majorName) {
        this.majorName = majorName;
    }

    public Long getClazzId() {
        return clazzId;
    }

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

    public String getClazzName() {
        return clazzName;
    }

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

    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 Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }

    public String getTrajectoryUrls() {
        return trajectoryUrls;
    }

    public void setTrajectoryUrls(String trajectoryUrls) {
        this.trajectoryUrls = trajectoryUrls;
    }

    public String getTrajectoryCoordinate() {
        return trajectoryCoordinate;
    }

    public void setTrajectoryCoordinate(String trajectoryCoordinate) {
        this.trajectoryCoordinate = trajectoryCoordinate;
    }

    public Long getSyncTime() {
        return syncTime;
    }

    public void setSyncTime(Long syncTime) {
        this.syncTime = syncTime;
    }

    public String getSheetUrls() {
        return sheetUrls;
    }

    public void setSheetUrls(String sheetUrls) {
        this.sheetUrls = sheetUrls;
    }

    public Double getTotalScore() {
        return totalScore;
    }

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

    public Double getObjectiveScore() {
        return objectiveScore;
    }

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

    public Double getSubjectiveScore() {
        return subjectiveScore;
    }

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