package com.goafanti.portal.bo;

import java.math.BigDecimal;
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 DemandSearchListBo {
	private String		id;

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

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

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

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

	/**
	 * 行业类别下拉A
	 */
	private Integer		industryCategoryA;

	/**
	 * 行业类别下拉B
	 */
	private Integer		industryCategoryB;

	/**
	 * 需求类型
	 */
	private Integer		demandType;

	/**
	 * 预算价格
	 */
	private BigDecimal	budgetCost;

	/**
	 * 问题说明
	 */
	private String		problemDes;

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

	/**
	 * 雇主名称
	 */
	private String		employerName;

	/**
	 * 用户等级
	 */
	private Integer		level;

	/**
	 * 用户等级
	 */
	private String		pictureUrl;
	/**
	 * 是否精品
	 */
	private Integer 	boutique;
	
	private Integer  urgentDays;
	
	private Integer urgentMoney;
	
	private String 		cityname;
	/**
	 * 接单数
	 */
	private String orderCount;
	/**
	 * 关注数量
	 */
	private String countInterest;
	
	private String  employerAddress;
	
	public String getEmployerName() {
		return employerName;
	}

	public void setEmployerName(String employerName) {
		this.employerName = employerName;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public String getId() {
		return id;
	}

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

	public String getKeyword() {
		return keyword;
	}

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

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

	@JsonFormat(shape = Shape.STRING)
	public Integer getIndustryCategoryA() {
		return industryCategoryA;
	}

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

	@JsonFormat(shape = Shape.STRING)
	public Integer getIndustryCategoryB() {
		return industryCategoryB;
	}

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

	@JsonFormat(shape = Shape.STRING)
	public Integer getDemandType() {
		return demandType;
	}

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

	public BigDecimal getBudgetCost() {
		return budgetCost;
	}

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

	public String getProblemDes() {
		return problemDes;
	}

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

	public Date getReleaseDate() {
		return releaseDate;
	}

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

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

	public void setReleaseDateFormattedDate(String releaseDateFormattedDate) {

	}

	public String getPictureUrl() {
		return pictureUrl;
	}

	public void setPictureUrl(String pictureUrl) {
		this.pictureUrl = pictureUrl;
	}

	public Integer getBoutique() {
		return boutique;
	}

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

	public Integer getUrgentDays() {
		return urgentDays;
	}

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

	public Integer getUrgentMoney() {
		return urgentMoney;
	}

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

	public String getCityname() {
		return cityname;
	}

	public void setCityname(String cityname) {
		this.cityname = cityname;
	}

	public String getOrderCount() {
		return orderCount;
	}

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

	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 String getEmployerAddress() {
		if (StringUtils.isEmpty(employerAddress)) {
			return "湖南长沙";
		}
		return employerAddress;
	}

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

	
}
