|
@@ -4,8 +4,12 @@ import com.uas.platform.b2b.model.Product;
|
|
|
import com.uas.platform.b2b.model.PurcOrderInfoItem;
|
|
import com.uas.platform.b2b.model.PurcOrderInfoItem;
|
|
|
import com.uas.platform.b2b.support.SystemSession;
|
|
import com.uas.platform.b2b.support.SystemSession;
|
|
|
import com.uas.platform.core.model.Status;
|
|
import com.uas.platform.core.model.Status;
|
|
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
|
|
+import java.util.HashSet;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+import java.util.Set;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* ERP系统的采购订单明细
|
|
* ERP系统的采购订单明细
|
|
@@ -26,6 +30,7 @@ public class PurchaseDetail {
|
|
|
private String pd_factory;
|
|
private String pd_factory;
|
|
|
private String pd_vendspec;
|
|
private String pd_vendspec;
|
|
|
private Integer pd_beipin;
|
|
private Integer pd_beipin;
|
|
|
|
|
+ private List<Attach> attaches;
|
|
|
|
|
|
|
|
public String getPd_vendspec() {
|
|
public String getPd_vendspec() {
|
|
|
return pd_vendspec;
|
|
return pd_vendspec;
|
|
@@ -115,7 +120,15 @@ public class PurchaseDetail {
|
|
|
this.pd_beipin = pd_beipin;
|
|
this.pd_beipin = pd_beipin;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
|
|
+ public List<Attach> getAttaches() {
|
|
|
|
|
+ return attaches;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public void setAttaches(List<Attach> attaches) {
|
|
|
|
|
+ this.attaches = attaches;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
* 转为平台的采购订单明细
|
|
* 转为平台的采购订单明细
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
@@ -136,6 +149,14 @@ public class PurchaseDetail {
|
|
|
product.setEnUU(SystemSession.getUser().getEnterprise().getUu());
|
|
product.setEnUU(SystemSession.getUser().getEnterprise().getUu());
|
|
|
item.setProduct(product);
|
|
item.setProduct(product);
|
|
|
item.setBeipin(this.pd_beipin);
|
|
item.setBeipin(this.pd_beipin);
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(this.attaches)) {
|
|
|
|
|
+ Set<com.uas.platform.b2b.model.Attach> b2bAttaches = new HashSet<com.uas.platform.b2b.model.Attach>();
|
|
|
|
|
+ for(Attach attach : this.attaches) {
|
|
|
|
|
+ com.uas.platform.b2b.model.Attach b2bAttach = attach.convertToB2bAttach("客户采购订单明细物料附件");
|
|
|
|
|
+ b2bAttaches.add(b2bAttach);
|
|
|
|
|
+ }
|
|
|
|
|
+ item.setAttachs(b2bAttaches);
|
|
|
|
|
+ }
|
|
|
return item;
|
|
return item;
|
|
|
}
|
|
}
|
|
|
|
|
|