瀏覽代碼

公共询价增加字段,记录商城信息

hejq 8 年之前
父節點
當前提交
75275d9e2d

+ 32 - 2
src/main/java/com/uas/ps/inquiry/model/PublicInquiryItem.java

@@ -114,6 +114,13 @@ public class PublicInquiryItem implements Serializable {
 	@Column(name = "id_venduseruu")
 	private Long vendUserUU;
 
+    /**
+     * 供应商企业信息
+     */
+    @OneToOne(cascade = { CascadeType.MERGE, CascadeType.REFRESH })
+    @JoinColumn(name = "id_venduseruu", insertable = false, updatable = false)
+    private User user;
+
 	/**
 	 * (买家预先提供的)有效期始
 	 */
@@ -311,6 +318,12 @@ public class PublicInquiryItem implements Serializable {
 	@Column(name = "id_vend_businesscode")
 	private String businessCode;
 
+	/**
+	 * 报价时间
+	 */
+	@Column(name = "id_offertime")
+	private Date offerTime;
+
 	public Long getId() {
 		return id;
 	}
@@ -457,7 +470,15 @@ public class PublicInquiryItem implements Serializable {
 		this.vendUserUU = vendUserUU;
 	}
 
-	public Short getAgreed() {
+    public User getUser() {
+        return user;
+    }
+
+    public void setUser(User user) {
+        this.user = user;
+    }
+
+    public Short getAgreed() {
 		return agreed;
 	}
 
@@ -658,13 +679,22 @@ public class PublicInquiryItem implements Serializable {
 		this.businessCode = businessCode;
 	}
 
+	public Date getOfferTime() {
+		return offerTime;
+	}
+
+	public void setOfferTime(Date offerTime) {
+		this.offerTime = offerTime;
+	}
+
 	/**
 	 * 将公共询价单转成报价单
 	 *
 	 * @param item 公共询价单明细
 	 */
 	public PublicInquiryItem(PurcInquiryItemInfo item) {
-		this.date = new Date();
+		this.date = item.getDate();
+		this.offerTime = new Date(System.currentTimeMillis());
 		this.agreed = item.getAgreed();
 		this.brand = item.getBrand();
 		this.sourceId = item.getId();

+ 61 - 0
src/main/java/com/uas/ps/inquiry/model/PublicInquiryItemInfo.java

@@ -291,6 +291,12 @@ public class PublicInquiryItemInfo implements Serializable {
 	@Column(name = "id_vend_businesscode")
 	private String businessCode;
 
+	/**
+	 * 报价时间
+	 */
+	@Column(name = "id_offertime")
+	private Date offerTime;
+
 	public Long getId() {
 		return id;
 	}
@@ -620,4 +626,59 @@ public class PublicInquiryItemInfo implements Serializable {
 		this.businessCode = businessCode;
 	}
 
+	public Date getOfferTime() {
+		return offerTime;
+	}
+
+	public void setOfferTime(Date offerTime) {
+		this.offerTime = offerTime;
+	}
+
+	@Override
+	public String toString() {
+		return "PublicInquiryItemInfo{" +
+				"id=" + id +
+				", sourceId=" + sourceId +
+				", number=" + number +
+				", inquiry=" + inquiry +
+				", userUU=" + userUU +
+				", productId=" + productId +
+				", product=" + product +
+				", prcode='" + prcode + '\'' +
+				", currency='" + currency + '\'' +
+				", taxrate=" + taxrate +
+				", remark='" + remark + '\'' +
+				", vendUU=" + vendUU +
+				", enterprise=" + enterprise +
+				", vendUserUU=" + vendUserUU +
+				", fromDate=" + fromDate +
+				", toDate=" + toDate +
+				", vendFromDate=" + vendFromDate +
+				", vendToDate=" + vendToDate +
+				", minOrderQty=" + minOrderQty +
+				", minPackQty=" + minPackQty +
+				", brand='" + brand + '\'' +
+				", vendorprodcode='" + vendorprodcode + '\'' +
+				", leadtime=" + leadtime +
+				", status=" + status +
+				", sendStatus=" + sendStatus +
+				", backStatus=" + backStatus +
+				", replySendStatus=" + replySendStatus +
+				", agreed=" + agreed +
+				", decideStatus=" + decideStatus +
+				", invalidStatus=" + invalidStatus +
+				", custLap=" + custLap +
+				", erpDate=" + erpDate +
+				", date=" + date +
+				", overdue=" + overdue +
+				", invalid=" + invalid +
+				", sourceApp='" + sourceApp + '\'' +
+				", needquantity=" + needquantity +
+				", erpstatus=" + erpstatus +
+				", kind='" + kind + '\'' +
+				", vendName='" + vendName + '\'' +
+				", businessCode='" + businessCode + '\'' +
+				", offerTime=" + offerTime +
+				'}';
+	}
 }

+ 14 - 0
src/main/java/com/uas/ps/inquiry/model/PurcInquiry.java

@@ -175,6 +175,12 @@ public class PurcInquiry implements Serializable {
     @Column(name = "in_erpdate")
     private  Date erpdate;
 
+    /**
+     * 明细总数
+     */
+    @Column(name = "in_amount")
+    private Integer amount;
+
     public Long getId() {
         return id;
     }
@@ -374,4 +380,12 @@ public class PurcInquiry implements Serializable {
     public void setErpdate(Date erpdate) {
         this.erpdate = erpdate;
     }
+
+    public Integer getAmount() {
+        return amount;
+    }
+
+    public void setAmount(Integer amount) {
+        this.amount = amount;
+    }
 }

+ 14 - 0
src/main/java/com/uas/ps/inquiry/model/PurcInquiryInfo.java

@@ -186,6 +186,12 @@ public class PurcInquiryInfo implements Serializable {
     @Column(name = "in_erpdate")
     private  Date erpdate;
 
+    /**
+     * 明细总数
+     */
+    @Column(name = "in_amount")
+    private Integer amount;
+
     public Long getId() {
         return id;
     }
@@ -395,4 +401,12 @@ public class PurcInquiryInfo implements Serializable {
     public void setErpdate(Date erpdate) {
         this.erpdate = erpdate;
     }
+
+    public Integer getAmount() {
+        return amount;
+    }
+
+    public void setAmount(Integer amount) {
+        this.amount = amount;
+    }
 }

+ 13 - 0
src/main/java/com/uas/ps/inquiry/model/PurcInquiryItem.java

@@ -250,6 +250,19 @@ public class PurcInquiryItem {
 	@Transient
 	private Long enuu;
 
+	/**
+	 * 单价预算
+	 */
+	@Column(name = "id_unitprice")
+	private Double unitPrice;
+
+    /**
+     * 报价时间
+     */
+	@Column(name = "id_offertime")
+    private Date offerTime;
+
+
 	public Long getId() {
 		return id;
 	}

+ 17 - 3
src/main/java/com/uas/ps/inquiry/model/PurcInquiryItemInfo.java

@@ -1,7 +1,5 @@
 package com.uas.ps.inquiry.model;
 
-import com.alibaba.fastjson.annotation.JSONField;
-import com.fasterxml.jackson.annotation.JsonIgnore;
 
 import javax.persistence.*;
 import java.util.*;
@@ -257,6 +255,12 @@ public class PurcInquiryItemInfo {
 	@Transient
 	private Long enuu;
 
+	/**
+	 * 报价时间
+	 */
+	@Column(name = "id_offertime")
+	private Date offerTime;
+
 	public Long getId() {
 		return id;
 	}
@@ -561,6 +565,14 @@ public class PurcInquiryItemInfo {
 		this.enuu = enuu;
 	}
 
+	public Date getOfferTime() {
+		return offerTime;
+	}
+
+	public void setOfferTime(Date offerTime) {
+		this.offerTime = offerTime;
+	}
+
 	public static List<PurcInquiryInfo> distinct(List<PurcInquiryItemInfo> inquiryItems) {
 		List<PurcInquiryInfo> inquiries = new ArrayList<>();
 		Set<Long> keys = new HashSet<>();
@@ -575,7 +587,7 @@ public class PurcInquiryItemInfo {
 
 	@Override
 	public String toString() {
-		return "PurcInquiryItem{" +
+		return "PurcInquiryItemInfo{" +
 				"id=" + id +
 				", number=" + number +
 				", inquiry=" + inquiry +
@@ -592,6 +604,7 @@ public class PurcInquiryItemInfo {
 				", taxrate=" + taxrate +
 				", remark='" + remark + '\'' +
 				", vendUU=" + vendUU +
+				", enterprise=" + enterprise +
 				", vendUserUU=" + vendUserUU +
 				", fromDate=" + fromDate +
 				", toDate=" + toDate +
@@ -613,6 +626,7 @@ public class PurcInquiryItemInfo {
 				", sourceid=" + sourceid +
 				", date=" + date +
 				", enuu=" + enuu +
+				", offerTime=" + offerTime +
 				'}';
 	}
 }