package cn.com.qmth.stmms.biz.exam.bean;

import java.util.Date;
import java.util.List;

import org.apache.commons.lang.StringUtils;

import cn.com.qmth.stmms.biz.utils.ScoreItem;
import cn.com.qmth.stmms.common.annotation.ExcelField;
import cn.com.qmth.stmms.common.utils.BigDecimalUtils;

public class ScoreVerifyVo {
	private Integer examId;
	// 考生id
	private Integer studentId;
	// 考生姓名
	@ExcelField(title = "考生姓名*", align = 2, sort = 1)
	private String studentName;
	// 考生编号
	@ExcelField(title = "考生编号*", align = 2, sort = 2)
	private String studentCode;
	// 科目
	@ExcelField(title = "科目代码*", align = 2, sort = 3)
	private String subjectCode;
	@ExcelField(title = "科目名称*", align = 2, sort = 4)
	private String subjectName;
	// 上传状态
	private Boolean upload;
	// 总分
	private Double subjectiveScore;
	// 得分明细
	private String subjectiveScoreList;
	// 校验人
	private String scoreVerifyUserName;
	// 校验时间
	private Date scoreVerifyTime;
	private Double objectiveScore;
	private Boolean absent;
	private List<String> sheetUrls;
	private String answerUrl;
	private String examNumber;
	private Integer sheetCount;
	private Boolean breach;
    private Double subjectScore;

	public String getSheetUrlString() {
		if (sheetUrls != null) {
			return StringUtils.join(sheetUrls, ",");
		} else {
			return "";
		}
	}

	public Integer getStudentId() {
		return studentId;
	}

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

	public String getStudentName() {
		return studentName;
	}

	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}

	public String getStudentCode() {
		return studentCode;
	}

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

	public double getTotalScore() {
		double score = 0;
		if (objectiveScore != null) {
			score = BigDecimalUtils.add(score, objectiveScore);
		}
		if (subjectiveScore != null) {
			score = BigDecimalUtils.add(score, subjectiveScore);
		}
		return score;
	}

	public String getObjectiveScoreString() {
		try {
			return ScoreItem.NUMBER_FORMAT.format(objectiveScore);
		} catch (Exception e) {
			return "";
		}
	}

	public String getSubjectiveScoreString() {
		try {
			return ScoreItem.NUMBER_FORMAT.format(subjectiveScore);
		} catch (Exception e) {
			return "";
		}
	}

	public String getTotalScoreString() {
		try {
			return ScoreItem.NUMBER_FORMAT.format(getTotalScore());
		} catch (Exception e) {
			return "";
		}
	}
	public String getSubjectScoreString() {
		try {
			return ScoreItem.NUMBER_FORMAT.format(getSubjectScore());
		} catch (Exception e) {
			return "";
		}
	}
	public Double getSubjectScore() {
		return subjectScore;
	}

	public void setSubjectScore(Double subjectScore) {
		this.subjectScore = subjectScore;
	}

	public Boolean getUpload() {
		return upload;
	}

	public void setUpload(Boolean upload) {
		this.upload = upload;
	}

	public Double getSubjectiveScore() {
		return subjectiveScore;
	}

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

	public String getSubjectiveScoreList() {
		return subjectiveScoreList;
	}

	public void setSubjectiveScoreList(String subjectiveScoreList) {
		this.subjectiveScoreList = subjectiveScoreList;
	}

	public String getScoreVerifyUserName() {
		return scoreVerifyUserName;
	}

	public void setScoreVerifyUserName(String scoreVerifyUserName) {
		this.scoreVerifyUserName = scoreVerifyUserName;
	}

	public Date getScoreVerifyTime() {
		return scoreVerifyTime;
	}

	public void setScoreVerifyTime(Date scoreVerifyTime) {
		this.scoreVerifyTime = scoreVerifyTime;
	}

	public String getSubjectCode() {
		return subjectCode;
	}

	public void setSubjectCode(String subjectCode) {
		this.subjectCode = subjectCode;
	}

	public String getSubjectName() {
		return subjectName;
	}

	public void setSubjectName(String subjectName) {
		this.subjectName = subjectName;
	}

	public Double getObjectiveScore() {
		return objectiveScore;
	}

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

	public Boolean getAbsent() {
		return absent;
	}

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

	public Integer getExamId() {
		return examId;
	}

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

	public List<String> getSheetUrls() {
		return sheetUrls;
	}

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

	public String getAnswerUrl() {
		return answerUrl;
	}

	public void setAnswerUrl(String answerUrl) {
		this.answerUrl = answerUrl;
	}

	public String getExamNumber() {
		return examNumber;
	}

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

	public Integer getSheetCount() {
		return sheetCount;
	}

	public void setSheetCount(Integer sheetCount) {
		this.sheetCount = sheetCount;
	}

	public Boolean getBreach() {
		return breach;
	}

	public void setBreach(Boolean breach) {
		this.breach = breach;
	}

}
