package com.uas.platform.b2b.erp.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.uas.platform.b2b.model.PurchaseForecastAllItem;

public class SaleForecastDown {
	private Long b2b_pf_id;
	private String pf_code;
	private String pf_kind;
	private Long pf_customeruu;// 客户UU
	private String pf_customername;//客户名称
	private String pf_contact;// 客户联系人(采购员)
	private Long pf_contactuu;// 客户联系人UU(采购员)
	private String pf_contactmobile;//客户联系人手机号
	private Date pf_date;//单据录入日期
	private String pf_purpose;//用途
	private List<SaleForecastDownDet> saleForecastDownDets;
	
	public Long getB2b_pf_id() {
		return b2b_pf_id;
	}

	public void setB2b_pf_id(Long b2b_pf_id) {
		this.b2b_pf_id = b2b_pf_id;
	}

	public String getPf_code() {
		return pf_code;
	}

	public void setPf_code(String pf_code) {
		this.pf_code = pf_code;
	}

	public String getPf_kind() {
		return pf_kind;
	}

	public void setPf_kind(String pf_kind) {
		this.pf_kind = pf_kind;
	}

	public Long getPf_customeruu() {
		return pf_customeruu;
	}

	public void setPf_customeruu(Long pf_customeruu) {
		this.pf_customeruu = pf_customeruu;
	}

	public String getPf_customername() {
		return pf_customername;
	}

	public void setPf_customername(String pf_customername) {
		this.pf_customername = pf_customername;
	}

	public String getPf_contact() {
		return pf_contact;
	}

	public void setPf_contact(String pf_contact) {
		this.pf_contact = pf_contact;
	}

	public Long getPf_contactuu() {
		return pf_contactuu;
	}

	public void setPf_contactuu(Long pf_contactuu) {
		this.pf_contactuu = pf_contactuu;
	}

	public String getPf_contactmobile() {
		return pf_contactmobile;
	}

	public void setPf_contactmobile(String pf_contactmobile) {
		this.pf_contactmobile = pf_contactmobile;
	}

	public Date getPf_date() {
		return pf_date;
	}

	public void setPf_date(Date pf_date) {
		this.pf_date = pf_date;
	}

	public String getPf_purpose() {
		return pf_purpose;
	}

	public void setPf_purpose(String pf_purpose) {
		this.pf_purpose = pf_purpose;
	}

	public List<SaleForecastDownDet> getSaleForecastDownDets() {
		return saleForecastDownDets;
	}

	public void setSaleForecastDownDets(
			List<SaleForecastDownDet> saleForecastDownDets) {
		this.saleForecastDownDets = saleForecastDownDets;
	}

	public SaleForecastDown(PurchaseForecastAllItem item) {
		this.b2b_pf_id = item.getOrder().getId();
		this.pf_code = item.getOrder().getCode();
		this.pf_customeruu = item.getOrder().getEnUU();
		this.pf_contactuu = item.getOrder().getUserUU();//存在单据采购员UU为单据采购员UU，否则为系统在平台新增的客户企业的一个用户
		this.pf_contact = item.getOrder().getUser().getUserName();
		this.pf_contactmobile = item.getOrder().getUser().getUserTel();
		this.pf_date = item.getOrder().getDate();
		this.pf_purpose = item.getOrder().getPurpose();
		this.pf_kind = item.getOrder().getKind();
		List<SaleForecastDownDet> details = new ArrayList<SaleForecastDownDet>();
		details.add(new SaleForecastDownDet(item));
		this.saleForecastDownDets = details;
	}
	
}
