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

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

public class MarkGroupDTO {

    @ExcelField(title = "课程代码", align = 2, sort = 10)
    private String subjectCode;

    @ExcelField(title = "课程名称", align = 2, sort = 20)
    private String subjectName;

    @ExcelField(title = "大题名称", align = 2, sort = 30)
    private String groupName;

    @ExcelField(title = "分组序号", align = 2, sort = 40)
    private int groupNumber;

    @ExcelField(title = "评卷员人数", align = 2, sort = 50)
    private long markerCount;

    @ExcelField(title = "评卷任务总数", align = 2, sort = 60)
    private long libraryCount;

    @ExcelField(title = "已完成任务数", align = 2, sort = 70)
    private long markedCount;

    @ExcelField(title = "评卷进度", align = 2, sort = 80)
    private String percent;

    @ExcelField(title = "待复核量", align = 2, sort = 90)
    private long inspectedCount;

    @ExcelField(title = "课程备注", align = 2, sort = 100)
    private String subjectRemark;

    public MarkGroupDTO(ExamSubject subject, MarkGroup group) {
        subjectCode = subject.getCode();
        subjectName = subject.getName();
        groupName = group.getTitle();
        groupNumber = group.getNumber();
        markerCount = group.getMarkerCount();
        libraryCount = group.getLibraryCount();
        markedCount = group.getMarkedCount();
        subjectRemark = subject.getRemark();
        // percent = libraryCount > 0 ? (new
        // DecimalFormat("####.###").format(markedCount * 100.0 / libraryCount)
        // + "%")
        // : "0%";
    }

    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 getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public int getGroupNumber() {
        return groupNumber;
    }

    public void setGroupNumber(int groupNumber) {
        this.groupNumber = groupNumber;
    }

    public long getMarkerCount() {
        return markerCount;
    }

    public void setMarkerCount(long markerCount) {
        this.markerCount = markerCount;
    }

    public long getLibraryCount() {
        return libraryCount;
    }

    public void setLibraryCount(long libraryCount) {
        this.libraryCount = libraryCount;
    }

    public long getMarkedCount() {
        return markedCount;
    }

    public void setMarkedCount(long markedCount) {
        this.markedCount = markedCount;
    }

    public String getPercent() {
        return percent;
    }

    public void setPercent(String percent) {
        this.percent = percent;
    }

    public String getSubjectRemark() {
        return subjectRemark;
    }

    public void setSubjectRemark(String subjectRemark) {
        this.subjectRemark = subjectRemark;
    }

    public long getInspectedCount() {
        return inspectedCount;
    }

    public void setInspectedCount(long inspectedCount) {
        this.inspectedCount = inspectedCount;
    }

}
