|
|
@@ -0,0 +1,165 @@
|
|
|
+package com.uas.platform.b2b.openapi.model;
|
|
|
+
|
|
|
+import com.uas.platform.b2b.model.PurchaseAcceptItem;
|
|
|
+import com.uas.platform.b2b.model.PurchaseOrder;
|
|
|
+import com.uas.platform.b2b.model.PurchaseOrderItem;
|
|
|
+
|
|
|
+import java.util.HashSet;
|
|
|
+import java.util.Set;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Author: huj
|
|
|
+ * @Date: Created in 11:19 2018/8/27.
|
|
|
+ */
|
|
|
+public class FxPurcOrderItem {
|
|
|
+
|
|
|
+ /**
|
|
|
+ *订单明细id
|
|
|
+ */
|
|
|
+ private Long id;
|
|
|
+ /**
|
|
|
+ *物料id
|
|
|
+ */
|
|
|
+ private Long productId;
|
|
|
+ /**
|
|
|
+ *物料编号
|
|
|
+ */
|
|
|
+ private String productCode;
|
|
|
+ /**
|
|
|
+ *物料名称
|
|
|
+ */
|
|
|
+ private String productTitle;
|
|
|
+ /**
|
|
|
+ *物料规格
|
|
|
+ */
|
|
|
+ private String productSpec;
|
|
|
+ /**
|
|
|
+ *物料原厂型号
|
|
|
+ */
|
|
|
+ private String productCmpcode;
|
|
|
+ /**
|
|
|
+ * 订单序号
|
|
|
+ */
|
|
|
+ private Short detno;
|
|
|
+ /**
|
|
|
+ * 订单数量
|
|
|
+ */
|
|
|
+ private Double qty;
|
|
|
+ /**
|
|
|
+ * 验收单明细
|
|
|
+ */
|
|
|
+ private Set<FxPurcAcceptItem> acceptItems = new HashSet<>();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 订单
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private FxPurOrder order;
|
|
|
+
|
|
|
+ public Set<FxPurcAcceptItem> getAcceptItems() {
|
|
|
+ return acceptItems;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAcceptItems(Set<FxPurcAcceptItem> acceptItems) {
|
|
|
+ this.acceptItems = acceptItems;
|
|
|
+ }
|
|
|
+
|
|
|
+ public FxPurOrder getOrder() {
|
|
|
+ return order;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOrder(FxPurOrder order) {
|
|
|
+ this.order = order;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getId() {
|
|
|
+ return id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setId(Long id) {
|
|
|
+ this.id = id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getProductId() {
|
|
|
+ return productId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setProductId(Long productId) {
|
|
|
+ this.productId = productId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getProductCode() {
|
|
|
+ return productCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setProductCode(String productCode) {
|
|
|
+ this.productCode = productCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getProductTitle() {
|
|
|
+ return productTitle;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setProductTitle(String productTitle) {
|
|
|
+ this.productTitle = productTitle;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getProductSpec() {
|
|
|
+ return productSpec;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setProductSpec(String productSpec) {
|
|
|
+ this.productSpec = productSpec;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getProductCmpcode() {
|
|
|
+ return productCmpcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setProductCmpcode(String productCmpcode) {
|
|
|
+ this.productCmpcode = productCmpcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Short getDetno() {
|
|
|
+ return detno;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setDetno(Short detno) {
|
|
|
+ this.detno = detno;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Double getQty() {
|
|
|
+ return qty;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setQty(Double qty) {
|
|
|
+ this.qty = qty;
|
|
|
+ }
|
|
|
+
|
|
|
+ public FxPurcOrderItem(){}
|
|
|
+
|
|
|
+ public FxPurcOrderItem(PurchaseOrderItem orderItem,PurchaseAcceptItem needAcceptItem) {
|
|
|
+ this.id = orderItem.getId();
|
|
|
+ this.productId = orderItem.getProductId();
|
|
|
+ this.productCode = orderItem.getProductCode();
|
|
|
+ this.productTitle = orderItem.getProductTitle();
|
|
|
+ this.productSpec = orderItem.getProductSpec();
|
|
|
+ this.productCmpcode = orderItem.getProductCmpCode();
|
|
|
+ this.detno = orderItem.getNumber();
|
|
|
+ this.qty = orderItem.getQty();
|
|
|
+ this.acceptItems.add(new FxPurcAcceptItem(needAcceptItem));
|
|
|
+ }
|
|
|
+
|
|
|
+ public FxPurcOrderItem convert(PurchaseOrderItem orderItem, PurchaseOrder order) {
|
|
|
+ this.id = orderItem.getId();
|
|
|
+ this.productId = orderItem.getProductId();
|
|
|
+ this.productCode = orderItem.getProductCode();
|
|
|
+ this.productTitle = orderItem.getProductTitle();
|
|
|
+ this.productSpec = orderItem.getProductSpec();
|
|
|
+ this.productCmpcode = orderItem.getProductCmpCode();
|
|
|
+ this.detno = orderItem.getNumber();
|
|
|
+ this.qty = orderItem.getQty();
|
|
|
+ this.order = new FxPurOrder().convert(order,orderItem.getAmount());
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+}
|