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

import com.uas.platform.b2b.model.Product;
import com.uas.platform.b2b.support.SystemSession;

/**
 * ERP系统的产品
 * 
 * @author yingp
 * 
 */
public class Prod {

	private String pr_code;
	private String pr_detail;
	private String pr_spec;
	private String pr_unit;
	private Float pr_zxbzs;
	private Float pr_zxdhl;
	private Float pr_leadtime;

	public String getPr_code() {
		return pr_code;
	}

	public void setPr_code(String pr_code) {
		this.pr_code = pr_code;
	}

	public String getPr_detail() {
		return pr_detail;
	}

	public void setPr_detail(String pr_detail) {
		this.pr_detail = pr_detail;
	}

	public String getPr_spec() {
		return pr_spec;
	}

	public void setPr_spec(String pr_spec) {
		this.pr_spec = pr_spec;
	}

	public String getPr_unit() {
		return pr_unit;
	}

	public void setPr_unit(String pr_unit) {
		this.pr_unit = pr_unit;
	}

	public Float getPr_zxbzs() {
		return pr_zxbzs;
	}

	public void setPr_zxbzs(Float pr_zxbzs) {
		this.pr_zxbzs = pr_zxbzs;
	}

	public Float getPr_zxdhl() {
		return pr_zxdhl;
	}

	public void setPr_zxdhl(Float pr_zxdhl) {
		this.pr_zxdhl = pr_zxdhl;
	}

	public Float getPr_leadtime() {
		return pr_leadtime;
	}

	public void setPr_leadtime(Float pr_leadtime) {
		this.pr_leadtime = pr_leadtime;
	}

	/**
	 * 转为平台的产品
	 * 
	 * @return
	 */
	public Product convert() {
		Product product = new Product();
		product.setCode(this.pr_code);
		product.setEnUU(SystemSession.getUser().getEnterprise().getUu());
		product.setUserUU(SystemSession.getUser().getUserUU());
		product.setTitle(this.pr_detail);
		product.setSpec(this.pr_spec);
		product.setUnit(this.pr_unit);
		product.setMinPack(this.pr_zxbzs);
		product.setMinOrder(this.pr_zxdhl);
		product.setLeadtime(this.pr_leadtime);
		return product;
	}

}
