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
5f0f84d4
Commit
5f0f84d4
authored
Jan 14, 2020
by
赵庆
Browse files
Options
Browse Files
Download
Plain Diff
gsb
parents
83396dbe
982c4865
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
29 deletions
+54
-29
bpo-web/app/base/api/impl/econtractApi.js
+28
-15
bpo-web/app/base/service/impl/econtractSve.js
+26
-14
No files found.
bpo-web/app/base/api/impl/econtractApi.js
View file @
5f0f84d4
...
...
@@ -514,6 +514,12 @@ class EcontractApi {
var
userMobile
=
obj
.
userMobile
||
""
;
var
nonceStr
=
obj
.
nonceStr
||
""
;
let
exists
=
await
this
.
bankthreelogSve
.
findOne
({
userName
:
userName
,
userIdNo
:
userIdNo
,
userBankNo
:
userBankNo
,
userMobile
:
userMobile
,
});
var
sign
=
obj
.
sign
||
""
;
var
btl
=
await
this
.
bankthreelogSve
.
create
({
appId
:
appId
,
...
...
@@ -560,6 +566,15 @@ class EcontractApi {
mobile
:
userMobile
,
};
if
(
exists
)
{
btl
.
result
=
true
;
btl
.
save
();
return
{
code
:
0
,
msg
:
"success"
};
}
var
tt
=
await
this
.
utilesignbaoSve
.
bankfour
(
bankParams
,
"econtractapi.bankthree"
)
||
{};
// {"code":-110,"message":"手机号格式错误","data":{}}
//1成功,-110提示验证信息有误,-120亲,提供的信息不正确,请验证后再试!
...
...
@@ -1249,6 +1264,7 @@ class EcontractApi {
var
signList
=
[];
var
unSignList
=
[];
var
accountMap
=
{};
var
accountMap2
=
{};
// 4 查签约用户
if
(
templateIds
.
idsO
.
length
>
0
)
{
var
idsOCOunt
=
await
this
.
usereaccountSve
.
getSignAccounts
(
templateIds
.
idsO
,
idNoList
,
idNameList
);
...
...
@@ -1259,32 +1275,29 @@ class EcontractApi {
if
(
templateIds
.
idsT
.
length
>
0
)
{
var
idsTCount
=
await
this
.
usereaccountSve
.
getSignAccounts_dk
(
templateIds
.
idsT
,
idNoList
,
idNameList
);
for
(
var
idT
of
idsTCount
)
{
accountMap
[
idT
.
userName
+
"_"
+
idT
.
personsSign
]
=
1
;
accountMap
2
[
idT
.
userName
+
"_"
+
idT
.
personsSign
]
=
1
;
}
}
// 5 比对用户是否签约
for
(
var
u
of
userList
)
{
if
(
accountMap
[
u
.
idName
+
"_"
+
u
.
idNo
])
{
if
(
accountMap
[
u
.
idName
+
"_"
+
u
.
idNo
]
||
accountMap2
[
u
.
idName
+
"_"
+
u
.
idNo
]
)
{
signList
.
push
(
u
);
}
else
{
unSignList
.
push
(
u
);
}
}
var
hash
=
{};
signList
=
signList
.
reduce
(
function
(
item
,
next
)
{
hash
[
next
.
idNo
]
?
''
:
hash
[
next
.
idNo
]
=
true
&&
item
.
push
(
next
);
return
item
},
[]);
unSignList
=
unSignList
.
reduce
(
function
(
item
,
next
)
{
hash
[
next
.
idNo
]
?
''
:
hash
[
next
.
idNo
]
=
true
&&
item
.
push
(
next
);
return
item
},
[]);
// var hash = {};
// signList = signList.reduce(function(item, next) {
// hash[next.idNo] ? '' : hash[next.idNo] = true && item.push(next);
// return item
// }, []);
//
// unSignList = unSignList.reduce(function(item, next) {
// hash[next.idNo] ? '' : hash[next.idNo] = true && item.push(next);
// return item
// }, []);
return
{
code
:
0
,
msg
:
""
,
...
...
bpo-web/app/base/service/impl/econtractSve.js
View file @
5f0f84d4
...
...
@@ -20,6 +20,9 @@ class EcontractService extends ServiceBase {
this
.
emessageDao
=
system
.
getObject
(
"db.emessageDao"
);
this
.
ecompanybusiDao
=
system
.
getObject
(
"db.ecompanybusiDao"
);
this
.
userDao
=
system
.
getObject
(
"db.userDao"
);
this
.
bankthreelogDao
=
system
.
getObject
(
"db.bankthreelogDao"
);
this
.
esealSve
=
system
.
getObject
(
"service.esealSve"
);
this
.
ejobapplySve
=
system
.
getObject
(
"service.ejobapplySve"
);
...
...
@@ -1289,20 +1292,29 @@ class EcontractService extends ServiceBase {
// e签宝流程
if
(
isNeedCreate
)
{
var
bankthreeParams
=
{
name
:
eaccount
.
userName
,
idno
:
eaccount
.
personsSign
,
cardno
:
eaccount
.
bankno
};
var
threeResult
=
await
this
.
utilesignbaoSve
.
bankthree
(
bankthreeParams
,
"bankinfoAuth"
);
// {"code":-110,"message":"手机号格式错误","data":{}}
//1成功,-110提示验证信息有误,-120亲,提供的信息不正确,请验证后再试!
console
.
log
(
"threeResult-----------------------------"
,
threeResult
);
if
(
!
threeResult
||
threeResult
.
code
==
-
120
)
{
return
this
.
returnjson
(
-
1
,
"银行三要素(姓名、身份证、银行卡号)验证失败"
);
}
if
(
threeResult
.
code
==
-
110
)
{
return
this
.
returnjson
(
-
1
,
"银行三要素验证失败"
);
let
banklog
=
await
this
.
bankthreelogDao
.
findOne
({
userName
:
eaccount
.
userName
,
userIdNo
:
eaccount
.
personsSign
,
userBankNo
:
eaccount
.
bankno
,
result
:
1
,
});
if
(
!
banklog
)
{
var
bankthreeParams
=
{
name
:
eaccount
.
userName
,
idno
:
eaccount
.
personsSign
,
cardno
:
eaccount
.
bankno
};
var
threeResult
=
await
this
.
utilesignbaoSve
.
bankthree
(
bankthreeParams
,
"bankinfoAuth"
);
// {"code":-110,"message":"手机号格式错误","data":{}}
//1成功,-110提示验证信息有误,-120亲,提供的信息不正确,请验证后再试!
console
.
log
(
"threeResult-----------------------------"
,
threeResult
);
if
(
!
threeResult
||
threeResult
.
code
==
-
120
)
{
return
this
.
returnjson
(
-
1
,
"银行三要素(姓名、身份证、银行卡号)验证失败"
);
}
if
(
threeResult
.
code
==
-
110
)
{
return
this
.
returnjson
(
-
1
,
"银行三要素验证失败"
);
}
}
var
uidStr
=
await
this
.
getUidStr
(
8
,
36
);
...
...
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