package cn.com.qmth.stmms.admin.dto;

import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
import cn.com.qmth.stmms.biz.exam.model.ScoreRate;
import cn.com.qmth.stmms.common.annotation.ExcelField;

public class ScoreRateDTO{
	
    @ExcelField(title = "学习中心", align = 2, sort = 10)
    private String campusName;

    @ExcelField(title = "科目代码", align = 2, sort = 20)
    private String subjectCode;

    @ExcelField(title = "科目名称", align = 2, sort = 30)
    private String subjectName;

    @ExcelField(title = "层次", align = 2, sort = 40)
    private String level;

    @ExcelField(title = "题号", align = 2, sort = 50)
    private String questionNumber;

    @ExcelField(title = "题目名称", align = 2, sort = 60)
    private String title;

    @ExcelField(title = "平均分", align = 2, sort = 70)
    private Double avgScore;

    @ExcelField(title = "应得分", align = 2, sort = 80)
    private Double totalScore;
    
    @ExcelField(title = "得分率(%)", align = 2, sort = 90)
    private double rate;

    public ScoreRateDTO() {

    }

    public ScoreRateDTO(ScoreRate scoreRate,ExamSubject subject) {
    	setCampusName(scoreRate.getCampusName());
        setSubjectCode(scoreRate.getSubjectCode());
        setSubjectName(subject != null ? subject.getName() : "");
        setLevel(subject != null ? subject.getLevel() : "");
        setQuestionNumber(scoreRate.getQuestionNumber());
        setTitle(scoreRate.getMainTitle());
        setAvgScore(scoreRate.getAvgScore());
        setTotalScore(scoreRate.getTotalScore());
        setRate(scoreRate.getRate());
    }

	public String getCampusName() {
		return campusName;
	}

	public void setCampusName(String campusName) {
		this.campusName = campusName;
	}

	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 String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public String getQuestionNumber() {
		return questionNumber;
	}

	public void setQuestionNumber(String questionNumber) {
		this.questionNumber = questionNumber;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Double getAvgScore() {
		return avgScore;
	}

	public void setAvgScore(Double avgScore) {
		this.avgScore = avgScore;
	}

	public Double getTotalScore() {
		return totalScore;
	}

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

	public double getRate() {
		return rate;
	}

	public void setRate(double rate) {
		this.rate = rate;
	}


}
