package com.goafanti.customer.bo;

import com.goafanti.common.constant.AFTConstants;

public class CustomerExcelBo {
	/** 营销员ID **/
	private String aid;
	/** 营销员姓名 **/
	private String adminName;
	/** 客户类型 **/
	private String customerType;
	/** 客户ID **/
	private String uid;
	/** 客户名 **/
	private String identifyName;
	/** 跟进状态 **/
	private String followSituation;
	/** 客户状态 **/
	private String customerStatus;
	/** 意向服务ID **/
	private String businessProjectId;
	/** 客户意向 **/
	private String customerIntention;
	/** 联系人 **/
	private String contacts;
	/** 联系号码 **/
	private String mobile;
	/** 行号 **/
	private int rowNumber;
	/** 是否新建 **/
	private boolean newData;
	
	public String getAid() {
		return aid;
	}
	public void setAid(String aid) {
		this.aid = aid;
	}
	public String getAdminName() {
		return adminName;
	}
	public void setAdminName(String adminName) {
		this.adminName = adminName;
	}
	public String getCustomerType() {
		return customerType;
	}
	public void setCustomerType(String customerType) {
		this.customerType = customerType;
	}
	public String getUid() {
		return uid;
	}
	public void setUid(String uid) {
		this.uid = uid;
	}
	public String getIdentifyName() {
		return identifyName;
	}
	public void setIdentifyName(String identifyName) {
		this.identifyName = identifyName;
	}
	public String getFollowSituation() {
		return followSituation;
	}
	public void setFollowSituation(String followSituation) {
		this.followSituation = followSituation;
	}
	public String getCustomerStatus() {
		return customerStatus;
	}
	public void setCustomerStatus(String customerStatus) {
		this.customerStatus = customerStatus;
	}
	public String getBusinessProjectId() {
		return businessProjectId;
	}
	public void setBusinessProjectId(String businessProjectId) {
		this.businessProjectId = businessProjectId;
	}
	public String getCustomerIntention() {
		return customerIntention;
	}
	public void setCustomerIntention(String customerIntention) {
		this.customerIntention = customerIntention;
	}
	public String getContacts() {
		return contacts;
	}
	public void setContacts(String contacts) {
		this.contacts = contacts;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public int getRowNumber() {
		return rowNumber;
	}
	public void setRowNumber(int rowNumber) {
		this.rowNumber = rowNumber;
	}
	public boolean isNewData() {
		return newData;
	}
	public void setNewData(boolean newData) {
		this.newData = newData;
	}
	@Override
	public boolean equals(Object obj) {
		if(!(obj instanceof CustomerExcelBo)) return false;
		CustomerExcelBo bo = (CustomerExcelBo)obj;
		if(!this.customerType.equals(bo.getCustomerType())) return false;
		if(AFTConstants.USER_TYPE_PERSONAL.equals(this.customerType)){
			if(this.mobile.equals(bo.getMobile()) && this.businessProjectId.equals(bo.getBusinessProjectId()))
				return true;
		}else if(AFTConstants.USER_TYPE_ORGANIZATION.equals(this.customerType)){
			if(this.identifyName.equals(bo.getIdentifyName()) && this.businessProjectId.equals(bo.getBusinessProjectId()))
				return true;
		}
		return false;
	}
	@Override
	public int hashCode() {
		if(AFTConstants.USER_TYPE_PERSONAL.equals(this.customerType))
			return (this.mobile+";"+this.mobile).hashCode();
		else
			return (this.identifyName+";"+this.businessProjectId).hashCode();
	}
	
}
