Bladeren bron

E签宝个人、企业认证,E签宝一步发起签署,签署完成后保存签署文件地址

qxm 5 jaren geleden
bovenliggende
commit
f9ff956837
31 gewijzigde bestanden met toevoegingen van 2136 en 1 verwijderingen
  1. 36 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/Attachment.java
  2. 50 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/BillParams.java
  3. 48 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/ConfigParams.java
  4. 78 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/ContextInfo.java
  5. 53 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/Copier.java
  6. 40 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/Doc.java
  7. 65 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/FlowConfigInfo.java
  8. 123 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/FlowInfo.java
  9. 66 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/IndivInfo.java
  10. 83 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/OrgEntity.java
  11. 53 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/PosBeanInfo.java
  12. 53 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/SignDateBean.java
  13. 79 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/Signer.java
  14. 41 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/SignerAccount.java
  15. 125 0
      suishenbang-system/src/main/java/com/dgtly/system/domain/SignfieldInfo.java
  16. 187 0
      suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/EsignController.java
  17. 20 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/config/ESignConfig.java
  18. 84 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/domain/OrderFile.java
  19. 64 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/mapper/OrderFileMapper.java
  20. 19 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/IEsignOrganRealVerifyService.java
  21. 19 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/IEsignPersonRealnVerifyService.java
  22. 62 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/IEsignSignService.java
  23. 64 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/IOrderFileService.java
  24. 1 1
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/ESignServiceImpl.java
  25. 61 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/EsignOrganRealVerifyServiceImpl.java
  26. 60 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/EsignPersonReaLnVerifyServiceImpl.java
  27. 205 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/EsignSignServiceImpl.java
  28. 104 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/OrderFileServiceImpl.java
  29. 71 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/utils/ESign/ESignHttpUtil.java
  30. 24 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/utils/ESign/ESignUrl.java
  31. 98 0
      suishenbang-wxportal/suishenbang-wxportal-common/src/main/resources/mapper/wxportal/OrderFileMapper.xml

+ 36 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/Attachment.java

@@ -0,0 +1,36 @@
+package com.dgtly.system.domain;
+
+/**
+ * @description: 附件信息
+ * @author: qxm
+ * @date: 2020/10/12 20:28
+ */
+public class Attachment {
+
+	//附件Id
+	private String fileId;
+	//附件名称
+	private String attachmentName;
+	
+	public String getFileId() {
+		return fileId;
+	}
+	public void setFileId(String fileId) {
+		this.fileId = fileId;
+	}
+	public String getAttachmentName() {
+		return attachmentName;
+	}
+	public void setAttachmentName(String attachmentName) {
+		this.attachmentName = attachmentName;
+	}
+	
+	public Attachment(String fileId, String attachmentName) {
+		this.fileId = fileId;
+		this.attachmentName = attachmentName;
+	}
+	public Attachment() {
+	}
+	
+	
+}

+ 50 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/BillParams.java

@@ -0,0 +1,50 @@
+/**
+ * 
+ */
+package com.dgtly.system.domain;
+
+/**业务计费参数 模型
+ * @author qxm
+ *
+ */
+public class BillParams {
+    //用于计费的项目Id
+	private String appId;
+	//付费方账号Gid
+	private String payerAccountGid;
+	//	售卖方案Id
+	private String saleSchemaId;
+	//计费套餐类型
+	private String scope;
+	public String getAppId() {
+		return appId;
+	}
+	public void setAppId(String appId) {
+		this.appId = appId;
+	}
+	public String getPayerAccountGid() {
+		return payerAccountGid;
+	}
+	public void setPayerAccountGid(String payerAccountGid) {
+		this.payerAccountGid = payerAccountGid;
+	}
+	public String getSaleSchemaId() {
+		return saleSchemaId;
+	}
+	public void setSaleSchemaId(String saleSchemaId) {
+		this.saleSchemaId = saleSchemaId;
+	}
+	public String getScope() {
+		return scope;
+	}
+	public void setScope(String scope) {
+		this.scope = scope;
+	}
+	@Override
+	public String toString() {
+		return "BillParams [appId=" + appId + ", payerAccountGid=" + payerAccountGid + ", saleSchemaId=" + saleSchemaId
+				+ ", scope=" + scope + "]";
+	}
+	
+	
+}

+ 48 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/ConfigParams.java

@@ -0,0 +1,48 @@
+package com.dgtly.system.domain;
+
+/**
+ * @description:个人/公司认证配置信息
+ * @author:qxm
+ * @date:2020/10/14 15:51
+ */
+public class ConfigParams {
+    /**指定个人认证页面上不可修改的基本信息。
+    如果创建e签宝个人账号时传入了姓名和证件号,
+    则页面上姓名和证件号固定不可修改;如果创建e签宝个人账号时未传入姓名和证件号,
+    则可通过此参数指定页面上姓名和证件号是否可修改。
+    name - 姓名; certNo - 证件号; mobileNo - 手机号;bankCardNo - 银行卡号;不指定表示可以修改*/
+    public String[] indivUneditableInfo;
+
+    /**指定页面上不可修改的信息属性。
+     创建e签宝账号时传入的信息属性在页面上固定不可修改;未传入的信息属性可通过此参数指定在页面上是否可修改,
+     未指定的信息属性可以修改。
+     name组织机构名称
+     certNo组织机构证件号
+     legalRepName法定代表人姓名
+     legalRepCertNo法定代表人身份证号
+     agentName经办人姓名
+     agentIdNo经办人证件号*/
+    public String[] orgUneditableInfo;
+
+    public String[] getIndivUneditableInfo() {
+        return indivUneditableInfo;
+    }
+
+    public void setIndivUneditableInfo(String[] indivUneditableInfo) {
+        this.indivUneditableInfo = indivUneditableInfo;
+    }
+
+    public String[] getOrgUneditableInfo() {
+        return orgUneditableInfo;
+    }
+
+    public void setOrgUneditableInfo(String[] orgUneditableInfo) {
+        this.orgUneditableInfo = orgUneditableInfo;
+    }
+
+    public ConfigParams(String[] indivUneditableInfo,String[] orgUneditableInfo){
+        this.indivUneditableInfo = indivUneditableInfo;
+        this.orgUneditableInfo = orgUneditableInfo;
+    }
+    public ConfigParams(){}
+}

+ 78 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/ContextInfo.java

@@ -0,0 +1,78 @@
+/**
+ *
+ */
+package com.dgtly.system.domain;
+
+/**带页面交互的实名与业务方通信数据模型
+ * @author qxm
+ *
+ */
+public class ContextInfo {
+    //发起方业务上下文标识:在异步通知时发送回发起方
+    private String contextId;
+    //发起方接收实名认证状态变更通知的地址
+    private String notifyUrl;
+    //实名发起来源
+    private String origin;
+    //实名结束后页面跳转地址.如果origin=APP,则需在该url参数中以key为esignAppScheme设置APP Scheme参数
+    private String redirectUrl;
+    //实名完成是否显示结果页,默认显示
+    private Boolean showResultPage;
+
+    public String getContextId() {
+        return contextId;
+    }
+
+    public void setContextId(String contextId) {
+        this.contextId = contextId;
+    }
+
+    public String getNotifyUrl() {
+        return notifyUrl;
+    }
+
+    public void setNotifyUrl(String notifyUrl) {
+        this.notifyUrl = notifyUrl;
+    }
+
+    public String getOrigin() {
+        return origin;
+    }
+
+    public void setOrigin(String origin) {
+        this.origin = origin;
+    }
+
+    public String getRedirectUrl() {
+        return redirectUrl;
+    }
+
+    public void setRedirectUrl(String redirectUrl) {
+        this.redirectUrl = redirectUrl;
+    }
+
+    public Boolean getShowResultPage() {
+        return showResultPage;
+    }
+
+    public void setShowResultPage(Boolean showResultPage) {
+        this.showResultPage = showResultPage;
+    }
+
+    public ContextInfo( String notifyUrl, String redirectUrl) {
+        this.notifyUrl = notifyUrl;
+        this.redirectUrl = redirectUrl;
+    }
+
+    public ContextInfo() {
+
+    }
+
+    @Override
+    public String toString() {
+        return "ContextInfo [contextId=" + contextId + ", notifyUrl=" + notifyUrl + ", origin=" + origin
+                + ", redirectUrl=" + redirectUrl + ", showResultPage=" + showResultPage + "]";
+    }
+
+
+}

+ 53 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/Copier.java

@@ -0,0 +1,53 @@
+package com.dgtly.system.domain;
+
+/**
+ * @description: 抄送人信息
+ * @author: qxm
+ * @date: 2020/10/12 20:28
+ */
+public class Copier {
+
+	//参与人 accountId
+	private String copierAccountId;
+	
+	//参与主体类型
+	private Integer copierIdentityAccountType;
+	
+	//参与主体账号id
+	private String copierIdentityAccountId;
+	
+	public String getCopierIdentityAccountId() {
+		return copierIdentityAccountId;
+	}
+
+	public void setCopierIdentityAccountId(String copierIdentityAccountId) {
+		this.copierIdentityAccountId = copierIdentityAccountId;
+	}
+
+	public String getCopierAccountId() {
+		return copierAccountId;
+	}
+
+	public void setCopierAccountId(String copierAccountId) {
+		this.copierAccountId = copierAccountId;
+	}
+
+	public Integer getCopierIdentityAccountType() {
+		return copierIdentityAccountType;
+	}
+
+	public void setCopierIdentityAccountType(Integer copierIdentityAccountType) {
+		this.copierIdentityAccountType = copierIdentityAccountType;
+	}
+
+	public Copier(String copierAccountId, Integer copierIdentityAccountType,String copierIdentityAccountId) {
+		this.copierAccountId = copierAccountId;
+		this.copierIdentityAccountType = copierIdentityAccountType;
+		this.copierIdentityAccountId = copierIdentityAccountId;
+	}
+
+	public Copier() {
+	}
+	
+	
+}

+ 40 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/Doc.java

@@ -0,0 +1,40 @@
+package com.dgtly.system.domain;
+
+/**
+ * @description: 文档信息
+ * @author: qxm
+ * @date: 2020/10/12 20:28
+ */
+public class Doc {
+	//文档Id
+	private String fileId;
+	
+	//文档名称
+	private String fileName;
+
+	public String getFileId() {
+		return fileId;
+	}
+
+	public void setFileId(String fileId) {
+		this.fileId = fileId;
+	}
+
+	public String getFileName() {
+		return fileName;
+	}
+
+	public void setFileName(String fileName) {
+		this.fileName = fileName;
+	}
+
+	public Doc(String fileId, String fileName) {
+		this.fileId = fileId;
+		this.fileName = fileName;
+	}
+
+	public Doc() {
+	}
+	
+	
+}

+ 65 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/FlowConfigInfo.java

@@ -0,0 +1,65 @@
+package com.dgtly.system.domain;
+
+/**
+ * @description: 任务配置信息
+ * @author: qxm
+ * @date: 2020/10/12 20:29
+ */
+public class FlowConfigInfo {
+	
+	//通知开发者地址
+	private String noticeDeveloperUrl;
+	
+	//通知方式,可选择多种通知方式
+	private String noticeType;
+	
+	//签署完成重定向地址
+	private String redirectUrl;
+	
+	//签署平台
+	private String signPlatform;
+
+	public String getNoticeDeveloperUrl() {
+		return noticeDeveloperUrl;
+	}
+
+	public void setNoticeDeveloperUrl(String noticeDeveloperUrl) {
+		this.noticeDeveloperUrl = noticeDeveloperUrl;
+	}
+
+	public String getNoticeType() {
+		return noticeType;
+	}
+
+	public void setNoticeType(String noticeType) {
+		this.noticeType = noticeType;
+	}
+
+	public String getRedirectUrl() {
+		return redirectUrl;
+	}
+
+	public void setRedirectUrl(String redirectUrl) {
+		this.redirectUrl = redirectUrl;
+	}
+
+	public String getSignPlatform() {
+		return signPlatform;
+	}
+
+	public void setSignPlatform(String signPlatform) {
+		this.signPlatform = signPlatform;
+	}
+
+	public FlowConfigInfo(String noticeDeveloperUrl, String noticeType, String redirectUrl, String signPlatform) {
+		this.noticeDeveloperUrl = noticeDeveloperUrl;
+		this.noticeType = noticeType;
+		this.redirectUrl = redirectUrl;
+		this.signPlatform = signPlatform;
+	}
+
+	public FlowConfigInfo() {
+	}
+	
+	
+}

+ 123 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/FlowInfo.java

@@ -0,0 +1,123 @@
+package com.dgtly.system.domain;
+
+/**
+ * @description: 流程基本信息
+ * @author: qxm
+ * @date: 2020/10/12 20:29
+ */
+public class FlowInfo {
+
+	//是否自动归档
+	private Boolean autoArchive;
+	
+	//是否自动开启
+	private Boolean autoInitiate;
+	
+	//业务场景
+	private String businessScene;
+	
+	//文件到期前,提前多少小时回调提醒续签,小时(时间区间:1小时——15天
+	private Integer contractRemind;
+	
+	//文件有效截止日期,毫秒
+	private Long contractValidity;
+	
+	//任务配置信息
+	private FlowConfigInfo flowConfigInfo;
+	
+	//流程备注
+	private String remark;
+	
+	//签署有效截止时间,毫秒
+	private Long signValidity;
+
+	public Boolean getAutoArchive() {
+		return autoArchive;
+	}
+
+	public void setAutoArchive(Boolean autoArchive) {
+		this.autoArchive = autoArchive;
+	}
+
+	public Boolean getAutoInitiate() {
+		return autoInitiate;
+	}
+
+	public void setAutoInitiate(Boolean autoInitiate) {
+		this.autoInitiate = autoInitiate;
+	}
+
+	public String getBusinessScene() {
+		return businessScene;
+	}
+
+	public void setBusinessScene(String businessScene) {
+		this.businessScene = businessScene;
+	}
+
+	public Integer getContractRemind() {
+		return contractRemind;
+	}
+
+	public void setContractRemind(Integer contractRemind) {
+		this.contractRemind = contractRemind;
+	}
+
+	public Long getContractValidity() {
+		return contractValidity;
+	}
+
+	public void setContractValidity(Long contractValidity) {
+		this.contractValidity = contractValidity;
+	}
+
+	public FlowConfigInfo getFlowConfigInfo() {
+		return flowConfigInfo;
+	}
+
+	public void setFlowConfigInfo(FlowConfigInfo flowConfigInfo) {
+		this.flowConfigInfo = flowConfigInfo;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public Long getSignValidity() {
+		return signValidity;
+	}
+
+	public void setSignValidity(Long signValidity) {
+		this.signValidity = signValidity;
+	}
+
+	public FlowInfo(Boolean autoArchive, Boolean autoInitiate, String businessScene, Integer contractRemind,
+			Long contractValidity, FlowConfigInfo flowConfigInfo, String remark, Long signValidity) {
+		this.autoArchive = autoArchive;
+		this.autoInitiate = autoInitiate;
+		this.businessScene = businessScene;
+		this.contractRemind = contractRemind;
+		this.contractValidity = contractValidity;
+		this.flowConfigInfo = flowConfigInfo;
+		this.remark = remark;
+		this.signValidity = signValidity;
+	}
+
+	
+	public FlowInfo(Boolean autoArchive,Boolean autoInitiate,String businessScene,FlowConfigInfo flowConfigInfo) {
+		this.autoArchive = autoArchive;
+		this.autoInitiate = autoInitiate;
+		this.businessScene = businessScene;
+		this.flowConfigInfo = flowConfigInfo;
+	}
+
+	public FlowInfo() {
+	}
+	
+	
+	
+}

+ 66 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/IndivInfo.java

@@ -0,0 +1,66 @@
+/**
+ * 
+ */
+package com.dgtly.system.domain;
+
+/**个人认证基本信息模型
+ * @author qxm
+ *
+ */
+public class IndivInfo {
+	//个人银行卡号
+    private String  bankCardNo;
+    //个人证件号
+    private String  certNo;
+    //个人证件类型
+    private String  certType;
+    //个人手机号
+    private String  mobileNo;
+    //个人姓名
+    private String  name;
+    //个人证件号所属地区/国籍
+    private String  nationality;
+	public String getBankCardNo() {
+		return bankCardNo;
+	}
+	public void setBankCardNo(String bankCardNo) {
+		this.bankCardNo = bankCardNo;
+	}
+	public String getCertNo() {
+		return certNo;
+	}
+	public void setCertNo(String certNo) {
+		this.certNo = certNo;
+	}
+	public String getCertType() {
+		return certType;
+	}
+	public void setCertType(String certType) {
+		this.certType = certType;
+	}
+	public String getMobileNo() {
+		return mobileNo;
+	}
+	public void setMobileNo(String mobileNo) {
+		this.mobileNo = mobileNo;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getNationality() {
+		return nationality;
+	}
+	public void setNationality(String nationality) {
+		this.nationality = nationality;
+	}
+	@Override
+	public String toString() {
+		return "IndivInfo [bankCardNo=" + bankCardNo + ", certNo=" + certNo + ", certType=" + certType + ", mobileNo="
+				+ mobileNo + ", name=" + name + ", nationality=" + nationality + "]";
+	}
+    
+    
+}

+ 83 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/OrgEntity.java

@@ -0,0 +1,83 @@
+/**
+ * 
+ */
+package com.dgtly.system.domain;
+
+/**企业基本信息模型
+ * @author qxm
+ *
+ */
+public class OrgEntity {
+	  //组织机构名称
+      private String name;
+      //组织机构证件号
+      private String certNo;
+      //组织结构证件类型
+      private String certType;
+      //法定代表人证件号
+      private String legalRepCertNo;
+      //法定代表人证件类型
+      private String legalRepCertType;
+      //法定代表人姓名
+      private String legalRepName;
+      //法定代表人地区/国籍
+      private String legalRepNationality;
+      //办理人身份
+      private String operatorType;
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getCertNo() {
+		return certNo;
+	}
+	public void setCertNo(String certNo) {
+		this.certNo = certNo;
+	}
+	public String getCertType() {
+		return certType;
+	}
+	public void setCertType(String certType) {
+		this.certType = certType;
+	}
+	public String getLegalRepCertNo() {
+		return legalRepCertNo;
+	}
+	public void setLegalRepCertNo(String legalRepCertNo) {
+		this.legalRepCertNo = legalRepCertNo;
+	}
+	public String getLegalRepCertType() {
+		return legalRepCertType;
+	}
+	public void setLegalRepCertType(String legalRepCertType) {
+		this.legalRepCertType = legalRepCertType;
+	}
+	public String getLegalRepName() {
+		return legalRepName;
+	}
+	public void setLegalRepName(String legalRepName) {
+		this.legalRepName = legalRepName;
+	}
+	public String getLegalRepNationality() {
+		return legalRepNationality;
+	}
+	public void setLegalRepNationality(String legalRepNationality) {
+		this.legalRepNationality = legalRepNationality;
+	}
+	public String getOperatorType() {
+		return operatorType;
+	}
+	public void setOperatorType(String operatorType) {
+		this.operatorType = operatorType;
+	}
+	@Override
+	public String toString() {
+		return "OrgEntity [name=" + name + ", certNo=" + certNo + ", certType=" + certType + ", legalRepCertNo="
+				+ legalRepCertNo + ", legalRepCertType=" + legalRepCertType + ", legalRepName=" + legalRepName
+				+ ", legalRepNationality=" + legalRepNationality + ", operatorType=" + operatorType + "]";
+	}
+      
+      
+}

+ 53 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/PosBeanInfo.java

@@ -0,0 +1,53 @@
+package com.dgtly.system.domain;
+
+/**
+ * @description: 签署区位置信息
+ * @author: qxm
+ * @date: 2020/10/12 20:29
+ */
+public class PosBeanInfo {
+	
+	//页码信息
+	private String posPage;
+	
+	//x坐标
+	private Float posX;
+	
+	//y坐标
+	private Float posY;
+
+	public String getPosPage() {
+		return posPage;
+	}
+
+	public void setPosPage(String posPage) {
+		this.posPage = posPage;
+	}
+
+	public Float getPosX() {
+		return posX;
+	}
+
+	public void setPosX(Float posX) {
+		this.posX = posX;
+	}
+
+	public Float getPosY() {
+		return posY;
+	}
+
+	public void setPosY(Float posY) {
+		this.posY = posY;
+	}
+
+	public PosBeanInfo(String posPage, Float posX, Float posY) {
+		this.posPage = posPage;
+		this.posX = posX;
+		this.posY = posY;
+	}
+
+	public PosBeanInfo() {
+	}
+	
+	
+}

+ 53 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/SignDateBean.java

@@ -0,0 +1,53 @@
+package com.dgtly.system.domain;
+
+/**
+ * @description: 签署日期信息
+ * @author: qxm
+ * @date: 2020/10/12 20:30
+ */
+public class SignDateBean {
+	
+	//是否添加签署日期
+	private Boolean addSignTime;
+	
+	//签章日期字体大小
+	private Integer fontSize;
+	
+	//签章日期格式
+	private String format;
+
+	public Boolean getAddSignTime() {
+		return addSignTime;
+	}
+
+	public void setAddSignTime(Boolean addSignTime) {
+		this.addSignTime = addSignTime;
+	}
+
+	public Integer getFontSize() {
+		return fontSize;
+	}
+
+	public void setFontSize(Integer fontSize) {
+		this.fontSize = fontSize;
+	}
+
+	public String getFormat() {
+		return format;
+	}
+
+	public void setFormat(String format) {
+		this.format = format;
+	}
+
+	public SignDateBean(Boolean addSignTime, Integer fontSize, String format) {
+		this.addSignTime = addSignTime;
+		this.fontSize = fontSize;
+		this.format = format;
+	}
+
+	public SignDateBean() {
+	}
+	
+	
+}

+ 79 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/Signer.java

@@ -0,0 +1,79 @@
+package com.dgtly.system.domain;
+
+import java.util.List;
+
+/**
+ * @description: 签署方信息
+ * @author: qxm
+ * @date: 2020/10/12 20:30
+ */
+public class Signer {
+	
+	//是否平台自动签署
+	private Boolean platformSign;
+	
+	//签署方签署顺序
+	private Integer signOrder;
+	
+	//签署方账号信息
+	private SignerAccount signerAccount;
+	
+	//签署文件信息
+	private List<SignfieldInfo> signfields;
+	
+	private String thirdOrderNo;
+
+	public Boolean getPlatformSign() {
+		return platformSign;
+	}
+
+	public void setPlatformSign(Boolean platformSign) {
+		this.platformSign = platformSign;
+	}
+
+	public Integer getSignOrder() {
+		return signOrder;
+	}
+
+	public void setSignOrder(Integer signOrder) {
+		this.signOrder = signOrder;
+	}
+
+	public SignerAccount getSignerAccount() {
+		return signerAccount;
+	}
+
+	public void setSignerAccount(SignerAccount signerAccount) {
+		this.signerAccount = signerAccount;
+	}
+
+	public List<SignfieldInfo> getSignfields() {
+		return signfields;
+	}
+
+	public void setSignfields(List<SignfieldInfo> signfields) {
+		this.signfields = signfields;
+	}
+
+	public String getThirdOrderNo() {
+		return thirdOrderNo;
+	}
+
+	public void setThirdOrderNo(String thirdOrderNo) {
+		this.thirdOrderNo = thirdOrderNo;
+	}
+
+	public Signer(Boolean platformSign, Integer signOrder, SignerAccount signerAccount, List<SignfieldInfo> signfields,
+			String thirdOrderNo) {
+		this.platformSign = platformSign;
+		this.signOrder = signOrder;
+		this.signerAccount = signerAccount;
+		this.signfields = signfields;
+		this.thirdOrderNo = thirdOrderNo;
+	}
+
+	public Signer() {
+	}
+	
+	
+}

+ 41 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/SignerAccount.java

@@ -0,0 +1,41 @@
+package com.dgtly.system.domain;
+
+/**
+ * @description: 签署方账号信息
+ * @author: qxm
+ * @date: 2020/10/12 20:30
+ */
+public class SignerAccount {
+	
+	//签署操作人个人账号标识,即操作本次签署的个人
+	private String signerAccountId;
+	
+	//签约主体账号标识,即本次签署对应任务的归属方
+	private String authorizedAccountId;
+
+	public String getSignerAccountId() {
+		return signerAccountId;
+	}
+
+	public void setSignerAccountId(String signerAccountId) {
+		this.signerAccountId = signerAccountId;
+	}
+
+	public String getAuthorizedAccountId() {
+		return authorizedAccountId;
+	}
+
+	public void setAuthorizedAccountId(String authorizedAccountId) {
+		this.authorizedAccountId = authorizedAccountId;
+	}
+
+	public SignerAccount(String signerAccountId, String authorizedAccountId) {
+		this.signerAccountId = signerAccountId;
+		this.authorizedAccountId = authorizedAccountId;
+	}
+
+	public SignerAccount() {
+	}
+	
+	
+}

+ 125 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/SignfieldInfo.java

@@ -0,0 +1,125 @@
+package com.dgtly.system.domain;
+
+/**
+ * @description: 签署文件信息
+ * @author: qxm
+ * @date: 2020/10/12 20:31
+ */
+public class SignfieldInfo {
+	
+	//是否自动执行
+	private Boolean autoExecute;
+	
+	//机构签约类别
+	private String actorIndentityType;
+	
+	//文件fileId
+	private String fileId;
+
+	//印章类型
+	private String sealType;
+	
+	//添加签署日期
+	private SignDateBean signDateBean;
+	
+	//签署类型
+	private Integer signType;
+	
+	//签署区位置信息
+	private PosBeanInfo posBean;
+	
+	//签署区的宽度
+	private Integer width;
+
+	public Boolean getAutoExecute() {
+		return autoExecute;
+	}
+
+	public void setAutoExecute(Boolean autoExecute) {
+		this.autoExecute = autoExecute;
+	}
+
+	public String getActorIndentityType() {
+		return actorIndentityType;
+	}
+
+	public void setActorIndentityType(String actorIndentityType) {
+		this.actorIndentityType = actorIndentityType;
+	}
+
+	public String getFileId() {
+		return fileId;
+	}
+
+	public void setFileId(String fileId) {
+		this.fileId = fileId;
+	}
+
+	public String getSealType() {
+		return sealType;
+	}
+
+	public void setSealType(String sealType) {
+		this.sealType = sealType;
+	}
+
+	public SignDateBean getSignDateBean() {
+		return signDateBean;
+	}
+
+	public void setSignDateBean(SignDateBean signDateBean) {
+		this.signDateBean = signDateBean;
+	}
+
+	public Integer getSignType() {
+		return signType;
+	}
+
+	public void setSignType(Integer signType) {
+		this.signType = signType;
+	}
+
+	public PosBeanInfo getPosBean() {
+		return posBean;
+	}
+
+	public void setPosBean(PosBeanInfo posBean) {
+		this.posBean = posBean;
+	}
+
+	public Integer getWidth() {
+		return width;
+	}
+
+	public void setWidth(Integer width) {
+		this.width = width;
+	}
+
+	public SignfieldInfo(Boolean autoExecute, String actorIndentityType, String fileId, String sealType,
+			SignDateBean signDateBean, Integer signType, PosBeanInfo posBean, Integer width) {
+		this.autoExecute = autoExecute;
+		this.actorIndentityType = actorIndentityType;
+		this.fileId = fileId;
+		this.sealType = sealType;
+		this.signDateBean = signDateBean;
+		this.signType = signType;
+		this.posBean = posBean;
+		this.width = width;
+	}
+
+	public SignfieldInfo(Boolean autoExecute, String fileId, String sealType,
+						 SignDateBean signDateBean, Integer signType, PosBeanInfo posBean, Integer width) {
+		this.autoExecute = autoExecute;
+		this.fileId = fileId;
+		this.sealType = sealType;
+		this.signDateBean = signDateBean;
+		this.signType = signType;
+		this.posBean = posBean;
+		this.width = width;
+	}
+
+	public SignfieldInfo() {
+	}
+	
+	
+}

+ 187 - 0
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/EsignController.java

@@ -0,0 +1,187 @@
+package com.dgtly.wxportal.controller;
+
+import com.dgtly.common.annotation.ApiPassToken;
+import com.dgtly.common.core.controller.ApiBaseController;
+import com.dgtly.common.core.domain.ParameterObject;
+import com.dgtly.wxportal.domain.OrderFile;
+import com.dgtly.wxportal.service.IEsignOrganRealVerifyService;
+import com.dgtly.wxportal.service.IEsignPersonRealnVerifyService;
+import com.dgtly.wxportal.service.IEsignSignService;
+import com.dgtly.wxportal.service.IOrderFileService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @description:e签宝认证
+ * @author:qxm
+ * @date:2020/10/12 16:18
+ */
+@Api(tags = "e签宝相关API", description = "提供e签宝服务API")
+@RequestMapping("eSign")
+@RestController
+@ApiPassToken
+public class EsignController extends ApiBaseController {
+
+    @Autowired
+    private IEsignPersonRealnVerifyService personRealnVerifyService;
+    @Autowired
+    private IEsignOrganRealVerifyService organRealVerifyService;
+    @Autowired
+    private IEsignSignService signService;
+    @Autowired
+    private IOrderFileService orderFileService;
+
+    /**
+     * 经销商订单签收方法
+     * 没有注册就注册,注册完就认证,然后再点击签署按钮,获取经销商用户id,对应主体id
+     * E签宝一步发起签署
+     */
+    @ApiOperation(value = "订单签收", notes = "参数:{'orderId':'xxx','signerAccountId':'xxx','authorizedAccountId':'xxx'}" +
+            "\n(orderId:订单编号" +
+            "\n(signerAccountId:签收人(个人)" +
+            "\n authorizedAccountId:签收主体(公司))")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params", paramType = "body")
+    })
+    @PostMapping("dealerSign")
+    public Object dealerSign() {
+
+        ParameterObject obj = getParameterObject();
+        obj.checkParameterNotNull("orderId,signerAccountId,authorizedAccountId");
+        String orderId = obj.getString("orderId");
+        String businessScene = "订单签收";
+        String fileName = "签收订单.pdf";
+        String signerAccountId = obj.getString("signerAccountId");
+        String authorizedAccountId = obj.getString("authorizedAccountId");
+
+        /*1、根据传入订单id,查询订单相关信息生成PDF,调用e签宝上传方法返回文件fileId*/
+        String fileId = "f6ada0144a464d7bb90224104d1c4ca3";
+        /*2、调用E签宝接口一步发起流程,得到返回的流程id*/
+        String flowId = signService.oneStepFlow(businessScene, fileId, fileName, signerAccountId, authorizedAccountId);
+        /*3、调用E签宝获取签署地址*/
+        String result = signService.processExecuteUrl(flowId, signerAccountId, authorizedAccountId);
+        /*4、保存订单id和flowId*/
+        OrderFile orderFile = new OrderFile();
+        orderFile.setOrderId(orderId);
+        orderFile.setFlowId(flowId);
+        orderFileService.insertOrderFile(orderFile);
+
+        return result;
+    }
+
+    /**
+     * 经销商通过签署地址签署后,回调此方法,通过flowId得到签署后的文件下载地址并保存url
+     */
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params", paramType = "body")
+    })
+    @PostMapping("updateOrderFile")
+    public Object updateOrderFile() {
+        ParameterObject obj = getParameterObject();
+        obj.checkParameterNotNull("flowId");
+        String flowId = obj.getString("flowId");
+        String fileUrl = signService.processDocumentDownload(flowId);
+
+        OrderFile orderFile = new OrderFile();
+        orderFile.setFlowId(flowId);
+        orderFile.setFileUrl(fileUrl);
+        orderFileService.updateOrderFileByFlowId(orderFile);
+        return fileUrl;
+    }
+
+
+    @ApiOperation(value = "E签宝个人认证", notes = "参数:{'accountId':'XXXXXXX'}" +
+            "\n(accountId:待认证账号Id)")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params", paramType = "body")
+    })
+    @PostMapping("personRealnVerify")
+    public Object personRealnVerify() {
+        ParameterObject obj = getParameterObject();
+        obj.checkParameterNotNull("accountId");
+        String accountId = obj.getString("accountId");
+        String result = personRealnVerifyService.personRealnVerify(accountId);
+        return result;
+    }
+
+    /*调用修改数据库个人认证状态*/
+    /*@PostMapping("notifyUrl")
+    public Object notifyUrl(){
+        ParameterObject obj =  getParameterObject();
+        obj.checkParameterNotNull("success");
+        String accountId = obj.getString("success");
+        String result = personRealnVerifyService.personRealnVerify(accountId);
+        return AjaxResult.success().putKV("result",result);
+    }*/
+
+
+    @ApiOperation(value = "E签宝企业认证", notes = "参数:{'accountId':'XXXXXXX','agentAccountId':'XXXXXXXXX'}" +
+            "\n(accountId:待认证e签宝企业账号Id,agentAccountId:办理人账号Id)")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params", paramType = "body")
+    })
+    @PostMapping("organRealVerify")
+    public Object organRealVerify() {
+        ParameterObject obj = getParameterObject();
+        obj.checkParameterNotNull("accountId,agentAccountId");
+        String accountId = obj.getString("accountId");
+        String agentAccountId = obj.getString("agentAccountId");
+        String result = organRealVerifyService.organRealVerify(accountId, agentAccountId);
+        return result;
+    }
+
+    /*调用修改数据库企业认证状态*/
+    /*@PostMapping("notifyUrl")
+    public Object notifyUrl(){
+        ParameterObject obj =  getParameterObject();
+        obj.checkParameterNotNull("success");
+        String accountId = obj.getString("success");
+        String result = personRealnVerifyService.personRealnVerify(accountId);
+        return AjaxResult.success().putKV("result",result);
+    }*/
+
+
+    /*@ApiOperation(value = "E签宝一步发起签署", notes = "参数:{'businessScene':'XXXXXXX','fileId':'XXXXXXXXX','fileName':'xxx.pdf','signerAccountId':'xxx','authorizedAccountId':'xxx'}" +
+            "\n ( businessScene:文件主题---xx订单签收" +
+            "\n fileId:签署文档id" +
+            "\n fileName:签署文件名称(名称可以自定义,必须带上文件扩展名,不然会导致后续发起流程校验过不去 示例:合同.pdf )" +
+            "\n signerAccountId:签署操作人个人账号标识,即操作本次签署的个人" +
+            "\n authorizedAccountId:签约主体账号标识,即本次签署对应任务的归属方,默认是签署操作人个人)")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params", paramType = "body")
+    })
+    @PostMapping("oneStepFlow")
+    public Object oneStepFlow() {
+        ParameterObject obj = getParameterObject();
+        obj.checkParameterNotNull("businessScene,fileId,fileName,signerAccountId,authorizedAccountId");
+        String businessScene = obj.getString("businessScene");
+        String fileId = obj.getString("fileId");
+        String fileName = obj.getString("fileName");
+        String signerAccountId = obj.getString("signerAccountId");
+        String authorizedAccountId = obj.getString("authorizedAccountId");
+//        String result = signService.oneStepFlow(businessScene,fileId,fileName,signerAccountId,authorizedAccountId);
+//        return result;
+        return null;
+    }
+
+    @ApiOperation(value = "E签宝一步发起签署", notes = "参数:{'flowId':'XXXXXXX'}")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "params", paramType = "body")
+    })
+    @PostMapping("processDocumentDownload")
+    public Object processDocumentDownload() {
+        ParameterObject obj = getParameterObject();
+        obj.checkParameterNotNull("flowId");
+        String flowId = obj.getString("businessScene");
+        String result = signService.processDocumentDownload(flowId);
+        *//*存入数据库*//*
+        return result;
+    }*/
+
+}

+ 20 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/config/ESignConfig.java

@@ -18,6 +18,14 @@ public class ESignConfig {
     private String eSignServiceUrl ;
     private ESignToken eSignToken;
 
+    @Value(value = "${esign.personNotifyUrl:none}")
+    private String personNotifyUrl ;
+
+    @Value(value = "${esign.organNotifyUrl:none}")
+    private String organNotifyUrl ;
+
+    @Value(value = "${esign.signSuccessUrl:none}")
+    private String signSuccessUrl ;
     @Bean
     public ESignToken eSignTokenUtil(){
         ESignToken eSignToken =  new ESignToken();
@@ -40,4 +48,16 @@ public class ESignConfig {
     public ESignToken geteSignToken() {
         return eSignToken;
     }
+
+    public String getPersonNotifyUrl() {
+        return personNotifyUrl;
+    }
+
+    public String getOrganNotifyUrl() {
+        return organNotifyUrl;
+    }
+
+    public String getSignSuccessUrl() {
+        return signSuccessUrl;
+    }
 }

+ 84 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/domain/OrderFile.java

@@ -0,0 +1,84 @@
+package com.dgtly.wxportal.domain;
+
+import com.dgtly.common.annotation.Excel;
+import com.dgtly.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 订单签收文件对象 ssb_order_file
+ * 
+ * @author qxm
+ * @date 2020-10-15
+ */
+public class OrderFile extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 订单id */
+    @Excel(name = "订单id")
+    private String orderId;
+
+    /** 签署流程id */
+    @Excel(name = "签署流程id")
+    private String flowId;
+
+    /** 签署文件url */
+    @Excel(name = "签署文件url")
+    private String fileUrl;
+
+    /** 是否删除 */
+    @Excel(name = "是否删除")
+    private String isDelete;
+
+    public void setOrderId(String orderId) 
+    {
+        this.orderId = orderId;
+    }
+
+    public String getOrderId() 
+    {
+        return orderId;
+    }
+    public void setFlowId(String flowId) 
+    {
+        this.flowId = flowId;
+    }
+
+    public String getFlowId() 
+    {
+        return flowId;
+    }
+    public void setFileUrl(String fileUrl) 
+    {
+        this.fileUrl = fileUrl;
+    }
+
+    public String getFileUrl() 
+    {
+        return fileUrl;
+    }
+    public void setIsDelete(String isDelete) 
+    {
+        this.isDelete = isDelete;
+    }
+
+    public String getIsDelete() 
+    {
+        return isDelete;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("orderId", getOrderId())
+            .append("flowId", getFlowId())
+            .append("fileUrl", getFileUrl())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("isDelete", getIsDelete())
+            .toString();
+    }
+}

+ 64 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/mapper/OrderFileMapper.java

@@ -0,0 +1,64 @@
+package com.dgtly.wxportal.mapper;
+
+import com.dgtly.wxportal.domain.OrderFile;
+
+import java.util.List;
+
+/**
+ * 订单签收文件Mapper接口
+ * 
+ * @author qxm
+ * @date 2020-10-15
+ */
+public interface OrderFileMapper 
+{
+    /**
+     * 查询订单签收文件
+     * 
+     * @param orderId 订单签收文件ID
+     * @return 订单签收文件
+     */
+    public OrderFile selectOrderFileById(String orderId);
+
+    /**
+     * 查询订单签收文件列表
+     * 
+     * @param orderFile 订单签收文件
+     * @return 订单签收文件集合
+     */
+    public List<OrderFile> selectOrderFileList(OrderFile orderFile);
+
+    /**
+     * 新增订单签收文件
+     * 
+     * @param orderFile 订单签收文件
+     * @return 结果
+     */
+    public int insertOrderFile(OrderFile orderFile);
+
+    /**
+     * 修改订单签收文件
+     * 
+     * @param orderFile 订单签收文件
+     * @return 结果
+     */
+    public int updateOrderFile(OrderFile orderFile);
+
+    /**
+     * 删除订单签收文件
+     * 
+     * @param orderId 订单签收文件ID
+     * @return 结果
+     */
+    public int deleteOrderFileById(String orderId);
+
+    /**
+     * 批量删除订单签收文件
+     * 
+     * @param orderIds 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteOrderFileByIds(String[] orderIds);
+
+    int updateOrderFileByFlowId(OrderFile orderFile);
+}

+ 19 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/IEsignOrganRealVerifyService.java

@@ -0,0 +1,19 @@
+package com.dgtly.wxportal.service;
+
+/**
+ * @description:企业认证
+ * @author:qxm
+ * @date:2020/10/12 16:04
+ */
+public interface IEsignOrganRealVerifyService {
+
+    /**
+     * @description: 企业认证,返回企业网页链接
+     * @param: [accountId, agentAccountId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:09
+     */
+    public String organRealVerify(String accountId, String agentAccountId);
+
+}

+ 19 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/IEsignPersonRealnVerifyService.java

@@ -0,0 +1,19 @@
+package com.dgtly.wxportal.service;
+
+/**
+ * @description:个人认证
+ * @author:qxm
+ * @date:2020/10/12 15:04
+ */
+public interface IEsignPersonRealnVerifyService {
+
+    /**
+     * @description: 个人认证, 返回网页认证链接
+     * @param: [accountId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:05
+     */
+    public String personRealnVerify(String accountId);
+
+}

+ 62 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/IEsignSignService.java

@@ -0,0 +1,62 @@
+package com.dgtly.wxportal.service;
+
+/**
+ * @description:签署服务API
+ * @author:qxm
+ * @date:2020/10/13 10:29
+ */
+public interface IEsignSignService {
+    /**
+     * @description: 一步发起签署
+     * @param: [accountId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:05
+     */
+    public String oneStepFlow(String businessScene, String fileId, String fileName, String signerAccountId, String authorizedAccountId);
+
+    /**
+     * @description: 开启签署流程
+     * @param: [flowId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:05
+     */
+    public String processStart(String flowId);
+
+    /**
+     * @description: 查询签署人列表
+     * @param: [flowId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:05
+     */
+    public String processExecuteSigners(String flowId);
+
+    /**
+     * @description: 获取签署地址
+     * @param: [flowId,accountId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:05
+     */
+    public String processExecuteUrl(String flowId,String accountId,String organizeId);
+
+    /**
+     * @description: 流程归档
+     * @param: [flowId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:05
+     */
+    public String processArchiv(String flowId);
+
+    /**
+     * @description: 文件下载
+     * @param: [flowId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:05
+     */
+    public String processDocumentDownload(String flowId);
+}

+ 64 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/IOrderFileService.java

@@ -0,0 +1,64 @@
+package com.dgtly.wxportal.service;
+
+import com.dgtly.wxportal.domain.OrderFile;
+
+import java.util.List;
+
+/**
+ * 订单签收文件Service接口
+ * 
+ * @author qxm
+ * @date 2020-10-15
+ */
+public interface IOrderFileService 
+{
+    /**
+     * 查询订单签收文件
+     * 
+     * @param orderId 订单签收文件ID
+     * @return 订单签收文件
+     */
+    public OrderFile selectOrderFileById(String orderId);
+
+    /**
+     * 查询订单签收文件列表
+     * 
+     * @param orderFile 订单签收文件
+     * @return 订单签收文件集合
+     */
+    public List<OrderFile> selectOrderFileList(OrderFile orderFile);
+
+    /**
+     * 新增订单签收文件
+     * 
+     * @param orderFile 订单签收文件
+     * @return 结果
+     */
+    public int insertOrderFile(OrderFile orderFile);
+
+    /**
+     * 修改订单签收文件
+     * 
+     * @param orderFile 订单签收文件
+     * @return 结果
+     */
+    public int updateOrderFile(OrderFile orderFile);
+
+    /**
+     * 批量删除订单签收文件
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteOrderFileByIds(String ids);
+
+    /**
+     * 删除订单签收文件信息
+     * 
+     * @param orderId 订单签收文件ID
+     * @return 结果
+     */
+    public int deleteOrderFileById(String orderId);
+
+    public int updateOrderFileByFlowId(OrderFile orderFile);
+}

+ 1 - 1
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/ESignServiceImpl.java

@@ -53,7 +53,7 @@ public class ESignServiceImpl implements ESignService {
      */
     private String creatPdf(String orderId){
 
-        return "D:/bc.pdf";
+        return "C:/Users/14471/Desktop/test.pdf";
     }
 
     /**

+ 61 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/EsignOrganRealVerifyServiceImpl.java

@@ -0,0 +1,61 @@
+package com.dgtly.wxportal.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.dgtly.system.domain.ConfigParams;
+import com.dgtly.system.domain.ContextInfo;
+import com.dgtly.wxportal.config.ESignConfig;
+import com.dgtly.wxportal.service.IEsignOrganRealVerifyService;
+import com.dgtly.wxportal.utils.ESign.ESignHttpUtil;
+import com.dgtly.wxportal.utils.ESign.ESignUrl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @description:企业认证
+ * @author:qxm
+ * @date:2020/10/12 16:08
+ */
+@Service
+public class EsignOrganRealVerifyServiceImpl implements IEsignOrganRealVerifyService {
+
+    @Autowired
+    private ESignHttpUtil eSignHttpUtil;
+    @Autowired
+    private ESignConfig eSignConfig;
+    /**
+     * @description: 企业认证
+     * @param: [accountId, agentAccountId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 15:13
+     */
+    @Override
+    public String organRealVerify(String accountId, String agentAccountId) {
+        JSONObject json = buildParam(accountId,agentAccountId);
+//        json.put("accountId", accountId);
+//        json.put("agentAccountId", agentAccountId);
+        JSONObject jsonObject = eSignHttpUtil.doPostGetJson(ESignUrl.OrgIdentityUrl, json, accountId);
+        return jsonObject.toJSONString();
+    }
+
+    private JSONObject buildParam(String accountId, String agentAccountId) {
+        //个人认证参数
+        String notifyUrl = eSignConfig.getOrganNotifyUrl();
+        String redirectUrl = "";
+        ContextInfo contextInfo = new ContextInfo(notifyUrl, redirectUrl);
+        //认证配置信息
+        String[] arr = {"name", "certNo", "legalRepName", "legalRepCertNo","agentName","agentIdNo"};
+        ConfigParams configParams = new ConfigParams(null,arr);
+        //拼接参数
+        return buildOneStepFlowParam(accountId,agentAccountId,contextInfo,configParams);
+    }
+
+    private static JSONObject buildOneStepFlowParam(String accountId, String agentAccountId, ContextInfo contextInfo, ConfigParams configParams) {
+        JSONObject json = new JSONObject();
+        json.put("accountId", accountId);
+        json.put("agentAccountId", agentAccountId);
+        json.put("contextInfo", contextInfo);
+        json.put("configParams", configParams);
+        return json;
+    }
+}

+ 60 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/EsignPersonReaLnVerifyServiceImpl.java

@@ -0,0 +1,60 @@
+package com.dgtly.wxportal.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.dgtly.system.domain.ConfigParams;
+import com.dgtly.system.domain.ContextInfo;
+import com.dgtly.wxportal.config.ESignConfig;
+import com.dgtly.wxportal.service.IEsignPersonRealnVerifyService;
+import com.dgtly.wxportal.utils.ESign.ESignHttpUtil;
+import com.dgtly.wxportal.utils.ESign.ESignUrl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @description:个人认证
+ * @author:qxm
+ * @date:2020/10/12 15:12
+ */
+@Service
+public class EsignPersonReaLnVerifyServiceImpl implements IEsignPersonRealnVerifyService {
+
+    @Autowired
+    private ESignHttpUtil eSignHttpUtil;
+    @Autowired
+    private ESignConfig eSignConfig;
+
+    /**
+     * @description: 个人认证
+     * @param: [accountId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 15:13
+     */
+    @Override
+    public String personRealnVerify(String accountId) {
+        JSONObject json = buildParam(accountId, "");
+        JSONObject jsonObject = eSignHttpUtil.doPostGetJson(ESignUrl.IndivIdentityUrl, json, accountId);
+        return jsonObject.toJSONString();
+    }
+
+    private JSONObject buildParam(String accountId, String receiveUrlMobileNo) {
+        //个人认证参数
+        String notifyUrl = eSignConfig.getPersonNotifyUrl();
+        String redirectUrl = "";
+        ContextInfo contextInfo = new ContextInfo(notifyUrl, redirectUrl);
+        //认证配置信息
+        String[] arr = {"name", "certNo", "mobileNo", "bankCardNo"};
+        ConfigParams configParams = new ConfigParams(arr, null);
+        //拼接参数
+        return buildOneStepFlowParam(accountId, receiveUrlMobileNo, contextInfo, configParams);
+    }
+
+    private static JSONObject buildOneStepFlowParam(String accountId, String receiveUrlMobileNo, ContextInfo contextInfo, ConfigParams configParams) {
+        JSONObject json = new JSONObject();
+        json.put("accountId", accountId);
+        json.put("contextInfo", contextInfo);
+        json.put("configParams", configParams);
+        return json;
+    }
+
+}

+ 205 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/EsignSignServiceImpl.java

@@ -0,0 +1,205 @@
+package com.dgtly.wxportal.service.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.dgtly.system.domain.*;
+import com.dgtly.wxportal.config.ESignConfig;
+import com.dgtly.wxportal.service.IEsignSignService;
+import com.dgtly.wxportal.utils.ESign.ESignHttpUtil;
+import com.dgtly.wxportal.utils.ESign.ESignUrl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @description:签署服务API
+ * @author:qxm
+ * @date:2020/10/13 10:31
+ */
+@Service
+public class EsignSignServiceImpl implements IEsignSignService {
+    @Autowired
+    private ESignHttpUtil eSignHttpUtil;
+    @Autowired
+    private ESignConfig eSignConfig;
+
+    /**
+     * @description: 一步发起签署
+     * @param: [copierAccountId, fileId, fileName, signerAccountId]
+     * copierAccountId 抄送人id
+     * fileId 文档id
+     * fileName 文件名称
+     * signerAccountId 签署操作人个人账号标识,即操作本次签署的个人注:平台用户自动签署时,该参数需要传入签署主体账号id
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/13 9:15
+     */
+    @Override
+    public String oneStepFlow(String businessScene, String fileId, String fileName, String signerAccountId,String authorizedAccountId) {
+        JSONObject json = buildParam(businessScene, fileId, fileName, signerAccountId,authorizedAccountId);
+        JSONObject jsonObject = eSignHttpUtil.doPostGetJson(ESignUrl.CreateFlowOneStepUrl,json);
+        JSONObject result = (JSONObject)jsonObject.get("data");
+        return result.get("flowId").toString();
+    }
+
+    /**
+     * @description: 开启签署流程
+     * @param: [flowId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:05
+     */
+    @Override
+    public String processStart(String flowId) {
+        JSONObject json = new JSONObject();
+//        json.put("flowId", flowId);
+        JSONObject jsonObject = eSignHttpUtil.doPutGetJson(ESignUrl.ProcessStartUrl, json,flowId);
+        return jsonObject.toJSONString();
+    }
+    /**
+     * @description: 查询签署人列表
+     * @param: [flowId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:05
+     */
+    @Override
+    public String processExecuteSigners(String flowId) {
+        JSONObject json = new JSONObject();
+//        json.put("flowId", flowId);
+        JSONObject jsonObject = eSignHttpUtil.doGetGetJson(ESignUrl.ProcessExecuteSignersUrl, json,flowId);
+        return jsonObject.toJSONString();
+    }
+
+    /**
+     * @description: 获取签署地址
+     * @param: [flowId,accountId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:05
+     */
+    @Override
+    public String processExecuteUrl(String flowId,String accountId,String organizeId) {
+        JSONObject json = new JSONObject();
+//        json.put("flowId", flowId);
+        JSONObject jsonObject = eSignHttpUtil.doGetGetJson(ESignUrl.ProcessExecuteUrl, json,flowId,accountId,organizeId);
+        return jsonObject.toJSONString();
+    }
+
+    /**
+     * @description: 流程归档
+     * @param: [flowId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:05
+     */
+    @Override
+    public String processArchiv(String flowId) {
+        JSONObject json = new JSONObject();
+//        json.put("flowId", flowId);
+        JSONObject jsonObject = eSignHttpUtil.doPutGetJson(ESignUrl.ProcessArchivUrl, json,flowId);
+        return jsonObject.toJSONString();
+    }
+
+    /**
+     * @description: 流程文件下载
+     * @param: [flowId]
+     * @return: java.lang.String
+     * @author: qxm
+     * @date: 2020/10/12 16:05
+     */
+    @Override
+    public String processDocumentDownload(String flowId) {
+        JSONObject json = new JSONObject();
+//        json.put("flowId", flowId);
+        JSONObject jsonObject = eSignHttpUtil.doGetGetJson(ESignUrl.ProcessDocumentDownloadUrl, json,flowId);
+        JSONObject result1 = (JSONObject)jsonObject.get("data");
+        JSONArray jsonarray = (JSONArray)result1.get("docs");
+        JSONObject result = (JSONObject)jsonarray.get(0);
+        return result.get("fileUrl").toString();
+    }
+
+    /**
+     * @description 模拟构建一步发起请求参数
+     *              <p>
+     *              这里模拟的场景是:无附件,一个抄送人,一个文件,一个平台方和一个待签署方
+     *              <p>
+     *              实际使用时,可以根据贵司的业务场景,选择填入附件信息、抄送人列表、文件列表、签署方信息
+     *              <p>
+     *              注意: 请求参数中的signers中的签署文件fileId,必须在待签文档信息docs中有填写,否则报错
+     *
+     *              <p>
+     *
+     */
+    private  JSONObject buildParam(String businessScene, String fileId, String fileName, String signerAccountId,String authorizedAccountId) {
+        // 附件信息列表 这里模拟没有附件的情况
+        List<Attachment> attachments = new ArrayList<>();
+
+        // 抄送人列表 这里模拟有一个抄送人
+        Copier copier = new Copier(signerAccountId, 0, null);
+        List<Copier> copiers = new ArrayList<>(); // Lists.newArrayList() 是guava 的写法
+        copiers.add(copier);
+
+        // 待签文件列表,这里模拟只有一个待签文件
+        Doc doc = new Doc(fileId, fileName);
+
+        List<Doc> docs = new ArrayList<>();//Lists.newArrayList(doc);
+        docs.add(doc);
+
+        // 流程配置,可以不配置,使用默认配置
+        String noticeDeveloperUrl = eSignConfig.getSignSuccessUrl();//回调通知URL
+        FlowConfigInfo flowConfigInfo = new FlowConfigInfo(noticeDeveloperUrl, "1,2", "www.baidu.com", null);
+        FlowInfo flowInfo = new FlowInfo(true,true,businessScene,flowConfigInfo);
+
+        // 签署方信息
+        // 平台方
+        PosBeanInfo posBean1 = new PosBeanInfo("1", 100F, 100F); // 签署位置
+//        SignfieldInfo signfield1 = new SignfieldInfo(false,"2", fileId, null, null, null, posBean1, null); // 签署区(签署主体是公司)
+        SignfieldInfo signfield1 = new SignfieldInfo(false, fileId, null, null, null, posBean1, null); // 签署区(个人签署)
+        List<SignfieldInfo> signfields = new ArrayList<>();
+        signfields.add(signfield1);
+//        SignerAccount signAccount = new SignerAccount(signerAccountId, signerAccountId);//签署方账号
+        SignerAccount signAccount = new SignerAccount(signerAccountId, authorizedAccountId);//签署方账号
+        Signer signer1 = new Signer(false, 1, signAccount, signfields, null); // 签署方
+        // 用户方
+//        PosBeanInfo posBean2 = new PosBeanInfo("1", 200F, 100F); // 签署位置
+//        SignfieldInfo signfield2 = new SignfieldInfo(false, null, fileId, null, null, null, posBean2, null); // 签署区
+//        List<SignfieldInfo> signfields1 = new ArrayList<>();
+//        signfields1.add(signfield2);
+//        Signer signer2 = new Signer(false, 1, signAccount, signfields1, null); //用户方
+        List<Signer> signers = new ArrayList<>();//Lists.newArrayList(signer1, signer2);
+        signers.add(signer1);
+//        signers.add(signer2);
+
+        //拼接参数
+        return buildOneStepFlowParam(attachments, copiers, docs, flowInfo, signers);
+    }
+
+    /**
+     * @description 一步发起签署 -- 构建请求参数
+     *              <p>
+     *
+     *              attachments:附件信息列表【可空】
+     *              <p>
+     *              copiers:抄送人列表【可空】
+     *              <p>
+     *              docs:待签文档信息【可空】
+     *              <p>
+     *              flowInfo:流程基本信息【可空】
+     *              <p>
+     *              signers:签署方信息列表【必填】
+     *
+     */
+    public static JSONObject buildOneStepFlowParam(List<Attachment> attachments, List<Copier> copiers, List<Doc> docs,
+                                                   FlowInfo flowInfo, List<Signer> signers) {
+        JSONObject json = new JSONObject();
+//        json.put("attachments", attachments);
+//        json.put("copiers", copiers);
+        json.put("docs", docs);
+        json.put("flowInfo", flowInfo);
+        json.put("signers", signers);
+        return json;
+    }
+}

+ 104 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/OrderFileServiceImpl.java

@@ -0,0 +1,104 @@
+package com.dgtly.wxportal.service.impl;
+
+import com.dgtly.common.core.text.Convert;
+import com.dgtly.common.utils.DateUtils;
+import com.dgtly.wxportal.domain.OrderFile;
+import com.dgtly.wxportal.mapper.OrderFileMapper;
+import com.dgtly.wxportal.service.IOrderFileService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 订单签收文件Service业务层处理
+ * 
+ * @author qxm
+ * @date 2020-10-15
+ */
+@Service
+public class OrderFileServiceImpl implements IOrderFileService
+{
+    @Autowired
+    private OrderFileMapper orderFileMapper;
+
+    /**
+     * 查询订单签收文件
+     * 
+     * @param orderId 订单签收文件ID
+     * @return 订单签收文件
+     */
+    @Override
+    public OrderFile selectOrderFileById(String orderId)
+    {
+        return orderFileMapper.selectOrderFileById(orderId);
+    }
+
+    /**
+     * 查询订单签收文件列表
+     * 
+     * @param orderFile 订单签收文件
+     * @return 订单签收文件
+     */
+    @Override
+    public List<OrderFile> selectOrderFileList(OrderFile orderFile)
+    {
+        return orderFileMapper.selectOrderFileList(orderFile);
+    }
+
+    /**
+     * 新增订单签收文件
+     * 
+     * @param orderFile 订单签收文件
+     * @return 结果
+     */
+    @Override
+    public int insertOrderFile(OrderFile orderFile)
+    {
+        orderFile.setCreateTime(DateUtils.getNowDate());
+        return orderFileMapper.insertOrderFile(orderFile);
+    }
+
+    /**
+     * 修改订单签收文件
+     * 
+     * @param orderFile 订单签收文件
+     * @return 结果
+     */
+    @Override
+    public int updateOrderFile(OrderFile orderFile)
+    {
+        orderFile.setUpdateTime(DateUtils.getNowDate());
+        return orderFileMapper.updateOrderFile(orderFile);
+    }
+
+    /**
+     * 删除订单签收文件对象
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    @Override
+    public int deleteOrderFileByIds(String ids)
+    {
+        return orderFileMapper.deleteOrderFileByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除订单签收文件信息
+     * 
+     * @param orderId 订单签收文件ID
+     * @return 结果
+     */
+    @Override
+    public int deleteOrderFileById(String orderId)
+    {
+        return orderFileMapper.deleteOrderFileById(orderId);
+    }
+
+    @Override
+    public int updateOrderFileByFlowId(OrderFile orderFile) {
+        orderFile.setUpdateTime(DateUtils.getNowDate());
+        return orderFileMapper.updateOrderFileByFlowId(orderFile);
+    }
+}

+ 71 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/utils/ESign/ESignHttpUtil.java

@@ -55,6 +55,7 @@ public class ESignHttpUtil {
     public JSONObject doGetGetJson(ESignUrl eurl, JSONObject param,String ...querys){
         String url = eurl.getUrl(querys);
         String str = doGet(url);
+//        String str = doGet(url,param.toJSONString());
         JSONObject json =JSONObject.parseObject(str);
         int code = json.getInteger("code");
         if(code!=0){
@@ -263,6 +264,76 @@ public class ESignHttpUtil {
         return result.toString();
     }
 
+    public String doGet(String url, String json)
+    {
+        PrintWriter out = null;
+        StringBuilder result = new StringBuilder();
+        BufferedReader in = null;
+        try
+        {
+            String urlNameString = url;
+            log.info("sendGet - {}", urlNameString);
+            URL realUrl = new URL(urlNameString);
+
+            URLConnection connection = realUrl.openConnection();
+            connection.setRequestProperty("accept", "*/*");
+            connection.setRequestProperty("X-Tsign-Open-App-Id",eSignConfig.getAppId());
+            connection.setRequestProperty("X-Tsign-Open-Token",eSignConfig.geteSignToken().getAccessToken());
+            connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
+            connection.setRequestProperty("connection", "Keep-Alive");
+            connection.connect();
+            in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+            out = new PrintWriter(connection.getOutputStream());
+            out.write(json);
+            out.flush();
+            String line;
+            while ((line = in.readLine()) != null)
+            {
+                result.append(line);
+            }
+            log.info("recv - {}", result);
+        }
+        catch(ConnectException e)
+        {
+            log.error("调用ESignHttpUtil.sendGet ConnectException, url=" + url , e);
+            throw new BusinessException("调用ESignHttpUtil.sendGet ConnectException, url=" + url );
+        }
+        catch (SocketTimeoutException e)
+        {
+            log.error("调用ESignHttpUtil.sendGet SocketTimeoutException, url=" + url , e);
+            throw new BusinessException("调用ESignHttpUtil.sendGet SocketTimeoutException, url=" + url );
+        }
+        catch (IOException e)
+        {
+            log.error("调用ESignHttpUtil.sendGet IOException, url=" + url, e);
+            throw new BusinessException("调用ESignHttpUtil.sendGet IOException, url=" + url );
+        }
+        catch (Exception e)
+        {
+            log.error("调用HttpsUtil.sendGet Exception, url=" + url , e);
+            throw new BusinessException("调用ESignHttpUtil.sendGet Exception, url=" + url );
+        }
+        finally
+        {
+            try
+            {
+                if (out != null)
+                {
+                    out.close();
+                }
+                if (in != null)
+                {
+                    in.close();
+                }
+            }
+            catch (Exception ex)
+            {
+                log.error("调用in.close Exception, url=" + url , ex);
+            }
+        }
+        return result.toString();
+    }
+
     public String doGet(String url)
     {
         StringBuilder result = new StringBuilder();

+ 24 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/utils/ESign/ESignUrl.java

@@ -16,6 +16,30 @@ public enum ESignUrl {
     ,GetPersonalAddress("/v2/identity/auth/web/%s/indivIdentityUrl")
     ,CreateThirdParty("/v1/organizations/createByThirdPartyUserId")
     ,uploadCreateFile("/v1/files/getUploadUrl")
+    //个人认证
+    ,IndivIdentityUrl("/v2/identity/auth/web/%s/indivIdentityUrl")
+    //企业认证
+    ,OrgIdentityUrl("/v2/identity/auth/web/%s/orgIdentityUrl")
+
+    //一步发起签署-包含以下几个流程
+    ,CreateFlowOneStepUrl("/api/v2/signflows/createFlowOneStep")
+    //2、创建签署流程
+//    ,CreateFlowOneStepUrl("/v1/signflows")
+//    //3、添加流程文件
+//    ,CreateFlowOneStepUrl("/v1/signflows/{flowId}/documents")
+//    //4、添加签署区,(自动和手动)
+//    ,CreateFlowOneStepUrl("/v1/signflows/{flowId}/signfields/platformSign")
+//    ,CreateFlowOneStepUrl("/v1/signflows/{flowId}/signfields/handSign")
+//    //6、开启签署流程
+    ,ProcessStartUrl("/v1/signflows/%s/start")
+    //6、流程签署人列表
+    ,ProcessExecuteSignersUrl("/v1/signflows/%s/signers")
+    //获取签署地址
+    ,ProcessExecuteUrl("/v1/signflows/%s/executeUrl?accountId=%s&organizeId=%s")
+//    //7、流程归档
+    ,ProcessArchivUrl("/v1/signflows/%s/archive")
+//    //8、签署的文件下载
+    ,ProcessDocumentDownloadUrl("/v1/signflows/%s/documents")
     ;
     private String url;
     private ESignConfig eSignConfig ;

+ 98 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/resources/mapper/wxportal/OrderFileMapper.xml

@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dgtly.wxportal.mapper.OrderFileMapper">
+    
+    <resultMap type="OrderFile" id="OrderFileResult">
+        <result property="orderId"    column="order_id"    />
+        <result property="flowId"    column="flow_id"    />
+        <result property="fileUrl"    column="file_url"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="isDelete"    column="is_delete"    />
+    </resultMap>
+
+    <sql id="selectOrderFileVo">
+        select order_id, flow_id, file_url, create_by, create_time, update_by, update_time, is_delete from ssb_order_file
+    </sql>
+
+    <select id="selectOrderFileList" parameterType="OrderFile" resultMap="OrderFileResult">
+        <include refid="selectOrderFileVo"/>
+        <where>  
+            <if test="orderId != null  and orderId != ''"> and order_id = #{orderId}</if>
+            <if test="flowId != null  and flowId != ''"> and flow_id = #{flowId}</if>
+            <if test="fileUrl != null  and fileUrl != ''"> and file_url = #{fileUrl}</if>
+            <if test="isDelete != null  and isDelete != ''"> and is_delete = #{isDelete}</if>
+        </where>
+    </select>
+    
+    <select id="selectOrderFileById" parameterType="String" resultMap="OrderFileResult">
+        <include refid="selectOrderFileVo"/>
+        where order_id = #{orderId}
+    </select>
+        
+    <insert id="insertOrderFile" parameterType="OrderFile">
+        insert into ssb_order_file
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="orderId != null">order_id,</if>
+            <if test="flowId != null">flow_id,</if>
+            <if test="fileUrl != null">file_url,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="isDelete != null">is_delete,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="orderId != null">#{orderId},</if>
+            <if test="flowId != null">#{flowId},</if>
+            <if test="fileUrl != null">#{fileUrl},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="isDelete != null">#{isDelete},</if>
+         </trim>
+    </insert>
+
+    <update id="updateOrderFile" parameterType="OrderFile">
+        update ssb_order_file
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="flowId != null">flow_id = #{flowId},</if>
+            <if test="fileUrl != null">file_url = #{fileUrl},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="isDelete != null">is_delete = #{isDelete},</if>
+        </trim>
+        where order_id = #{orderId}
+    </update>
+    <update id="updateOrderFileByFlowId">
+        update ssb_order_file
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="fileUrl != null">file_url = #{fileUrl},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="isDelete != null">is_delete = #{isDelete},</if>
+        </trim>
+        where flow_id = #{flowId}
+    </update>
+
+    <delete id="deleteOrderFileById" parameterType="String">
+        delete from ssb_order_file where order_id = #{orderId}
+    </delete>
+
+    <delete id="deleteOrderFileByIds" parameterType="String">
+        delete from ssb_order_file where order_id in 
+        <foreach item="orderId" collection="array" open="(" separator="," close=")">
+            #{orderId}
+        </foreach>
+    </delete>
+
+</mapper>