package com.uas.platform.b2b.model;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.Set;

/**
 * 平台里面，客户收到供应商的送样后的认定单
 * 
 * @author suntg
 *
 */
@Table(name = "purc$proofingapproval")
@Entity
public class PurchaseProofingApproval implements Serializable {

	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "psa_id")
	private Long id;
	/**
	 * 所属企业UU(买方)
	 */
	@Column(name = "psa_enuu")
	private Long enUU;
	/**
	 * 企业（买方）
	 */
	@OneToOne(cascade = { CascadeType.MERGE, CascadeType.REFRESH })
	@JoinColumn(name = "psa_enuu", insertable = false, updatable = false)
	private EnterpriseInfo enterprise;
	/**
	 * 认定单号编号
	 */
	@Column(name = "psa_code")
	private String code;
	/**
	 * 打样申请单号
	 */
	@Column(name = "psa_pscode")
	private String pscode;
	/**
	 * 送样单号
	 */
	@Column(name = "psa_sscode")
	private String sscode;
	/**
	 * 供应商UU
	 */
	@Column(name = "psa_venduu")
	private Long vendUU;
	/**
	 * 物料编号
	 */
	@Column(name = "psa_prodcode")
	private String prodCode;
	/**
	 * 物料名称
	 */
	@Column(name = "psa_proddetail")
	private String prodDetail;
	/**
	 * 物料规格
	 */
	@Column(name = "psa_prodspec")
	private String prodSpec;
	/**
	 * 物料单位
	 */
	@Column(name = "psa_produnit")
	private String prodUnit;
	/**
	 * 数量
	 */
	@Column(name = "psa_sampleqty")
	private Double sampleqty;
	/**
	 * 单重(g)
	 */
	@Column(name = "psa_height")
	private Double height;
	/**
	 * 材料
	 */
	@Column(name = "psa_material")
	private String material;
	/**
	 * 材质
	 */
	@Column(name = "psa_materialquality")
	private String materialquality;
	/**
	 * 产地
	 */
	@Column(name = "psa_address")
	private String address;
	/**
	 * 产地标示
	 */
	@Column(name = "psa_addressmark")
	private String addressmark;
	/**
	 * 录入人
	 */
	@Column(name = "psa_recordor")
	private String recordor;
	/**
	 * 录入日期
	 */
	@Column(name = "psa_indate")
	private Date inDate;
	/**
	 * 备注
	 */
	@Column(name = "psa_remark")
	private String remark;
	/**
	 * 附件
	 */
	@OneToMany(cascade = {CascadeType.ALL}, fetch = FetchType.EAGER)
	@JoinTable(name="purc$approvalattach", joinColumns = @JoinColumn(name = "psa_id", referencedColumnName = "psa_id"), inverseJoinColumns = @JoinColumn(name="at_id", referencedColumnName = "at_id"))
	private Set<Attach> attachs;
	/**
	 * 收到样品时间 - 研发认定
	 */
	@Column(name = "psa_prdtime")
	private Date prdtime;
	/**
	 * 收到样品数量 - 研发认定
	 */
	@Column(name = "psa_prdypsl")
	private Double prdypsl;
	/**
	 * 综合判定 - 研发认定
	 */
	@Column(name = "psa_prdresult")
	private String prdresult;
	/**
	 * 建议 - 研发判定
	 */
	@Column(name = "psa_prdadvice")
	private String prdadvice;
	/**
	 * 描述 - 研发认定
	 */
	@Column(name = "psa_prdremark", length = 1000)
	private String prdremark;
	/**
	 * 附件 - 研发认定
	 */
	@OneToMany(cascade = {CascadeType.ALL}, fetch = FetchType.EAGER)
	@JoinTable(name="purc$approvalattach_prd", joinColumns = @JoinColumn(name = "psa_id", referencedColumnName = "psa_id"), inverseJoinColumns = @JoinColumn(name="at_id", referencedColumnName = "at_id"))
	private Set<Attach> prdAttachs;
	/**
	 * 收到样品时间 - IQC认定
	 */
	@Column(name = "psa_padtime")
	private Date padtime;
	/**
	 * 收到样品数量 - IQC认定
	 */
	@Column(name = "psa_padypsl")
	private Double padypsl;
	/**
	 * 综合判定 - IQC认定
	 */
	@Column(name = "psa_padresult")
	private String padresult;
	/**
	 * 建议 - IQC认定
	 */
	@Column(name = "psa_padadvice")
	private String padadvice;
	/**
	 * 描述 - IQC认定
	 */
	@Column(name = "psa_padremark", length = 1000)
	private String padremark;
	/**
	 * 附件 - IQC认定
	 */
	@OneToMany(cascade = {CascadeType.ALL}, fetch = FetchType.EAGER)
	@JoinTable(name="purc$approvalattach_pad", joinColumns = @JoinColumn(name = "psa_id", referencedColumnName = "psa_id"), inverseJoinColumns = @JoinColumn(name="at_id", referencedColumnName = "at_id"))
	private Set<Attach> padAttachs;
	/**
	 * 收到样品时间 - 工程认定
	 */
	@Column(name = "psa_ppdtime")
	private Date ppdtime;
	/**
	 * 收到样品数量 - 工程认定
	 */
	@Column(name = "psa_ppdypsl")
	private Double ppdypsl;
	/**
	 * 综合判定 - 工程认定
	 */
	@Column(name = "psa_ppdresult")
	private String ppdresult;
	/**
	 * 建议 - 工程认定
	 */
	@Column(name = "psa_ppdadvice")
	private String ppdadvice;
	/**
	 * 描述 - 工程认定
	 */
	@Column(name = "psa_ppdremark", length = 1000)
	private String ppdremark;
	/**
	 * 附件 - 工程认定
	 */
	@OneToMany(cascade = {CascadeType.ALL}, fetch = FetchType.EAGER)
	@JoinTable(name="purc$approvalattach_ppd", joinColumns = @JoinColumn(name = "psa_id", referencedColumnName = "psa_id"), inverseJoinColumns = @JoinColumn(name="at_id", referencedColumnName = "at_id"))
	private Set<Attach> ppdAttachs;
	/**
	 * 认定结果
	 */
	@Column(name = "psa_finalresult")
	private String finalresult;
	/**
	 * 原因
	 */
	@Column(name = "psa_finalresultremark")
	private String finalresultremark;
	/**
	 * 优选等级
	 */
	@Column(name = "psa_yxdj")
	private String yxdj;
	/**
	 * 传输状态(到卖方)
	 */
	@Column(name = "psa_sendstatus")
	private Short sendStatus;

	/**
	 * 对应的erpId
	 */
	@Column(name = "psa_erpid")
	private Long erpId;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getEnUU() {
		return enUU;
	}

	public void setEnUU(Long enUU) {
		this.enUU = enUU;
	}

	public EnterpriseInfo getEnterprise() {
		return enterprise;
	}

	public void setEnterprise(EnterpriseInfo enterprise) {
		this.enterprise = enterprise;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getPscode() {
		return pscode;
	}

	public void setPscode(String pscode) {
		this.pscode = pscode;
	}

	public String getSscode() {
		return sscode;
	}

	public void setSscode(String sscode) {
		this.sscode = sscode;
	}

	public Long getVendUU() {
		return vendUU;
	}

	public void setVendUU(Long vendUU) {
		this.vendUU = vendUU;
	}

	public String getProdCode() {
		return prodCode;
	}

	public void setProdCode(String prodCode) {
		this.prodCode = prodCode;
	}

	public String getProdDetail() {
		return prodDetail;
	}

	public void setProdDetail(String prodDetail) {
		this.prodDetail = prodDetail;
	}

	public String getProdSpec() {
		return prodSpec;
	}

	public void setProdSpec(String prodSpec) {
		this.prodSpec = prodSpec;
	}

	public String getProdUnit() {
		return prodUnit;
	}

	public void setProdUnit(String prodUnit) {
		this.prodUnit = prodUnit;
	}

	public Double getSampleqty() {
		return sampleqty;
	}

	public void setSampleqty(Double sampleqty) {
		this.sampleqty = sampleqty;
	}

	public Double getHeight() {
		return height;
	}

	public void setHeight(Double height) {
		this.height = height;
	}

	public String getMaterial() {
		return material;
	}

	public void setMaterial(String material) {
		this.material = material;
	}

	public String getMaterialquality() {
		return materialquality;
	}

	public void setMaterialquality(String materialquality) {
		this.materialquality = materialquality;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAddressmark() {
		return addressmark;
	}

	public void setAddressmark(String addressmark) {
		this.addressmark = addressmark;
	}

	public String getRecordor() {
		return recordor;
	}

	public void setRecordor(String recordor) {
		this.recordor = recordor;
	}

	public Date getInDate() {
		return inDate;
	}

	public void setInDate(Date inDate) {
		this.inDate = inDate;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getPrdtime() {
		return prdtime;
	}

	public void setPrdtime(Date prdtime) {
		this.prdtime = prdtime;
	}

	public Double getPrdypsl() {
		return prdypsl;
	}

	public void setPrdypsl(Double prdypsl) {
		this.prdypsl = prdypsl;
	}

	public String getPrdresult() {
		return prdresult;
	}

	public void setPrdresult(String prdresult) {
		this.prdresult = prdresult;
	}

	public String getPrdadvice() {
		return prdadvice;
	}

	public void setPrdadvice(String prdadvice) {
		this.prdadvice = prdadvice;
	}

	public String getPrdremark() {
		return prdremark;
	}

	public void setPrdremark(String prdremark) {
		this.prdremark = prdremark;
	}

	public Date getPadtime() {
		return padtime;
	}

	public void setPadtime(Date padtime) {
		this.padtime = padtime;
	}

	public Double getPadypsl() {
		return padypsl;
	}

	public void setPadypsl(Double padypsl) {
		this.padypsl = padypsl;
	}

	public String getPadresult() {
		return padresult;
	}

	public void setPadresult(String padresult) {
		this.padresult = padresult;
	}

	public String getPadadvice() {
		return padadvice;
	}

	public void setPadadvice(String padadvice) {
		this.padadvice = padadvice;
	}

	public String getPadremark() {
		return padremark;
	}

	public void setPadremark(String padremark) {
		this.padremark = padremark;
	}

	public Date getPpdtime() {
		return ppdtime;
	}

	public void setPpdtime(Date ppdtime) {
		this.ppdtime = ppdtime;
	}

	public Double getPpdypsl() {
		return ppdypsl;
	}

	public void setPpdypsl(Double ppdypsl) {
		this.ppdypsl = ppdypsl;
	}

	public String getPpdresult() {
		return ppdresult;
	}

	public void setPpdresult(String ppdresult) {
		this.ppdresult = ppdresult;
	}

	public String getPpdadvice() {
		return ppdadvice;
	}

	public void setPpdadvice(String ppdadvice) {
		this.ppdadvice = ppdadvice;
	}

	public String getPpdremark() {
		return ppdremark;
	}

	public void setPpdremark(String ppdremark) {
		this.ppdremark = ppdremark;
	}

	public String getFinalresult() {
		return finalresult;
	}

	public void setFinalresult(String finalresult) {
		this.finalresult = finalresult;
	}

	public String getFinalresultremark() {
		return finalresultremark;
	}

	public void setFinalresultremark(String finalresultremark) {
		this.finalresultremark = finalresultremark;
	}

	public Short getSendStatus() {
		return sendStatus;
	}

	public void setSendStatus(Short sendStatus) {
		this.sendStatus = sendStatus;
	}

	public Set<Attach> getAttachs() {
		return attachs;
	}

	public void setAttachs(Set<Attach> attachs) {
		this.attachs = attachs;
	}

	public Set<Attach> getPrdAttachs() {
		return prdAttachs;
	}

	public void setPrdAttachs(Set<Attach> prdAttachs) {
		this.prdAttachs = prdAttachs;
	}

	public Set<Attach> getPadAttachs() {
		return padAttachs;
	}

	public void setPadAttachs(Set<Attach> padAttachs) {
		this.padAttachs = padAttachs;
	}

	public Set<Attach> getPpdAttachs() {
		return ppdAttachs;
	}

	public void setPpdAttachs(Set<Attach> ppdAttachs) {
		this.ppdAttachs = ppdAttachs;
	}

	public String getYxdj() {
		return yxdj;
	}

	public void setYxdj(String yxdj) {
		this.yxdj = yxdj;
	}

	public Long getErpId() {
		return erpId;
	}

	public void setErpId(Long erpId) {
		this.erpId = erpId;
	}
}