package cn.com.qmth.stmms.biz.mark.model;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class Task implements Serializable {

    private static final long serialVersionUID = 4912665442008033200L;

    /**
     * 考生编号
     */
    private String studentId;

    /**
     * 库ID
     */
    private int libraryId;

    /**
     * 评卷员Id
     */
    private int markId;

    /**
     * 题卡图片地址
     */
    private List<String> pictureUrls;

    /**
     * 题卡原图地址
     */
    private List<String> sheetUrls;

    /**
     * 答案文档地址
     */
    private String answerUrl;

    /**
     * 试卷文档地址
     */
    private String paperUrl;

    /**
     * 客观题总分
     */
    private Double objectiveScore;

    /**
     * 给分步骤
     */
    private List<MarkStepDTO> markStepList;

    /**
     * 是否自评
     */
    private boolean isSelf;

    /**
     * 是否回评
     */
    private boolean isPrevious;

    /**
     * 是否打回
     */
    private boolean isBack;

    /**
     * 是否问题卷
     */
    private boolean isProblem;

    /**
     * 总分
     */
    private double totalScore;

    /**
     * 分值列表
     */
    private String scoreList;

    /**
     * 阅卷轨迹列表
     */
    private TrackDTO[] trackList;

    /**
     * 所花时间
     */
    private long spent;

    /**
     * 问题类型
     */
    private int reason;

    /**
     * 评卷时间
     */
    private Date markTime;

    /**
     * 任务是否存在
     */
    private boolean isExist;

    /**
     * 试卷标记信息
     */
    private String tags;

    private String message;

    //特殊标识：√ 或 ❌ 或 乄
    private SpecialTagDTO [] tagList;

    public Task() {

    }

    public String getStudentId() {
        return studentId;
    }

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

    public int getLibraryId() {
        return libraryId;
    }

    public void setLibraryId(int libraryId) {
        this.libraryId = libraryId;
    }

    public int getMarkId() {
        return markId;
    }

    public void setMarkId(int markId) {
        this.markId = markId;
    }

    public List<String> getPictureUrls() {
        return pictureUrls;
    }

    public void setPictureUrls(List<String> pictureUrls) {
        this.pictureUrls = pictureUrls;
    }

    public String getAnswerUrl() {
        return answerUrl;
    }

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

    public String getPaperUrl() {
        return paperUrl;
    }

    public void setPaperUrl(String paperUrl) {
        this.paperUrl = paperUrl;
    }

    public List<MarkStepDTO> getMarkStepList() {
        return markStepList;
    }

    public void setMarkStepList(List<MarkStepDTO> markStepList) {
        this.markStepList = markStepList;
    }

    public double getTotalScore() {
        return totalScore;
    }

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

    public String getScoreList() {
        return scoreList;
    }

    public void setScoreList(String scoreList) {
        this.scoreList = scoreList;
    }

    public long getSpent() {
        return spent;
    }

    public void setSpent(long spent) {
        this.spent = spent;
    }

    public int getReason() {
        return reason;
    }

    public void setReason(int reason) {
        this.reason = reason;
    }

    public Date getMarkTime() {
        return markTime;
    }

    public void setMarkTime(Date markTime) {
        this.markTime = markTime;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Double getObjectiveScore() {
        return objectiveScore;
    }

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

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

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

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public boolean isSelf() {
        return isSelf;
    }

    public void setSelf(boolean isSelf) {
        this.isSelf = isSelf;
    }

    public boolean isPrevious() {
        return isPrevious;
    }

    public void setPrevious(boolean isPrevious) {
        this.isPrevious = isPrevious;
    }

    public boolean isBack() {
        return isBack;
    }

    public void setBack(boolean isBack) {
        this.isBack = isBack;
    }

    public boolean isProblem() {
        return isProblem;
    }

    public void setProblem(boolean isProblem) {
        this.isProblem = isProblem;
    }

    public boolean isExist() {
        return isExist;
    }

    public void setExist(boolean isExist) {
        this.isExist = isExist;
    }

    public TrackDTO[] getTrackList() {
        return trackList;
    }

    public void setTrackList(TrackDTO[] trackList) {
        this.trackList = trackList;
    }

    public Map<String, List<TrackDTO>> getTrackMap() {
        Map<String, List<TrackDTO>> map = new HashMap<String, List<TrackDTO>>();
        if (trackList != null) {
            for (TrackDTO dto : trackList) {
                String questionNumber = dto.getQuestionNumber();
                List<TrackDTO> list = map.get(questionNumber);
                if (list == null) {
                    list = new LinkedList<TrackDTO>();
                    map.put(questionNumber, list);
                }
                list.add(dto);
            }
        }
        return map;
    }

    public SpecialTagDTO[] getTagList() {
        return tagList;
    }

    public void setTagList(SpecialTagDTO[] tagList) {
        this.tagList = tagList;
    }
}
