package com.goafanti.common.model;

import java.math.BigDecimal;
import java.util.Date;

import org.apache.commons.lang3.StringUtils;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.goafanti.common.utils.FileUtils;

public class TechProject {
	private String		id;

	private String		uid;

	/**
	 * 合同ID
	 */
	private String		contractId;

	/**
	 * 编号
	 */
	private Integer		serialNumber;

	/**
	 * 联系人
	 */
	private Integer		contacts;

	/**
	 * 科技项目申报部门
	 */
	private String		department;

	/**
	 * 派单信息
	 */
	private String		dispatchInfo;

	/**
	 * 项目名称
	 */
	private String		projectName;

	/**
	 * 项目类型
	 */
	private String		projectCatagory;

	/**
	 * 技术领域
	 */
	private String		techField;

	/**
	 * 项目简介
	 */
	private String		projectDes;

	/**
	 * 是否立项
	 */
	private Integer		projectMode;

	/**
	 * 立项金额
	 */
	private BigDecimal	projectApproval;

	/**
	 * 是否补助
	 */
	private Integer		subsidy;

	/**
	 * 咨询师
	 */
	private String		consultant;

	/**
	 * 项目材料URL
	 */
	private String		approvalUrl;

	/**
	 * 申报状态
	 */
	private Integer		state;

	/**
	 * 派单日
	 */
	private Date		createTime;

	/**
	 * 受理日
	 */
	private Date		acceptDate;

	/**
	 * 项目批复日期
	 */
	private Date		approvedDate;

	/**
	 * 记录创建日期
	 */
	private Date		recordTime;

	/**
	 * 删除标记
	 */
	private Integer		deletedSign;

	/**
	 * 申请创建人
	 */
	private String		founder;

	/**
	 * 负责人
	 */
	private String		principal;
	

	public String getPrincipal() {
		return principal;
	}

	public void setPrincipal(String principal) {
		this.principal = principal;
	}

	public String getFounder() {
		return founder;
	}

	public void setFounder(String founder) {
		this.founder = founder;
	}

	public String getId() {
		return id;
	}

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

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getContractId() {
		return contractId;
	}

	public void setContractId(String contractId) {
		this.contractId = contractId;
	}

	public Integer getSerialNumber() {
		return serialNumber;
	}

	public void setSerialNumber(Integer serialNumber) {
		this.serialNumber = serialNumber;
	}

	@JsonFormat(shape = Shape.STRING)
	public Integer getContacts() {
		return contacts;
	}

	public void setContacts(Integer contacts) {
		this.contacts = contacts;
	}

	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public String getDispatchInfo() {
		return dispatchInfo;
	}

	public void setDispatchInfo(String dispatchInfo) {
		this.dispatchInfo = dispatchInfo;
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getProjectCatagory() {
		return projectCatagory;
	}

	public void setProjectCatagory(String projectCatagory) {
		this.projectCatagory = projectCatagory;
	}

	public String getTechField() {
		return techField;
	}

	public void setTechField(String techField) {
		this.techField = techField;
	}

	public String getProjectDes() {
		return projectDes;
	}

	public void setProjectDes(String projectDes) {
		this.projectDes = projectDes;
	}

	public Integer getProjectMode() {
		return projectMode;
	}

	public void setProjectMode(Integer projectMode) {
		this.projectMode = projectMode;
	}

	public BigDecimal getProjectApproval() {
		return projectApproval;
	}

	public void setProjectApproval(BigDecimal projectApproval) {
		this.projectApproval = projectApproval;
	}

	public Integer getSubsidy() {
		return subsidy;
	}

	public void setSubsidy(Integer subsidy) {
		this.subsidy = subsidy;
	}

	public String getConsultant() {
		return consultant;
	}

	public void setConsultant(String consultant) {
		this.consultant = consultant;
	}

	public String getApprovalUrl() {
		return approvalUrl;
	}

	public void setApprovalUrl(String approvalUrl) {
		this.approvalUrl = approvalUrl;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getAcceptDate() {
		return acceptDate;
	}

	public void setAcceptDate(Date acceptDate) {
		this.acceptDate = acceptDate;
	}

	public Date getApprovedDate() {
		return approvedDate;
	}

	public void setApprovedDate(Date approvedDate) {
		this.approvedDate = approvedDate;
	}

	public Date getRecordTime() {
		return recordTime;
	}

	public void setRecordTime(Date recordTime) {
		this.recordTime = recordTime;
	}

	@JsonIgnore
	public Integer getDeletedSign() {
		return deletedSign;
	}

	public void setDeletedSign(Integer deletedSign) {
		this.deletedSign = deletedSign;
	}

	// 科技项目资料
	public String getApprovalDownloadFileName() {
		if (StringUtils.isBlank(this.approvalUrl)) {
			return null;
		} else {
			return FileUtils.getDownloadFileName(this.approvalUrl);
		}
	}

	public void setApprovalDownloadFileName(String approvalDownloadFileName) {

	}
}