|
|
@@ -20,106 +20,141 @@ import com.uas.platform.core.model.Status;
|
|
|
|
|
|
/**
|
|
|
* 采购方角度ERP采购验收单
|
|
|
+ *
|
|
|
* @author suntg
|
|
|
* @date 2015年4月17日10:32:24
|
|
|
*
|
|
|
*/
|
|
|
public class PurchaseProdInOut {
|
|
|
|
|
|
- private String pi_inoutno;//采购检验单号
|
|
|
- private Long pi_vendoruu;//客户uu号
|
|
|
- private String pi_currency;//币别
|
|
|
- private Float pi_rate;//汇率
|
|
|
- private String pi_payment;//付款方式
|
|
|
- private String pi_transport;//运输方式
|
|
|
- private String pi_remark;//备注
|
|
|
- private String pi_inoutman;//过账人
|
|
|
- private Date pi_date;//过账日期
|
|
|
- private String pi_sendcode;//送货单号
|
|
|
- private String pi_receivename;//应付供应商名
|
|
|
- private String pi_receivecode;//应付供应商编号
|
|
|
- private List<PurchaseProdInOutDetail> details;//明细
|
|
|
-
|
|
|
+ private Long pi_id;// id
|
|
|
+ private String pi_inoutno;// 采购检验单号
|
|
|
+ private Long pi_vendoruu;// 客户uu号
|
|
|
+ private String pi_currency;// 币别
|
|
|
+ private Float pi_rate;// 汇率
|
|
|
+ private String pi_payment;// 付款方式
|
|
|
+ private String pi_transport;// 运输方式
|
|
|
+ private String pi_remark;// 备注
|
|
|
+ private String pi_inoutman;// 过账人
|
|
|
+ private Date pi_date;// 过账日期
|
|
|
+ private String pi_sendcode;// 送货单号
|
|
|
+ private String pi_receivename;// 应付供应商名
|
|
|
+ private String pi_receivecode;// 应付供应商编号
|
|
|
+ private List<PurchaseProdInOutDetail> details;// 明细
|
|
|
+
|
|
|
+ public Long getPi_id() {
|
|
|
+ return pi_id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPi_id(Long pi_id) {
|
|
|
+ this.pi_id = pi_id;
|
|
|
+ }
|
|
|
+
|
|
|
public String getPi_inoutno() {
|
|
|
return pi_inoutno;
|
|
|
}
|
|
|
+
|
|
|
public void setPi_inoutno(String pi_inoutno) {
|
|
|
this.pi_inoutno = pi_inoutno;
|
|
|
}
|
|
|
+
|
|
|
public Long getPi_vendoruu() {
|
|
|
return pi_vendoruu;
|
|
|
}
|
|
|
+
|
|
|
public void setPi_vendoruu(Long pi_vendoruu) {
|
|
|
this.pi_vendoruu = pi_vendoruu;
|
|
|
}
|
|
|
+
|
|
|
public String getPi_currency() {
|
|
|
return pi_currency;
|
|
|
}
|
|
|
+
|
|
|
public void setPi_currency(String pi_currency) {
|
|
|
this.pi_currency = pi_currency;
|
|
|
}
|
|
|
+
|
|
|
public Float getPi_rate() {
|
|
|
return pi_rate;
|
|
|
}
|
|
|
+
|
|
|
public void setPi_rate(Float pi_rate) {
|
|
|
this.pi_rate = pi_rate;
|
|
|
}
|
|
|
+
|
|
|
public String getPi_payment() {
|
|
|
return pi_payment;
|
|
|
}
|
|
|
+
|
|
|
public void setPi_payment(String pi_payment) {
|
|
|
this.pi_payment = pi_payment;
|
|
|
}
|
|
|
+
|
|
|
public String getPi_transport() {
|
|
|
return pi_transport;
|
|
|
}
|
|
|
+
|
|
|
public void setPi_transport(String pi_transport) {
|
|
|
this.pi_transport = pi_transport;
|
|
|
}
|
|
|
+
|
|
|
public String getPi_remark() {
|
|
|
return pi_remark;
|
|
|
}
|
|
|
+
|
|
|
public void setPi_remark(String pi_remark) {
|
|
|
this.pi_remark = pi_remark;
|
|
|
}
|
|
|
+
|
|
|
public String getPi_inoutman() {
|
|
|
return pi_inoutman;
|
|
|
}
|
|
|
+
|
|
|
public void setPi_inoutman(String pi_inoutman) {
|
|
|
this.pi_inoutman = pi_inoutman;
|
|
|
}
|
|
|
+
|
|
|
public Date getPi_date() {
|
|
|
return pi_date;
|
|
|
}
|
|
|
+
|
|
|
public void setPi_date(Date pi_date) {
|
|
|
this.pi_date = pi_date;
|
|
|
}
|
|
|
+
|
|
|
public String getPi_sendcode() {
|
|
|
return pi_sendcode;
|
|
|
}
|
|
|
+
|
|
|
public void setPi_sendcode(String pi_sendcode) {
|
|
|
this.pi_sendcode = pi_sendcode;
|
|
|
}
|
|
|
+
|
|
|
public String getPi_receivename() {
|
|
|
return pi_receivename;
|
|
|
}
|
|
|
+
|
|
|
public void setPi_receivename(String pi_receivename) {
|
|
|
this.pi_receivename = pi_receivename;
|
|
|
}
|
|
|
+
|
|
|
public String getPi_receivecode() {
|
|
|
return pi_receivecode;
|
|
|
}
|
|
|
+
|
|
|
public void setPi_receivecode(String pi_receivecode) {
|
|
|
this.pi_receivecode = pi_receivecode;
|
|
|
}
|
|
|
+
|
|
|
public List<PurchaseProdInOutDetail> getDetails() {
|
|
|
return details;
|
|
|
}
|
|
|
+
|
|
|
public void setDetails(List<PurchaseProdInOutDetail> details) {
|
|
|
this.details = details;
|
|
|
}
|
|
|
-
|
|
|
- public PurchaseAccept convent(){
|
|
|
+
|
|
|
+ public PurchaseAccept convent() {
|
|
|
PurchaseAccept accept = new PurchaseAccept();
|
|
|
accept.setCode(this.pi_inoutno);
|
|
|
accept.setCurrency(this.pi_currency);
|
|
|
@@ -134,17 +169,18 @@ public class PurchaseProdInOut {
|
|
|
accept.setSendStatus((short) Status.NOT_UPLOAD.value());
|
|
|
accept.setReceivename(this.pi_receivename);
|
|
|
accept.setReceivecode(this.pi_receivecode);
|
|
|
- if(! CollectionUtils.isEmpty(this.details)) {
|
|
|
+ if (!CollectionUtils.isEmpty(this.details)) {
|
|
|
Set<PurchaseAcceptItem> acceptItems = new HashSet<PurchaseAcceptItem>();
|
|
|
- for(PurchaseProdInOutDetail detail : this.details) {
|
|
|
+ for (PurchaseProdInOutDetail detail : this.details) {
|
|
|
acceptItems.add(detail.convent());
|
|
|
}
|
|
|
accept.setAcceptItems(acceptItems);
|
|
|
}
|
|
|
+ accept.setErpId(this.pi_id);
|
|
|
return accept;
|
|
|
}
|
|
|
-
|
|
|
- public PurchaseReturn conventToReturn(){
|
|
|
+
|
|
|
+ public PurchaseReturn conventToReturn() {
|
|
|
PurchaseReturn purchaseReturn = new PurchaseReturn();
|
|
|
purchaseReturn.setCode(this.pi_inoutno);
|
|
|
purchaseReturn.setCurrency(this.pi_currency);
|
|
|
@@ -159,17 +195,18 @@ public class PurchaseProdInOut {
|
|
|
purchaseReturn.setReceivename(this.pi_receivename);
|
|
|
purchaseReturn.setReceivecode(this.pi_receivecode);
|
|
|
purchaseReturn.setSendStatus((short) Status.NOT_UPLOAD.value());
|
|
|
- if(! CollectionUtils.isEmpty(this.details)) {
|
|
|
+ if (!CollectionUtils.isEmpty(this.details)) {
|
|
|
Set<PurchaseReturnItem> returnItems = new HashSet<PurchaseReturnItem>();
|
|
|
- for(PurchaseProdInOutDetail detail : this.details) {
|
|
|
+ for (PurchaseProdInOutDetail detail : this.details) {
|
|
|
returnItems.add(detail.conventToReturn());
|
|
|
}
|
|
|
purchaseReturn.setReturnItems(returnItems);
|
|
|
}
|
|
|
+ purchaseReturn.setErpId(this.pi_id);
|
|
|
return purchaseReturn;
|
|
|
}
|
|
|
-
|
|
|
- public PurchaseBadIn conventToBadIn(){
|
|
|
+
|
|
|
+ public PurchaseBadIn conventToBadIn() {
|
|
|
PurchaseBadIn purchaseBadIn = new PurchaseBadIn();
|
|
|
purchaseBadIn.setCode(this.pi_inoutno);
|
|
|
purchaseBadIn.setCurrency(this.pi_currency);
|
|
|
@@ -184,17 +221,18 @@ public class PurchaseProdInOut {
|
|
|
purchaseBadIn.setReceiveCode(this.pi_receivecode);
|
|
|
purchaseBadIn.setReceiveName(this.pi_receivename);
|
|
|
purchaseBadIn.setSendStatus((short) Status.NOT_UPLOAD.value());
|
|
|
- if(! CollectionUtils.isEmpty(this.details)) {
|
|
|
+ if (!CollectionUtils.isEmpty(this.details)) {
|
|
|
Set<PurchaseBadInItem> badInItems = new HashSet<PurchaseBadInItem>();
|
|
|
- for(PurchaseProdInOutDetail detail : this.details) {
|
|
|
+ for (PurchaseProdInOutDetail detail : this.details) {
|
|
|
badInItems.add(detail.conventToBadIn());
|
|
|
}
|
|
|
purchaseBadIn.setBadInItems(badInItems);
|
|
|
}
|
|
|
+ purchaseBadIn.setErpId(this.pi_id);
|
|
|
return purchaseBadIn;
|
|
|
}
|
|
|
-
|
|
|
- public PurchaseBadOut conventToBadOut(){
|
|
|
+
|
|
|
+ public PurchaseBadOut conventToBadOut() {
|
|
|
PurchaseBadOut purchaseBadOut = new PurchaseBadOut();
|
|
|
purchaseBadOut.setCode(this.pi_inoutno);
|
|
|
purchaseBadOut.setCurrency(this.pi_currency);
|
|
|
@@ -209,13 +247,14 @@ public class PurchaseProdInOut {
|
|
|
purchaseBadOut.setReceiveCode(this.pi_receivecode);
|
|
|
purchaseBadOut.setReceiveName(this.pi_receivename);
|
|
|
purchaseBadOut.setSendStatus((short) Status.NOT_UPLOAD.value());
|
|
|
- if(! CollectionUtils.isEmpty(this.details)) {
|
|
|
+ if (!CollectionUtils.isEmpty(this.details)) {
|
|
|
Set<PurchaseBadOutItem> badOutItems = new HashSet<PurchaseBadOutItem>();
|
|
|
- for(PurchaseProdInOutDetail detail : this.details) {
|
|
|
+ for (PurchaseProdInOutDetail detail : this.details) {
|
|
|
badOutItems.add(detail.conventToBadOut());
|
|
|
}
|
|
|
purchaseBadOut.setBadOutItems(badOutItems);
|
|
|
}
|
|
|
+ purchaseBadOut.setErpId(this.pi_id);
|
|
|
return purchaseBadOut;
|
|
|
}
|
|
|
}
|