|
|
@@ -52,24 +52,42 @@ public class PurchaseOrderChangeItem {
|
|
|
private PurchaseOrderChange orderChange;
|
|
|
|
|
|
/**
|
|
|
- * 采购订单明细
|
|
|
+ * 采购订单明细ID
|
|
|
*/
|
|
|
- @OneToOne(cascade = { CascadeType.REFRESH })
|
|
|
- @JoinColumn(name = "pcd_pdid", insertable = false, updatable = false)
|
|
|
- private PurchaseOrderItem orderItem;
|
|
|
-
|
|
|
@Column(name = "pcd_pdid")
|
|
|
private Long orderItemId;
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 采购订单明细序号
|
|
|
+ */
|
|
|
+ @Column(name = "pcd_pdnumber")
|
|
|
+ private Short orderItemNumber;
|
|
|
+
|
|
|
/**
|
|
|
* 新产品
|
|
|
*/
|
|
|
@OneToOne(cascade = { CascadeType.REFRESH })
|
|
|
@JoinColumn(name = "pcd_newprid", insertable = false, updatable = false)
|
|
|
private Product newProduct;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 原产品
|
|
|
+ */
|
|
|
+ @OneToOne(cascade = { CascadeType.REFRESH })
|
|
|
+ @JoinColumn(name = "pcd_oldprid", insertable = false, updatable = false)
|
|
|
+ private Product oldProduct;
|
|
|
|
|
|
+ /**
|
|
|
+ * 新产品id
|
|
|
+ */
|
|
|
@Column(name = "pcd_newprid")
|
|
|
private Long newProductId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 原产品id
|
|
|
+ */
|
|
|
+ @Column(name = "pcd_oldprid")
|
|
|
+ private Long oldProductId;
|
|
|
|
|
|
/**
|
|
|
* 新数量
|
|
|
@@ -77,17 +95,35 @@ public class PurchaseOrderChangeItem {
|
|
|
@Column(name = "pcd_newqty")
|
|
|
private Double newQty;
|
|
|
|
|
|
+ /**
|
|
|
+ * 原数量
|
|
|
+ */
|
|
|
+ @Column(name = "pcd_oldqty")
|
|
|
+ private Double oldQty;
|
|
|
+
|
|
|
/**
|
|
|
* 新含税单价
|
|
|
*/
|
|
|
@Column(name = "pcd_newprice")
|
|
|
private Double newPrice;
|
|
|
|
|
|
+ /**
|
|
|
+ * 原含税单价
|
|
|
+ */
|
|
|
+ @Column(name = "pcd_oldprice")
|
|
|
+ private Double oldPrice;
|
|
|
+
|
|
|
/**
|
|
|
* 新税率
|
|
|
*/
|
|
|
@Column(name = "pcd_newtaxrate")
|
|
|
private Float newTaxrate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 原税率
|
|
|
+ */
|
|
|
+ @Column(name = "pcd_oldtaxrate")
|
|
|
+ private Float oldTaxrate;
|
|
|
|
|
|
/**
|
|
|
* 新交货日期
|
|
|
@@ -95,6 +131,12 @@ public class PurchaseOrderChangeItem {
|
|
|
@Column(name = "pcd_newdelivery")
|
|
|
private Date newDelivery;
|
|
|
|
|
|
+ /**
|
|
|
+ * 原交货日期
|
|
|
+ */
|
|
|
+ @Column(name = "pcd_olddelivery")
|
|
|
+ private Date oldDelivery;
|
|
|
+
|
|
|
/**
|
|
|
* 备注
|
|
|
*/
|
|
|
@@ -127,14 +169,6 @@ public class PurchaseOrderChangeItem {
|
|
|
this.orderChange = orderChange;
|
|
|
}
|
|
|
|
|
|
- public PurchaseOrderItem getOrderItem() {
|
|
|
- return orderItem;
|
|
|
- }
|
|
|
-
|
|
|
- public void setOrderItem(PurchaseOrderItem orderItem) {
|
|
|
- this.orderItem = orderItem;
|
|
|
- }
|
|
|
-
|
|
|
public Product getNewProduct() {
|
|
|
return newProduct;
|
|
|
}
|
|
|
@@ -199,25 +233,60 @@ public class PurchaseOrderChangeItem {
|
|
|
this.remark = remark;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 变更明细转入到采购订单明细
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
- public PurchaseOrderItem convert() {
|
|
|
- if (this.newDelivery != null)
|
|
|
- this.orderItem.setDelivery(this.newDelivery);
|
|
|
- if (this.newPrice != null)
|
|
|
- this.orderItem.setPrice(this.newPrice);
|
|
|
- if (this.newQty != null && this.newQty > 0)
|
|
|
- this.orderItem.setQty(this.newQty);
|
|
|
- if (this.newTaxrate != null)
|
|
|
- this.orderItem.setTaxrate(this.newTaxrate);
|
|
|
- if (this.newProduct != null) {
|
|
|
- this.orderItem.setProduct(this.newProduct);
|
|
|
- this.orderItem.setProductId(this.newProductId);
|
|
|
- }
|
|
|
- return this.orderItem;
|
|
|
+ public Short getOrderItemNumber() {
|
|
|
+ return orderItemNumber;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOrderItemNumber(Short orderItemNumber) {
|
|
|
+ this.orderItemNumber = orderItemNumber;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Product getOldProduct() {
|
|
|
+ return oldProduct;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOldProduct(Product oldProduct) {
|
|
|
+ this.oldProduct = oldProduct;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getOldProductId() {
|
|
|
+ return oldProductId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOldProductId(Long oldProductId) {
|
|
|
+ this.oldProductId = oldProductId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Double getOldQty() {
|
|
|
+ return oldQty;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOldQty(Double oldQty) {
|
|
|
+ this.oldQty = oldQty;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Double getOldPrice() {
|
|
|
+ return oldPrice;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOldPrice(Double oldPrice) {
|
|
|
+ this.oldPrice = oldPrice;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Float getOldTaxrate() {
|
|
|
+ return oldTaxrate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOldTaxrate(Float oldTaxrate) {
|
|
|
+ this.oldTaxrate = oldTaxrate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Date getOldDelivery() {
|
|
|
+ return oldDelivery;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOldDelivery(Date oldDelivery) {
|
|
|
+ this.oldDelivery = oldDelivery;
|
|
|
}
|
|
|
|
|
|
public static List<PurchaseOrderChange> distinct(List<PurchaseOrderChangeItem> items) {
|