package com.qmth.qrzk.repository.task;

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

import com.qmth.qrzk.repository.pager.model.PagerConstruct;
import com.qmth.qrzk.repository.pager.model.PaperSkeleton;
import com.qmth.qrzk.repository.service.query.QueryParams;
import com.qmth.qrzk.repository.user.model.Book;
import com.qmth.qrzk.repository.user.model.Course;
import com.qmth.qrzk.repository.user.model.User;
import com.qmth.qrzk.repository.utils.Consts;

public class PaperTask extends QueryParams{
	private Integer id;
	private String taskNo;//任务单编号
	private String title;//标题
	private String paperName;//试卷名称
	private Integer batchId;//任务批次
	private Integer courseId;//课程
	private String courseCode;
	private String courseName;
	private Course course;
	private Integer bookId;//教材
	private Book book;
	private Date planStartTime;//计划开工时间
	private Date planEndTime;//计划结束时间
	private Date realStartTime;//实际开工时间
	private Date realEndTime;//实际结束时间
	private String remark;//备注
	private Integer propositionTeacher;//命题教师，现改名为命题教师1
	private String propositionLoginName;
	private Integer auditTeacher;//审题教师，现改名为命题教师2
	private String auditTeacherLoginName;
	private Integer typesetter;//排版员
	private String typesetterLoginName;
	private Integer primarySecretary;//主学科秘书，现改名为学科秘书1
	private String primarySecretaryLoginName;
	private Integer assistantSecretary;//辅学科秘书，现改名为学科秘书2
	private String assistantSecretaryLoginName;
	private Integer curDealer;//当前处理人
	private String status;//状态
	private String atts;//附件ID数组
	private Integer createdBy;
	private Date createdTime;
	private Integer updatedBy;
	private Date updatedTime;
	
	private PaperSkeleton paperSkeleton;
	private PagerConstruct pagerConstruct;
	private List<TaskFlowLog> flows;
	private Integer defaultNextDealer;
	private List<User> nextDealers;
	private List<User> preDealers;
	
	private Integer paperId;
	private Integer teacherAssessmentId;
	private Integer difficultyEstimateTableId;
	private String batchType;

	private String guid;
	
	public String getGuid() {
		return guid;
	}
	public void setGuid(String guid) {
		this.guid = guid;
	}
	public Integer getPaperId() {
		return paperId;
	}
	public void setPaperId(Integer paperId) {
		this.paperId = paperId;
	}
	
	public Integer getTeacherAssessmentId() {
		return teacherAssessmentId;
	}
	public void setTeacherAssessmentId(Integer teacherAssessmentId) {
		this.teacherAssessmentId = teacherAssessmentId;
	}
	public Integer getDifficultyEstimateTableId() {
		return difficultyEstimateTableId;
	}
	public void setDifficultyEstimateTableId(Integer difficultyEstimateTableId) {
		this.difficultyEstimateTableId = difficultyEstimateTableId;
	}
	public PaperSkeleton getPaperSkeleton() {
		return paperSkeleton;
	}
	public void setPaperSkeleton(PaperSkeleton paperSkeleton) {
		this.paperSkeleton = paperSkeleton;
	}
	public PagerConstruct getPagerConstruct() {
		return pagerConstruct;
	}
	public void setPagerConstruct(PagerConstruct pagerConstruct) {
		this.pagerConstruct = pagerConstruct;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getTaskNo() {
		return taskNo;
	}
	public void setTaskNo(String taskNo) {
		this.taskNo = taskNo;
	}
	
	public String getCourseCode() {
		return courseCode;
	}
	public void setCourseCode(String courseCode) {
		this.courseCode = courseCode;
	}
	public String getTitle() {
		return title;
	}
	
	public String getCourseName() {
		return courseName;
	}
	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getPaperName() {
		return paperName;
	}
	public void setPaperName(String paperName) {
		this.paperName = paperName;
	}
	public Integer getBatchId() {
		return batchId;
	}
	public String getPropositionLoginName() {
		return propositionLoginName;
	}
	public void setPropositionLoginName(String propositionLoginName) {
		this.propositionLoginName = propositionLoginName;
	}
	public String getAuditTeacherLoginName() {
		return auditTeacherLoginName;
	}
	public void setAuditTeacherLoginName(String auditTeacherLoginName) {
		this.auditTeacherLoginName = auditTeacherLoginName;
	}
	public String getTypesetterLoginName() {
		return typesetterLoginName;
	}
	public void setTypesetterLoginName(String typesetterLoginName) {
		this.typesetterLoginName = typesetterLoginName;
	}
	public String getPrimarySecretaryLoginName() {
		return primarySecretaryLoginName;
	}
	public void setPrimarySecretaryLoginName(String primarySecretaryLoginName) {
		this.primarySecretaryLoginName = primarySecretaryLoginName;
	}
	public String getAssistantSecretaryLoginName() {
		return assistantSecretaryLoginName;
	}
	public void setAssistantSecretaryLoginName(String assistantSecretaryLoginName) {
		this.assistantSecretaryLoginName = assistantSecretaryLoginName;
	}
	public void setBatchId(Integer batchId) {
		this.batchId = batchId;
	}
	public Integer getCourseId() {
		return courseId;
	}
	public void setCourseId(Integer courseId) {
		this.courseId = courseId;
	}
	public Integer getBookId() {
		return bookId;
	}
	public void setBookId(Integer bookId) {
		this.bookId = bookId;
	}
	public Date getPlanStartTime() {
		return planStartTime;
	}
	public void setPlanStartTime(Date planStartTime) {
		this.planStartTime = planStartTime;
	}
	public Date getPlanEndTime() {
		return planEndTime;
	}
	public void setPlanEndTime(Date planEndTime) {
		this.planEndTime = planEndTime;
	}
	public Date getRealStartTime() {
		return realStartTime;
	}
	public void setRealStartTime(Date realStartTime) {
		this.realStartTime = realStartTime;
	}
	public Date getRealEndTime() {
		return realEndTime;
	}
	public void setRealEndTime(Date realEndTime) {
		this.realEndTime = realEndTime;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public Integer getPropositionTeacher() {
		return propositionTeacher;
	}
	public User getPropositionTeacherBean(){
		return Consts.UserMap.get(propositionTeacher);
	}
	public void setPropositionTeacher(Integer propositionTeacher) {
		this.propositionTeacher = propositionTeacher;
	}
	public Integer getAuditTeacher() {
		return auditTeacher;
	}
	public User getAuditTeacherBean(){
		return Consts.UserMap.get(auditTeacher);
	}
	public void setAuditTeacher(Integer auditTeacher) {
		this.auditTeacher = auditTeacher;
	}
	public Integer getTypesetter() {
		return typesetter;
	}
	public User getTypesetterBean(){
		return Consts.UserMap.get(typesetter);
	}
	public void setTypesetter(Integer typesetter) {
		this.typesetter = typesetter;
	}
	public Integer getPrimarySecretary() {
		return primarySecretary;
	}
	public User getPrimarySecretaryBean(){
		return Consts.UserMap.get(primarySecretary);
	}
	public void setPrimarySecretary(Integer primarySecretary) {
		this.primarySecretary = primarySecretary;
	}
	public Integer getAssistantSecretary() {
		return assistantSecretary;
	}
	public User getAssistantSecretaryBean(){
		return Consts.UserMap.get(assistantSecretary);
	}
	public void setAssistantSecretary(Integer assistantSecretary) {
		this.assistantSecretary = assistantSecretary;
	}
	public Integer getCurDealer() {
		return curDealer;
	}
	public User getCurDealerBean(){
		return Consts.UserMap.get(curDealer);
	}
	public void setCurDealer(Integer curDealer) {
		this.curDealer = curDealer;
	}
	public String getStatus() {
		return status;
	}
	public String getStatusName(){
		return Consts.PaperTaskStatus.dicMap.get(status);
	}
	public String getReviewStatusName(){
		return Consts.ReviewTaskStatus.dicMap.get(status);
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getAtts() {
		return atts;
	}
	public void setAtts(String atts) {
		this.atts = atts;
	}
	public Integer getCreatedBy() {
		return createdBy;
	}
	public void setCreatedBy(Integer createdBy) {
		this.createdBy = createdBy;
	}
	public Date getCreatedTime() {
		return createdTime;
	}
	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}
	public Integer getUpdatedBy() {
		return updatedBy;
	}
	public void setUpdatedBy(Integer updatedBy) {
		this.updatedBy = updatedBy;
	}
	
	public Date getUpdatedTime() {
		return updatedTime;
	}
	public void setUpdatedTime(Date updatedTime) {
		this.updatedTime = updatedTime;
	}
	public Course getCourse() {
		return course;
	}
	public void setCourse(Course course) {
		this.course = course;
	}
	public Book getBook() {
		return book;
	}
	public void setBook(Book book) {
		this.book = book;
	}
	public List<TaskFlowLog> getFlows() {
		if(flows == null){
			flows = new ArrayList<TaskFlowLog>();
		}
		return flows;
	}
	public void setFlows(List<TaskFlowLog> flows) {
		this.flows = flows;
	}
	public PaperTask(String courseCode, String courseName,
			String propositionLoginName, String auditTeacherLoginName,
			String typesetterLoginName, String primarySecretaryLoginName,
			String assistantSecretaryLoginName) {
		super();
		this.courseCode = courseCode;
		this.courseName = courseName;
		this.propositionLoginName = propositionLoginName;
		this.auditTeacherLoginName = auditTeacherLoginName;
		this.typesetterLoginName = typesetterLoginName;
		this.primarySecretaryLoginName = primarySecretaryLoginName;
		this.assistantSecretaryLoginName = assistantSecretaryLoginName;
	}
	
	public PaperTask(String taskNo, String auditTeacherLoginName,
			String primarySecretaryLoginName, String typesetterLoginName) {
		super();
		this.taskNo = taskNo;
		this.auditTeacherLoginName = auditTeacherLoginName;
		this.primarySecretaryLoginName = primarySecretaryLoginName;
		this.typesetterLoginName = typesetterLoginName;
	}
	
	public PaperTask() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public List<User> getPreDealers() {
		return preDealers;
	}
	public void setPreDealers(List<User> preDealers) {
		this.preDealers = preDealers;
	}
	public Integer getDefaultNextDealer() {
		return defaultNextDealer;
	}
	public void setDefaultNextDealer(Integer defaultNextDealer) {
		this.defaultNextDealer = defaultNextDealer;
	}
	public List<User> getNextDealers() {
		return nextDealers;
	}
	public void setNextDealers(List<User> nextDealers) {
		this.nextDealers = nextDealers;
	}
	public String getBatchType() {
		return batchType;
	}
	public String getBatchTypeName() {
		return Consts.TaskBatchType.dicMap.get(batchType);
	}
	public void setBatchType(String batchType) {
		this.batchType = batchType;
	}
	
}
