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
91c094b5
Commit
91c094b5
authored
Dec 13, 2019
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
071bcaa5
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
82 additions
and
17 deletions
+82
-17
.gitignore
+3
-0
bpo-admin/app/base/api/impl/testApi.js
+56
-7
bpo-admin/app/base/controller/impl/dkcompanyCtl.js
+2
-1
bpo-admin/app/base/controller/impl/dkcontractCtl.js
+2
-1
bpo-admin/app/base/controller/impl/econtractCtl.js
+2
-1
bpo-admin/app/base/service/impl/econtractSve.js
+2
-1
bpo-admin/app/config/settings.js
+15
-6
No files found.
.gitignore
0 → 100644
View file @
91c094b5
bpo-admin/node_modules/*
.idea/*
\ No newline at end of file
bpo-admin/app/base/api/impl/testApi.js
View file @
91c094b5
...
...
@@ -21,18 +21,45 @@ class TestApi {
await
this
.
dkcontractSve
.
downloadCompleteUrl
(
1000
);
}
async
createPerson
(
obj
)
{
//创建企业账号
var
params
=
{
thirdId
:
await
this
.
getUidStr
(
28
),
name
:
obj
.
userName
||
'王昆'
,
idNo
:
obj
.
idNo
||
"222403198301071778"
,
idType
:
obj
.
idType
||
19
,
mobile
:
obj
.
mobile
||
"18600440811"
,
};
var
tt
=
await
this
.
utilesignbaoSve
.
createAccountId
(
params
,
"testApi"
);
tt
.
aaa
=
"aaa"
;
console
.
log
(
tt
);
return
tt
;
}
async
creatCompanyAccountId
(
obj
)
{
//创建企业账号
// var params = {
// thirdId: obj.thirdId || "owD7y5AqMWjDSru10gDacEeA9Q5g", //企业用户在对接方的账号标识字段-该字段来唯一标识一个企业用户
// creatorId: obj.creatorId || "fc7d596a767b47a4874490966c7641c7", //企业创建人在 e签宝的个人账号唯一标识(宋毅accountId)
// name: obj.name || "汉唐信通(北京)科技有限公司", //企业名称
// organCode: obj.organCode || "911101057889696760", //企业证照号(企业统一社会信用代码)
// organType: obj.organType || 11, //企业账号证照类型--11为企业统一社会信用代码
// legalName: obj.legalName || "宋毅", //企业法人姓名
// legalIdNo: obj.legalIdNo || "341221198504218256", //企业法人身份证号
// legalIdType: 19, //个人账号证件类型--19为中国大陆居民身份证
// email: obj.email || "lisa@gongsibao.com" //企业邮箱
// };
var
params
=
{
thirdId
:
obj
.
thirdId
||
"owD7y5AqMWjDSru10gDacEeA9Q5g"
,
//企业用户在对接方的账号标识字段-该字段来唯一标识一个企业用户
creatorId
:
obj
.
creatorId
||
"
fc7d596a767b47a4874490966c7641c7
"
,
//企业创建人在 e签宝的个人账号唯一标识(宋毅accountId)
name
:
obj
.
name
||
"汉唐信通(北京)
咨询股份
有限公司"
,
//企业名称
organCode
:
obj
.
organCode
||
"9111010
57889696760
"
,
//企业证照号(企业统一社会信用代码)
thirdId
:
obj
.
thirdId
||
await
this
.
getUidStr
(
28
)
,
//企业用户在对接方的账号标识字段-该字段来唯一标识一个企业用户
creatorId
:
obj
.
creatorId
||
"
050da411512e4fc2bae921862ac938fc
"
,
//企业创建人在 e签宝的个人账号唯一标识(宋毅accountId)
name
:
obj
.
name
||
"汉唐信通(北京)
科技
有限公司"
,
//企业名称
organCode
:
obj
.
organCode
||
"9111010
83066224948
"
,
//企业证照号(企业统一社会信用代码)
organType
:
obj
.
organType
||
11
,
//企业账号证照类型--11为企业统一社会信用代码
legalName
:
obj
.
legalName
||
"
宋毅
"
,
//企业法人姓名
legalIdNo
:
obj
.
legalIdNo
||
"
341221198504218256
"
,
//企业法人身份证号
legalName
:
obj
.
legalName
||
"
李丽
"
,
//企业法人姓名
legalIdNo
:
obj
.
legalIdNo
||
"
620105197605160029
"
,
//企业法人身份证号
legalIdType
:
19
,
//个人账号证件类型--19为中国大陆居民身份证
email
:
obj
.
email
||
"li
sa
@gongsibao.com"
//企业邮箱
email
:
obj
.
email
||
"li
li
@gongsibao.com"
//企业邮箱
};
console
.
log
(
params
);
var
tt
=
await
this
.
utilesignbaoSve
.
creatCompanyAccountId
(
params
,
"testApi"
);
tt
.
aaa
=
"aaa"
;
console
.
log
(
tt
);
...
...
@@ -75,5 +102,26 @@ class TestApi {
}
}
}
async
getUidStr
(
len
,
radix
)
{
var
chars
=
'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
.
split
(
''
);
var
uuid
=
[],
i
;
radix
=
radix
||
chars
.
length
;
if
(
len
)
{
for
(
i
=
0
;
i
<
len
;
i
++
)
uuid
[
i
]
=
chars
[
0
|
Math
.
random
()
*
radix
];
}
else
{
var
r
;
uuid
[
8
]
=
uuid
[
13
]
=
uuid
[
18
]
=
uuid
[
23
]
=
'-'
;
uuid
[
14
]
=
'4'
;
for
(
i
=
0
;
i
<
36
;
i
++
)
{
if
(
!
uuid
[
i
])
{
r
=
0
|
Math
.
random
()
*
16
;
uuid
[
i
]
=
chars
[(
i
==
19
)
?
(
r
&
0x3
)
|
0x8
:
r
];
}
}
}
return
uuid
.
join
(
''
);
}
}
module
.
exports
=
TestApi
;
\ No newline at end of file
bpo-admin/app/base/controller/impl/dkcompanyCtl.js
View file @
91c094b5
...
...
@@ -47,7 +47,8 @@ class DKcompanyCtl extends CtlBase {
await
dkcompany
.
save
();
}
else
{
// var accountId = "740b19e0799a4d7abacfa1a31fb72b1e"; // 测试
var
accountId
=
"f50d8f8cdd8d4bcda6b1aaad1d4b14bf"
;
// 生产
// var accountId = "f50d8f8cdd8d4bcda6b1aaad1d4b14bf"; // 生产
var
accountId
=
settings
.
apiconfig
.
companyAccountId
();
// 生产
var
aliasName
=
dkcompany
.
sealName
+
"-alias"
;
rs
=
await
this
.
utilesignbaoSve
.
creatEntSignet
(
accountId
,
aliasName
,
dkcompany
.
sealName
,
""
,
""
,
"dkcompanyCtl"
);
...
...
bpo-admin/app/base/controller/impl/dkcontractCtl.js
View file @
91c094b5
...
...
@@ -267,7 +267,8 @@ class DKcontractCtl extends CtlBase {
var
sealId
=
""
;
if
(
!
eseal
)
{
var
rs
=
await
this
.
utilesignbaoSve
.
creatEntSignet
(
"f50d8f8cdd8d4bcda6b1aaad1d4b14bf"
,
nameA
+
"alias"
,
nameA
,
""
,
""
,
"econtractCtl"
);
// var rs = await this.utilesignbaoSve.creatEntSignet("f50d8f8cdd8d4bcda6b1aaad1d4b14bf", nameA + "alias", nameA, "", "", "econtractCtl");
var
rs
=
await
this
.
utilesignbaoSve
.
creatEntSignet
(
settings
.
apiconfig
.
companyAccountId
(),
nameA
+
"alias"
,
nameA
,
""
,
""
,
"econtractCtl"
);
if
(
rs
&&
rs
.
code
==
1
)
{
sealId
=
rs
.
data
.
sealId
;
await
this
.
esealSve
.
create
({
...
...
bpo-admin/app/base/controller/impl/econtractCtl.js
View file @
91c094b5
...
...
@@ -299,7 +299,8 @@ class EcontractCtl extends CtlBase {
var
sealId
=
""
;
if
(
!
eseal
)
{
var
rs
=
await
this
.
utilesignbaoSve
.
creatEntSignet
(
"f50d8f8cdd8d4bcda6b1aaad1d4b14bf"
,
nameA
+
"alias"
,
nameA
,
""
,
""
,
"econtractCtl"
);
// var rs = await this.utilesignbaoSve.creatEntSignet("f50d8f8cdd8d4bcda6b1aaad1d4b14bf", nameA + "alias", nameA, "", "", "econtractCtl");
var
rs
=
await
this
.
utilesignbaoSve
.
creatEntSignet
(
settings
.
apiconfig
.
companyAccountId
(),
nameA
+
"alias"
,
nameA
,
""
,
""
,
"econtractCtl"
);
if
(
rs
&&
rs
.
code
==
1
)
{
sealId
=
rs
.
data
.
sealId
;
await
this
.
esealSve
.
create
({
...
...
bpo-admin/app/base/service/impl/econtractSve.js
View file @
91c094b5
...
...
@@ -215,7 +215,8 @@ class EcontractService extends ServiceBase {
});
// TODO 生产环境需要打开
if
(
!
eseal
)
{
var
rs
=
await
this
.
utilesignbaoSve
.
creatEntSignet
(
"f50d8f8cdd8d4bcda6b1aaad1d4b14bf"
,
etemplate
.
nameA
+
"alias"
,
etemplate
.
nameA
,
""
,
""
,
"econtractSve"
);
// var rs = await this.utilesignbaoSve.creatEntSignet("f50d8f8cdd8d4bcda6b1aaad1d4b14bf", etemplate.nameA + "alias", etemplate.nameA, "", "", "econtractSve");
var
rs
=
await
this
.
utilesignbaoSve
.
creatEntSignet
(
settings
.
apiconfig
.
companyAccountId
(),
etemplate
.
nameA
+
"alias"
,
etemplate
.
nameA
,
""
,
""
,
"econtractSve"
);
if
(
rs
&&
rs
.
code
==
1
)
{
sealId
=
rs
.
data
.
sealId
;
await
this
.
esealSve
.
create
({
...
...
bpo-admin/app/config/settings.js
View file @
91c094b5
...
...
@@ -48,7 +48,8 @@ var settings = {
//e签宝接口Url
eSignBaoUrl
:
function
()
{
if
(
settings
.
env
==
"dev"
)
{
return
"https://smlo.tsign.cn/opentreaty-service"
;
// return "https://smlo.tsign.cn/opentreaty-service";
return
"https://o.tsign.cn/opentreaty-service"
;
}
else
{
return
"https://o.tsign.cn/opentreaty-service"
;
}
...
...
@@ -56,25 +57,33 @@ var settings = {
//e签宝银行验证接口Url
eSignBaoBankVerifyUrl
:
function
()
{
if
(
settings
.
env
==
"dev"
)
{
return
"https://smlo.tsign.cn/openrealname-service"
;
// return "https://smlo.tsign.cn/openrealname-service";
return
"https://o.tsign.cn/openrealname-service"
;
}
else
{
return
"https://o.tsign.cn/openrealname-service"
;
}
},
companyAccountId
:
function
()
{
return
"5c25eb4ee3b448da90babec3ce8d1144"
;
},
//e签宝appId
eSignBaoAppId
:
function
()
{
if
(
settings
.
env
==
"dev"
)
{
return
"4438757581"
;
// return "4438757581";
return
"5111588557"
;
}
else
{
return
"5111566617"
// return "5111566617"
return
"5111588557"
}
},
//e签宝appKey
eSignBaoAppKey
:
function
()
{
if
(
settings
.
env
==
"dev"
)
{
return
"0d798cdf01ecb31bf9949f319f8d77db"
;
// return "0d798cdf01ecb31bf9949f319f8d77db";
return
"1595787e8d5b7d19f7b6798f16f41fc2"
;
}
else
{
return
"ea386dfd9063b3669b38b78ed36792cc"
// return "ea386dfd9063b3669b38b78ed36792cc"
return
"1595787e8d5b7d19f7b6798f16f41fc2"
}
},
},
...
...
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