package com.qmth.qrzk.repository.user.model;

import java.util.Date;

public class Paper {
	private int id;
	
	private String code;
	
	private int courseId;
	
	private String courseCode;
	
	private String courseName;
	
	private int bookId;
	
	private String bookName;
	
	private String bookAuthor;
	
	private String bookPress;
	
	private String bookPressYear;
	
	private String school;
	
	private String status;
	
	private int isSpecialAnswerSheet;
	
	private String paperPath;
	
	private String separatePaperPath;
	
	private String wPaperPath; //网评卷地址

	private String standardAnswerPath;
	
	private String answerSheetPath;
	
	private String zyPath;//转印说明路径
	
	private String attachmentsPath;
	
	private String picturesPath;
	
	private String remark;
	
	private String reserved;
	
	private Date createdDT;
	
	private int createdBy;
	
	private Date updatedDT;
	
	private int updatedBy;
	
	private int residueFormal;
	
	//清样库建设需要关联的出库扫描、入库扫描、试卷回库、标答回库、题卡回库
	
	private int isOutBoundScanned;		//出库扫描
	
	private int isStorageScanned;		//入库扫描
	
	private int isPaperReturn;			//试卷回库
	
	private int isStandadAnswerReturn;	//标答回库
	
	private int isAnswerSheetReturn;	//题卡回库
	
	private int isSeparatePaperReturn;	//分卷回库
	
	private int isWPaperReturn;	//网评卷回库
	
	private int isZyReturn;	//网评卷回库

	private int pageIndex;
	
	private int count;
	

	public String getwPaperPath() {
		return wPaperPath;
	}

	public void setwPaperPath(String wPaperPath) {
		this.wPaperPath = wPaperPath;
	}

	public int getIsWPaperReturn() {
		return isWPaperReturn;
	}

	public void setIsWPaperReturn(int isWPaperReturn) {
		this.isWPaperReturn = isWPaperReturn;
	}

	public int getIsSeparatePaperReturn() {
		return isSeparatePaperReturn;
	}
	
	public void setIsSeparatePaperReturn(int isSeparatePaperReturn) {
		this.isSeparatePaperReturn = isSeparatePaperReturn;
	}
	
	public String getSeparatePaperPath() {
		return separatePaperPath;
	}

	public void setSeparatePaperPath(String separatePaperPath) {
		this.separatePaperPath = separatePaperPath;
	}
	
	public int getResidueFormal() {
		return residueFormal;
	}

	public void setResidueFormal(int residueFormal) {
		this.residueFormal = residueFormal;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public int getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public int getCourseId() {
		return courseId;
	}

	public void setCourseId(int courseId) {
		this.courseId = courseId;
	}

	public int getBookId() {
		return bookId;
	}

	public void setBookId(int bookId) {
		this.bookId = bookId;
	}

	public String getBookName() {
		return bookName;
	}

	public void setBookName(String bookName) {
		this.bookName = bookName;
	}

	public String getBookAuthor() {
		return bookAuthor;
	}

	public void setBookAuthor(String bookAuthor) {
		this.bookAuthor = bookAuthor;
	}

	public String getBookPress() {
		return bookPress;
	}

	public void setBookPress(String bookPress) {
		this.bookPress = bookPress;
	}

	public String getBookPressYear() {
		return bookPressYear;
	}

	public void setBookPressYear(String bookPressYear) {
		this.bookPressYear = bookPressYear;
	}

	public String getSchool() {
		return school;
	}

	public void setSchool(String school) {
		this.school = school;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	public int getIsSpecialAnswerSheet() {
		return isSpecialAnswerSheet;
	}

	public void setIsSpecialAnswerSheet(int isSpecialAnswerSheet) {
		this.isSpecialAnswerSheet = isSpecialAnswerSheet;
	}

	public String getPaperPath() {
		return paperPath;
	}

	public void setPaperPath(String paperPath) {
		this.paperPath = paperPath;
	}

	public String getStandardAnswerPath() {
		return standardAnswerPath;
	}

	public void setStandardAnswerPath(String standardAnswerPath) {
		this.standardAnswerPath = standardAnswerPath;
	}

	public String getAnswerSheetPath() {
		return answerSheetPath;
	}

	public void setAnswerSheetPath(String answerSheetPath) {
		this.answerSheetPath = answerSheetPath;
	}

	public String getAttachmentsPath() {
		return attachmentsPath;
	}

	public void setAttachmentsPath(String attachmentsPath) {
		this.attachmentsPath = attachmentsPath;
	}

	public String getPicturesPath() {
		return picturesPath;
	}

	public void setPicturesPath(String picturesPath) {
		this.picturesPath = picturesPath;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getReserved() {
		return reserved;
	}

	public void setReserved(String reserved) {
		this.reserved = reserved;
	}

	public Date getCreatedDT() {
		return createdDT;
	}

	public void setCreatedDT(Date createdDT) {
		this.createdDT = createdDT;
	}

	public int getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(int createdBy) {
		this.createdBy = createdBy;
	}

	public Date getUpdatedDT() {
		return updatedDT;
	}

	public void setUpdatedDT(Date updatedDT) {
		this.updatedDT = updatedDT;
	}

	public int getUpdatedBy() {
		return updatedBy;
	}

	public void setUpdatedBy(int updatedBy) {
		this.updatedBy = updatedBy;
	}

	public String getCourseCode() {
		return courseCode;
	}

	public void setCourseCode(String courseCode) {
		this.courseCode = courseCode;
	}

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public Paper() {
		super();
	}

	public Paper(int id, String status) {
		super();
		this.id = id;
		this.status = status;
	}

	public int getIsOutBoundScanned() {
		return isOutBoundScanned;
	}

	public void setIsOutBoundScanned(int isOutBoundScanned) {
		this.isOutBoundScanned = isOutBoundScanned;
	}


	public int getIsStorageScanned() {
		return isStorageScanned;
	}

	public void setIsStorageScanned(int isStorageScanned) {
		this.isStorageScanned = isStorageScanned;
	}

	public int getIsPaperReturn() {
		return isPaperReturn;
	}

	public void setIsPaperReturn(int isPaperReturn) {
		this.isPaperReturn = isPaperReturn;
	}

	public int getIsStandadAnswerReturn() {
		return isStandadAnswerReturn;
	}

	public void setIsStandadAnswerReturn(int isStandadAnswerReturn) {
		this.isStandadAnswerReturn = isStandadAnswerReturn;
	}

	public int getIsAnswerSheetReturn() {
		return isAnswerSheetReturn;
	}

	public void setIsAnswerSheetReturn(int isAnswerSheetReturn) {
		this.isAnswerSheetReturn = isAnswerSheetReturn;
	}

	public String getZyPath() {
		return zyPath;
	}

	public void setZyPath(String zyPath) {
		this.zyPath = zyPath;
	}
	
	public int getIsZyReturn() {
		return isZyReturn;
	}

	public void setIsZyReturn(int isZyReturn) {
		this.isZyReturn = isZyReturn;
	}

	public Paper(String courseCode, String courseName, String bookName,
			String bookAuthor, String bookPress, String bookPressYear,
			String school,String code, String status,int isSpecialAnswerSheet) {
		super();
		this.courseCode = courseCode;
		this.courseName = courseName;
		this.bookName = bookName;
		this.bookAuthor = bookAuthor;
		this.bookPress = bookPress;
		this.bookPressYear = bookPressYear;
		this.school = school;
		this.code=code;
		this.status = status;
		this.isSpecialAnswerSheet=isSpecialAnswerSheet;
	}

	public Paper(String courseCode, String courseName, String bookName,
			String bookAuthor, String bookPress, String bookPressYear,
			String school,String status,String code, String remark) {
		super();
		this.courseCode = courseCode;
		this.courseName = courseName;
		this.bookName = bookName;
		this.bookAuthor = bookAuthor;
		this.bookPress = bookPress;
		this.bookPressYear = bookPressYear;
		this.school = school;
		this.status=status;
		this.code=code;
		this.remark = remark;
	}

	public Paper( String code, String courseName, String bookName,
			String school) {
		super();
		this.code = code;
		this.courseName = courseName;
		this.bookName = bookName;
		this.school = school;
	}

	public Paper(String code, String courseCode, String courseName,
			String bookName, String bookAuthor, String bookPress,
			String bookPressYear, String school) {
		super();
		this.code = code;
		this.courseCode = courseCode;
		this.courseName = courseName;
		this.bookName = bookName;
		this.bookAuthor = bookAuthor;
		this.bookPress = bookPress;
		this.bookPressYear = bookPressYear;
		this.school = school;
	}

	public Paper(int id, String wPaperPath, String standardAnswerPath) {
		super();
		this.id = id;
		this.wPaperPath = wPaperPath;
		this.standardAnswerPath = standardAnswerPath;
	}

	public Paper(int id, String wPaperPath, String standardAnswerPath,
			String answerSheetPath) {
		super();
		this.id = id;
		this.wPaperPath = wPaperPath;
		this.standardAnswerPath = standardAnswerPath;
		this.answerSheetPath = answerSheetPath;
	}
	
	public boolean isPaperFilesUploaded(){
		boolean isAnswerSheetUploaded = (this.getIsSpecialAnswerSheet() == 1) ? (this.getAnswerSheetPath() != null || this.getZyPath() != null) : true;
		return isWPaperUploaded() && isStandardAnswerUploaded() && isAnswerSheetUploaded;
	}

	public Paper(String code) {
		super();
		this.code = code;
	}
	
	public boolean isWPaperUploaded(){
		return wPaperPath != null && !wPaperPath.equals("");
	}
	
	public boolean isStandardAnswerUploaded(){
		return standardAnswerPath != null && !standardAnswerPath.equals("");
	}
	
	public boolean isSeparatePaperUploaded(){
		return separatePaperPath != null && !separatePaperPath.equals("");
	}
	
	public boolean isAnswerSheetUploaded(){
		return answerSheetPath != null && !answerSheetPath.equals("");
	}

	public boolean isZyUploaded(){
		return zyPath != null && !zyPath.equals("");
	}
	
}
