package com.qmth.qrzk.supplypaper.vo;

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

import com.qmth.qrzk.repository.common.enumeration.PaperType;
import com.qmth.qrzk.supplypaper.model.Province;

/**
 * 省份模式供卷数据
 * @author zhengmin
 *
 */
public class ProvCourseVO {

	private Integer provCode;
	private String provName;
	private String zipcode;//邮编
	private String address;//地址
	private String office;//办公室
	private String phone;//联系电话
	private String receiver;//收件人
	private PaperType paperType;
	private String paperTypeLabel;
	private int courseCount;
	
	private List<SupplyCourseVO> courses = new ArrayList<SupplyCourseVO>();
	//打印试卷回执单时，将合卷分卷分别合并显示
	private List<ArrayList<SupplyCourseVO>> courseGroups = new ArrayList<ArrayList<SupplyCourseVO>>();
	
	public List<ArrayList<SupplyCourseVO>> getCourseGroups() {
		return courseGroups;
	}

	public void setCourseGroups(List<ArrayList<SupplyCourseVO>> courseGroups) {
		this.courseGroups = courseGroups;
	}

	public ProvCourseVO(Integer provCode,String provName,PaperType type){
		this.provCode = provCode;
		this.provName = provName;
		this.paperType = type;
	}
	
	public ProvCourseVO(Integer provCode, String provName, String zipcode,
			String address, String office, String phone, String receiver,
			PaperType paperType, List<SupplyCourseVO> courses) {
		super();
		this.provCode = provCode;
		this.provName = provName;
		this.zipcode = zipcode;
		this.address = address;
		this.office = office;
		this.phone = phone;
		this.receiver = receiver;
		this.paperType = paperType;
		this.courses = courses;
	}
	
	public ProvCourseVO(Province p){
		this.provCode = p.getCode();
		this.provName = p.getName();
		this.zipcode = p.getZipcode();
		this.address = p.getAddress();
		this.office = p.getOffice();
		this.phone = p.getPhone();
		this.receiver = p.getReceiver();
		this.paperType = p.getPaperType();
	}
	
	public ProvCourseVO() {
		super();
	}
	public Integer getProvCode() {
		return provCode;
	}
	public void setProvCode(Integer provCode) {
		this.provCode = provCode;
	}
	public String getProvName() {
		return provName;
	}
	public void setProvName(String provName) {
		this.provName = provName;
	}
	public String getZipcode() {
		return zipcode;
	}
	public void setZipcode(String zipcode) {
		this.zipcode = zipcode;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getOffice() {
		return office;
	}
	public void setOffice(String office) {
		this.office = office;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getReceiver() {
		return receiver;
	}
	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}
	public PaperType getPaperType() {
		return paperType;
	}
	public void setPaperType(PaperType paperType) {
		this.paperType = paperType;
	}
	
	public String getPaperTypeLabel() {
		return this.paperType != null?this.paperType.getValue():null;
	}
	public void setPaperTypeLabel(String paperTypeLabel) {
		this.paperTypeLabel = paperTypeLabel;
	}
	public List<SupplyCourseVO> getCourses() {
		return courses;
	}
	public void setCourses(List<SupplyCourseVO> courses) {
		this.courses = courses;
	}
	
	public int getCourseCount() {
		return this.courses.size();
	}

	public void setCourseCount(int courseCount) {
		this.courseCount = courseCount;
	}

	public void addCourse(SupplyCourseVO vo){
		this.courses.add(vo);
	}
}
