package com.goafanti.achievement.bo;

import java.util.Date;

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

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
import com.goafanti.common.constant.AFTConstants;
import com.goafanti.common.utils.StringUtils;

public class AchievementListBo {

	private String	id;

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

	/**
	 * 数据类别 (0--成果, 1--技术, 2--项目)
	 */
	private Integer	dataCategory;

	/**
	 * 名称
	 */
	private String	name;

	/**
	 * 关键词
	 */
	private String	keyword;

	/**
	 * 类型(0--专利, 2--软著, 3--项目, 4--版权, 5--工业设计, 6--配方, 7--非标)
	 */
	private Integer	category;

	/**
	 * 成果所有人ID
	 */
	private String	ownerId;

	/**
	 * 成果所有人名称
	 */
	private String	ownerName;

	/**
	 * 所有人类型(0-个人,1-组织)
	 */
	private Integer	ownerType;

	/**
	 * 发布时间
	 */
	private Date	releaseDate;
	
	/**
	 * 发布状态
	 */
	private Integer	releaseStatus;

	/**
	 * 审核状态
	 */
	private Integer	auditStatus;

	/**
	 * 技术经纪人
	 */
	private String	techBrokerId;
	
	/**
	 * 技术经纪人IDD
	 */
	private String	techBrokerIdd;

	/**
	 * 认证所有人名称
	 */
	private String	username;

	/**
	 * 所属组织ID
	 */
	private String	orgId;

	/**
	 * 所属组织联系方式
	 */
	private Integer	contacts;

    /**
     *  是否属于精品 0 - 否	, 1 - 是
     */
    private Integer boutique;
    
    /**
     *  图片链接
     */
    private String technicalpictureurl;
    
    /**
	 * 交易方式(转让方式(0--完全转让,1--许可转让,2--技术入股))
	 */
	private Integer		transferMode;
    
	/**
	 * 成熟度
	 */
	private Integer		maturity;
	
	/**
	 * 行业
	 */
	private Integer		fieldA;
	
	private String		fieldAS;
	
	private String		field;
	
	private String		fieldB;
	
	private String		fieldC;
	
	private String		maturityS;
	
	private String		transferModeS;
	
	private String	ownerTypeS;
	/**
	 * 是否展示在首页 0-否  1-是
	 */
	private Integer hot;
	
	private String countInterest;
	/**
	 * 简介
	 */
	private String introduction;
	/**
	 * 所有人地址
	 */
	private String 	ownerPostalAddress;
	
	private Date createTime;
	
	
	private String buyIntention;
	
	public Integer getReleaseStatus() {
		return releaseStatus;
	}

	public void setReleaseStatus(Integer releaseStatus) {
		this.releaseStatus = releaseStatus;
	}

	public String getTechBrokerIdd() {
		return techBrokerIdd;
	}

	public void setTechBrokerIdd(String techBrokerIdd) {
		this.techBrokerIdd = techBrokerIdd;
	}

	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

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

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

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getId() {
		return id;
	}

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

	public Integer getSerialNumber() {
		return serialNumber;
	}

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

	@JsonFormat(shape = Shape.STRING)
	public Integer getDataCategory() {
		return dataCategory;
	}

	public void setDataCategory(Integer dataCategory) {
		this.dataCategory = dataCategory;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	@JsonFormat(shape = Shape.STRING)
	public Integer getCategory() {
		return category;
	}

	public void setCategory(Integer category) {
		this.category = category;
	}

	public String getOwnerName() {
		return ownerName;
	}

	public void setOwnerName(String ownerName) {
		this.ownerName = ownerName;
	}

	@JsonFormat(shape = Shape.STRING)
	public Integer getOwnerType() {
		return ownerType;
	}

	public void setOwnerType(Integer ownerType) {
		this.ownerType = ownerType;
	}

	public Date getReleaseDate() {
		return releaseDate;
	}

	public void setReleaseDate(Date releaseDate) {
		this.releaseDate = releaseDate;
	}

	@JsonFormat(shape = Shape.STRING)
	public Integer getAuditStatus() {
		return auditStatus;
	}

	public void setAuditStatus(Integer auditStatus) {
		this.auditStatus = auditStatus;
	}

	public String getTechBrokerId() {
		return techBrokerId;
	}

	public void setTechBrokerId(String techBrokerId) {
		this.techBrokerId = techBrokerId;
	}

	public String getOwnerId() {
		return ownerId;
	}

	public void setOwnerId(String ownerId) {
		this.ownerId = ownerId;
	}
	
	@JsonFormat(shape = Shape.STRING)
	public Integer getBoutique() {
		return boutique;
	}

	public void setBoutique(Integer boutique) {
		this.boutique = boutique;
	}

	public String getReleaseDateFormattedDate() {
		if (this.releaseDate == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.getReleaseDate(), AFTConstants.YYYYMMDDHHMMSS);
		}
	}

	public void setReleaseDateFormattedDate(String releaseDateFormattedDate) {

	}

	public String getTechnicalpictureurl() {
		return technicalpictureurl;
	}

	public void setTechnicalpictureurl(String technicalpictureurl) {
		this.technicalpictureurl = technicalpictureurl;
	}

	public Integer getTransferMode() {
		return transferMode;
	}

	public void setTransferMode(Integer transferMode) {
		this.transferMode = transferMode;
	}

	public Integer getMaturity() {
		return maturity;
	}   

	public void setMaturity(Integer maturity) {
		this.maturity = maturity;
	}

	public Integer getFieldA() {
		return fieldA;
	}

	public void setFieldA(Integer fieldA) {
		this.fieldA = fieldA;
	}

	public String getFieldAS() {
		return fieldAS;
	}

	public void setFieldAS(String fieldAS) {
		this.fieldAS = fieldAS;
	}

	public String getFieldB() {
		return fieldB;
	}

	public void setFieldB(String fieldB) {
		this.fieldB = fieldB;
	}
	public String getFieldC() {
		return fieldC;
	}

	public void setFieldC(String fieldC) {
		this.fieldC = fieldC;
	}
	public String getField() {
		return field;
	}

	public void setField(String field) {
		this.field = field;
	}
	public String getMaturityS() {
		return maturityS;
	}

	public void setMaturityS(String maturityS) {
		this.maturityS = maturityS;
	}

	public String getTransferModeS() {
		return transferModeS;
	}

	public void setTransferModeS(String transferModeS) {
		this.transferModeS = transferModeS;
	}

	public String getOwnerTypeS() {
		return ownerTypeS;
	}

	public void setOwnerTypeS(String ownerTypeS) {
		this.ownerTypeS = ownerTypeS;
	}
	@JsonFormat(shape = Shape.STRING)
	public Integer getHot() {
		return hot;
	}

	public void setHot(Integer hot) {
		this.hot = hot;
	}


	public String getCountInterest() {
		if (StringUtils.isBlank(countInterest)) countInterest = "20";
			return String.valueOf(Integer.valueOf(countInterest)+20);
	}

	public void setCountInterest(String countInterest) {
		this.countInterest = countInterest;
	}

	public String getIntroduction() {
		return introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	public String getOwnerPostalAddress() {
		if (StringUtils.isEmpty(ownerPostalAddress)) {
			return "湖南长沙";
		}
		return ownerPostalAddress;
	}

	public void setOwnerPostalAddress(String ownerPostalAddress) {
		this.ownerPostalAddress = ownerPostalAddress;
	}
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getCreateTimeFormattedDate() {
		if (this.createTime == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
		}

	}

	public String getBuyIntention() {
		return buyIntention;
	}

	public void setBuyIntention(String buyIntention) {
		this.buyIntention = buyIntention;
	}
}
