Browse Source

新增自动订单接口

hejq 8 years ago
parent
commit
1329c53f7d

+ 1 - 2
src/main/java/com/uas/platform/b2b/controller/BaseInfoController.java

@@ -414,8 +414,7 @@ public class BaseInfoController {
 	 * @modify-desc 增加操作日志
 	 */
 	@RequestMapping(value = "/addtoCart", method = RequestMethod.POST)
-	public ResponseEntity<ModelMap> save(String token, @RequestBody String json) {
-		NewPurcOrder neworder = JSONObject.parseObject(json, NewPurcOrder.class);
+	public ResponseEntity<ModelMap> save(String token, @RequestBody NewPurcOrder neworder) {
 		ModelMap map = new ModelMap();
 		boolean flag = tokenService.enabled(token);
 		if (flag) {

+ 210 - 0
src/main/java/com/uas/platform/b2b/erp/model/AutOrder.java

@@ -0,0 +1,210 @@
+package com.uas.platform.b2b.erp.model;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 自动转换订单
+ *
+ * Created by hejq on 2018-05-02.
+ */
+public class AutOrder implements Serializable {
+
+    /**
+     * default serialVersionUID
+     */
+    private static final long serialVersionUID = 1L;
+
+    private Long id;
+
+    /**
+     * 采购单号
+     */
+    private String pu_code;
+
+    /**
+     * 采购日期
+     */
+    private String pu_date;
+
+    /**
+     * 采购单所属采购员名称
+     */
+    private String em_name;
+
+    /**
+     * 采购单所属采购员联系方式
+     */
+    private String em_mobile;
+
+    /**
+     * 所属采购员邮箱
+     */
+    private String em_email;
+
+    /**
+     * 采购方
+     */
+    private String en_name;
+
+    /**
+     * 供应商
+     */
+    private String ve_name;
+
+    /**
+     * 币别
+     */
+    private String pu_currency;
+
+    /**
+     * 税率
+     */
+    private String pu_rate;
+
+    /**
+     * 采购类型
+     */
+    private String pu_kind;
+
+    /**
+     * 付款方式
+     */
+    private String pu_payments;
+
+    /**
+     * 送货地址
+     */
+    private String pu_shipaddresscode;
+
+    /**
+     * PDF文档的路径
+     */
+    private String pu_filepath;
+
+    /**
+     * 对应的采购单详情List
+     */
+    private List<AutOrderDetail> details;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getPu_code() {
+        return pu_code;
+    }
+
+    public void setPu_code(String pu_code) {
+        this.pu_code = pu_code;
+    }
+
+    public String getPu_date() {
+        return pu_date;
+    }
+
+    public void setPu_date(String pu_date) {
+        this.pu_date = pu_date;
+    }
+
+    public String getEm_name() {
+        return em_name;
+    }
+
+    public void setEm_name(String em_name) {
+        this.em_name = em_name;
+    }
+
+    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 String getEn_name() {
+        return en_name;
+    }
+
+    public void setEn_name(String en_name) {
+        this.en_name = en_name;
+    }
+
+    public String getVe_name() {
+        return ve_name;
+    }
+
+    public void setVe_name(String ve_name) {
+        this.ve_name = ve_name;
+    }
+
+    public String getPu_currency() {
+        return pu_currency;
+    }
+
+    public void setPu_currency(String pu_currency) {
+        this.pu_currency = pu_currency;
+    }
+
+    public String getPu_rate() {
+        return pu_rate;
+    }
+
+    public void setPu_rate(String 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_shipaddresscode() {
+        return pu_shipaddresscode;
+    }
+
+    public void setPu_shipaddresscode(String pu_shipaddresscode) {
+        this.pu_shipaddresscode = pu_shipaddresscode;
+    }
+
+    public String getPu_filepath() {
+        return pu_filepath;
+    }
+
+    public void setPu_filepath(String pu_filepath) {
+        this.pu_filepath = pu_filepath;
+    }
+
+    public List<AutOrderDetail> getDetails() {
+        return details;
+    }
+
+    public void setDetails(List<AutOrderDetail> details) {
+        this.details = details;
+    }
+}

+ 123 - 0
src/main/java/com/uas/platform/b2b/erp/model/AutOrderDetail.java

@@ -0,0 +1,123 @@
+package com.uas.platform.b2b.erp.model;
+
+import com.uas.platform.b2b.model.PurchaseOrderAll;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+/**
+ * 自动生成订单明细
+ *
+ * Created by hejq on 2018-05-02.
+ */
+public class AutOrderDetail implements Serializable {
+
+    /**
+     * default serialVersionUID
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 物料编号
+     */
+    private String pd_prodcode;
+
+    /**
+     * 采购数量
+     */
+    private String pd_qty;
+
+    /**
+     * 采购价格
+     */
+    private String pd_price;
+
+    /**
+     * 交期
+     */
+    private String pd_delivery;
+
+    /**
+     * 税率税率
+     */
+    private String pd_rate;
+
+    /**
+     * 序号
+     */
+    private String pd_detno;
+
+    /**
+     * 采购订单
+     */
+    private AutOrder order;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getPd_prodcode() {
+        return pd_prodcode;
+    }
+
+    public void setPd_prodcode(String pd_prodcode) {
+        this.pd_prodcode = pd_prodcode;
+    }
+
+    public String getPd_qty() {
+        return pd_qty;
+    }
+
+    public void setPd_qty(String pd_qty) {
+        this.pd_qty = pd_qty;
+    }
+
+    public String getPd_price() {
+        return pd_price;
+    }
+
+    public void setPd_price(String pd_price) {
+        this.pd_price = pd_price;
+    }
+
+    public String getPd_delivery() {
+        return pd_delivery;
+    }
+
+    public void setPd_delivery(String pd_delivery) {
+        this.pd_delivery = pd_delivery;
+    }
+
+    public String getPd_rate() {
+        return pd_rate;
+    }
+
+    public void setPd_rate(String pd_rate) {
+        this.pd_rate = pd_rate;
+    }
+
+    public String getPd_detno() {
+        return pd_detno;
+    }
+
+    public void setPd_detno(String pd_detno) {
+        this.pd_detno = pd_detno;
+    }
+
+    public AutOrder getOrder() {
+        return order;
+    }
+
+    public void setOrder(AutOrder order) {
+        this.order = order;
+    }
+}

+ 10 - 0
src/main/java/com/uas/platform/b2b/erp/model/KeywordAlias.java

@@ -0,0 +1,10 @@
+package com.uas.platform.b2b.erp.model;
+
+
+/**
+ * 关键词别名
+ *
+ * Created by hejq on 2018-05-02.
+ */
+public class KeywordAlias {
+}