Browse Source

客户打样申请+送样

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@655 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
suntg 11 years ago
parent
commit
d5bde5168d

+ 3 - 3
src/main/java/com/uas/platform/b2b/model/Attach.java

@@ -41,7 +41,7 @@ public class Attach {
 	private Long size;
 	private Long size;
 	
 	
 	@Transient
 	@Transient
-	private Long sourceId;
+	private String sourceId;
 
 
 	public Long getId() {
 	public Long getId() {
 		return id;
 		return id;
@@ -83,11 +83,11 @@ public class Attach {
 		this.size = size;
 		this.size = size;
 	}
 	}
 
 
-	public Long getSourceId() {
+	public String getSourceId() {
 		return sourceId;
 		return sourceId;
 	}
 	}
 
 
-	public void setSourceId(Long sourceId) {
+	public void setSourceId(String sourceId) {
 		this.sourceId = sourceId;
 		this.sourceId = sourceId;
 	}
 	}
 
 

+ 280 - 0
src/main/java/com/uas/platform/b2b/model/PurchaseProofing.java

@@ -0,0 +1,280 @@
+package com.uas.platform.b2b.model;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Set;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToMany;
+import javax.persistence.OneToOne;
+import javax.persistence.OrderBy;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+import org.codehaus.jackson.annotate.JsonIgnore;
+
+/**
+ * 平台里面,以供应商的角度来查看客户打样申请
+ * 
+ * @author suntg
+ *
+ */
+@Table(name = "purc$proofing")
+@Entity
+public class PurchaseProofing implements Serializable {
+
+	/**
+	 * 序列号
+	 */
+	private static final long serialVersionUID = 2147648497108840786L;
+
+	@Id
+	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "purc$proofing_gen")
+	@SequenceGenerator(name = "purc$proofing_gen", sequenceName = "purc$proofing_seq", allocationSize = 1)
+	@Column(name = "pp_id")
+	private Long id;
+
+	/**
+	 * 所属企业UU(买方)
+	 */
+	@Column(name = "pp_enuu")
+	private Long enUU;
+
+	/**
+	 * 企业(买方)
+	 */
+	@OneToOne(cascade = { CascadeType.MERGE })
+	@JoinColumn(name = "pp_enuu", insertable = false, updatable = false)
+	private Enterprise enterprise;
+	
+	/**
+	 * 买方申请人uu
+	 */
+	@Column(name = "pp_useruu")
+	private Long userUU;
+	
+	/**
+	 * 买方申请人
+	 */
+	@OneToOne(cascade = { CascadeType.MERGE })
+	@JoinColumn(name = "pp_useruu", insertable = false, updatable = false)
+	private User user;
+
+	/**
+	 * 流水号
+	 */
+	@Column(name = "pp_code")
+	private String code;
+
+	/**
+	 * 单据录入日期
+	 */
+	@Column(name = "pp_indate")
+	private Date date;
+
+	/**
+	 * 录入人
+	 */
+	@Column(name = "pp_recorder")
+	private String recorder;
+
+	/**
+	 * 物料(买方物料)
+	 */
+	@OneToOne(cascade = { CascadeType.REFRESH })
+	@JoinColumn(name = "pp_prid", insertable = false, updatable = false)
+	private Product product;
+
+	@Column(name = "pp_prid")
+	private Long productId;
+	
+	/**
+	 * 是否收费
+	 */
+	@Column(name = "pp_ischarge")
+	private String isCharge;
+
+	/**
+	 * 需求交货日期
+	 */
+	@Column(name = "pp_delivery")
+	private Date delivery;
+
+	/**
+	 * 环保要求
+	 */
+	@Column(name = "pp_envrequiry")
+	private String envrequiry;
+
+	/**
+	 * 备注
+	 */
+	@Column(name = "pp_remark")
+	private String remark;
+	
+	/**
+	 * 使用范围
+	 */
+	@Column(name = "pp_scope")
+	private String scope;
+
+	/**
+	 * 打样申请明细
+	 */
+	@OneToMany(mappedBy = "proofing", cascade = { CascadeType.REFRESH, CascadeType.PERSIST, CascadeType.REMOVE, CascadeType.MERGE }, fetch = FetchType.EAGER)
+	@OrderBy("number")
+	private Set<PurchaseProofingItem> proofingItems;
+
+	/**
+	 * 附件ID
+	 */
+	@Column(name = "pp_attach")
+	private String attach;
+
+	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 Enterprise getEnterprise() {
+		return enterprise;
+	}
+
+	public void setEnterprise(Enterprise enterprise) {
+		this.enterprise = enterprise;
+	}
+
+	public Long getUserUU() {
+		return userUU;
+	}
+
+	public void setUserUU(Long userUU) {
+		this.userUU = userUU;
+	}
+
+	public User getUser() {
+		return user;
+	}
+
+	public void setUser(User user) {
+		this.user = user;
+	}
+
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public Date getDate() {
+		return date;
+	}
+
+	public void setDate(Date date) {
+		this.date = date;
+	}
+
+	public String getRecorder() {
+		return recorder;
+	}
+
+	public void setRecorder(String recorder) {
+		this.recorder = recorder;
+	}
+
+	public Product getProduct() {
+		return product;
+	}
+
+	public void setProduct(Product product) {
+		this.product = product;
+	}
+
+	public Long getProductId() {
+		return productId;
+	}
+
+	public void setProductId(Long productId) {
+		this.productId = productId;
+	}
+
+	public String getIsCharge() {
+		return isCharge;
+	}
+
+	public void setIsCharge(String isCharge) {
+		this.isCharge = isCharge;
+	}
+
+	public Date getDelivery() {
+		return delivery;
+	}
+
+	public void setDelivery(Date delivery) {
+		this.delivery = delivery;
+	}
+
+	public String getEnvrequiry() {
+		return envrequiry;
+	}
+
+	public void setEnvrequiry(String envrequiry) {
+		this.envrequiry = envrequiry;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public String getScope() {
+		return scope;
+	}
+
+	public void setScope(String scope) {
+		this.scope = scope;
+	}
+	
+	@JsonIgnore
+	public Set<PurchaseProofingItem> getProofingItems() {
+		return proofingItems;
+	}
+
+	public void setProofingItems(Set<PurchaseProofingItem> proofingItems) {
+		this.proofingItems = proofingItems;
+	}
+
+	public String getAttach() {
+		return attach;
+	}
+
+	public void setAttach(String attach) {
+		this.attach = attach;
+	}
+
+	
+
+}

+ 222 - 0
src/main/java/com/uas/platform/b2b/model/PurchaseProofingItem.java

@@ -0,0 +1,222 @@
+package com.uas.platform.b2b.model;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+/**
+ * 平台里面,以供应商的角度来查看客户打样申请明细
+ * 
+ * @author yingp
+ *
+ */
+@Table(name = "purc$proofingitems")
+@Entity
+public class PurchaseProofingItem {
+
+	@Id
+	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "purc$proofingitems_gen")
+	@SequenceGenerator(name = "purc$proofingitems_gen", sequenceName = "purc$proofingitems_seq", allocationSize = 1)
+	@Column(name = "ppi_id")
+	private Long id;
+
+	/**
+	 * 来源(买家ERP采购询价明细)的ID
+	 */
+	@Column(name = "ppi_sourceid", updatable = false)
+	private Long sourceId;
+
+	/**
+	 * 序号
+	 */
+	@Column(name = "ppi_number")
+	private Short number;
+
+	/**
+	 * 客户打样申请
+	 */
+	@ManyToOne(cascade = CascadeType.ALL, optional = true)
+	@JoinColumn(name = "ppi_ppid", nullable = false)
+	private PurchaseProofing proofing;
+
+	/**
+	 * 币种
+	 */
+	@Column(name = "ppi_currency")
+	private String currency;
+
+	/**
+	 * 税率
+	 */
+	@Column(name = "ppi_taxrate")
+	private Double taxrate;
+
+	/**
+	 * 单价
+	 */
+	@Column(name = "ppi_price")
+	private Double price;
+
+	/**
+	 * 数量
+	 */
+	@Column(name = "ppi_qty")
+	private Double qty;
+
+	/**
+	 * 总价
+	 */
+	@Column(name = "ppi_amount")
+	private Double amount;
+
+	/**
+	 * 供应商UU
+	 */
+	@Column(name = "ppi_venduu")
+	private Long vendUU;
+
+	/**
+	 * 供应商联系人UU
+	 */
+	@Column(name = "ppi_venduseruu")
+	private Long vendUserUU;
+
+	/**
+	 * 备注
+	 */
+	@Column(name = "ppi_remark")
+	private String remark;
+	
+	/**
+	 * 送样状态(未送样、已送样)
+	 */
+	@Column(name = "ppi_status")
+	private Short status;
+	
+	/**
+	 * 传输到卖家ERP的状态
+	 */
+	@Column(name = "ppi_sendstatus")
+	private Short sendStatus;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getSourceId() {
+		return sourceId;
+	}
+
+	public void setSourceId(Long sourceId) {
+		this.sourceId = sourceId;
+	}
+
+	public Short getNumber() {
+		return number;
+	}
+
+	public void setNumber(Short number) {
+		this.number = number;
+	}
+
+	public PurchaseProofing getProofing() {
+		return proofing;
+	}
+
+	public void setProofing(PurchaseProofing proofing) {
+		this.proofing = proofing;
+	}
+
+	public String getCurrency() {
+		return currency;
+	}
+
+	public void setCurrency(String currency) {
+		this.currency = currency;
+	}
+
+	public Double getTaxrate() {
+		return taxrate;
+	}
+
+	public void setTaxrate(Double taxrate) {
+		this.taxrate = taxrate;
+	}
+
+	public Double getPrice() {
+		return price;
+	}
+
+	public void setPrice(Double price) {
+		this.price = price;
+	}
+
+	public Double getQty() {
+		return qty;
+	}
+
+	public void setQty(Double qty) {
+		this.qty = qty;
+	}
+
+	public Double getAmount() {
+		return amount;
+	}
+
+	public void setAmount(Double amount) {
+		this.amount = amount;
+	}
+
+	public Long getVendUU() {
+		return vendUU;
+	}
+
+	public void setVendUU(Long vendUU) {
+		this.vendUU = vendUU;
+	}
+
+	public Long getVendUserUU() {
+		return vendUserUU;
+	}
+
+	public void setVendUserUU(Long vendUserUU) {
+		this.vendUserUU = vendUserUU;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public Short getSendStatus() {
+		return sendStatus;
+	}
+
+	public void setSendStatus(Short sendStatus) {
+		this.sendStatus = sendStatus;
+	}
+
+	public Short getStatus() {
+		return status;
+	}
+
+	public void setStatus(Short status) {
+		this.status = status;
+	}
+
+
+}

+ 342 - 0
src/main/java/com/uas/platform/b2b/model/PurchaseProofingSend.java

@@ -0,0 +1,342 @@
+package com.uas.platform.b2b.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToOne;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+/**
+ * 平台里面,供应商针对客户打样申请的送样单
+ * 
+ * @author suntg
+ *
+ */
+@Table(name = "purc$proofingsend")
+@Entity
+public class PurchaseProofingSend implements Serializable {
+
+	/**
+	 * 序列号
+	 */
+	private static final long serialVersionUID = 2147648497108840786L;
+
+	@Id
+	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "purc$proofingsend_gen")
+	@SequenceGenerator(name = "purc$proofingsend_gen", sequenceName = "purc$proofingsend_seq", allocationSize = 1)
+	@Column(name = "pps_id")
+	private Long id;
+
+	/**
+	 * 送样单号
+	 */
+	@Column(name = "pps_code")
+	private String code;
+
+	/**
+	 * 客户打样申请
+	 */
+	@OneToOne(cascade = { CascadeType.MERGE })
+	@JoinColumn(name = "pps_itemid", insertable = false, updatable = false)
+	private PurchaseProofingItem proofingItem;
+	
+	/**
+	 * 客户打样申请id
+	 */
+	@Column(name = "pps_itemid")
+	private Long itemId;
+	
+	/**
+	 * 送样数量
+	 */
+	@Column(name = "pps_sendqty")
+	private Double sendQty;
+
+	/**
+	 * 口水料比例
+	 */
+	@Column(name = "pps_ratio")
+	private Double ratio;
+
+	/**
+	 * 单重(g)
+	 */
+	@Column(name = "pps_weight")
+	private Double weight;
+
+	/**
+	 * 材料
+	 */
+	@Column(name = "pps_material")
+	private String material;
+	
+	/**
+	 * 材质
+	 */
+	@Column(name = "pps_materialquality")
+	private String materialQuality;
+
+	/**
+	 * 主要产地
+	 */
+	@Column(name = "pps_adress")
+	private String adress;
+
+	/**
+	 * 产地标示
+	 */
+	@Column(name = "pps_addressmark")
+	private String addressMark;
+
+	/**
+	 * 送样日期
+	 */
+	@Column(name = "pps_date")
+	private Date date;
+
+	/**
+	 * 采购单价
+	 */
+	@Column(name = "pps_puprice")
+	private Double puprice;
+
+	/**
+	 * 备品率(%)
+	 */
+	@Column(name = "pps_spare")
+	private Double spare;
+
+	/**
+	 * 最小包装量
+	 */
+	@Column(name = "pps_minqty")
+	private Double minQty;
+
+	/**
+	 * 最小订购量
+	 */
+	@Column(name = "pps_minbuyqty")
+	private Double minBuyQty;
+
+	/**
+	 * 品牌
+	 */
+	@Column(name = "pps_brand")
+	private String brand;
+
+	/**
+	 * 交货周期
+	 */
+	@Column(name = "pps_delivery")
+	private Double delivery;
+
+	/**
+	 * 录入人(送样人)
+	 */
+	@Column(name = "pps_recorder")
+	private String recorder;
+
+	/**
+	 * 附件
+	 */
+	@Column(name = "pps_attach")
+	private String attach;
+	
+	/**
+	 * 传输到买方ERP的状态
+	 */
+	@Column(name = "pps_sendstatus")
+	private Short sendStatus;
+
+	/**
+	 * 传输到卖方ERP的状态
+	 */
+	@Column(name = "pps_backstatus")
+	private Short backStatus;
+
+	public Short getSendStatus() {
+		return sendStatus;
+	}
+
+	public void setSendStatus(Short sendStatus) {
+		this.sendStatus = sendStatus;
+	}
+
+	public Short getBackStatus() {
+		return backStatus;
+	}
+
+	public void setBackStatus(Short backStatus) {
+		this.backStatus = backStatus;
+	}
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public PurchaseProofingItem getProofingItem() {
+		return proofingItem;
+	}
+
+	public void setProofingItem(PurchaseProofingItem proofingItem) {
+		this.proofingItem = proofingItem;
+	}
+
+	public Long getItemId() {
+		return itemId;
+	}
+
+	public void setItemId(Long itemId) {
+		this.itemId = itemId;
+	}
+
+	public Double getSendQty() {
+		return sendQty;
+	}
+
+	public void setSendQty(Double sendQty) {
+		this.sendQty = sendQty;
+	}
+
+	public Double getRatio() {
+		return ratio;
+	}
+
+	public void setRatio(Double ratio) {
+		this.ratio = ratio;
+	}
+
+	public Double getWeight() {
+		return weight;
+	}
+
+	public void setWeight(Double weight) {
+		this.weight = weight;
+	}
+
+	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 getAdress() {
+		return adress;
+	}
+
+	public void setAdress(String adress) {
+		this.adress = adress;
+	}
+
+	public String getAddressMark() {
+		return addressMark;
+	}
+
+	public void setAddressMark(String addressMark) {
+		this.addressMark = addressMark;
+	}
+
+	public Date getDate() {
+		return date;
+	}
+
+	public void setDate(Date date) {
+		this.date = date;
+	}
+
+	public Double getPuprice() {
+		return puprice;
+	}
+
+	public void setPuprice(Double puprice) {
+		this.puprice = puprice;
+	}
+
+	public Double getSpare() {
+		return spare;
+	}
+
+	public void setSpare(Double spare) {
+		this.spare = spare;
+	}
+
+	public Double getMinQty() {
+		return minQty;
+	}
+
+	public void setMinQty(Double minQty) {
+		this.minQty = minQty;
+	}
+
+	public Double getMinBuyQty() {
+		return minBuyQty;
+	}
+
+	public void setMinBuyQty(Double minBuyQty) {
+		this.minBuyQty = minBuyQty;
+	}
+
+	public String getBrand() {
+		return brand;
+	}
+
+	public void setBrand(String brand) {
+		this.brand = brand;
+	}
+
+	public Double getDelivery() {
+		return delivery;
+	}
+
+	public void setDelivery(Double delivery) {
+		this.delivery = delivery;
+	}
+
+	public String getRecorder() {
+		return recorder;
+	}
+
+	public void setRecorder(String recorder) {
+		this.recorder = recorder;
+	}
+
+	public String getAttach() {
+		return attach;
+	}
+
+	public void setAttach(String attach) {
+		this.attach = attach;
+	}
+
+
+}