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.goafanti.common.utils.FileUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
 * 上年度高新技术产品(服务)
 */
public class OrgTechProduct {
    private String id;

    private String uid;

    /**
    * 编号
    */
    private String serialNumber;

    /**
    * 产品名称
    */
    private String productName;

    /**
    * 技术领域1st select
    */
    private Integer technicalField1;

    /**
    * 技术领域2nd select
    */
    private Integer technicalField2;

    /**
    * 技术领域3rd select
    */
    private Integer technicalField3;

    /**
    * 技术来源
    */
    private Integer technicalSource;

    /**
    * 上年度销售收入
    */
    private BigDecimal lastYearRevenue;

    /**
    * 是否是主要产品(服务)
    */
    private Integer mainProduct;

    /**
    * 知识产权编号
    */
    private String intellectualPropertyNumber;

    /**
    * 关键技术及主要技术指标
    */
    private String keyTechnology;

    /**
    * 与同类产品（服务）的竞争优势
    */
    private String competitiveEdge;

    /**
    * 知识产权获得情况及其对产品（服务）在技术上发挥的支持作用
    */
    private String conditionEffect;

    /**
    * 年份
    */
    private Integer year;
    
    
    /**
     * 记录创建时间
     */
    private Date createTime;
    
    /**
     * 台帐URL
     */
    private String accountUrl;
    
    /**
     * 删除标记
     */
    private Integer deletedSign;

    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 getSerialNumber() {
        return serialNumber;
    }

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

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }
    
    @JsonFormat(shape = Shape.STRING)
    public Integer getTechnicalField1() {
        return technicalField1;
    }
    
    public void setTechnicalField1(Integer technicalField1) {
        this.technicalField1 = technicalField1;
    }
    
    @JsonFormat(shape = Shape.STRING)
    public Integer getTechnicalField2() {
        return technicalField2;
    }

    public void setTechnicalField2(Integer technicalField2) {
        this.technicalField2 = technicalField2;
    }
    
    @JsonFormat(shape = Shape.STRING)
    public Integer getTechnicalField3() {
        return technicalField3;
    }

    public void setTechnicalField3(Integer technicalField3) {
        this.technicalField3 = technicalField3;
    }
    
    @JsonFormat(shape = Shape.STRING)
    public Integer getTechnicalSource() {
        return technicalSource;
    }

    public void setTechnicalSource(Integer technicalSource) {
        this.technicalSource = technicalSource;
    }

   

    public BigDecimal getLastYearRevenue() {
		return lastYearRevenue;
	}

	public void setLastYearRevenue(BigDecimal lastYearRevenue) {
		this.lastYearRevenue = lastYearRevenue;
	}

	public Integer getMainProduct() {
        return mainProduct;
    }

    public void setMainProduct(Integer mainProduct) {
        this.mainProduct = mainProduct;
    }

    public String getIntellectualPropertyNumber() {
        return intellectualPropertyNumber;
    }

    public void setIntellectualPropertyNumber(String intellectualPropertyNumber) {
        this.intellectualPropertyNumber = intellectualPropertyNumber;
    }

    public String getKeyTechnology() {
        return keyTechnology;
    }

    public void setKeyTechnology(String keyTechnology) {
        this.keyTechnology = keyTechnology;
    }

    public String getCompetitiveEdge() {
        return competitiveEdge;
    }

    public void setCompetitiveEdge(String competitiveEdge) {
        this.competitiveEdge = competitiveEdge;
    }

    public String getConditionEffect() {
        return conditionEffect;
    }

    public void setConditionEffect(String conditionEffect) {
        this.conditionEffect = conditionEffect;
    }

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }
    
    @JsonIgnore
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public String getAccountUrl() {
		return accountUrl;
	}

	public void setAccountUrl(String accountUrl) {
		this.accountUrl = accountUrl;
	}

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

	public void setDeletedSign(Integer deletedSign) {
		this.deletedSign = deletedSign;
	}
    
	//高新技术产品台帐
	public String getAccountDownloadFileName(){
		if (StringUtils.isBlank(this.accountUrl)){
			return null;
		} else {
			return (null == this.productName) ? "" : this.productName +FileUtils.getDownloadFileName(this.accountUrl);
		}
	}
	
	public void setAccountDownloadFileName(String accountDownloadFileName){
		
	}
}