package com.goafanti.demand.bo;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

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 DemandListBo {

	private String	id;

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

	/**
	 * 数据类别(0-个人需求,1-单位需求)
	 */
	private Integer	dataCategory;

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

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

	/**
	 * 发布时间
	 */
	private Date	releaseDate;

	/**
	 * 需求类型 
	 */
	private Integer	demandType;
	private String	demandTypeS;
	
	private BigDecimal budgetCost;

	private Date	validityPeriod;

	private Integer	status;
	
	private Integer fixedbudget;
	
	private Integer		industryCategoryA;

	private Integer		industryCategoryB;
	
	private Integer		industryCategoryC;
	
	private String      problemDes;

	private String		pictureUrl;
	private String		industryCategory1;
	
	private String		industryCategory2;
	
	private Integer 	boutique;
	

	private String		industryCategory3;
	
	private String 	interest;
	
	/**
	 * 是否发布(0-未发布,1-发布)
	 */
	private Integer	releaseStatus;

	private String	employerId;
	
	private String  employerAddress;

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

	/**
	 * 关注数量
	 */
	private String countInterest;
	/**
	 *  
	 */
	private Integer  urgentDays;
	private BigDecimal urgentMoney;

	
	private Date createTime;
	
	private String remark;
	/**
	 * 环信ID
	 */
	private String easemobName;
	/**
	 * 接单数
	 */
	private String orderCount;
	
	private String orderIntentionCount; 
	
	private String		industryCategoryAS;
	
	private String contacts;
	private String contactMobile;
	

	@JsonFormat(shape = Shape.STRING)
	public String getIndustryCategory1() {
		return industryCategory1;
	}
	
	public void setIndustryCategory1(String industryCategory1) {
		this.industryCategory1 = industryCategory1;
	}
	
	public String getIndustryCategory2() {
		return industryCategory2;
	}
	
	public void setIndustryCategory2(String industryCategory2) {
		this.industryCategory2 = industryCategory2;
	}
	
	public String getIndustryCategory3() {
		return industryCategory3;
	}
	
	public void setIndustryCategory3(String industryCategory3) {
		this.industryCategory3 = industryCategory3;
	}
	public Integer getAuditStatus() {
		return auditStatus;
	}

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

	public String getEmployerId() {
		return employerId;
	}

	public void setEmployerId(String employerId) {
		this.employerId = employerId;
	}

	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;
	}

	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 getDemandType() {
		return demandType;
	}

	public void setDemandType(Integer demandType) {
		this.demandType = demandType;
	}

	public Date getValidityPeriod() {
		return validityPeriod;
	}

	public void setValidityPeriod(Date validityPeriod) {
		this.validityPeriod = validityPeriod;
	}

	@JsonFormat(shape = Shape.STRING)
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getReleaseStatus() {
		return releaseStatus;
	}

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

	public Date getReleaseDate() {
		return releaseDate;
	}

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

	public String getValidityPeriodFormattedDate() {
		if (this.validityPeriod == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.getValidityPeriod(), AFTConstants.YYYYMMDDHHMMSS);
		}
	}

	public void setValidityPeriodFormattedDate(String validityPeriodFormattedDate) {

	}

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

	public void setReleaseDateFormattedDate(String releaseDateFormattedDate) {

	}

	public Integer getFixedbudget() {
		return fixedbudget;
	}

	public void setFixedbudget(Integer fixedbudget) {
		this.fixedbudget = fixedbudget;
	}

	public Integer getIndustryCategoryA() {
		return industryCategoryA;
	}

	public void setIndustryCategoryA(Integer industryCategoryA) {
		this.industryCategoryA = industryCategoryA;
	}

	public Integer getIndustryCategoryB() {
		return industryCategoryB;
	}

	public void setIndustryCategoryB(Integer industryCategoryB) {
		this.industryCategoryB = industryCategoryB;
	}

	public String getPictureUrl() {
		return pictureUrl;
	}

	public void setPictureUrl(String pictureUrl) {
		this.pictureUrl = pictureUrl;
	}
	
	public List<String> getPictureUrls() {
		List<String> list=new ArrayList<String>();
		if (this.pictureUrl == null) {
			return list;
		} else {
			String []s=pictureUrl.split(",");
			 list = Arrays.asList(s);  
			return list;
		}
	}

	public String getDemandTypeS() {
		return demandTypeS;
	}

	public void setDemandTypeS(String demandTypeS) {
		this.demandTypeS = demandTypeS;
	}


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

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

	public Integer getUrgentDays() {
		return urgentDays;
	}

	public void setUrgentDays(Integer urgentDays) {
		this.urgentDays = urgentDays;
	}

	public BigDecimal getUrgentMoney() {
		return urgentMoney;
	}

	public void setUrgentMoney(BigDecimal urgentMoney) {
		this.urgentMoney = urgentMoney;
	}

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

	public void setEmployerAddress(String employerAddress) {
		this.employerAddress = employerAddress;
	}

	public String getProblemDes() {
		return problemDes;
	}

	public void setProblemDes(String problemDes) {
		this.problemDes = problemDes;
	}

	public Integer getIndustryCategoryC() {
		return industryCategoryC;
	}

	public void setIndustryCategoryC(Integer industryCategoryC) {
		this.industryCategoryC = industryCategoryC;
	}
	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 getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;

	}

	public Integer getBoutique() {
		return boutique;
	}

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

	public BigDecimal getBudgetCost() {
		return budgetCost;
	}

	public void setBudgetCost(BigDecimal budgetCost) {
		this.budgetCost = budgetCost;
	}

	public String getInterest() {
		return interest;
	}

	public void setInterest(String interest) {
		this.interest = interest;
	}

	public String getEasemobName() {
		return easemobName;
	}

	public void setEasemobName(String easemobName) {
		this.easemobName = easemobName;
	}

	public String getOrderCount() {
		return orderCount;
	}

	public void setOrderCount(String orderCount) {
		this.orderCount = orderCount;
	}

	public String getOrderIntentionCount() {
		return orderIntentionCount;
	}

	public void setOrderIntentionCount(String orderIntentionCount) {
		this.orderIntentionCount = orderIntentionCount;
	}

	public String getIndustryCategoryAS() {
		return industryCategoryAS;
	}

	public void setIndustryCategoryAS(String industryCategoryAS) {
		this.industryCategoryAS = industryCategoryAS;
	}

	public String getContacts() {
		return contacts;
	}

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

	public String getContactMobile() {
		return contactMobile;
	}

	public void setContactMobile(String contactMobile) {
		this.contactMobile = contactMobile;
	}

}
