Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
58112eab
Commit
58112eab
authored
Mar 19, 2020
by
zhaoxiqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
2517cf22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
100 additions
and
6 deletions
+100
-6
bpo-web/app/base/service/impl/entcontractSve.js
+4
-4
bpo-web/app/base/service/impl/utilesignbaoSve.js
+96
-2
No files found.
bpo-web/app/base/service/impl/entcontractSve.js
View file @
58112eab
...
@@ -638,9 +638,9 @@ class EntcontractService extends ServiceBase {
...
@@ -638,9 +638,9 @@ class EntcontractService extends ServiceBase {
agentB
:
entcompany
.
contactName
,
//乙方 联系人
agentB
:
entcompany
.
contactName
,
//乙方 联系人
agentMobileB
:
entcompany
.
contactMobile
,
//乙方 联系电话
agentMobileB
:
entcompany
.
contactMobile
,
//乙方 联系电话
bankNameB
:
entcompany
.
bankAccount
,
//账户名称
//
bankNameB: entcompany.bankAccount,//账户名称
bank
:
entcompany
.
bankName
,
//开户行
//
bank: entcompany.bankName,//开户行
bankNumB
:
entcompany
.
bankNo
,
//账号
//
bankNumB: entcompany.bankNo,//账号
signDate
:
today
,
//签约时间
signDate
:
today
,
//签约时间
signDateA
:
today
,
//甲方签约日期 必填
signDateA
:
today
,
//甲方签约日期 必填
...
@@ -650,7 +650,7 @@ class EntcontractService extends ServiceBase {
...
@@ -650,7 +650,7 @@ class EntcontractService extends ServiceBase {
var
ebaoAccountId
=
eaccount
.
eaccountid
;
//签署人账户id-- 必填
var
ebaoAccountId
=
eaccount
.
eaccountid
;
//签署人账户id-- 必填
var
thirdOrderNo
=
entcontract
.
id
;
//第三方流水号,通知回调使用---选填
var
thirdOrderNo
=
entcontract
.
id
;
//第三方流水号,通知回调使用---选填
var
eBaoRedirectBossUrl
=
""
;
var
eBaoRedirectBossUrl
=
""
;
var
tt
=
await
this
.
utilesignbaoSve
.
userAutoSignContractNoTemplate
(
signParams
,
ebaoAccountId
,
thirdOrderNo
,
eBaoRedirectBossUrl
,
"econtractSve"
,
sealId
);
var
tt
=
await
this
.
utilesignbaoSve
.
userAutoSignContractNoTemplate
reversalSeal
(
signParams
,
ebaoAccountId
,
thirdOrderNo
,
eBaoRedirectBossUrl
,
"econtractSve"
,
sealId
);
if
(
tt
&&
tt
.
data
&&
tt
.
code
==
1
)
{
if
(
tt
&&
tt
.
data
&&
tt
.
code
==
1
)
{
entcontract
.
eflowid
=
tt
.
data
.
flowId
;
entcontract
.
eflowid
=
tt
.
data
.
flowId
;
entcontract
.
edocid
=
tt
.
data
.
docId
;
entcontract
.
edocid
=
tt
.
data
.
docId
;
...
...
bpo-web/app/base/service/impl/utilesignbaoSve.js
View file @
58112eab
...
@@ -777,6 +777,101 @@ class UtilESignBaoService {
...
@@ -777,6 +777,101 @@ class UtilESignBaoService {
return
result
;
return
result
;
}
}
/*
seal 位置反转
*/
async
userAutoSignContractNoTemplatereversalSeal
(
params
,
ebaoAccountId
,
thirdOrderNo
,
eSignBaoRedirectBossUrl
,
opName
,
sealId
)
{
//用户签署合同-------调用此方法
//日志记录
logCtl
.
info
({
optitle
:
"e签宝===>创建用户签署合同信息info"
,
op
:
"app/base/service/impl/utilesignbaoSve/userSignContractNoTemplate"
,
content
:
"参数:ebaoAccountId="
+
ebaoAccountId
+
",thirdOrderNo="
+
thirdOrderNo
+
",eSignBaoRedirectBossUrl="
+
eSignBaoRedirectBossUrl
+
",请求params参数:"
+
JSON
.
stringify
(
params
),
clientIp
:
""
});
/*
1.合同模板创建合同 5.4.2
2.创建合同签署流程 5.5.1
3.发起对接平台自动签署 5.5.2
4.发起用户自动签署 5.5.3
*/
var
result
=
{
code
:
1
,
message
:
"success"
,
data
:
{}
};
if
(
ebaoAccountId
==
null
||
ebaoAccountId
==
""
||
ebaoAccountId
==
"undefined"
)
{
result
.
code
=
-
100
;
result
.
message
=
"ebaoAccountId参数有误"
;
return
result
;
}
var
tThirdOrderNo
=
thirdOrderNo
==
null
||
thirdOrderNo
==
""
||
thirdOrderNo
==
"undefined"
?
""
:
thirdOrderNo
var
self
=
this
;
//1.合同模板创建合同 5.4.2
var
createTemplate
=
await
self
.
createByTemplate
(
params
,
opName
,
result
);
if
(
createTemplate
.
code
!=
1
)
{
return
result
;
}
var
tDocId
=
createTemplate
.
data
.
docId
;
var
addProcessParams
=
{
businessScene
:
params
.
name
,
//业务场景名称-- 必填
initiatorAccountId
:
""
,
//发起方账户id,默认对接平台,--使用默认的,不用填写
signValidity
:
""
,
//签署截止时间戳毫秒值-- 选填
payer
:
""
,
//签署付费方,默认对接平台-- 选填
signPlatform
:
"1"
,
//指定用户签署的平台,空值表示不限平台(1:H5签2:支付宝生活号签3:微信小程序签(后续版本支持))-- 选填
noticeType
:
""
,
//用户接收签署任务通知的方式,空值不通知,1短信,2邮箱,格式"1,2"
redirectUrl
:
eSignBaoRedirectBossUrl
,
//页面签署完成后跳转地址
docId
:
tDocId
,
//合同id
docName
:
""
//合同名称,默认使用创建合同时的名称-- 选填
};
//2.创建合同签署流程 5.5.1
var
createAddProcess
=
await
self
.
addProcess
(
addProcessParams
,
opName
,
result
);
if
(
createAddProcess
.
code
!=
1
)
{
return
result
;
}
var
tFlowId
=
createAddProcess
.
data
.
flowId
;
var
platformSignTaskParams
=
{
flowId
:
tFlowId
,
//流程id-- 必填
thirdOrderNo
:
tThirdOrderNo
,
//第三方流水号,通知回调使用
posList
:
[{
signType
:
1
,
//盖章位置定位方式,1关键字定位-- 必填
key
:
"sealB"
//-- 必填
}]
};
if
(
sealId
)
{
//印章id,不传时使用账户默认印章
platformSignTaskParams
.
sealId
=
sealId
;
}
//3.发起对接平台自动签署 5.5.2
var
platformSignTaskResult
=
await
self
.
platformSignTask
(
platformSignTaskParams
,
opName
,
result
);
if
(
platformSignTaskResult
.
code
!=
1
)
{
return
result
;
}
var
autoUserSignTaskParams
=
{
flowId
:
tFlowId
,
//流程id-- 必填
accountId
:
ebaoAccountId
,
//签署人账户id-- 必填
thirdOrderNo
:
tThirdOrderNo
,
//第三方流水号,通知回调使用
sealType
:
"0"
,
//印章类型, 指定签署印章类型,0:手绘印章;1:模板印章-- 必填 ?????????????????????????????
posList
:
[{
signType
:
1
,
//盖章位置定位方式,1关键字定位-- 必填
key
:
"sealA"
//-- 必填
}]
};
//4.发起用户自动签署 5.5.3
var
autoUserSignTaskResult
=
await
self
.
autoUserSignTask
(
autoUserSignTaskParams
,
opName
,
result
);
if
(
autoUserSignTaskResult
.
code
!=
1
)
{
return
result
;
}
// 打开这行注释
await
this
.
archiveProcess
({
flowId
:
tFlowId
},
opName
);
result
.
data
=
{
flowId
:
tFlowId
,
//流程id
docId
:
tDocId
,
//合同id
templateId
:
params
.
templateId
//模板id,由创建模板接口调用返回的templateId
};
return
result
;
}
/*参数说明:
/*参数说明:
var params = {
var params = {
templateId: "2c98d5446734acf5016827d168a6013b", //模板id,由创建模板接口调用返回的templateId 必填
templateId: "2c98d5446734acf5016827d168a6013b", //模板id,由创建模板接口调用返回的templateId 必填
...
@@ -1097,4 +1192,4 @@ class UtilESignBaoService {
...
@@ -1097,4 +1192,4 @@ class UtilESignBaoService {
}
}
}
}
}
}
module
.
exports
=
UtilESignBaoService
;
module
.
exports
=
UtilESignBaoService
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment