package com.goafanti.common.model;

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

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.goafanti.common.constant.AFTConstants;
import com.goafanti.common.utils.FileUtils;

public class OrgActivityCost {
    private String id;

    private String aid;

    private String uid;
    
    /**
     * 年份
     */
    private Integer year;

    /**
    * 项目编号
    */
    private String activityNumber;

    /**
    * 内部人员人工费用（万元）
    */
    private BigDecimal internalLaborCost;

    /**
    * 内部直接投入费用（万元）
    */
    private BigDecimal internalDirectCost;

    /**
    * 内部折旧费用与长期待摊费用（万元）
    */
    private BigDecimal internalDepreciationCost;

    /**
    * 内部无形资产摊销费用（万元）
    */
    private BigDecimal internalAmortizationCost;

    /**
    * 内部设计费用(万元)
    */
    private BigDecimal internalDesignCost;

    /**
    * 内部装备调试费用与实验费用（万元）
    */
    private BigDecimal internalEquipmentCost;

    /**
    * 内部其他费用(万元)
    */
    private BigDecimal internalOtherCost;

    /**
    * 委托外部研究开发总费用(万元)
    */
    private BigDecimal externalTotalCost;

    /**
    * 委托外部境内的外部研发费用（万元）
    */
    private BigDecimal externalAbroadCost;

    /**
    * 企业填报人
    */
    private String enterpriseFiller;

    /**
    * 企业填报人签字日期
    */
    private Date signDate;

    /**
    * 排序号
    */
    private String sortNumber;

    private Date startDate;

    private Date endDate;
    
    /**
     * 台帐URL
     */
    private String accountUrl;

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

    public String getId() {
        return id;
    }

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

    public String getAid() {
        return aid;
    }

    public void setAid(String aid) {
        this.aid = aid;
    }

    public String getUid() {
        return uid;
    }

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

    public String getActivityNumber() {
        return activityNumber;
    }

    public void setActivityNumber(String activityNumber) {
        this.activityNumber = activityNumber;
    }

    
    
    public BigDecimal getInternalLaborCost() {
		return internalLaborCost;
	}

	public void setInternalLaborCost(BigDecimal internalLaborCost) {
		this.internalLaborCost = internalLaborCost;
	}

	public BigDecimal getInternalDirectCost() {
		return internalDirectCost;
	}

	public void setInternalDirectCost(BigDecimal internalDirectCost) {
		this.internalDirectCost = internalDirectCost;
	}

	public BigDecimal getInternalDepreciationCost() {
		return internalDepreciationCost;
	}

	public void setInternalDepreciationCost(BigDecimal internalDepreciationCost) {
		this.internalDepreciationCost = internalDepreciationCost;
	}

	public BigDecimal getInternalAmortizationCost() {
		return internalAmortizationCost;
	}

	public void setInternalAmortizationCost(BigDecimal internalAmortizationCost) {
		this.internalAmortizationCost = internalAmortizationCost;
	}

	public BigDecimal getInternalDesignCost() {
		return internalDesignCost;
	}

	public void setInternalDesignCost(BigDecimal internalDesignCost) {
		this.internalDesignCost = internalDesignCost;
	}

	public BigDecimal getInternalEquipmentCost() {
		return internalEquipmentCost;
	}

	public void setInternalEquipmentCost(BigDecimal internalEquipmentCost) {
		this.internalEquipmentCost = internalEquipmentCost;
	}

	public BigDecimal getInternalOtherCost() {
		return internalOtherCost;
	}

	public void setInternalOtherCost(BigDecimal internalOtherCost) {
		this.internalOtherCost = internalOtherCost;
	}

	public BigDecimal getExternalTotalCost() {
		return externalTotalCost;
	}

	public void setExternalTotalCost(BigDecimal externalTotalCost) {
		this.externalTotalCost = externalTotalCost;
	}

	public BigDecimal getExternalAbroadCost() {
		return externalAbroadCost;
	}

	public void setExternalAbroadCost(BigDecimal externalAbroadCost) {
		this.externalAbroadCost = externalAbroadCost;
	}

	public String getEnterpriseFiller() {
        return enterpriseFiller;
    }

    public void setEnterpriseFiller(String enterpriseFiller) {
        this.enterpriseFiller = enterpriseFiller;
    }

    public Date getSignDate() {
        return signDate;
    }

    public void setSignDate(Date signDate) {
        this.signDate = signDate;
    }

    public String getSortNumber() {
        return sortNumber;
    }

    public void setSortNumber(String sortNumber) {
        this.sortNumber = sortNumber;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }
    
    
    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 Integer getYear() {
		return year;
	}

	public void setYear(Integer year) {
		this.year = year;
	}

	public String getSignDateFormattedDate(){
    	if (this.signDate == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.getSignDate(), AFTConstants.YYYYMMDD);
		}
    }
    
    public void setSignDateFormattedDate(String signDateFormattedDate){
    	
    }
    
    @JsonIgnore
    public String getStartDateFormattedDate(){
		if (this.startDate == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.getStartDate(), AFTConstants.YYYYMMDDHHMMSS);
		}
	}
	
	public void setStartDateFormattedDate(String startDateFormattedDate){
		
	}
	
	@JsonIgnore
	public String getEndDateFormattedDate(){
		if (this.endDate == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.getEndDate(), AFTConstants.YYYYMMDDHHMMSS);
		}
	}
	
	public void setEndDateFormattedDate(String endDateFormattedDate){
		
	}
	
	public String getAccountDownloadFileName(){
		if (StringUtils.isBlank(this.accountUrl)){
			return null;
		} else {
			return (null == this.activityNumber) ? "" : this.activityNumber +FileUtils.getDownloadFileName(this.accountUrl);
		}
	}
	
	public void setAccountDownloadFileName(String accountDownloadFileName){
		
	}
}