|
@@ -0,0 +1,464 @@
|
|
|
+package com.usoftchina.uas.pl.b2b.po;
|
|
|
+
|
|
|
+import com.usoft.b2b.external.erp.order.api.entity.Purchase;
|
|
|
+import com.usoftchina.uas.pl.utils.NumberUtils;
|
|
|
+import com.usoftchina.uas.pl.utils.StringUtils;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+
|
|
|
+ * ERP系统的采购订单明细
|
|
|
+ *
|
|
|
+ * @author yingp
|
|
|
+ *
|
|
|
+ */
|
|
|
+public class PurchaseDetailPO {
|
|
|
+
|
|
|
+ private String pd_code;
|
|
|
+ private String pd_prodcode;
|
|
|
+ private Double pd_qty;
|
|
|
+ private Double pd_price;
|
|
|
+ private Date pd_delivery;
|
|
|
+ private String pd_remark;
|
|
|
+ private Float pd_rate;
|
|
|
+ private short pd_detno;
|
|
|
+ private String pd_factory;
|
|
|
+ private String pd_vendspec;
|
|
|
+ private Integer pd_beipin;
|
|
|
+ private String pd_prattach;
|
|
|
+
|
|
|
+ private String pd_purcvendname;
|
|
|
+
|
|
|
+ private Long pd_purcvenduu;
|
|
|
+
|
|
|
+ private String pd_custpurchasecode;
|
|
|
+
|
|
|
+ private Short pd_custpurchasedetno;
|
|
|
+
|
|
|
+ private String pd_acceptcustname;
|
|
|
+
|
|
|
+ private String pd_acceptcustaddress;
|
|
|
+
|
|
|
+ private Long pd_acceptcustuu;
|
|
|
+
|
|
|
+ private String pd_hasissued;
|
|
|
+
|
|
|
+ private Float pd_purcprice;
|
|
|
+
|
|
|
+ private Float pd_purctaxrate;
|
|
|
+
|
|
|
+ private String pd_purccurrency;
|
|
|
+
|
|
|
+ private String pd_taxcode;
|
|
|
+
|
|
|
+ private String pd_billname;
|
|
|
+
|
|
|
+ private String pd_orispeccode;
|
|
|
+ private List<AttachPO> attaches;
|
|
|
+
|
|
|
+
|
|
|
+ private String pd_repprodcode;
|
|
|
+
|
|
|
+ private String pd_repdetail;
|
|
|
+
|
|
|
+ private String pd_repspec;
|
|
|
+
|
|
|
+
|
|
|
+ private String pr_oldcode;
|
|
|
+
|
|
|
+ private String pr_oldname;
|
|
|
+
|
|
|
+ private String pr_oldspec;
|
|
|
+
|
|
|
+
|
|
|
+ private String pd_prmaterial;
|
|
|
+
|
|
|
+
|
|
|
+ private String pd_topmothercode;
|
|
|
+
|
|
|
+ public String getPd_topmothercode() {
|
|
|
+ return pd_topmothercode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_topmothercode(String pd_topmothercode) {
|
|
|
+ this.pd_topmothercode = pd_topmothercode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_prmaterial() {
|
|
|
+ return pd_prmaterial;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_prmaterial(String pd_prmaterial) {
|
|
|
+ this.pd_prmaterial = pd_prmaterial;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPr_oldcode() {
|
|
|
+ return pr_oldcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPr_oldcode(String pr_oldcode) {
|
|
|
+ this.pr_oldcode = pr_oldcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPr_oldname() {
|
|
|
+ return pr_oldname;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPr_oldname(String pr_oldname) {
|
|
|
+ this.pr_oldname = pr_oldname;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPr_oldspec() {
|
|
|
+ return pr_oldspec;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPr_oldspec(String pr_oldspec) {
|
|
|
+ this.pr_oldspec = pr_oldspec;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_repprodcode() {
|
|
|
+ return pd_repprodcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_repprodcode(String pd_repprodcode) {
|
|
|
+ this.pd_repprodcode = pd_repprodcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_repdetail() {
|
|
|
+ return pd_repdetail;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_repdetail(String pd_repdetail) {
|
|
|
+ this.pd_repdetail = pd_repdetail;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_repspec() {
|
|
|
+ return pd_repspec;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_repspec(String pd_repspec) {
|
|
|
+ this.pd_repspec = pd_repspec;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_taxcode() {
|
|
|
+ return pd_taxcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_taxcode(String pd_taxcode) {
|
|
|
+ this.pd_taxcode = pd_taxcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_billname() {
|
|
|
+ return pd_billname;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_billname(String pd_billname) {
|
|
|
+ this.pd_billname = pd_billname;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_orispeccode() {
|
|
|
+ return pd_orispeccode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_orispeccode(String pd_orispeccode) {
|
|
|
+ this.pd_orispeccode = pd_orispeccode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Float getPd_purcprice() {
|
|
|
+ return pd_purcprice;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_purcprice(Float pd_purcprice) {
|
|
|
+ this.pd_purcprice = pd_purcprice;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Float getPd_purctaxrate() {
|
|
|
+ return pd_purctaxrate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_purctaxrate(Float pd_purctaxrate) {
|
|
|
+ this.pd_purctaxrate = pd_purctaxrate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_purccurrency() {
|
|
|
+ return pd_purccurrency;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_purccurrency(String pd_purccurrency) {
|
|
|
+ this.pd_purccurrency = pd_purccurrency;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_vendspec() {
|
|
|
+ return pd_vendspec;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_vendspec(String pd_vendspec) {
|
|
|
+ this.pd_vendspec = pd_vendspec;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getPd_acceptcustuu() {
|
|
|
+ return pd_acceptcustuu;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_acceptcustuu(Long pd_acceptcustuu) {
|
|
|
+ this.pd_acceptcustuu = pd_acceptcustuu;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_hasissued() {
|
|
|
+ return pd_hasissued;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_hasissued(String pd_hasissued) {
|
|
|
+ this.pd_hasissued = pd_hasissued;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_factory() {
|
|
|
+ return pd_factory;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_factory(String pd_factory) {
|
|
|
+ this.pd_factory = pd_factory;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_code() {
|
|
|
+ return pd_code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_code(String pd_code) {
|
|
|
+ this.pd_code = pd_code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_prodcode() {
|
|
|
+ return pd_prodcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_prodcode(String pd_prodcode) {
|
|
|
+ this.pd_prodcode = pd_prodcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Double getPd_qty() {
|
|
|
+ return pd_qty;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_qty(Double pd_qty) {
|
|
|
+ this.pd_qty = pd_qty;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Double getPd_price() {
|
|
|
+ return pd_price;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_price(Double pd_price) {
|
|
|
+ this.pd_price = pd_price;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Date getPd_delivery() {
|
|
|
+ return pd_delivery;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_delivery(Date pd_delivery) {
|
|
|
+ this.pd_delivery = pd_delivery;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_remark() {
|
|
|
+ return pd_remark;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_remark(String pd_remark) {
|
|
|
+ this.pd_remark = pd_remark;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Float getPd_rate() {
|
|
|
+ return pd_rate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_rate(Float pd_rate) {
|
|
|
+ this.pd_rate = pd_rate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public short getPd_detno() {
|
|
|
+ return pd_detno;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_detno(short pd_detno) {
|
|
|
+ this.pd_detno = pd_detno;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getPd_beipin() {
|
|
|
+ return pd_beipin;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_beipin(Integer pd_beipin) {
|
|
|
+ this.pd_beipin = pd_beipin;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_prattach() {
|
|
|
+ return pd_prattach;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_prattach(String pd_prattach) {
|
|
|
+ this.pd_prattach = pd_prattach;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<AttachPO> getAttaches() {
|
|
|
+ return attaches;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAttaches(List<AttachPO> attaches) {
|
|
|
+ this.attaches = attaches;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_purcvendname() {
|
|
|
+ return pd_purcvendname;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_purcvendname(String pd_purcvendname) {
|
|
|
+ this.pd_purcvendname = pd_purcvendname;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getPd_purcvenduu() {
|
|
|
+ return pd_purcvenduu;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_purcvenduu(Long pd_purcvenduu) {
|
|
|
+ this.pd_purcvenduu = pd_purcvenduu;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_custpurchasecode() {
|
|
|
+ return pd_custpurchasecode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_custpurchasecode(String pd_custpurchasecode) {
|
|
|
+ this.pd_custpurchasecode = pd_custpurchasecode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Short getPd_custpurchasedetno() {
|
|
|
+ return pd_custpurchasedetno;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_custpurchasedetno(Short pd_custpurchasedetno) {
|
|
|
+ this.pd_custpurchasedetno = pd_custpurchasedetno;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_acceptcustname() {
|
|
|
+ return pd_acceptcustname;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_acceptcustname(String pd_acceptcustname) {
|
|
|
+ this.pd_acceptcustname = pd_acceptcustname;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getPd_acceptcustaddress() {
|
|
|
+ return pd_acceptcustaddress;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPd_acceptcustaddress(String pd_acceptcustaddress) {
|
|
|
+ this.pd_acceptcustaddress = pd_acceptcustaddress;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Purchase.PurchaseDetail map() {
|
|
|
+ Purchase.PurchaseDetail.Builder builder = Purchase.PurchaseDetail.newBuilder();
|
|
|
+ if (!StringUtils.isEmpty(pd_code)) {
|
|
|
+ builder.setPdCode(pd_code);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_prodcode)) {
|
|
|
+ builder.setPdProdcode(pd_prodcode);
|
|
|
+ }
|
|
|
+ if (null != pd_qty) {
|
|
|
+ builder.setPdQty(pd_qty);
|
|
|
+ }
|
|
|
+ if (null != pd_price) {
|
|
|
+ builder.setPdPrice(pd_price);
|
|
|
+ }
|
|
|
+ if (null != pd_delivery) {
|
|
|
+ builder.setPdDelivery(pd_delivery.getTime());
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_remark)) {
|
|
|
+ builder.setPdRemark(pd_remark);
|
|
|
+ }
|
|
|
+ if (null != pd_rate) {
|
|
|
+ builder.setPdRate(pd_rate);
|
|
|
+ }
|
|
|
+ builder.setPdDetno(pd_detno);
|
|
|
+ if (!StringUtils.isEmpty(pd_factory)) {
|
|
|
+ builder.setPdFactory(pd_factory);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_vendspec)) {
|
|
|
+ builder.setPdVendspec(pd_vendspec);
|
|
|
+ }
|
|
|
+ if (null != pd_beipin) {
|
|
|
+ builder.setPdBeipin(pd_beipin);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_purcvendname)) {
|
|
|
+ builder.setPdPurcvendname(pd_purcvendname);
|
|
|
+ }
|
|
|
+ if (!NumberUtils.isEmpty(pd_purcvenduu)) {
|
|
|
+ builder.setPdPurcvenduu(pd_purcvenduu);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_custpurchasecode)) {
|
|
|
+ builder.setPdCustpurchasecode(pd_custpurchasecode);
|
|
|
+ }
|
|
|
+ if (!NumberUtils.isEmpty(pd_custpurchasedetno)) {
|
|
|
+ builder.setPdCustpurchasedetno(pd_custpurchasedetno);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_acceptcustname)) {
|
|
|
+ builder.setPdAcceptcustname(pd_acceptcustname);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_acceptcustaddress)) {
|
|
|
+ builder.setPdAcceptcustaddress(pd_acceptcustaddress);
|
|
|
+ }
|
|
|
+ if (!NumberUtils.isEmpty(pd_acceptcustuu)) {
|
|
|
+ builder.setPdAcceptcustuu(pd_acceptcustuu);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_hasissued)) {
|
|
|
+ builder.setPdHasissued(pd_hasissued);
|
|
|
+ }
|
|
|
+ if (null != pd_purcprice) {
|
|
|
+ builder.setPdPurcprice(pd_purcprice);
|
|
|
+ }
|
|
|
+ if (null != pd_purctaxrate) {
|
|
|
+ builder.setPdPurctaxrate(pd_purctaxrate);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_purccurrency)) {
|
|
|
+ builder.setPdPurccurrency(pd_purccurrency);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_taxcode)) {
|
|
|
+ builder.setPdTaxcode(pd_taxcode);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_purccurrency)) {
|
|
|
+ builder.setPdPurccurrency(pd_purccurrency);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_billname)) {
|
|
|
+ builder.setPdBillname(pd_billname);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_orispeccode)) {
|
|
|
+ builder.setPdOrispeccode(pd_orispeccode);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_repprodcode)) {
|
|
|
+ builder.setPdRepprodcode(pd_repprodcode);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_repdetail)) {
|
|
|
+ builder.setPdRepdetail(pd_repdetail);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pd_repspec)) {
|
|
|
+ builder.setPdRepspec(pd_repspec);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pr_oldcode)) {
|
|
|
+ builder.setPrOldcode(pr_oldcode);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pr_oldname)) {
|
|
|
+ builder.setPrOldname(pr_oldname);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(pr_oldspec)) {
|
|
|
+ builder.setPrOldspec(pr_oldspec);
|
|
|
+ }
|
|
|
+ if (!CollectionUtils.isEmpty(attaches)) {
|
|
|
+ attaches.forEach(attach -> {
|
|
|
+ builder.addAttaches(attach.map());
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return builder.build();
|
|
|
+ }
|
|
|
+}
|