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

import com.uas.platform.b2b.model.MakeAcceptItem;
import com.uas.platform.b2b.model.MakeOrder;
import com.uas.platform.b2b.model.MakeReturnItem;

/**
 * 采购方角度ERP委外验收单明细
 * @author suntg
 * @date 2015年4月17日10:32:24
 *
 */
public class MakeProdInOutDetail {

	private Long pd_id;//id
	private Short pd_detno;//明细行序号
	private String pd_ordercode;//委外编号 1
	private Short pd_orderdetno;//采购单明细行号
	private Double pd_inqty;//入库数量 1
	private Double pd_outqty;//出库数量 1
	private Double pd_orderprice;//委外加工单价 1
	private Double pd_taxrate;//税率 1
	private String pd_batchcode;//批号 1
	private String pd_remark;//备注 1
	private String pd_whname;//仓库名称
	
	public Long getPd_id() {
		return pd_id;
	}
	public void setPd_id(Long pd_id) {
		this.pd_id = pd_id;
	}
	public Short getPd_detno() {
		return pd_detno;
	}
	public void setPd_detno(Short pd_detno) {
		this.pd_detno = pd_detno;
	}
	public String getPd_ordercode() {
		return pd_ordercode;
	}
	public void setPd_ordercode(String pd_ordercode) {
		this.pd_ordercode = pd_ordercode;
	}
	public Short getPd_orderdetno() {
		return pd_orderdetno;
	}
	public void setPd_orderdetno(Short pd_orderdetno) {
		this.pd_orderdetno = pd_orderdetno;
	}
	public Double getPd_inqty() {
		return pd_inqty;
	}
	public void setPd_inqty(Double pd_inqty) {
		this.pd_inqty = pd_inqty;
	}
	public Double getPd_taxrate() {
		return pd_taxrate;
	}
	public void setPd_taxrate(Double pd_taxrate) {
		this.pd_taxrate = pd_taxrate;
	}
	public String getPd_batchcode() {
		return pd_batchcode;
	}
	public void setPd_batchcode(String pd_batchcode) {
		this.pd_batchcode = pd_batchcode;
	}
	public String getPd_remark() {
		return pd_remark;
	}
	public void setPd_remark(String pd_remark) {
		this.pd_remark = pd_remark;
	}
	public Double getPd_orderprice() {
		return pd_orderprice;
	}
	public void setPd_orderprice(Double pd_orderprice) {
		this.pd_orderprice = pd_orderprice;
	}
	public Double getPd_outqty() {
		return pd_outqty;
	}
	public void setPd_outqty(Double pd_outqty) {
		this.pd_outqty = pd_outqty;
	}
	public String getPd_whname() {
		return pd_whname;
	}
	public void setPd_whname(String pd_whname) {
		this.pd_whname = pd_whname;
	}
	/**
	 * 委外验收
	 * @return
	 */
	public MakeAcceptItem convent(){
		MakeAcceptItem acceptItem = new MakeAcceptItem();
		acceptItem.setNumber(this.pd_detno);
		acceptItem.setQty(this.pd_inqty);
		acceptItem.setRemark(this.pd_remark);
		acceptItem.setBatchCode(this.pd_batchcode);
		acceptItem.setOrderPrice(this.pd_orderprice);
		acceptItem.setTaxrate(this.pd_taxrate);
		acceptItem.setWhname(this.pd_whname);
		MakeOrder order = new MakeOrder();
		order.setCode(this.pd_ordercode);
		acceptItem.setOrder(order);
		return acceptItem;
	}
	/**
	 * 委外验退
	 * @return
	 */
	public MakeReturnItem conventToReturn(){
		MakeReturnItem returnItem = new MakeReturnItem();
		returnItem.setNumber(this.pd_detno);
		returnItem.setQty(this.pd_outqty);
		returnItem.setRemark(this.pd_remark);
		returnItem.setBatchCode(this.pd_batchcode);
		returnItem.setOrderPrice(this.pd_orderprice);
		returnItem.setTaxrate(this.pd_taxrate);
		returnItem.setWhname(this.pd_whname);
		MakeOrder order = new MakeOrder();
		order.setCode(this.pd_ordercode);
		returnItem.setOrder(order);
		return returnItem;
		
	}
	
}
