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

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

import com.uas.platform.b2b.model.PurchaseProofingItem;
import com.uas.platform.b2b.model.PurchaseProofingSend;
import com.uas.platform.core.model.Status;

/**
 * 卖家ERP系统的客户送货提醒单
 * 
 * @author yingp
 * 
 */
public class SaleSampleSend {

	private Long b2b_ss_id;//送样单b2b Id
	private Long b2b_ps_id;//客户送样申请b2b Id
	private String ss_code;
	private Double ss_sendnum;
	private Double ss_ratio;
	private Double ss_height;
	private String ss_material;
	private String ss_materialquality;
	private String ss_address;
	private String ss_addressmark;
	private Date ss_indate;
	private Double ss_puprice;
	private Double ss_spare;
	private String ss_brand;
	private Double ss_minqty;
	private Double ss_minbuyqty;
	private Double ss_delivery;
	private String ss_attach;
	private String ss_recorder;
	private String ss_pscode;
	private Short ss_pddetno;
	private Long ss_useruu;
	private String ss_vendspec;//生产厂型号（供应商的物料规格）
	private List<RemoteFile> files;
	public List<RemoteFile> getFiles() {
		return files;
	}
	public void setFiles(List<RemoteFile> files) {
		this.files = files;
	}
	public Long getSs_useruu() {
		return ss_useruu;
	}
	public void setSs_useruu(Long ss_useruu) {
		this.ss_useruu = ss_useruu;
	}
	public String getSs_pscode() {
		return ss_pscode;
	}

	public void setSs_pscode(String ss_pscode) {
		this.ss_pscode = ss_pscode;
	}

	public Long getB2b_ss_id() {
		return b2b_ss_id;
	}

	public void setB2b_ss_id(Long b2b_ss_id) {
		this.b2b_ss_id = b2b_ss_id;
	}

	public Long getB2b_ps_id() {
		return b2b_ps_id;
	}

	public void setB2b_ps_id(Long b2b_ps_id) {
		this.b2b_ps_id = b2b_ps_id;
	}

	public String getSs_code() {
		return ss_code;
	}

	public void setSs_code(String ss_code) {
		this.ss_code = ss_code;
	}

	public Double getSs_sendnum() {
		return ss_sendnum;
	}

	public void setSs_sendnum(Double ss_sendnum) {
		this.ss_sendnum = ss_sendnum;
	}

	public Double getSs_ratio() {
		return ss_ratio;
	}

	public void setSs_ratio(Double ss_ratio) {
		this.ss_ratio = ss_ratio;
	}

	public Double getSs_height() {
		return ss_height;
	}

	public void setSs_height(Double ss_height) {
		this.ss_height = ss_height;
	}

	public String getSs_material() {
		return ss_material;
	}

	public void setSs_material(String ss_material) {
		this.ss_material = ss_material;
	}

	public String getSs_materialquality() {
		return ss_materialquality;
	}

	public void setSs_materialquality(String ss_materialquality) {
		this.ss_materialquality = ss_materialquality;
	}

	public String getSs_address() {
		return ss_address;
	}

	public void setSs_address(String ss_address) {
		this.ss_address = ss_address;
	}

	public String getSs_addressmark() {
		return ss_addressmark;
	}

	public void setSs_addressmark(String ss_addressmark) {
		this.ss_addressmark = ss_addressmark;
	}

	public Date getSs_indate() {
		return ss_indate;
	}

	public void setSs_indate(Date ss_indate) {
		this.ss_indate = ss_indate;
	}

	public Double getSs_puprice() {
		return ss_puprice;
	}

	public void setSs_puprice(Double ss_puprice) {
		this.ss_puprice = ss_puprice;
	}

	public Double getSs_spare() {
		return ss_spare;
	}

	public void setSs_spare(Double ss_spare) {
		this.ss_spare = ss_spare;
	}

	public String getSs_brand() {
		return ss_brand;
	}

	public void setSs_brand(String ss_brand) {
		this.ss_brand = ss_brand;
	}

	public Double getSs_minqty() {
		return ss_minqty;
	}

	public void setSs_minqty(Double ss_minqty) {
		this.ss_minqty = ss_minqty;
	}

	public Double getSs_minbuyqty() {
		return ss_minbuyqty;
	}

	public void setSs_minbuyqty(Double ss_minbuyqty) {
		this.ss_minbuyqty = ss_minbuyqty;
	}

	public Double getSs_delivery() {
		return ss_delivery;
	}

	public void setSs_delivery(Double ss_delivery) {
		this.ss_delivery = ss_delivery;
	}

	public String getSs_attach() {
		return ss_attach;
	}

	public void setSs_attach(String ss_attach) {
		this.ss_attach = ss_attach;
	}

	public String getSs_recorder() {
		return ss_recorder;
	}

	public void setSs_recorder(String ss_recorder) {
		this.ss_recorder = ss_recorder;
	}

	public Short getSs_pddetno() {
		return ss_pddetno;
	}

	public void setSs_pddetno(Short ss_pddetno) {
		this.ss_pddetno = ss_pddetno;
	}
	
	public String getSs_vendspec() {
		return ss_vendspec;
	}
	public void setSs_vendspec(String ss_vendspec) {
		this.ss_vendspec = ss_vendspec;
	}
	/**
	 * no-arg constructor
	 * 空构造函数
	 */
	public SaleSampleSend(){}

	public SaleSampleSend(PurchaseProofingSend proofingSend){
		this.b2b_ps_id = proofingSend.getProofingItem().getId();
		this.b2b_ss_id = proofingSend.getId();
		this.ss_address = proofingSend.getAdress();
		this.ss_addressmark = proofingSend.getAddressMark();
		this.ss_brand = proofingSend.getBrand();
		this.ss_code = proofingSend.getCode();
		this.ss_delivery = proofingSend.getDelivery();
		this.ss_height = proofingSend.getWeight();
		this.ss_indate = proofingSend.getDate();
		this.ss_material = proofingSend.getMaterial();
		this.ss_materialquality = proofingSend.getMaterialQuality();
		this.ss_minbuyqty = proofingSend.getMinBuyQty();
		this.ss_minqty = proofingSend.getMinQty();
		this.ss_ratio = proofingSend.getRatio();
		this.ss_recorder = proofingSend.getRecorder();
		this.ss_sendnum = proofingSend.getSendQty();
		this.ss_spare = proofingSend.getSpare();
		this.ss_puprice = proofingSend.getPuprice();
		this.ss_pscode = proofingSend.getProofingItem().getProofing().getCode();
		this.ss_pddetno = proofingSend.getProofingItem().getNumber();
		this.ss_useruu = proofingSend.getProofingItem().getProofing().getUserUU();
		this.ss_vendspec = proofingSend.getVendSpec();
	}
	
	public PurchaseProofingSend convert(){
		PurchaseProofingSend proofingSend = new PurchaseProofingSend();
		proofingSend.setAddressMark(ss_addressmark);
		proofingSend.setAdress(ss_address);
		proofingSend.setBackStatus((short) Status.DOWNLOADED.value());//传输到卖家ERP的状态为已上传
		proofingSend.setBrand(ss_brand);
		proofingSend.setCode(ss_code);
		proofingSend.setDate(ss_indate);
		proofingSend.setDelivery(ss_delivery);
		proofingSend.setItemId(b2b_ps_id);
		proofingSend.setMaterial(ss_material);
		proofingSend.setMaterialQuality(ss_materialquality);
		proofingSend.setMinBuyQty(ss_minbuyqty);
		proofingSend.setMinQty(ss_minqty);
		PurchaseProofingItem proofingItem = new PurchaseProofingItem();
		proofingItem.setId(b2b_ps_id);
		proofingSend.setProofingItem(proofingItem);
		proofingSend.setPuprice(ss_puprice);
		proofingSend.setRatio(ss_ratio);
		proofingSend.setRecorder(ss_recorder);
		proofingSend.setSendStatus((short) Status.NOT_UPLOAD.value());//传输到买家ERP的状态为未上传
		proofingSend.setSpare(ss_spare);
		proofingSend.setWeight(ss_height);
		proofingSend.setSendQty(ss_sendnum);
		proofingSend.setVendSpec(ss_vendspec);
		return proofingSend;
	}


}
