Переглянути джерело

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/java/com/uas/erp/schedular/financeservice/domain/AccountInfo.java
#	src/main/java/com/uas/erp/schedular/financeservice/domain/Apply.java
#	src/main/java/com/uas/erp/schedular/financeservice/domain/AssociateCompanyInfo.java
#	src/main/java/com/uas/erp/schedular/financeservice/domain/BusinessConditionInfo.java
#	src/main/java/com/uas/erp/schedular/financeservice/domain/ChangesInstructionInfo.java
#	src/main/java/com/uas/erp/schedular/financeservice/domain/CustInfo.java
#	src/main/java/com/uas/erp/schedular/financeservice/domain/CustomerExcutiveInfo.java
#	src/main/java/com/uas/erp/schedular/financeservice/domain/CustomerInfo.java
#	src/main/java/com/uas/erp/schedular/financeservice/domain/FinanceConditionInfo.java
#	src/main/java/com/uas/erp/schedular/financeservice/domain/ProductMixInfo.java
#	src/main/java/com/uas/erp/schedular/financeservice/domain/PurcCustInfo.java
#	src/main/java/com/uas/erp/schedular/financeservice/domain/ShareholdersInfo.java
#	src/main/java/com/uas/erp/schedular/financeservice/domain/UpdowncastInfo.java
#	src/main/java/com/uas/erp/schedular/financeservice/task/AbstractTask.java
#	src/main/resources/init/setting.json
#	src/test/java/com/uas/erp/test/ConnectToFinanceTest.java
hejq 8 роки тому
батько
коміт
7caefd7fa6
20 змінених файлів з 3003 додано та 8 видалено
  1. 104 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/AccountInfo.java
  2. 199 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/Apply.java
  3. 193 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/ApplyInfo.java
  4. 115 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/AssociateCompanyInfo.java
  5. 91 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/Attach.java
  6. 66 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/BusinessConditionInfo.java
  7. 89 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/ChangesInstructionInfo.java
  8. 444 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/CustInfo.java
  9. 172 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/CustomerExcutiveInfo.java
  10. 330 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/CustomerInfo.java
  11. 104 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/FinanceConditionInfo.java
  12. 104 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/ProductMixInfo.java
  13. 247 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/PurcCustInfo.java
  14. 104 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/ShareholdersInfo.java
  15. 117 0
      src/main/java/com/uas/erp/schedular/financeservice/domain/UpdowncastInfo.java
  16. 324 0
      src/main/java/com/uas/erp/schedular/financeservice/task/AbstractTask.java
  17. 96 0
      src/main/java/com/uas/erp/schedular/financeservice/task/ApplyInfoTask.java
  18. 11 4
      src/main/resources/init/setting.json
  19. 89 0
      src/test/java/com/uas/erp/test/ConnectToFinanceTest.java
  20. 4 4
      src/test/java/com/uas/erp/test/XmlTest.java

+ 104 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/AccountInfo.java

@@ -0,0 +1,104 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+/**
+ * created by shicr on 2017/12/20
+ * 财务数据表
+ **/
+public class AccountInfo {
+
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 企业uu
+     * @return
+     */
+    private Long enuu;
+
+    /**
+     *财务类型情况
+     */
+    private String ai_kind;
+
+    /**
+     * 买方名称
+     */
+    private String ai_cuname;
+
+    /**
+     *金额
+     */
+    private String ai_amount;
+
+    /**
+     * 占比
+     */
+    private Double ai_rate;
+
+    /**
+     * 账龄
+     */
+    private Long ai_paydays;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public String getAi_kind() {
+        return ai_kind;
+    }
+
+    public void setAi_kind(String ai_kind) {
+        this.ai_kind = ai_kind;
+    }
+
+    public String getAi_cuname() {
+        return ai_cuname;
+    }
+
+    public void setAi_cuname(String ai_cuname) {
+        this.ai_cuname = ai_cuname;
+    }
+
+    public String getAi_amount() {
+        return ai_amount;
+    }
+
+    public void setAi_amount(String ai_amount) {
+        this.ai_amount = ai_amount;
+    }
+
+    public Double getAi_rate() {
+        return ai_rate;
+    }
+
+    public void setAi_rate(Double ai_rate) {
+        this.ai_rate = ai_rate;
+    }
+
+    public Long getAi_paydays() {
+        return ai_paydays;
+    }
+
+    public void setAi_paydays(Long ai_paydays) {
+        this.ai_paydays = ai_paydays;
+    }
+
+    public AccountInfo() {
+
+    }
+}

+ 199 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/Apply.java

@@ -0,0 +1,199 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 金融服务申请数据
+ * 
+ * @author hejq
+ * @time 创建时间:2017年11月24日
+ */
+public class Apply implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * ID
+	 */
+	private Long id;
+
+	/**
+	 * 企业uu
+	 * @return
+	 */
+	private Long enuu;
+
+	/**
+	 * 联系人
+	 */
+	private String fa_contact;
+
+	/**
+	 * 联系方式1
+	 */
+	private String fa_telphone;
+	
+	/**
+	 * 联系方式2
+	 */
+	private String fa_phone;
+	
+	/**
+	 * 申请金额
+	 */
+	private Long fa_appamount;
+	
+	/**
+	 * 申请人
+	 */
+	private String fa_applyman;
+	
+	/**
+	 * 申请日期
+	 */
+	private String fa_applydate;
+	
+	/**
+	 * 申请得分
+	 */
+	private Double fa_score;
+	
+	/**
+	 * 融资申请单号
+	 */
+	private String fa_busincode;
+	
+	/**
+	 * 保理公司名称
+	 */
+	private String fa_facorpname;
+	
+	/**
+	 * 保理公司
+	 */
+	private String fa_facorpcode;
+
+	/**
+     * 客户信息表
+	 */
+	private CustInfo customerInfo;
+
+	/**
+	 * 附件表
+	 * @return
+	 */
+	private List<Attach> attachList;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getEnuu() {
+		return enuu;
+	}
+
+	public void setEnuu(Long enuu) {
+		this.enuu = enuu;
+	}
+
+	public String getFa_contact() {
+		return fa_contact;
+	}
+
+	public void setFa_contact(String fa_contact) {
+		this.fa_contact = fa_contact;
+	}
+
+	public String getFa_telphone() {
+		return fa_telphone;
+	}
+
+	public void setFa_telphone(String fa_telphone) {
+		this.fa_telphone = fa_telphone;
+	}
+
+	public String getFa_phone() {
+		return fa_phone;
+	}
+
+	public void setFa_phone(String fa_phone) {
+		this.fa_phone = fa_phone;
+	}
+
+	public Long getFa_appamount() {
+		return fa_appamount;
+	}
+
+	public void setFa_appamount(Long fa_appamount) {
+		this.fa_appamount = fa_appamount;
+	}
+
+	public String getFa_applyman() {
+		return fa_applyman;
+	}
+
+	public void setFa_applyman(String fa_applyman) {
+		this.fa_applyman = fa_applyman;
+	}
+
+	public String getFa_applydate() {
+		return fa_applydate;
+	}
+
+	public void setFa_applydate(String fa_applydate) {
+		this.fa_applydate = fa_applydate;
+	}
+
+	public Double getFa_score() {
+		return fa_score;
+	}
+
+	public void setFa_score(Double fa_score) {
+		this.fa_score = fa_score;
+	}
+
+	public String getFa_busincode() {
+		return fa_busincode;
+	}
+
+	public void setFa_busincode(String fa_busincode) {
+		this.fa_busincode = fa_busincode;
+	}
+
+	public String getFa_facorpname() {
+		return fa_facorpname;
+	}
+
+	public void setFa_facorpname(String fa_facorpname) {
+		this.fa_facorpname = fa_facorpname;
+	}
+
+	public String getFa_facorpcode() {
+		return fa_facorpcode;
+	}
+
+	public void setFa_facorpcode(String fa_facorpcode) {
+		this.fa_facorpcode = fa_facorpcode;
+	}
+
+	public CustInfo getCustomerInfo() {
+		return customerInfo;
+	}
+
+	public void setCustomerInfo(CustInfo customerInfo) {
+		this.customerInfo = customerInfo;
+	}
+
+	public List<Attach> getAttachList() {
+		return attachList;
+	}
+
+	public void setAttachList(List<Attach> attachList) {
+		this.attachList = attachList;
+	}
+}

+ 193 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/ApplyInfo.java

@@ -0,0 +1,193 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+import java.io.Serializable;
+
+/**
+ * created by shicr on 2017/12/26
+ **/
+public class ApplyInfo implements Serializable{
+
+    private static final long serialVersionUID = 1L;
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 企业uu
+     * @return
+     */
+    private Long enuu;
+
+    /**
+     * 联系人
+     */
+    private String fa_contact;
+
+    /**
+     * 联系方式1
+     */
+    private String fa_telphone;
+
+    /**
+     * 联系方式2
+     */
+    private String fa_phone;
+
+    /**
+     * 申请金额
+     */
+    private Long fa_appamount;
+
+    /**
+     * 申请人
+     */
+    private String fa_applyman;
+
+    /**
+     * 申请日期
+     */
+    private String fa_applydate;
+
+    /**
+     * 申请得分
+     */
+    private Double fa_score;
+
+    /**
+     * 融资申请单号
+     */
+    private String fa_busincode;
+
+    /**
+     * 保理公司名称
+     */
+    private String fa_facorpname;
+
+    /**
+     * 保理公司
+     */
+    private String fa_facorpcode;
+
+    /**
+     * 客户信息表
+     */
+    private CustInfo customerInfo;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public String getFa_contact() {
+        return fa_contact;
+    }
+
+    public void setFa_contact(String fa_contact) {
+        this.fa_contact = fa_contact;
+    }
+
+    public String getFa_telphone() {
+        return fa_telphone;
+    }
+
+    public void setFa_telphone(String fa_telphone) {
+        this.fa_telphone = fa_telphone;
+    }
+
+    public String getFa_phone() {
+        return fa_phone;
+    }
+
+    public void setFa_phone(String fa_phone) {
+        this.fa_phone = fa_phone;
+    }
+
+    public Long getFa_appamount() {
+        return fa_appamount;
+    }
+
+    public void setFa_appamount(Long fa_appamount) {
+        this.fa_appamount = fa_appamount;
+    }
+
+    public String getFa_applyman() {
+        return fa_applyman;
+    }
+
+    public void setFa_applyman(String fa_applyman) {
+        this.fa_applyman = fa_applyman;
+    }
+
+    public String getFa_applydate() {
+        return fa_applydate;
+    }
+
+    public void setFa_applydate(String fa_applydate) {
+        this.fa_applydate = fa_applydate;
+    }
+
+    public Double getFa_score() {
+        return fa_score;
+    }
+
+    public void setFa_score(Double fa_score) {
+        this.fa_score = fa_score;
+    }
+
+    public String getFa_busincode() {
+        return fa_busincode;
+    }
+
+    public void setFa_busincode(String fa_busincode) {
+        this.fa_busincode = fa_busincode;
+    }
+
+    public String getFa_facorpname() {
+        return fa_facorpname;
+    }
+
+    public void setFa_facorpname(String fa_facorpname) {
+        this.fa_facorpname = fa_facorpname;
+    }
+
+    public String getFa_facorpcode() {
+        return fa_facorpcode;
+    }
+
+    public void setFa_facorpcode(String fa_facorpcode) {
+        this.fa_facorpcode = fa_facorpcode;
+    }
+
+    public ApplyInfo(Apply apply) {
+        if (apply != null) {
+            this.id = apply.getId();
+            this.enuu = apply.getEnuu();
+            this.fa_contact = apply.getFa_contact();
+            this.fa_telphone = apply.getFa_telphone();
+            this.fa_phone = apply.getFa_phone();
+            this.fa_appamount = apply.getFa_appamount();
+            this.fa_applyman = apply.getFa_applyman();
+            this.fa_applydate = apply.getFa_applydate();
+            this.fa_score = apply.getFa_score();
+            this.fa_busincode = apply.getFa_busincode();
+            this.fa_facorpname = apply.getFa_facorpname();
+            this.fa_facorpcode = apply.getFa_facorpcode();
+        }
+    }
+
+    public ApplyInfo () {
+
+    }
+}

+ 115 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/AssociateCompanyInfo.java

@@ -0,0 +1,115 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+
+/**
+ * 关联企业
+ * created by shicr on 2017/12/18
+ **/
+public class AssociateCompanyInfo {
+
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 企业uu
+     * @return
+     */
+    private Long enuu;
+
+    /**
+     *关联方企业名称
+     */
+    private String cud_name;
+
+    /**
+     * 关联关系
+     */
+    private String cud_association;
+
+    /**
+     * 法人代表
+     */
+    private String cud_legalperson;
+
+    /**
+     * 法人代表股权(占比%)
+     */
+    private Double cud_ratio;
+
+    /**
+     * 主营业务
+     */
+    private String cud_product;
+
+    /**
+     * 注册资本(万元)
+     */
+    private Double cud_amount;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCud_name() {
+        return cud_name;
+    }
+
+    public void setCud_name(String cud_name) {
+        this.cud_name = cud_name;
+    }
+
+    public String getCud_association() {
+        return cud_association;
+    }
+
+    public void setCud_association(String cud_association) {
+        this.cud_association = cud_association;
+    }
+
+    public String getCud_legalperson() {
+        return cud_legalperson;
+    }
+
+    public void setCud_legalperson(String cud_legalperson) {
+        this.cud_legalperson = cud_legalperson;
+    }
+
+    public Double getCud_ratio() {
+        return cud_ratio;
+    }
+
+    public void setCud_ratio(Double cud_ratio) {
+        this.cud_ratio = cud_ratio;
+    }
+
+    public String getCud_product() {
+        return cud_product;
+    }
+
+    public void setCud_product(String cud_product) {
+        this.cud_product = cud_product;
+    }
+
+    public Double getCud_amount() {
+        return cud_amount;
+    }
+
+    public void setCud_amount(Double cud_amount) {
+        this.cud_amount = cud_amount;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+}

+ 91 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/Attach.java

@@ -0,0 +1,91 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+/**
+ * created by shicr on 2017/12/25
+ **/
+public class Attach implements Serializable{
+
+    private static final long serialVersionUID = 1L;
+
+    private Long id;
+
+    /**
+     * 附件名
+     */
+    private String name;
+
+    /**
+     * 附件路径
+     */
+    @Column(name="path")
+    private String path;
+
+    /**
+     * 文件大小
+     */
+    private Long size;
+
+    /**
+     *文件所属类别
+     */
+    private String type;
+
+    /**
+     * 附件所属的金融单据
+     */
+    private Long applyId;
+
+
+    public Long getApplyId() {
+        return applyId;
+    }
+
+    public void setApplyId(Long applyId) {
+        this.applyId = applyId;
+    }
+
+    public Long getSize() {
+        return size;
+    }
+
+    public void setSize(Long size) {
+        this.size = size;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+}

+ 66 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/BusinessConditionInfo.java

@@ -0,0 +1,66 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+/**
+ * created by shicr on 2017/12/20
+ * 情况描述
+ **/
+public class BusinessConditionInfo {
+
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 企业uu
+     * @return
+     */
+    private Long enuu;
+
+    /**
+     * 经营情况简述
+     */
+    private String bc_bcremark;
+
+    /**
+     *贸易流程简述
+     * @return
+     */
+    private String bc_sweaterprocess;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public String getBc_bcremark() {
+        return bc_bcremark;
+    }
+
+    public void setBc_bcremark(String bc_bcremark) {
+        this.bc_bcremark = bc_bcremark;
+    }
+
+    public String getBc_sweaterprocess() {
+        return bc_sweaterprocess;
+    }
+
+    public void setBc_sweaterprocess(String bc_sweaterprocess) {
+        this.bc_sweaterprocess = bc_sweaterprocess;
+    }
+
+    public BusinessConditionInfo() {
+
+    }
+}

+ 89 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/ChangesInstructionInfo.java

@@ -0,0 +1,89 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+/**
+ * 变更内容
+ */
+public class ChangesInstructionInfo {
+
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 优软账号
+     */
+    private Long enuu;
+
+    /**
+     * 变更科目
+     */
+    private String cd_type;
+
+    /**
+     * 变更时间
+     */
+    private String cs_date;
+
+    /**
+     * 变更前内容
+     */
+    private String cs_before;
+
+    /**
+     * 变更后内容
+     */
+    private String cs_after;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public String getCd_type() {
+        return cd_type;
+    }
+
+    public void setCd_type(String cd_type) {
+        this.cd_type = cd_type;
+    }
+
+    public String getCs_date() {
+        return cs_date;
+    }
+
+    public void setCs_date(String cs_date) {
+        this.cs_date = cs_date;
+    }
+
+    public String getCs_before() {
+        return cs_before;
+    }
+
+    public void setCs_before(String cs_before) {
+        this.cs_before = cs_before;
+    }
+
+    public String getCs_after() {
+        return cs_after;
+    }
+
+    public void setCs_after(String cs_after) {
+        this.cs_after = cs_after;
+    }
+
+    public ChangesInstructionInfo() {
+
+    }
+}

+ 444 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/CustInfo.java

@@ -0,0 +1,444 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+import java.util.List;
+
+/**
+ * Created by hejq on 2017-12-21.
+ */
+public class CustInfo {
+
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 公司中文名
+     */
+    private String cu_name;
+
+    /**
+     * 公司英文名
+     */
+    private String cu_engname;
+
+    /**
+     * 公司类型
+     */
+    private String cu_enterptype;
+
+    /**
+     * 成立时间
+     */
+    private String cu_licensedate;
+
+    /**
+     * 证件类型
+     */
+    private String cu_paperstype;
+
+    /**
+     * 证件类型
+     */
+    private String cu_institutype;
+
+    /**
+     * 证件号码
+     */
+    private String cu_paperscode;
+
+    /**
+     * 证件到期日
+     */
+    private String cu_ctfduedate;
+
+    /**
+     * 营业执照号
+     */
+    private String cu_businesscode;
+
+    /**
+     * 国标行业分类
+     */
+    private String cu_nastdinducls;
+
+    /**
+     * 注册资本币种
+     */
+    private String cu_capcurrency;
+
+    /**
+     * 注册资本
+     */
+    private Double cu_regcapital;
+
+    /**
+     * 实缴资本
+     */
+    private Double cu_paidincapital;
+    /**
+     * 公司注册地
+     */
+    private String cu_redaddcode;
+    /**
+     * 办公地址
+     */
+    private String cu_officeaddcode;
+
+    /**
+     * 经营范围
+     */
+    private String cu_businsscope;
+
+    /**
+     * 其他情况说明
+     */
+    private String cu_others;
+
+    /**
+     * 企业uu
+     *
+     * @return
+     */
+    private Long cu_enuu;
+
+    /**
+     * 最高权力机构
+     *
+     * @return
+     */
+    private String cu_highestauthority;
+
+    /**
+     * 员工人数
+     *
+     * @return
+     */
+    private Long cu_employeesnum;
+
+    /**
+     * 部门设置概况
+     *
+     * @return
+     */
+    private String cu_departsituation;
+
+    /**
+     * 财务数据表
+     */
+    private List<AccountInfo> accountInfoList;
+
+    /**
+     * 关联企业
+     */
+    private List<AssociateCompanyInfo> associateCompanies;
+
+    /**
+     * 情况描述
+     */
+    private BusinessConditionInfo businessCondition;
+
+    /**
+     * 变更内容
+     */
+    private List<ChangesInstructionInfo> changesInstructions;
+
+    /**
+     * 管理层信息
+     */
+    private List<CustomerExcutiveInfo> customerExcutives;
+
+    /**
+     * 财务情况说明
+     */
+    private List<FinanceConditionInfo> financeConditions;
+
+    /**
+     * 金融服务申请数据
+     */
+    private Apply financingApply;
+
+    /**
+     * 买方客户资料
+     */
+    private List<PurcCustInfo> mfCustInfos;
+
+    /**
+     * 经营情况表
+     */
+    private List<ProductMixInfo> productMixes;
+
+    /**
+     * 股东信息表
+     */
+    private List<ShareholdersInfo> shareholders;
+
+    /**
+     * 供应商客户
+     */
+    private List<UpdowncastInfo> updowncasts;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCu_name() {
+        return cu_name;
+    }
+
+    public void setCu_name(String cu_name) {
+        this.cu_name = cu_name;
+    }
+
+    public String getCu_engname() {
+        return cu_engname;
+    }
+
+    public void setCu_engname(String cu_engname) {
+        this.cu_engname = cu_engname;
+    }
+
+    public String getCu_enterptype() {
+        return cu_enterptype;
+    }
+
+    public void setCu_enterptype(String cu_enterptype) {
+        this.cu_enterptype = cu_enterptype;
+    }
+
+    public String getCu_licensedate() {
+        return cu_licensedate;
+    }
+
+    public void setCu_licensedate(String cu_licensedate) {
+        this.cu_licensedate = cu_licensedate;
+    }
+
+    public String getCu_paperstype() {
+        return cu_paperstype;
+    }
+
+    public void setCu_paperstype(String cu_paperstype) {
+        this.cu_paperstype = cu_paperstype;
+    }
+
+    public String getCu_institutype() {
+        return cu_institutype;
+    }
+
+    public void setCu_institutype(String cu_institutype) {
+        this.cu_institutype = cu_institutype;
+    }
+
+    public String getCu_paperscode() {
+        return cu_paperscode;
+    }
+
+    public void setCu_paperscode(String cu_paperscode) {
+        this.cu_paperscode = cu_paperscode;
+    }
+
+    public String getCu_ctfduedate() {
+        return cu_ctfduedate;
+    }
+
+    public void setCu_ctfduedate(String cu_ctfduedate) {
+        this.cu_ctfduedate = cu_ctfduedate;
+    }
+
+    public String getCu_businesscode() {
+        return cu_businesscode;
+    }
+
+    public void setCu_businesscode(String cu_businesscode) {
+        this.cu_businesscode = cu_businesscode;
+    }
+
+    public String getCu_nastdinducls() {
+        return cu_nastdinducls;
+    }
+
+    public void setCu_nastdinducls(String cu_nastdinducls) {
+        this.cu_nastdinducls = cu_nastdinducls;
+    }
+
+    public String getCu_capcurrency() {
+        return cu_capcurrency;
+    }
+
+    public void setCu_capcurrency(String cu_capcurrency) {
+        this.cu_capcurrency = cu_capcurrency;
+    }
+
+    public Double getCu_regcapital() {
+        return cu_regcapital;
+    }
+
+    public void setCu_regcapital(Double cu_regcapital) {
+        this.cu_regcapital = cu_regcapital;
+    }
+
+    public Double getCu_paidincapital() {
+        return cu_paidincapital;
+    }
+
+    public void setCu_paidincapital(Double cu_paidincapital) {
+        this.cu_paidincapital = cu_paidincapital;
+    }
+
+    public String getCu_redaddcode() {
+        return cu_redaddcode;
+    }
+
+    public void setCu_redaddcode(String cu_redaddcode) {
+        this.cu_redaddcode = cu_redaddcode;
+    }
+
+    public String getCu_officeaddcode() {
+        return cu_officeaddcode;
+    }
+
+    public void setCu_officeaddcode(String cu_officeaddcode) {
+        this.cu_officeaddcode = cu_officeaddcode;
+    }
+
+    public String getCu_businsscope() {
+        return cu_businsscope;
+    }
+
+    public void setCu_businsscope(String cu_businsscope) {
+        this.cu_businsscope = cu_businsscope;
+    }
+
+    public String getCu_others() {
+        return cu_others;
+    }
+
+    public void setCu_others(String cu_others) {
+        this.cu_others = cu_others;
+    }
+
+    public Long getCu_enuu() {
+        return cu_enuu;
+    }
+
+    public void setCu_enuu(Long cu_enuu) {
+        this.cu_enuu = cu_enuu;
+    }
+
+    public String getCu_highestauthority() {
+        return cu_highestauthority;
+    }
+
+    public void setCu_highestauthority(String cu_highestauthority) {
+        this.cu_highestauthority = cu_highestauthority;
+    }
+
+    public Long getCu_employeesnum() {
+        return cu_employeesnum;
+    }
+
+    public void setCu_employeesnum(Long cu_employeesnum) {
+        this.cu_employeesnum = cu_employeesnum;
+    }
+
+    public String getCu_departsituation() {
+        return cu_departsituation;
+    }
+
+    public void setCu_departsituation(String cu_departsituation) {
+        this.cu_departsituation = cu_departsituation;
+    }
+
+    public List<AccountInfo> getAccountInfoList() {
+        return accountInfoList;
+    }
+
+    public void setAccountInfoList(List<AccountInfo> accountInfoList) {
+        this.accountInfoList = accountInfoList;
+    }
+
+    public List<AssociateCompanyInfo> getAssociateCompanies() {
+        return associateCompanies;
+    }
+
+    public void setAssociateCompanies(List<AssociateCompanyInfo> associateCompanies) {
+        this.associateCompanies = associateCompanies;
+    }
+
+    public BusinessConditionInfo getBusinessCondition() {
+        return businessCondition;
+    }
+
+    public void setBusinessCondition(BusinessConditionInfo businessCondition) {
+        this.businessCondition = businessCondition;
+    }
+
+    public List<ChangesInstructionInfo> getChangesInstructions() {
+        return changesInstructions;
+    }
+
+    public void setChangesInstructions(List<ChangesInstructionInfo> changesInstructions) {
+        this.changesInstructions = changesInstructions;
+    }
+
+    public List<CustomerExcutiveInfo> getCustomerExcutives() {
+        return customerExcutives;
+    }
+
+    public void setCustomerExcutives(List<CustomerExcutiveInfo> customerExcutives) {
+        this.customerExcutives = customerExcutives;
+    }
+
+    public List<FinanceConditionInfo> getFinanceConditions() {
+        return financeConditions;
+    }
+
+    public void setFinanceConditions(List<FinanceConditionInfo> financeConditions) {
+        this.financeConditions = financeConditions;
+    }
+
+    public Apply getFinancingApply() {
+        return financingApply;
+    }
+
+    public void setFinancingApply(Apply financingApply) {
+        this.financingApply = financingApply;
+    }
+
+    public List<PurcCustInfo> getMfCustInfos() {
+        return mfCustInfos;
+    }
+
+    public void setMfCustInfos(List<PurcCustInfo> mfCustInfos) {
+        this.mfCustInfos = mfCustInfos;
+    }
+
+    public List<ProductMixInfo> getProductMixes() {
+        return productMixes;
+    }
+
+    public void setProductMixes(List<ProductMixInfo> productMixes) {
+        this.productMixes = productMixes;
+    }
+
+    public List<ShareholdersInfo> getShareholders() {
+        return shareholders;
+    }
+
+    public void setShareholders(List<ShareholdersInfo> shareholders) {
+        this.shareholders = shareholders;
+    }
+
+    public List<UpdowncastInfo> getUpdowncasts() {
+        return updowncasts;
+    }
+
+    public void setUpdowncasts(List<UpdowncastInfo> updowncasts) {
+        this.updowncasts = updowncasts;
+    }
+}

+ 172 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/CustomerExcutiveInfo.java

@@ -0,0 +1,172 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+/**
+ * created by shicr on 2017/12/20
+ * 管理层信息
+ **/
+public class CustomerExcutiveInfo {
+
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 企业uu
+     * @return
+     */
+    private Long enuu;
+
+    /**
+     * 高管姓名
+     */
+    private String ce_name;
+
+    /**
+     *性别
+     */
+    private String ce_sex;
+
+    /**
+     *证件类型
+     */
+    private String ce_paperstype;
+
+    /**
+     *证件号码
+     */
+    private String ce_paperscode;
+
+
+    /**
+     *学历
+     */
+    private String ce_education;
+
+    /**
+     * 职务
+     */
+    private String ce_position;
+
+    /**
+     *担任该职务时间
+     */
+    private String ce_stwkfpo;
+
+    /**
+     * 从事本行业时间
+     */
+    private short ce_workeyears;
+
+    /**
+     *住所
+     */
+    private String ce_nowaddress;
+
+    /**
+     *工作简介
+     */
+    private String ce_woekexper;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public String getCe_name() {
+        return ce_name;
+    }
+
+    public void setCe_name(String ce_name) {
+        this.ce_name = ce_name;
+    }
+
+    public String getCe_sex() {
+        return ce_sex;
+    }
+
+    public void setCe_sex(String ce_sex) {
+        this.ce_sex = ce_sex;
+    }
+
+    public String getCe_paperstype() {
+        return ce_paperstype;
+    }
+
+    public void setCe_paperstype(String ce_paperstype) {
+        this.ce_paperstype = ce_paperstype;
+    }
+
+    public String getCe_paperscode() {
+        return ce_paperscode;
+    }
+
+    public void setCe_paperscode(String ce_paperscode) {
+        this.ce_paperscode = ce_paperscode;
+    }
+
+    public String getCe_education() {
+        return ce_education;
+    }
+
+    public void setCe_education(String ce_education) {
+        this.ce_education = ce_education;
+    }
+
+    public String getCe_position() {
+        return ce_position;
+    }
+
+    public void setCe_position(String ce_position) {
+        this.ce_position = ce_position;
+    }
+
+    public String getCe_stwkfpo() {
+        return ce_stwkfpo;
+    }
+
+    public void setCe_stwkfpo(String ce_stwkfpo) {
+        this.ce_stwkfpo = ce_stwkfpo;
+    }
+
+    public short getCe_workeyears() {
+        return ce_workeyears;
+    }
+
+    public void setCe_workeyears(short ce_workeyears) {
+        this.ce_workeyears = ce_workeyears;
+    }
+
+    public String getCe_nowaddress() {
+        return ce_nowaddress;
+    }
+
+    public void setCe_nowaddress(String ce_nowaddress) {
+        this.ce_nowaddress = ce_nowaddress;
+    }
+
+    public String getCe_woekexper() {
+        return ce_woekexper;
+    }
+
+    public void setCe_woekexper(String ce_woekexper) {
+        this.ce_woekexper = ce_woekexper;
+    }
+
+    public CustomerExcutiveInfo() {
+
+    }
+}
+
+

+ 330 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/CustomerInfo.java

@@ -0,0 +1,330 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+/**
+ * created by shicr on 2017/12/26
+ **/
+public class CustomerInfo {
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 公司中文名
+     */
+    private String cu_name;
+
+    /**
+     * 公司英文名
+     */
+    private String cu_engname;
+
+    /**
+     * 公司类型
+     */
+    private String cu_enterptype;
+
+    /**
+     * 成立时间
+     */
+    private String cu_licensedate;
+
+    /**
+     * 证件类型
+     */
+    private String cu_paperstype;
+
+    /**
+     * 证件类型
+     */
+    private String cu_institutype;
+
+    /**
+     * 证件号码
+     */
+    private String cu_paperscode;
+
+    /**
+     * 证件到期日
+     */
+    private String cu_ctfduedate;
+
+    /**
+     * 营业执照号
+     */
+    private String cu_businesscode;
+
+    /**
+     * 国标行业分类
+     */
+    private String cu_nastdinducls;
+
+    /**
+     * 注册资本币种
+     */
+    private String cu_capcurrency;
+
+    /**
+     * 注册资本
+     */
+    private Double cu_regcapital;
+
+    /**
+     * 实缴资本
+     */
+    private Double cu_paidincapital;
+    /**
+     * 公司注册地
+     */
+    private String cu_redaddcode;
+    /**
+     * 办公地址
+     */
+    private String cu_officeaddcode;
+
+    /**
+     * 经营范围
+     */
+    private String cu_businsscope;
+
+    /**
+     * 其他情况说明
+     */
+    private String cu_others;
+
+    /**
+     * 企业uu
+     *
+     * @return
+     */
+    private Long cu_enuu;
+
+    /**
+     * 最高权力机构
+     *
+     * @return
+     */
+    private String cu_highestauthority;
+
+    /**
+     * 员工人数
+     *
+     * @return
+     */
+    private Long cu_employeesnum;
+
+    /**
+     * 部门设置概况
+     *
+     * @return
+     */
+    private String cu_departsituation;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCu_name() {
+        return cu_name;
+    }
+
+    public void setCu_name(String cu_name) {
+        this.cu_name = cu_name;
+    }
+
+    public String getCu_engname() {
+        return cu_engname;
+    }
+
+    public void setCu_engname(String cu_engname) {
+        this.cu_engname = cu_engname;
+    }
+
+    public String getCu_enterptype() {
+        return cu_enterptype;
+    }
+
+    public void setCu_enterptype(String cu_enterptype) {
+        this.cu_enterptype = cu_enterptype;
+    }
+
+    public String getCu_licensedate() {
+        return cu_licensedate;
+    }
+
+    public void setCu_licensedate(String cu_licensedate) {
+        this.cu_licensedate = cu_licensedate;
+    }
+
+    public String getCu_paperstype() {
+        return cu_paperstype;
+    }
+
+    public void setCu_paperstype(String cu_paperstype) {
+        this.cu_paperstype = cu_paperstype;
+    }
+
+    public String getCu_institutype() {
+        return cu_institutype;
+    }
+
+    public void setCu_institutype(String cu_institutype) {
+        this.cu_institutype = cu_institutype;
+    }
+
+    public String getCu_paperscode() {
+        return cu_paperscode;
+    }
+
+    public void setCu_paperscode(String cu_paperscode) {
+        this.cu_paperscode = cu_paperscode;
+    }
+
+    public String getCu_ctfduedate() {
+        return cu_ctfduedate;
+    }
+
+    public void setCu_ctfduedate(String cu_ctfduedate) {
+        this.cu_ctfduedate = cu_ctfduedate;
+    }
+
+    public String getCu_businesscode() {
+        return cu_businesscode;
+    }
+
+    public void setCu_businesscode(String cu_businesscode) {
+        this.cu_businesscode = cu_businesscode;
+    }
+
+    public String getCu_nastdinducls() {
+        return cu_nastdinducls;
+    }
+
+    public void setCu_nastdinducls(String cu_nastdinducls) {
+        this.cu_nastdinducls = cu_nastdinducls;
+    }
+
+    public String getCu_capcurrency() {
+        return cu_capcurrency;
+    }
+
+    public void setCu_capcurrency(String cu_capcurrency) {
+        this.cu_capcurrency = cu_capcurrency;
+    }
+
+    public Double getCu_regcapital() {
+        return cu_regcapital;
+    }
+
+    public void setCu_regcapital(Double cu_regcapital) {
+        this.cu_regcapital = cu_regcapital;
+    }
+
+    public Double getCu_paidincapital() {
+        return cu_paidincapital;
+    }
+
+    public void setCu_paidincapital(Double cu_paidincapital) {
+        this.cu_paidincapital = cu_paidincapital;
+    }
+
+    public String getCu_redaddcode() {
+        return cu_redaddcode;
+    }
+
+    public void setCu_redaddcode(String cu_redaddcode) {
+        this.cu_redaddcode = cu_redaddcode;
+    }
+
+    public String getCu_officeaddcode() {
+        return cu_officeaddcode;
+    }
+
+    public void setCu_officeaddcode(String cu_officeaddcode) {
+        this.cu_officeaddcode = cu_officeaddcode;
+    }
+
+    public String getCu_businsscope() {
+        return cu_businsscope;
+    }
+
+    public void setCu_businsscope(String cu_businsscope) {
+        this.cu_businsscope = cu_businsscope;
+    }
+
+    public String getCu_others() {
+        return cu_others;
+    }
+
+    public void setCu_others(String cu_others) {
+        this.cu_others = cu_others;
+    }
+
+    public Long getCu_enuu() {
+        return cu_enuu;
+    }
+
+    public void setCu_enuu(Long cu_enuu) {
+        this.cu_enuu = cu_enuu;
+    }
+
+    public String getCu_highestauthority() {
+        return cu_highestauthority;
+    }
+
+    public void setCu_highestauthority(String cu_highestauthority) {
+        this.cu_highestauthority = cu_highestauthority;
+    }
+
+    public Long getCu_employeesnum() {
+        return cu_employeesnum;
+    }
+
+    public void setCu_employeesnum(Long cu_employeesnum) {
+        this.cu_employeesnum = cu_employeesnum;
+    }
+
+    public String getCu_departsituation() {
+        return cu_departsituation;
+    }
+
+    public void setCu_departsituation(String cu_departsituation) {
+        this.cu_departsituation = cu_departsituation;
+    }
+
+    public CustomerInfo () {
+
+    }
+
+    public CustomerInfo (CustInfo info) {
+        if(info!=null) {
+            this.id = info.getId();
+            this.cu_name = info.getCu_name();
+            this.cu_engname = info.getCu_engname();
+            this.cu_enterptype = info.getCu_enterptype();
+            this.cu_licensedate = info.getCu_licensedate();
+            this.cu_paperstype = info.getCu_paperstype();
+            this.cu_institutype = info.getCu_institutype();
+            this.cu_paperscode = info.getCu_paperscode();
+            this.cu_ctfduedate = info.getCu_ctfduedate();
+            this.cu_businesscode = info.getCu_businesscode();
+            this.cu_nastdinducls = info.getCu_nastdinducls();
+            this.cu_capcurrency = info.getCu_capcurrency();
+            this.cu_regcapital = info.getCu_regcapital();
+            this.cu_paidincapital = info.getCu_paidincapital();
+            this.cu_redaddcode = info.getCu_redaddcode();
+            this.cu_officeaddcode = info.getCu_officeaddcode();
+            this.cu_businsscope = info.getCu_businsscope();
+            this.cu_others = info.getCu_others();
+            this.cu_enuu = info.getCu_enuu();
+            this.cu_highestauthority = info.getCu_highestauthority();
+            this.cu_employeesnum = info.getCu_employeesnum();
+            this.cu_departsituation = info.getCu_departsituation();
+        }
+    }
+}

+ 104 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/FinanceConditionInfo.java

@@ -0,0 +1,104 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+/**
+ * created by shicr on 2017/12/20
+ * 财务情况说明
+ **/
+public class FinanceConditionInfo {
+
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 企业uu
+     * @return
+     */
+    private Long enuu;
+
+    /**
+     *账龄<=3个月
+     */
+    private Double fc_agingamount1;
+
+    /**
+     * 3个月<帐龄≤6个月
+     */
+    private Double fc_agingamount2;
+
+    /**
+     * 6个月<帐龄<=1年
+     */
+    private Double fc_agingamount4;
+
+    /**
+     * 帐龄>1年
+     */
+    private Double fc_agingamount3;
+
+    /**
+     * 其他应收账款说明
+     */
+    private String fc_otharremark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public Double getFc_agingamount1() {
+        return fc_agingamount1;
+    }
+
+    public void setFc_agingamount1(Double fc_agingamount1) {
+        this.fc_agingamount1 = fc_agingamount1;
+    }
+
+    public Double getFc_agingamount2() {
+        return fc_agingamount2;
+    }
+
+    public void setFc_agingamount2(Double fc_agingamount2) {
+        this.fc_agingamount2 = fc_agingamount2;
+    }
+
+    public Double getFc_agingamount4() {
+        return fc_agingamount4;
+    }
+
+    public void setFc_agingamount4(Double fc_agingamount4) {
+        this.fc_agingamount4 = fc_agingamount4;
+    }
+
+    public Double getFc_agingamount3() {
+        return fc_agingamount3;
+    }
+
+    public void setFc_agingamount3(Double fc_agingamount3) {
+        this.fc_agingamount3 = fc_agingamount3;
+    }
+
+    public String getFc_otharremark() {
+        return fc_otharremark;
+    }
+
+    public void setFc_otharremark(String fc_otharremark) {
+        this.fc_otharremark = fc_otharremark;
+    }
+
+    public FinanceConditionInfo() {
+
+    }
+}

+ 104 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/ProductMixInfo.java

@@ -0,0 +1,104 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+/**
+ * created by shicr on 2017/12/20
+ * 经营情况表
+ **/
+public class ProductMixInfo {
+
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 企业UU
+     * @return
+     */
+    private Long enuu;
+
+    /**
+     *产品/服务种类
+     */
+    private String pm_kind;
+
+    /**
+     *今年营业收入
+     */
+    private Double pm_tannualrevenue;
+
+    /**
+     * 占今年总收入比例
+     */
+    private Double pm_tratio;
+
+    /**
+     * 上年营业收入
+     */
+    private Double pm_annualrevenue;
+
+    /**
+     * 占总收入比例
+     */
+    private Double pm_ratio;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public String getPm_kind() {
+        return pm_kind;
+    }
+
+    public void setPm_kind(String pm_kind) {
+        this.pm_kind = pm_kind;
+    }
+
+    public Double getPm_tannualrevenue() {
+        return pm_tannualrevenue;
+    }
+
+    public void setPm_tannualrevenue(Double pm_tannualrevenue) {
+        this.pm_tannualrevenue = pm_tannualrevenue;
+    }
+
+    public Double getPm_tratio() {
+        return pm_tratio;
+    }
+
+    public void setPm_tratio(Double pm_tratio) {
+        this.pm_tratio = pm_tratio;
+    }
+
+    public Double getPm_annualrevenue() {
+        return pm_annualrevenue;
+    }
+
+    public void setPm_annualrevenue(Double pm_annualrevenue) {
+        this.pm_annualrevenue = pm_annualrevenue;
+    }
+
+    public Double getPm_ratio() {
+        return pm_ratio;
+    }
+
+    public void setPm_ratio(Double pm_ratio) {
+        this.pm_ratio = pm_ratio;
+    }
+
+    public ProductMixInfo() {
+
+    }
+}

+ 247 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/PurcCustInfo.java

@@ -0,0 +1,247 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+/**
+ * created by shicr on 2017/12/20
+ * 买方客户资料
+ **/
+public class PurcCustInfo {
+
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 企业uu
+     * @return
+     */
+    private Long enuu;
+
+    /**
+     * 买方名称
+     */
+    private String mf_custname;
+
+    /**
+     * 额度申请
+     */
+    private Double mf_credit;
+
+    /**
+     * 法人代表
+     */
+    private String mf_legrep;
+
+    /**
+     * 注册资本(万元)
+     */
+    private Double mf_regcapital;
+
+    /**
+     * 经营地址
+     */
+    private String mf_addr;
+
+    /**
+     * 成立时间
+     */
+    private String mf_estabtime;
+
+    /**
+     *联系人
+     */
+    private String mf_contact;
+
+    /**
+     *联系电话
+     */
+    private String mf_contactnum;
+
+    /**
+     *传真
+     */
+    private String mf_fax;
+
+    /**
+     * 电子邮箱
+     */
+    private String mf_email;
+
+    /**
+     * 结算开户行
+     */
+    private String mf_balancebank;
+
+    /**
+     * 银行账户
+     */
+    private String mf_bankaccount;
+
+    /**
+     * 交易产品
+     */
+    private String mf_tradprod;
+
+    /**
+     * 付款条件
+     */
+    private String mf_payterm;
+
+    /**
+     * 股东占比(%)
+     */
+    private Double mf_shareholder;
+
+    /**
+     * 经营范围
+     */
+    private String mf_businsscope;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public String getMf_custname() {
+        return mf_custname;
+    }
+
+    public void setMf_custname(String mf_custname) {
+        this.mf_custname = mf_custname;
+    }
+
+    public Double getMf_credit() {
+        return mf_credit;
+    }
+
+    public void setMf_credit(Double mf_credit) {
+        this.mf_credit = mf_credit;
+    }
+
+    public String getMf_legrep() {
+        return mf_legrep;
+    }
+
+    public void setMf_legrep(String mf_legrep) {
+        this.mf_legrep = mf_legrep;
+    }
+
+    public Double getMf_regcapital() {
+        return mf_regcapital;
+    }
+
+    public void setMf_regcapital(Double mf_regcapital) {
+        this.mf_regcapital = mf_regcapital;
+    }
+
+    public String getMf_addr() {
+        return mf_addr;
+    }
+
+    public void setMf_addr(String mf_addr) {
+        this.mf_addr = mf_addr;
+    }
+
+    public String getMf_estabtime() {
+        return mf_estabtime;
+    }
+
+    public void setMf_estabtime(String mf_estabtime) {
+        this.mf_estabtime = mf_estabtime;
+    }
+
+    public String getMf_contact() {
+        return mf_contact;
+    }
+
+    public void setMf_contact(String mf_contact) {
+        this.mf_contact = mf_contact;
+    }
+
+    public String getMf_contactnum() {
+        return mf_contactnum;
+    }
+
+    public void setMf_contactnum(String mf_contactnum) {
+        this.mf_contactnum = mf_contactnum;
+    }
+
+    public String getMf_fax() {
+        return mf_fax;
+    }
+
+    public void setMf_fax(String mf_fax) {
+        this.mf_fax = mf_fax;
+    }
+
+    public String getMf_email() {
+        return mf_email;
+    }
+
+    public void setMf_email(String mf_email) {
+        this.mf_email = mf_email;
+    }
+
+    public String getMf_balancebank() {
+        return mf_balancebank;
+    }
+
+    public void setMf_balancebank(String mf_balancebank) {
+        this.mf_balancebank = mf_balancebank;
+    }
+
+    public String getMf_bankaccount() {
+        return mf_bankaccount;
+    }
+
+    public void setMf_bankaccount(String mf_bankaccount) {
+        this.mf_bankaccount = mf_bankaccount;
+    }
+
+    public String getMf_tradprod() {
+        return mf_tradprod;
+    }
+
+    public void setMf_tradprod(String mf_tradprod) {
+        this.mf_tradprod = mf_tradprod;
+    }
+
+    public String getMf_payterm() {
+        return mf_payterm;
+    }
+
+    public void setMf_payterm(String mf_payterm) {
+        this.mf_payterm = mf_payterm;
+    }
+
+    public Double getMf_shareholder() {
+        return mf_shareholder;
+    }
+
+    public void setMf_shareholder(Double mf_shareholder) {
+        this.mf_shareholder = mf_shareholder;
+    }
+
+    public String getMf_businsscope() {
+        return mf_businsscope;
+    }
+
+    public void setMf_businsscope(String mf_businsscope) {
+        this.mf_businsscope = mf_businsscope;
+    }
+
+    public PurcCustInfo() {
+
+    }
+}

+ 104 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/ShareholdersInfo.java

@@ -0,0 +1,104 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+/**
+ * 股东信息表
+ * created by shicr on 2017/12/18
+ **/
+public class ShareholdersInfo {
+
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 股东名称
+     */
+    private String cs_name;
+
+    /**
+     * 证件类型
+     */
+    private String cs_paperstype;
+
+    /**
+     * 证件号码
+     */
+    private String cs_paperscode;
+
+    /**
+     * 出资比例(%)
+     */
+    private Double cs_investratio;
+
+    /**
+     *实际投资金额
+     */
+    private Double cs_investamount;
+
+    /**
+     * 企业UU
+     * @return
+     */
+    private Long enuu;
+
+    public String getCs_name() {
+        return cs_name;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public void setCs_name(String cs_name) {
+        this.cs_name = cs_name;
+    }
+
+    public String getCs_paperstype() {
+        return cs_paperstype;
+    }
+
+    public void setCs_paperstype(String cs_paperstype) {
+        this.cs_paperstype = cs_paperstype;
+    }
+
+    public String getCs_paperscode() {
+        return cs_paperscode;
+    }
+
+    public void setCs_paperscode(String cs_paperscode) {
+        this.cs_paperscode = cs_paperscode;
+    }
+
+    public Double getCs_investratio() {
+        return cs_investratio;
+    }
+
+    public void setCs_investratio(Double cs_investratio) {
+        this.cs_investratio = cs_investratio;
+    }
+
+    public Double getCs_investamount() {
+        return cs_investamount;
+    }
+
+    public void setCs_investamount(Double cs_investamount) {
+        this.cs_investamount = cs_investamount;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public ShareholdersInfo() {
+
+    }
+}

+ 117 - 0
src/main/java/com/uas/erp/schedular/financeservice/domain/UpdowncastInfo.java

@@ -0,0 +1,117 @@
+package com.uas.erp.schedular.financeservice.domain;
+
+/**
+ * 供应商客户
+ * created by shicr on 2017/12/20
+ **/
+public class UpdowncastInfo {
+
+    /**
+     * ID
+     */
+    private Long id;
+
+    /**
+     * 名称
+     */
+    private String udc_name;
+
+    /**
+     * 企业uu
+     * @return
+     */
+    private Long enuu;
+
+    /**
+     * 产品
+     */
+    private String udc_product;
+
+    /**
+     * 上年交易额
+     */
+    private Double udc_lastyear;
+
+    /**
+     * 今年交易额
+     */
+    private Double udc_thisyear;
+
+    /**
+     * 结账方式及日期
+     */
+    private String udc_payment;
+
+    /**
+     * 合作年限
+     */
+    private Short udc_cooperationyears;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getEnuu() {
+        return enuu;
+    }
+
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
+
+    public String getUdc_name() {
+        return udc_name;
+    }
+
+    public void setUdc_name(String udc_name) {
+        this.udc_name = udc_name;
+    }
+
+    public String getUdc_product() {
+        return udc_product;
+    }
+
+    public void setUdc_product(String udc_product) {
+        this.udc_product = udc_product;
+    }
+
+    public Double getUdc_lastyear() {
+        return udc_lastyear;
+    }
+
+    public void setUdc_lastyear(Double udc_lastyear) {
+        this.udc_lastyear = udc_lastyear;
+    }
+
+    public Double getUdc_thisyear() {
+        return udc_thisyear;
+    }
+
+    public void setUdc_thisyear(Double udc_thisyear) {
+        this.udc_thisyear = udc_thisyear;
+    }
+
+    public String getUdc_payment() {
+        return udc_payment;
+    }
+
+    public void setUdc_payment(String udc_payment) {
+        this.udc_payment = udc_payment;
+    }
+
+    public Short getUdc_cooperationyears() {
+        return udc_cooperationyears;
+    }
+
+    public void setUdc_cooperationyears(Short udc_cooperationyears) {
+        this.udc_cooperationyears = udc_cooperationyears;
+    }
+
+    public UpdowncastInfo() {
+
+    }
+}

+ 324 - 0
src/main/java/com/uas/erp/schedular/financeservice/task/AbstractTask.java

@@ -0,0 +1,324 @@
+package com.uas.erp.schedular.financeservice.task;
+
+import com.alibaba.fastjson.JSON;
+import com.uas.erp.schedular.agent.v1.AbstractAgent;
+import com.uas.erp.schedular.b2b.domain.Attach;
+import com.uas.erp.schedular.b2b.domain.KeyEntity;
+import com.uas.erp.schedular.b2b.domain.Prod;
+import com.uas.erp.schedular.core.Constant;
+import com.uas.erp.schedular.database.RestJdbcTemplate;
+import com.uas.erp.schedular.entity.Master;
+import com.uas.erp.schedular.service.SettingService;
+import com.uas.erp.schedular.util.CollectionUtil;
+import com.uas.erp.schedular.util.ContextHolder;
+import com.uas.erp.schedular.util.DateUtil;
+import com.uas.erp.schedular.util.HmacUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.util.StringUtils;
+import org.springframework.web.client.RestTemplate;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URI;
+import java.net.URLEncoder;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by Pro1 on 2017/7/26.
+ */
+public class AbstractTask extends AbstractAgent {
+
+    // 数据传输单次大小限制
+    protected static final int DATA_SIZE_LIMIT = 500;
+
+    @Autowired
+    private RestTemplate restTemplate;
+
+    @Autowired
+    protected RestJdbcTemplate jdbcTemplate;
+
+    @Autowired
+    protected SettingService settingService;
+
+    protected Logger logger = LoggerFactory.getLogger(this.getClass());
+
+    /**
+     * 按账套环境,使用不同接口地址
+     * @return
+     */
+    private String getApiDomain() {
+        String key = "test".equals(ContextHolder.getMaster().getMa_env()) ? "api.finance.service.test.url" : "api.finance.service.url";
+        return settingService.getValue(key);
+    }
+
+    /**
+     * UAS系统外网地址
+     * @return
+     */
+    private String getUASUrl() {
+        return settingService.getValue("api.uas.outer.url");
+    }
+
+    /**
+     * URI加身份签名
+     * @param url
+     * @param vars
+     * @return
+     */
+    private String getURI(String url, Object... vars) {
+        Master master = ContextHolder.getMaster();
+        if (null == master.getMa_uu() || StringUtils.isEmpty(master.getMa_accesssecret())) {
+            throw new RuntimeException("未设置企业UU和私钥");
+        }
+        StringBuffer accessUrl = new StringBuffer(url);
+        accessUrl.append(url.contains("?") ? "&" : "?");
+        // 身份ID
+        accessUrl.append("access_id=").append(master.getMa_uu());
+        // 时间戳
+        accessUrl.append("&_timestamp=").append(System.currentTimeMillis());
+        URI uri = restTemplate.getUriTemplateHandler().expand(getApiDomain() + accessUrl.toString(), vars);
+        url = uri.toString();
+        // 签名
+        return url + "&_signature=" + HmacUtils.encode(url, master.getMa_accesssecret());
+    }
+
+    protected <T> T getForObject(String url, Class<T> objectClass, Object... vars) {
+        return restTemplate.getForObject(getURI(url, vars), objectClass);
+    }
+
+    protected <T> List<T> getForList(String url, Class<T> objectClass, Object... vars) {
+        String resultStr = restTemplate.getForObject(getURI(url, vars), String.class);
+        return JSON.parseArray(resultStr, objectClass);
+    }
+
+    /**
+     * b2b当前版本的接口只支持以form-data方式提交,requestBody方式暂不支持
+     * @param url
+     * @param vars
+     */
+    protected void post(String url, MultiValueMap<String, String> vars) {
+        HttpHeaders headers = new HttpHeaders();
+        headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
+        HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(vars, headers);
+        restTemplate.postForLocation(getURI(url), request);
+    }
+
+    protected ResponseEntity postForEntity(String url, MultiValueMap<String, String> vars) {
+        HttpHeaders headers = new HttpHeaders();
+        headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
+        HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(vars, headers);
+        return restTemplate.postForEntity(getURI(url), request, String.class);
+    }
+
+    protected <T> List<T> postForList(String url, Class<T> objectClass, MultiValueMap<String, String> vars) {
+        ResponseEntity<String> resultEntity = postForEntity(url, vars);
+        return JSON.parseArray(resultEntity.getBody(), objectClass);
+    }
+
+    /**
+     * 封装成平台接口数据格式
+     * @param data
+     * @return
+     */
+    protected static MultiValueMap<String, String> dataWrap(Object data) {
+        MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
+        String dataStr = null;
+        Class<?> cls = data.getClass();
+        if (cls.isAssignableFrom(String.class) || cls.isAssignableFrom(Number.class) ||
+                cls.isAssignableFrom(Character.class)) {
+            dataStr = data.toString();
+        } else {
+            dataStr = JSON.toJSONString(data);
+        }
+        try {
+            dataStr = URLEncoder.encode(dataStr, "UTF-8");
+        } catch (UnsupportedEncodingException e) {
+
+        }
+        map.set("data", dataStr);
+        return map;
+    }
+
+    /**
+     * 数据上传工具,封装了处理前、后置、错误处理方法
+     * @param <T>
+     */
+    protected abstract class AbstractHandler<T> {
+
+        private List<T> data;
+
+        public AbstractHandler(List<T> data) {
+            this.data = data;
+        }
+
+        /**
+         * onHandler方法前执行
+         */
+        protected void onBefore(){
+
+        }
+
+        protected abstract ResponseEntity onHandler(List<T> data);
+
+        /**
+         * onHandler方法执行成功后执行
+         */
+        protected void onSuccess(){
+
+        }
+
+        /**
+         * onHandler方法执行失败后执行
+         */
+        protected void onError(String message){
+            throw new RuntimeException(message);
+        }
+
+        /**
+         * 所有方法执行完成后执行
+         */
+        protected void onAfter(){
+
+        }
+
+        public void run() {
+            String errMsg = null;
+            onBefore();
+            try {
+                ResponseEntity response = onHandler(data);
+                if (!response.getStatusCode().is2xxSuccessful()) {
+                    errMsg = String.valueOf(response.getBody());
+                }
+            } catch (Exception e) {
+                errMsg = e.getMessage();
+            }
+            try {
+                if (null == errMsg) {
+                    onSuccess();
+                } else {
+                    onError(errMsg);
+                }
+            } finally {
+                onAfter();
+            }
+        }
+    }
+
+    /**
+     * POST方式处理工具
+     * @param <T>
+     */
+    protected class AbstractPostHandler<T> extends AbstractHandler<T> {
+        private String postUri;
+
+        public AbstractPostHandler(String postUri, List<T> data) {
+            super(data);
+            this.postUri = postUri;
+        }
+
+        @Override
+        protected ResponseEntity onHandler(List<T> data) {
+            return postForEntity(postUri, dataWrap(data));
+        }
+    }
+
+    /**
+     * 基于状态控制的处理工具
+     * @param <T>
+     */
+    protected abstract class AbstractStatusBasedHandler<T extends KeyEntity> extends AbstractPostHandler<T> {
+
+        private String idStr;
+        private String tableName;
+        private String idColumn;
+        private String statusColumn;
+
+        public AbstractStatusBasedHandler(String tableName, String idColumn, String statusColumn, String postUri, List<T> data) {
+            super(postUri, data);
+            this.idStr = CollectionUtil.getKeyString(data);
+            this.tableName = tableName;
+            this.idColumn = idColumn;
+            this.statusColumn = statusColumn;
+        }
+
+        @Override
+        protected void onBefore() {
+            jdbcTemplate.execute(String.format("update %s set %s='上传中' where %s in (%s)", tableName, statusColumn, idColumn, idStr));
+        }
+
+        @Override
+        protected void onSuccess() {
+            jdbcTemplate.execute(String.format("update %s set %s='已上传' where %s in (%s)", tableName, statusColumn, idColumn, idStr));
+        }
+
+        @Override
+        protected void onError(String message) {
+            jdbcTemplate.execute(String.format("update %s set %s='待上传' where %s in (%s) and %s='上传中'", tableName, statusColumn, idColumn, idStr, statusColumn));
+            super.onError(message);
+        }
+    }
+
+    /**
+     * 基于状态控制的处理工具
+     * @param <T>
+     */
+    protected class StatusBasedHandler<T extends KeyEntity> extends AbstractStatusBasedHandler<T> {
+
+        public StatusBasedHandler(String tableName, String idColumn, String statusColumn, String postUri, List<T> data) {
+            super(tableName, idColumn, statusColumn, postUri, data);
+        }
+    }
+
+    /**
+     * 处理物料上传的工具
+     */
+    protected final class ProductHandler extends StatusBasedHandler<Prod>{
+
+        public ProductHandler(List<Prod> data) {
+            super("product", "pr_id", "PR_SENDSTATUS", "/erp/product", data);
+        }
+    }
+
+    /**
+     * 查找附件
+     * @param attachIds 附件ID
+     * @return
+     */
+    protected List<Attach> getAttachs(String[] attachIds) {
+        String erpUrl = getUASUrl();
+        List<Attach> attaches = jdbcTemplate.queryForBeanList("select fp_id, fp_size, fp_name from filepath where fp_id in ("
+                + StringUtils.arrayToDelimitedString(attachIds, ",") + ")", Attach.class);
+        if (!CollectionUtils.isEmpty(attaches)) {
+            for (Attach attach : attaches) {
+                attach.setFp_url(erpUrl + Attach.DOWN_FILE_ACTION + attach.getFp_id());
+            }
+        }
+        return attaches;
+    }
+
+    /**
+     * 创建消息
+     *
+     * @param caller
+     * @param sourceIds
+     * @param type
+     */
+    protected void createMessage(String caller, String sourceIds, String type) {
+        Integer mid = jdbcTemplate.getInt("select max(mm_id) from MESSAGEMODEL left join MESSAGEROLE on mm_id=mr_mmid where MR_ISUSED=-1 AND MM_ISUSED=-1 and mm_caller=? and MM_OPERATE='b2b' AND MM_ACTION=?",
+                caller, type);
+        if (null != mid) {
+            jdbcTemplate.execute("{call SP_CREATEINFO(?,'ADMIN',?,?)}",
+                    mid, sourceIds, DateUtil.parseDateToOracleString(Constant.YMD_HMS, new Date()));
+        }
+    }
+
+}

+ 96 - 0
src/main/java/com/uas/erp/schedular/financeservice/task/ApplyInfoTask.java

@@ -0,0 +1,96 @@
+package com.uas.erp.schedular.financeservice.task;
+import com.alibaba.fastjson.JSONObject;
+import com.uas.api.crypto.util.FlexJsonUtils;
+import com.uas.erp.schedular.financeservice.domain.*;
+import com.uas.erp.schedular.task.support.Method;
+import com.uas.erp.schedular.task.support.Role;
+import com.uas.erp.schedular.task.support.TaskMapping;
+import com.uas.erp.schedular.util.ContextHolder;
+import org.springframework.stereotype.Component;
+import org.springframework.ui.ModelMap;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
+import java.util.List;
+
+/**
+ * 金融服数据下载方法更新
+ *
+ * Created by hejq on 2017-12-21.
+ */
+@Component
+@TaskMapping(title = "金融服务", role = Role.SELLER)
+public class ApplyInfoTask extends AbstractTask {
+
+    @TaskMapping(title = "申请企业从金融平台下载客户的申请数据", fixedDelay = 60000, method = Method.DOWNLOAD)
+    public void downloadFinance() {
+        String jsonStr = getForObject("/erp/finance", String.class);
+        if (!StringUtils.isEmpty(jsonStr)) {
+            JSONObject jsonObject = JSONObject.parseObject(jsonStr);
+            String size = jsonObject.getString("size");
+            ContextHolder.setDataSize(null != size ? Integer.valueOf(size) : 0);
+            saveApplyInfo(jsonObject.getString("apply"));
+            // TODO notice++
+            // 回执
+            onSaleDownSuccess(jsonObject.getString("idStr"));
+        }
+    }
+
+    /**
+     * 将下载的数据的idStr传回金融平台进行更新操作
+     *
+     * @param idStr 返回更新下载状态的idStr
+     */
+    private void onSaleDownSuccess(String idStr) {
+        if(!StringUtils.isEmpty(idStr))
+            post("/erp/finance/back", dataWrap(idStr));
+    }
+
+    /**
+     * 下载的数据传输到ERP做处理,这边不做处理
+     *
+     * @param apply 关于apply的json
+     */
+    private void saveApplyInfo(String apply) {
+        List<Apply> applies = FlexJsonUtils.fromJsonArray(apply, Apply.class);
+        if (!CollectionUtils.isEmpty(applies)) {
+            for (Apply apply1 : applies) {
+                String url = "/openapi/applicant/financingApply.action";
+
+                List<AssociateCompanyInfo> companyInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getAssociateCompanies() : null;
+
+                List<CustomerExcutiveInfo> customerExcutiveInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getCustomerExcutives() : null;
+
+                BusinessConditionInfo conditionInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getBusinessCondition() : null;
+
+                List<FinanceConditionInfo> conditionInfo = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getFinanceConditions() : null;
+
+                List<ProductMixInfo> productMixInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getProductMixes() : null;
+
+                List<PurcCustInfo> purcCustInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getMfCustInfos() : null;
+
+                List<UpdowncastInfo> updowncastInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getUpdowncasts() : null;
+
+                List<ShareholdersInfo> shareholdersInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getShareholders() : null;
+
+                List<ChangesInstructionInfo> changesInstructionInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getChangesInstructions() : null;
+
+                List<AccountInfo> accountInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getAccountInfoList() : null;
+
+                postForEntity(url, new ModelMap("customer", FlexJsonUtils.toJsonDeep(new CustomerInfo(apply1.getCustomerInfo())))
+                        .addAttribute("apply", FlexJsonUtils.toJsonDeep(new ApplyInfo(apply1)))
+                        .addAttribute("associateCompany", FlexJsonUtils.toJsonDeep(companyInfos))
+                        .addAttribute("businessCondition", FlexJsonUtils.toJsonDeep(conditionInfos))
+                        .addAttribute("customerExcutive", FlexJsonUtils.toJsonDeep(customerExcutiveInfos))
+                        .addAttribute("financeCondition", FlexJsonUtils.toJsonDeep(conditionInfo))
+                        .addAttribute("mfCust", FlexJsonUtils.toJsonDeep(purcCustInfos))
+                        .addAttribute("attaches", FlexJsonUtils.toJsonDeep(apply1.getAttachList()))
+                        .addAttribute("prouductMixe", FlexJsonUtils.toJsonDeep(productMixInfos))
+                        .addAttribute("updowncast", FlexJsonUtils.toJsonDeep(updowncastInfos))
+                        .addAttribute("shareholders", FlexJsonUtils.toJsonDeep(shareholdersInfos))
+                        .addAttribute("changeInstruction", FlexJsonUtils.toJsonDeep(changesInstructionInfos))
+                        .addAttribute("accountList", FlexJsonUtils.toJsonDeep(accountInfos))
+                );
+            }
+        }
+    }
+}

+ 11 - 4
src/main/resources/init/setting.json

@@ -8,7 +8,7 @@
 },{
   "key": "api.uas.inner.url",
   "description": "UAS系统内网接口地址",
-  "value": "http://127.0.0.1:8081/ERP"
+  "value": "http://192.168.253.29:8080/ERP/"
 },{
   "key": "api.b2b.test.url",
   "description": "优软B2B平台测试接口地址",
@@ -19,10 +19,17 @@
   "value": "http://uas.ubtob.com"
 },{
   "key": "api.finance.test.url",
-  "description": "金融保理平台测试接口地址",
-  "value": "http://10.10.100.178:23000"
+  "description": "金融保理平台测试接口地址"
 },{
   "key": "api.finance.url",
-  "description": "金融保理平台正式接口地址",
+  "description": "金融保理平台(后台)正式接口地址",
+  "value": "http://10.10.100.178:23000"
+},{
+  "key": "api.finance.service.test.url",
+  "description": "金融保理平台(客户端)测试接口地址",
+  "value": "http://localhost:8081"
+},{
+  "key": "api.finance.service.url",
+  "description": "金融保理平台(客户端)正式接口地址",
   "value": "http://10.10.100.178:23000"
 }]

+ 89 - 0
src/test/java/com/uas/erp/test/ConnectToFinanceTest.java

@@ -0,0 +1,89 @@
+package com.uas.erp.test;
+
+import com.alibaba.fastjson.JSONObject;
+import com.uas.api.crypto.util.FlexJsonUtils;
+import com.uas.erp.schedular.UasSchedulingApplication;
+import com.uas.erp.schedular.entity.Master;
+import com.uas.erp.schedular.financeservice.domain.*;
+import com.uas.erp.schedular.financeservice.task.AbstractTask;
+import com.uas.erp.schedular.util.ContextHolder;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.ui.ModelMap;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+
+
+/**
+ * 从金融平台获取数据再连接ERP的测试
+ * <p>
+ * Created by hejq on 2017-12-22.
+ */
+//@RunWith(SpringJUnit4ClassRunner.class)
+//@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = UasSchedulingApplication.class)
+public class ConnectToFinanceTest extends AbstractTask {
+
+//    @Test
+    public void testConnect() {
+        Master master = new Master();
+        master.setMa_user("UAS_TEST");
+        master.setMa_uu(10046597L);
+        master.setMa_accesssecret("60ed5581d63aa728e050007f0100453f");
+        master.setMa_env("test");
+        master.setMa_name("UAS_TEST");
+        ContextHolder.setMaster(master);
+        String jsonStr = getForObject("/erp/finance", String.class);
+        JSONObject jsonObject = JSONObject.parseObject(jsonStr);
+        String size = jsonObject.getString("size");
+        String apply = jsonObject.getString("apply");
+        List<Apply> applies = FlexJsonUtils.fromJsonArray(apply, Apply.class);
+
+        if (!CollectionUtils.isEmpty(applies)) {
+            for (Apply apply1 : applies) {
+                String url = "/openapi/applicant/financingApply.action";
+
+                List<AssociateCompanyInfo> companyInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getAssociateCompanies() : null;
+
+                List<CustomerExcutiveInfo> customerExcutiveInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getCustomerExcutives() : null;
+
+                BusinessConditionInfo conditionInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getBusinessCondition() : null;
+
+                List<FinanceConditionInfo> conditionInfo = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getFinanceConditions() : null;
+
+                List<ProductMixInfo> productMixInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getProductMixes() : null;
+
+                List<PurcCustInfo> purcCustInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getMfCustInfos() : null;
+
+                List<UpdowncastInfo> updowncastInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getUpdowncasts() : null;
+
+                List<ShareholdersInfo> shareholdersInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getShareholders() : null;
+
+                List<ChangesInstructionInfo> changesInstructionInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getChangesInstructions() : null;
+
+                List<AccountInfo> accountInfos = apply1.getCustomerInfo() != null ? apply1.getCustomerInfo().getAccountInfoList() : null;
+
+                System.out.println(FlexJsonUtils.toJsonDeep(new ApplyInfo(apply1)));
+
+                System.out.println(FlexJsonUtils.toJsonDeep(apply1.getAttachList()));
+
+                postForEntity(url, new ModelMap("customer", FlexJsonUtils.toJsonDeep(new CustomerInfo(apply1.getCustomerInfo())))
+                        .addAttribute("apply", FlexJsonUtils.toJsonDeep(new ApplyInfo(apply1)))
+                        .addAttribute("associateCompany", FlexJsonUtils.toJsonDeep(companyInfos))
+                        .addAttribute("businessCondition", FlexJsonUtils.toJsonDeep(conditionInfos))
+                        .addAttribute("customerExcutive", FlexJsonUtils.toJsonDeep(customerExcutiveInfos))
+                        .addAttribute("financeCondition", FlexJsonUtils.toJsonDeep(conditionInfo))
+                        .addAttribute("mfCust", FlexJsonUtils.toJsonDeep(purcCustInfos))
+                        .addAttribute("attaches", FlexJsonUtils.toJsonDeep(apply1.getAttachList()))
+                        .addAttribute("prouductMixe", FlexJsonUtils.toJsonDeep(productMixInfos))
+                        .addAttribute("updowncast", FlexJsonUtils.toJsonDeep(updowncastInfos))
+                        .addAttribute("shareholders", FlexJsonUtils.toJsonDeep(shareholdersInfos))
+                        .addAttribute("changeInstruction", FlexJsonUtils.toJsonDeep(changesInstructionInfos))
+                        .addAttribute("accountList", FlexJsonUtils.toJsonDeep(accountInfos))
+                );
+            }
+        }
+    }
+}

+ 4 - 4
src/test/java/com/uas/erp/test/XmlTest.java

@@ -19,12 +19,12 @@ public class XmlTest {
 
 //    @Test
     public void parseXml() throws Exception{
-        String xmlStr = FileCopyUtils.copyToString(new FileReader("C:\\Users\\Pro1\\MicroServiceGit\\uas2.0\\uas-schedular\\src\\main\\resources\\database\\template\\deputyOrder.xml"));
+        String xmlStr = FileCopyUtils.copyToString(new FileReader("E:\\file\\test\\deputyOrder.xml"));
         Map<String, Object> model = new HashMap<>();
-        model.put("orders", getOrders(10));
+        model.put("orders", getOrders(2));
         long start = System.currentTimeMillis();
         String str = SqlTemplate.fromXml(xmlStr, model);
-        StreamUtils.copy(str, Charset.defaultCharset(), new FileOutputStream("C:\\Users\\Pro1\\MicroServiceGit\\uas2.0\\uas-schedular\\src\\test\\deputyOrder.sql"));
+        StreamUtils.copy(str, Charset.defaultCharset(), new FileOutputStream("E:\\file\\test\\deputyOrder.sql"));
         System.out.println("used: " + (System.currentTimeMillis() - start));
     }
 
@@ -42,7 +42,7 @@ public class XmlTest {
             order.setMadealcode("M000" + i);
             order.setMadealdate(new Date());
             List<DeputyOrderItem> items = new ArrayList<>();
-            for (int j = 0; j < 10; j++) {
+            for (int j = 0; j < 2; j++) {
                 DeputyOrderItem item = new DeputyOrderItem();
                 item.setProdname("测试物料" + i + "-" + j);
                 item.setProdcode("P-" + i + "-" + j);