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

import com.uas.platform.b2b.model.Product;
import com.uas.platform.b2b.model.PurchaseInquiryMouldDetail;

/**
 * 模具询价模具物料明细
 * 
 *
 */
public class InquiryMouldDetail {

	private Long b2b_imd_id;
	private Long ind_id;
	private String ind_code;
	private Short ind_detno;
	private String ind_prodcode;
	private String ind_proddetail;
	private String ind_prodspec;
	private Double ind_price;
	private String ind_remark;
	private String ind_pscode;
	private String ind_psname;

	private Product product;


	public Long getB2b_imd_id() {
		return b2b_imd_id;
	}

	public void setB2b_imd_id(Long b2b_imd_id) {
		this.b2b_imd_id = b2b_imd_id;
	}

	public String getInd_code() {
		return ind_code;
	}

	public void setInd_code(String ind_code) {
		this.ind_code = ind_code;
	}

	public Short getInd_detno() {
		return ind_detno;
	}

	public void setInd_detno(Short ind_detno) {
		this.ind_detno = ind_detno;
	}

	public String getInd_prodcode() {
		return ind_prodcode;
	}

	public void setInd_prodcode(String ind_prodcode) {
		this.ind_prodcode = ind_prodcode;
	}

	public String getInd_proddetail() {
		return ind_proddetail;
	}

	public void setInd_proddetail(String ind_proddetail) {
		this.ind_proddetail = ind_proddetail;
	}

	public String getInd_prodspec() {
		return ind_prodspec;
	}

	public void setInd_prodspec(String ind_prodspec) {
		this.ind_prodspec = ind_prodspec;
	}

	public Double getInd_price() {
		return ind_price;
	}

	public void setInd_price(Double ind_price) {
		this.ind_price = ind_price;
	}

	public String getInd_remark() {
		return ind_remark;
	}

	public void setInd_remark(String ind_remark) {
		this.ind_remark = ind_remark;
	}

	public String getInd_pscode() {
		return ind_pscode;
	}

	public void setInd_pscode(String ind_pscode) {
		this.ind_pscode = ind_pscode;
	}

	public String getInd_psname() {
		return ind_psname;
	}

	public void setInd_psname(String ind_psname) {
		this.ind_psname = ind_psname;
	}

	public Long getInd_id() {
		return ind_id;
	}

	public void setInd_id(Long ind_id) {
		this.ind_id = ind_id;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	/**
	 * 转为平台的模具物料明细
	 * 
	 * @return
	 */
	public PurchaseInquiryMouldDetail convert() {
		PurchaseInquiryMouldDetail purchaseInquiryMouldDetail = new PurchaseInquiryMouldDetail();
		purchaseInquiryMouldDetail.setCode(this.ind_code);
		purchaseInquiryMouldDetail.setDetno(this.ind_detno);
		purchaseInquiryMouldDetail.setErpSourceId(this.ind_id);
		purchaseInquiryMouldDetail.setPrice(this.ind_price);
		purchaseInquiryMouldDetail.setProdCode(this.ind_prodcode);
		// purchaseInquiryMouldDetail.setProdCode(product.getCode());
		// purchaseInquiryMouldDetail.setProdTitle(product.getTitle());
		// purchaseInquiryMouldDetail.setProdSpec(product.getSpec());
		purchaseInquiryMouldDetail.setPsCode(this.ind_pscode);
		purchaseInquiryMouldDetail.setPsName(this.ind_psname);
		purchaseInquiryMouldDetail.setRemark(this.ind_remark);
		
		return purchaseInquiryMouldDetail;
	}

	public InquiryMouldDetail() {

	}

	public InquiryMouldDetail(PurchaseInquiryMouldDetail detail) {
		this.b2b_imd_id = detail.getId();
		this.ind_id = detail.getErpSourceId();
		this.ind_code = detail.getCode();
		this.ind_detno = detail.getDetno();
		this.ind_price = detail.getReply();
		this.ind_prodcode = detail.getProdCode();
		// this.ind_proddetail = detail.getProdTitle();
		// this.ind_prodspec = detail.getProdSpec();
		this.ind_psname = detail.getPsName();
		this.ind_pscode = detail.getPsCode();
		this.ind_remark = detail.getRemark();
	}


}
