Browse Source

采购单上传对接接口

chenw 6 years ago
parent
commit
449bab3d1d

+ 28 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/saas/inquiry/api/PurchaseApi.java

@@ -0,0 +1,28 @@
+package com.usoftchina.saas.inquiry.api;
+
+import com.usoftchina.saas.inquiry.po.purchase.SavePurchaseListResp;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@FeignClient(url = "${b2b.baseUrl.uu}", name = "b2b-server")
+@RequestMapping("/erp/purchase")
+public interface PurchaseApi {
+    /**
+     * 上传采购单
+     * @param data
+     * @return
+     */
+    @RequestMapping(method = RequestMethod.POST)
+    SavePurchaseListResp savePurchase(@RequestParam("data") String data);
+
+    /**
+     * 结案、反结案采购单后,传到平台
+     * @param data
+     */
+    @PostMapping("/end")
+    void updatePurchaseDetailEnd(@RequestParam("data") String data);
+
+}

+ 302 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/saas/inquiry/po/purchase/Purchase.java

@@ -0,0 +1,302 @@
+package com.usoftchina.saas.inquiry.po.purchase;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description 采购单
+ * @Author chenwei
+ * @Date 2019/01/14
+ */
+public class Purchase implements Serializable {
+
+    private String pu_code;
+    private Date pu_date;
+    private Long em_uu;
+    private String em_name;
+    private String em_sex;
+    private String em_mobile;
+    private String em_email;
+    private Long ve_uu;
+    private String pu_cop;
+    private Long ve_contactuu;
+    private String ve_contact;
+    private String pu_currency;
+    private Float pu_rate;
+    private String pu_kind;  // 采购类型
+    private String pu_payments;
+    private String pu_remark;
+    private String pu_recordman;
+    private String pu_auditman;
+    private Date pu_indate;
+    private String pu_shipaddresscode;
+    private String pu_receivename;
+    private String pu_receivecode;
+    private Long pu_id;
+    private List<PurchaseDetail> purchaseDetails;
+    private String pu_purpose; // 用途,
+    private String pu_arcustcode; // 买家应收客户,
+    private String pu_shcustcode; // 收货客户,
+    private String pu_refcode; // 销售单号
+    private String pu_custcode; // 客户编号,
+    private String pu_custname; // 客户名称。
+    private String pu_transport;
+    private Long pu_b2bid;// 查询平台的id号
+
+    public String getPu_code() {
+        return pu_code;
+    }
+
+    public void setPu_code(String pu_code) {
+        this.pu_code = pu_code;
+    }
+
+    public Date getPu_date() {
+        return pu_date;
+    }
+
+    public void setPu_date(Date pu_date) {
+        this.pu_date = pu_date;
+    }
+
+    public Long getEm_uu() {
+        return em_uu;
+    }
+
+    public void setEm_uu(Long em_uu) {
+        this.em_uu = em_uu;
+    }
+
+    public String getEm_name() {
+        return em_name;
+    }
+
+    public void setEm_name(String em_name) {
+        this.em_name = em_name;
+    }
+
+    public String getEm_sex() {
+        return em_sex;
+    }
+
+    public void setEm_sex(String em_sex) {
+        this.em_sex = em_sex;
+    }
+
+    public String getEm_mobile() {
+        return em_mobile;
+    }
+
+    public void setEm_mobile(String em_mobile) {
+        this.em_mobile = em_mobile;
+    }
+
+    public String getEm_email() {
+        return em_email;
+    }
+
+    public void setEm_email(String em_email) {
+        this.em_email = em_email;
+    }
+
+    public Long getVe_uu() {
+        return ve_uu;
+    }
+
+    public void setVe_uu(Long ve_uu) {
+        this.ve_uu = ve_uu;
+    }
+
+    public String getPu_cop() {
+        return pu_cop;
+    }
+
+    public void setPu_cop(String pu_cop) {
+        this.pu_cop = pu_cop;
+    }
+
+    public Long getVe_contactuu() {
+        return ve_contactuu;
+    }
+
+    public void setVe_contactuu(Long ve_contactuu) {
+        this.ve_contactuu = ve_contactuu;
+    }
+
+    public String getVe_contact() {
+        return ve_contact;
+    }
+
+    public void setVe_contact(String ve_contact) {
+        this.ve_contact = ve_contact;
+    }
+
+    public String getPu_currency() {
+        return pu_currency;
+    }
+
+    public void setPu_currency(String pu_currency) {
+        this.pu_currency = pu_currency;
+    }
+
+    public Float getPu_rate() {
+        return pu_rate;
+    }
+
+    public void setPu_rate(Float pu_rate) {
+        this.pu_rate = pu_rate;
+    }
+
+    public String getPu_kind() {
+        return pu_kind;
+    }
+
+    public void setPu_kind(String pu_kind) {
+        this.pu_kind = pu_kind;
+    }
+
+    public String getPu_payments() {
+        return pu_payments;
+    }
+
+    public void setPu_payments(String pu_payments) {
+        this.pu_payments = pu_payments;
+    }
+
+    public String getPu_remark() {
+        return pu_remark;
+    }
+
+    public void setPu_remark(String pu_remark) {
+        this.pu_remark = pu_remark;
+    }
+
+    public String getPu_recordman() {
+        return pu_recordman;
+    }
+
+    public void setPu_recordman(String pu_recordman) {
+        this.pu_recordman = pu_recordman;
+    }
+
+    public String getPu_auditman() {
+        return pu_auditman;
+    }
+
+    public void setPu_auditman(String pu_auditman) {
+        this.pu_auditman = pu_auditman;
+    }
+
+    public Date getPu_indate() {
+        return pu_indate;
+    }
+
+    public void setPu_indate(Date pu_indate) {
+        this.pu_indate = pu_indate;
+    }
+
+    public String getPu_shipaddresscode() {
+        return pu_shipaddresscode;
+    }
+
+    public void setPu_shipaddresscode(String pu_shipaddresscode) {
+        this.pu_shipaddresscode = pu_shipaddresscode;
+    }
+
+    public String getPu_receivename() {
+        return pu_receivename;
+    }
+
+    public void setPu_receivename(String pu_receivename) {
+        this.pu_receivename = pu_receivename;
+    }
+
+    public String getPu_receivecode() {
+        return pu_receivecode;
+    }
+
+    public void setPu_receivecode(String pu_receivecode) {
+        this.pu_receivecode = pu_receivecode;
+    }
+
+    public Long getPu_id() {
+        return pu_id;
+    }
+
+    public void setPu_id(Long pu_id) {
+        this.pu_id = pu_id;
+    }
+
+    public List<PurchaseDetail> getPurchaseDetails() {
+        return purchaseDetails;
+    }
+
+    public void setPurchaseDetails(List<PurchaseDetail> purchaseDetails) {
+        this.purchaseDetails = purchaseDetails;
+    }
+
+    public String getPu_purpose() {
+        return pu_purpose;
+    }
+
+    public void setPu_purpose(String pu_purpose) {
+        this.pu_purpose = pu_purpose;
+    }
+
+    public String getPu_arcustcode() {
+        return pu_arcustcode;
+    }
+
+    public void setPu_arcustcode(String pu_arcustcode) {
+        this.pu_arcustcode = pu_arcustcode;
+    }
+
+    public String getPu_shcustcode() {
+        return pu_shcustcode;
+    }
+
+    public void setPu_shcustcode(String pu_shcustcode) {
+        this.pu_shcustcode = pu_shcustcode;
+    }
+
+    public String getPu_refcode() {
+        return pu_refcode;
+    }
+
+    public void setPu_refcode(String pu_refcode) {
+        this.pu_refcode = pu_refcode;
+    }
+
+    public String getPu_custcode() {
+        return pu_custcode;
+    }
+
+    public void setPu_custcode(String pu_custcode) {
+        this.pu_custcode = pu_custcode;
+    }
+
+    public String getPu_custname() {
+        return pu_custname;
+    }
+
+    public void setPu_custname(String pu_custname) {
+        this.pu_custname = pu_custname;
+    }
+
+    public String getPu_transport() {
+        return pu_transport;
+    }
+
+    public void setPu_transport(String pu_transport) {
+        this.pu_transport = pu_transport;
+    }
+
+    public Long getPu_b2bid() {
+        return pu_b2bid;
+    }
+
+    public void setPu_b2bid(Long pu_b2bid) {
+        this.pu_b2bid = pu_b2bid;
+    }
+}

+ 313 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/saas/inquiry/po/purchase/PurchaseDetail.java

@@ -0,0 +1,313 @@
+package com.usoftchina.saas.inquiry.po.purchase;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description 采购单明细
+ * @Author chenwei
+ * @Date 2019/01/14
+ */
+public class PurchaseDetail implements Serializable {
+
+    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_purcvendname;
+    //终端供应商uu
+    private Long pd_purcvenduu;
+    //客户采购订单号
+    private String pd_custpurchasecode;
+    //客户采购订单序号
+    private Short pd_custpurchasedetno;
+    //收货客户
+    private String pd_acceptcustname;
+    //收货地址
+    private String pd_acceptcustaddress;
+    //收货客户uu
+    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 String pd_repprodcode;
+    //替代料名称
+    private String pd_repdetail;
+    //替代料规格
+    private String pd_repspec;
+
+    //旧料编号
+    private String pr_oldcode;
+    //旧料名称
+    private String pr_oldname;
+    //旧料规格
+    private String pr_oldspec;
+
+    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 String getPd_factory() {
+        return pd_factory;
+    }
+
+    public void setPd_factory(String pd_factory) {
+        this.pd_factory = pd_factory;
+    }
+
+    public String getPd_vendspec() {
+        return pd_vendspec;
+    }
+
+    public void setPd_vendspec(String pd_vendspec) {
+        this.pd_vendspec = pd_vendspec;
+    }
+
+    public Integer getPd_beipin() {
+        return pd_beipin;
+    }
+
+    public void setPd_beipin(Integer pd_beipin) {
+        this.pd_beipin = pd_beipin;
+    }
+
+    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 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 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_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 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 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;
+    }
+}

+ 22 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/saas/inquiry/po/purchase/SavePurchaseListReq.java

@@ -0,0 +1,22 @@
+package com.usoftchina.saas.inquiry.po.purchase;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Description 保存采购单上传对象
+ * @Author chenwei
+ * @Date 2019/01/14
+ */
+public class SavePurchaseListReq implements Serializable {
+
+    List<Purchase> data;
+
+    public List<Purchase> getData() {
+        return data;
+    }
+
+    public void setData(List<Purchase> data) {
+        this.data = data;
+    }
+}

+ 22 - 0
applications/transfers/mall-api/src/main/java/com/usoftchina/saas/inquiry/po/purchase/SavePurchaseListResp.java

@@ -0,0 +1,22 @@
+package com.usoftchina.saas.inquiry.po.purchase;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Description 保存采购单响应对象
+ * @Author chenwei
+ * @Date 2019/01/14
+ */
+public class SavePurchaseListResp implements Serializable {
+
+    List<Purchase> data;
+
+    public List<Purchase> getData() {
+        return data;
+    }
+
+    public void setData(List<Purchase> data) {
+        this.data = data;
+    }
+}