Explorar el Código

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@447 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d

administrator hace 11 años
padre
commit
21263a2d19

+ 0 - 12
src/main/java/com/uas/platform/b2b/dao/SaleOrderDao.java

@@ -1,12 +0,0 @@
-package com.uas.platform.b2b.dao;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.stereotype.Repository;
-
-import com.uas.platform.b2b.model.SaleOrder;
-
-@Repository
-public interface SaleOrderDao extends JpaSpecificationExecutor<SaleOrder>, JpaRepository<SaleOrder, Long> {
-
-}

+ 6 - 0
src/main/java/com/uas/platform/b2b/erp/model/AcceptNotify.java

@@ -60,5 +60,11 @@ public class AcceptNotify {
 	public AcceptNotify(SaleSend send) {
 	public AcceptNotify(SaleSend send) {
 		
 		
 	}
 	}
+	
+	public SaleSend convert() {
+		SaleSend send = new SaleSend();
+		
+		return send;
+	}
 
 
 }
 }

+ 0 - 5
src/main/java/com/uas/platform/b2b/model/SaleChange.java

@@ -1,5 +0,0 @@
-package com.uas.platform.b2b.model;
-
-public class SaleChange {
-
-}

+ 0 - 243
src/main/java/com/uas/platform/b2b/model/SaleOrder.java

@@ -1,243 +0,0 @@
-package com.uas.platform.b2b.model;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-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.OneToMany;
-import javax.persistence.OrderBy;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-
-@Entity
-@Table(name = "sale$orders")
-public class SaleOrder implements Serializable {
-
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	@Id
-	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sale$orders_gen")
-	@SequenceGenerator(name = "sale$orders_gen", sequenceName = "sale$orders_seq", allocationSize = 1)
-	@Column(name = "sa_id")
-	private Long id;
-
-	/**
-	 * 订单所属企业UU
-	 */
-	@Column(name = "sa_enuu")
-	private Long enUU;
-
-	/**
-	 * 订单所属业务员UU
-	 */
-	@Column(name = "sa_useruu")
-	private Long userUU;
-
-	/**
-	 * 销售订单号
-	 */
-	@Column(name = "sa_code")
-	private String code;
-
-	/**
-	 * 销售类型
-	 */
-	@Column(name = "sa_type")
-	private String type;
-
-	/**
-	 * 单据归属日期
-	 */
-	@Column(name = "sa_date")
-	private Date date;
-
-	/**
-	 * 录单人员UU
-	 */
-	@Column(name = "sa_recorderuu")
-	private Long recorderUU;
-
-	/**
-	 * 客户企业UU
-	 */
-	@Column(name = "sa_custuu")
-	private Long custUU;
-
-	/**
-	 * 客户联系人UU
-	 */
-	@Column(name = "sa_custuseruu")
-	private Long custUserUU;
-
-	/**
-	 * 交货地址
-	 */
-	@Column(name = "sa_shipaddress")
-	private String shipAddress;
-
-	/**
-	 * 备注
-	 */
-	@Column(name = "sa_remark")
-	private String remark;
-
-	/**
-	 * 收款币种
-	 */
-	@Column(name = "sa_currency")
-	private String currency;
-
-	/**
-	 * 收款方式
-	 */
-	@Column(name = "sa_payments")
-	private String payments;
-
-	/**
-	 * 订单状态
-	 */
-	@Column(name = "sa_status")
-	private String status;
-
-	/**
-	 * 订单明细
-	 */
-	@OneToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, mappedBy = "order", fetch = FetchType.EAGER)
-	@OrderBy("number")
-	@NotFound(action = NotFoundAction.IGNORE)
-	private List<SaleOrderItem> orderItems;
-
-	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 Long getUserUU() {
-		return userUU;
-	}
-
-	public void setUserUU(Long userUU) {
-		this.userUU = userUU;
-	}
-
-	public String getCode() {
-		return code;
-	}
-
-	public void setCode(String code) {
-		this.code = code;
-	}
-
-	public String getType() {
-		return type;
-	}
-
-	public void setType(String type) {
-		this.type = type;
-	}
-
-	public Date getDate() {
-		return date;
-	}
-
-	public void setDate(Date date) {
-		this.date = date;
-	}
-
-	public Long getRecorderUU() {
-		return recorderUU;
-	}
-
-	public void setRecorderUU(Long recorderUU) {
-		this.recorderUU = recorderUU;
-	}
-
-	public Long getCustUU() {
-		return custUU;
-	}
-
-	public void setCustUU(Long custUU) {
-		this.custUU = custUU;
-	}
-
-	public Long getCustUserUU() {
-		return custUserUU;
-	}
-
-	public void setCustUserUU(Long custUserUU) {
-		this.custUserUU = custUserUU;
-	}
-
-	public String getShipAddress() {
-		return shipAddress;
-	}
-
-	public void setShipAddress(String shipAddress) {
-		this.shipAddress = shipAddress;
-	}
-
-	public String getRemark() {
-		return remark;
-	}
-
-	public void setRemark(String remark) {
-		this.remark = remark;
-	}
-
-	public String getCurrency() {
-		return currency;
-	}
-
-	public void setCurrency(String currency) {
-		this.currency = currency;
-	}
-
-	public String getPayments() {
-		return payments;
-	}
-
-	public void setPayments(String payments) {
-		this.payments = payments;
-	}
-
-	public String getStatus() {
-		return status;
-	}
-
-	public void setStatus(String status) {
-		this.status = status;
-	}
-
-	public List<SaleOrderItem> getOrderItems() {
-		return orderItems;
-	}
-
-	public void setOrderItems(List<SaleOrderItem> orderItems) {
-		this.orderItems = orderItems;
-	}
-
-}

+ 0 - 173
src/main/java/com/uas/platform/b2b/model/SaleOrderItem.java

@@ -1,173 +0,0 @@
-package com.uas.platform.b2b.model;
-
-import java.io.Serializable;
-import java.sql.Date;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "sale$orderitems")
-public class SaleOrderItem implements Serializable {
-
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	@Id
-	@Column(name = "sd_id")
-	private Long id;
-
-	/**
-	 * 销售订单
-	 */
-	@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
-	@JoinColumn(name = "sd_said")
-	private SaleOrder order;
-
-	/**
-	 * 序号
-	 */
-	@Column(name = "sd_number")
-	private Short number;
-
-	/**
-	 * 产品ID
-	 */
-	@Column(name = "sd_prid")
-	private Long productId;
-
-	/**
-	 * 产品
-	 */
-	@OneToOne(cascade = { CascadeType.ALL })
-	@JoinColumn(name = "sd_prid", insertable = false, updatable = false)
-	private Product product;
-
-	/**
-	 * 数量
-	 */
-	@Column(name = "sd_qty")
-	private Double qty;
-
-	/**
-	 * 备注
-	 */
-	@Column(name = "sd_remark")
-	private String remark;
-
-	/**
-	 * 含税单价
-	 */
-	@Column(name = "sd_price")
-	private Double price;
-
-	/**
-	 * 含税金额
-	 */
-	@Column(name = "sd_amount", insertable = false, updatable = false)
-	private Double amount;
-
-	/**
-	 * 交货日期
-	 */
-	@Column(name = "sd_delivery")
-	private Date delivery;
-
-	private Short isok;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public SaleOrder getOrder() {
-		return order;
-	}
-
-	public void setOrder(SaleOrder order) {
-		this.order = order;
-	}
-
-	public Short getNumber() {
-		return number;
-	}
-
-	public void setNumber(Short number) {
-		this.number = number;
-	}
-
-	public Long getProductId() {
-		return productId;
-	}
-
-	public void setProductId(Long productId) {
-		this.productId = productId;
-	}
-
-	public Product getProduct() {
-		return product;
-	}
-
-	public void setProduct(Product product) {
-		this.product = product;
-	}
-
-	public Double getQty() {
-		return qty;
-	}
-
-	public void setQty(Double qty) {
-		this.qty = qty;
-	}
-
-	public String getRemark() {
-		return remark;
-	}
-
-	public void setRemark(String remark) {
-		this.remark = remark;
-	}
-
-	public Double getPrice() {
-		return price;
-	}
-
-	public void setPrice(Double price) {
-		this.price = price;
-	}
-
-	public Double getAmount() {
-		return amount;
-	}
-
-	public void setAmount(Double amount) {
-		this.amount = amount;
-	}
-
-	public Date getDelivery() {
-		return delivery;
-	}
-
-	public void setDelivery(Date delivery) {
-		this.delivery = delivery;
-	}
-
-	public Short getIsok() {
-		return isok;
-	}
-
-	public void setIsok(Short isok) {
-		this.isok = isok;
-	}
-}

+ 121 - 2
src/main/java/com/uas/platform/b2b/model/SaleSend.java

@@ -1,12 +1,17 @@
 package com.uas.platform.b2b.model;
 package com.uas.platform.b2b.model;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
+import java.util.Set;
 
 
+import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Entity;
+import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.OrderBy;
 import javax.persistence.SequenceGenerator;
 import javax.persistence.SequenceGenerator;
 import javax.persistence.Table;
 import javax.persistence.Table;
 
 
@@ -14,7 +19,7 @@ import javax.persistence.Table;
  * 平台里面,供应商发起的发货单
  * 平台里面,供应商发起的发货单
  * 
  * 
  * @author yingp
  * @author yingp
- *
+ * 
  */
  */
 @Table(name = "sale$send")
 @Table(name = "sale$send")
 @Entity
 @Entity
@@ -32,11 +37,61 @@ public class SaleSend implements Serializable {
 	private Long id;
 	private Long id;
 
 
 	/**
 	/**
-	 * 发货单 所属企业UU
+	 * 单号
+	 */
+	@Column(name = "ss_code")
+	private String code;
+
+	/**
+	 * 发货单 所属企业(卖家)UU
 	 */
 	 */
 	@Column(name = "ss_enuu")
 	@Column(name = "ss_enuu")
 	private Long enUU;
 	private Long enUU;
 
 
+	/**
+	 * 付款方式
+	 */
+	@Column(name = "ss_payments")
+	private String payments;
+
+	/**
+	 * 币别
+	 */
+	@Column(name = "ss_currency")
+	private String currency;
+
+	/**
+	 * 汇率
+	 */
+	@Column(name = "ss_rate")
+	private Float rate;
+
+	/**
+	 * 客户企业UU
+	 */
+	@Column(name = "ss_custuu")
+	private Long custUU;
+
+	/**
+	 * 客户联系人UU
+	 */
+	@Column(name = "ss_custuseruu")
+	private Long custUserUU;
+
+	/**
+	 * 备注
+	 */
+	@Column(name = "ss_remark")
+	private String remark;
+
+	/**
+	 * 发货明细
+	 */
+	@OneToMany(mappedBy = "send", cascade = { CascadeType.REFRESH, CascadeType.PERSIST, CascadeType.REMOVE,
+			CascadeType.MERGE }, fetch = FetchType.EAGER)
+	@OrderBy("number")
+	private Set<SaleSendItem> sendItems;
+
 	public Long getId() {
 	public Long getId() {
 		return id;
 		return id;
 	}
 	}
@@ -45,6 +100,14 @@ public class SaleSend implements Serializable {
 		this.id = id;
 		this.id = id;
 	}
 	}
 
 
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
 	public Long getEnUU() {
 	public Long getEnUU() {
 		return enUU;
 		return enUU;
 	}
 	}
@@ -53,4 +116,60 @@ public class SaleSend implements Serializable {
 		this.enUU = enUU;
 		this.enUU = enUU;
 	}
 	}
 
 
+	public String getPayments() {
+		return payments;
+	}
+
+	public void setPayments(String payments) {
+		this.payments = payments;
+	}
+
+	public String getCurrency() {
+		return currency;
+	}
+
+	public void setCurrency(String currency) {
+		this.currency = currency;
+	}
+
+	public Float getRate() {
+		return rate;
+	}
+
+	public void setRate(Float rate) {
+		this.rate = rate;
+	}
+
+	public Long getCustUU() {
+		return custUU;
+	}
+
+	public void setCustUU(Long custUU) {
+		this.custUU = custUU;
+	}
+
+	public Long getCustUserUU() {
+		return custUserUU;
+	}
+
+	public void setCustUserUU(Long custUserUU) {
+		this.custUserUU = custUserUU;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public Set<SaleSendItem> getSendItems() {
+		return sendItems;
+	}
+
+	public void setSendItems(Set<SaleSendItem> sendItems) {
+		this.sendItems = sendItems;
+	}
+
 }
 }

+ 111 - 0
src/main/java/com/uas/platform/b2b/model/SaleSendItem.java

@@ -0,0 +1,111 @@
+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.OneToOne;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+/**
+ * 平台里面,供应商发起的发货单明细
+ * 
+ * @author yingp
+ * 
+ */
+@Table(name = "sale$senditem")
+@Entity
+public class SaleSendItem {
+
+	@Id
+	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sale$senditem_gen")
+	@SequenceGenerator(name = "sale$senditem_gen", sequenceName = "sale$senditem_seq", allocationSize = 1)
+	@Column(name = "si_id")
+	private Long id;
+
+	/**
+	 * 序号
+	 */
+	@Column(name = "si_number")
+	private Short number;
+
+	/**
+	 * 客户送货提醒单
+	 */
+	@OneToOne(cascade = { CascadeType.REFRESH })
+	@JoinColumn(name = "si_noticeid", insertable = false, updatable = false, nullable = false)
+	private PurchaseNotice notice;
+
+	/**
+	 * 数量
+	 */
+	@Column(name = "si_qty")
+	private Double qty;
+
+	/**
+	 * 单价
+	 */
+	@Column(name = "si_price")
+	private Double price;
+
+	/**
+	 * 发货单
+	 */
+	@ManyToOne(cascade = CascadeType.ALL, optional = true)
+	@JoinColumn(name = "si_ssid", nullable = false)
+	private SaleSend send;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Short getNumber() {
+		return number;
+	}
+
+	public void setNumber(Short number) {
+		this.number = number;
+	}
+
+	public PurchaseNotice getNotice() {
+		return notice;
+	}
+
+	public void setNotice(PurchaseNotice notice) {
+		this.notice = notice;
+	}
+
+	public Double getQty() {
+		return qty;
+	}
+
+	public void setQty(Double qty) {
+		this.qty = qty;
+	}
+
+	public Double getPrice() {
+		return price;
+	}
+
+	public void setPrice(Double price) {
+		this.price = price;
+	}
+
+	public SaleSend getSend() {
+		return send;
+	}
+
+	public void setSend(SaleSend send) {
+		this.send = send;
+	}
+
+}