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
bf09eb65
Commit
bf09eb65
authored
Jun 17, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
fae0b44a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
0 deletions
+77
-0
bpo-web/app/base/api/impl/econtractApi.js
+54
-0
bpo-web/app/base/service/impl/econtractSve.js
+23
-0
No files found.
bpo-web/app/base/api/impl/econtractApi.js
View file @
bf09eb65
...
@@ -392,6 +392,60 @@ class EcontractApi {
...
@@ -392,6 +392,60 @@ class EcontractApi {
}
}
}
}
async
sinedUser
(
obj
,
req
)
{
// 验证合法性
let
appId
=
obj
.
appId
;
let
nonceStr
=
obj
.
nonceStr
;
let
idNo
=
obj
.
idNo
;
let
busi
=
await
this
.
ecompanybusiSve
.
findOne
({
appId
:
appId
});
if
(
!
busi
)
{
return
{
code
:
1001003
,
msg
:
"配置信息错误,请联系薪必果人员进行配置"
};
}
let
signArr
=
[];
signArr
.
push
(
"appId="
+
appId
);
signArr
.
push
(
"idNo="
+
idNo
);
signArr
.
push
(
"nonceStr="
+
nonceStr
);
signArr
.
push
(
"key="
+
busi
.
key
);
let
signStr
=
signArr
.
join
(
"&"
)
let
sign
=
md5
(
signStr
).
toUpperCase
();
console
.
log
(
signStr
,
sign
);
if
(
sign
!=
obj
.
sign
)
{
return
{
code
:
1001001
,
msg
:
"签名失败"
};
}
let
params
=
{
etemplate_id
:
busi
.
etemplate_id
,
idNo
:
idNo
.
toUpperCase
(),
};
try
{
let
user
=
await
this
.
econtractSve
.
findSingleSignedUser
(
params
);
let
result
=
{
code
:
0
,
msg
:
"success"
,
data
:
user
};
return
result
;
}
catch
(
e
)
{
let
result
=
{
code
:
500
,
msg
:
"接口异常"
};
console
.
log
(
e
.
stack
);
return
result
;
}
}
async
sinedEcontractStatus
(
obj
,
req
)
{
async
sinedEcontractStatus
(
obj
,
req
)
{
// 验证合法性
// 验证合法性
...
...
bpo-web/app/base/service/impl/econtractSve.js
View file @
bf09eb65
...
@@ -920,6 +920,29 @@ class EcontractService extends ServiceBase {
...
@@ -920,6 +920,29 @@ class EcontractService extends ServiceBase {
return
list
;
return
list
;
}
}
async
findSingleSignedUser
(
params
)
{
let
sql
=
[];
sql
.
push
(
"SELECT t1.id,t1.begin_at as beginDate,t1.end_at as endDate,"
);
sql
.
push
(
"t2.userName AS idName, t2.mobile ,t2.`personsSign` AS idNo, t1.completed_at AS signTime, t2.bankno AS bankNo,"
);
sql
.
push
(
"t3.userId3rd, t3.userCode3rd, t3.branchCode3rd, t1.fileurl AS fileUrl"
);
sql
.
push
(
"FROM c_econtract t1"
);
sql
.
push
(
"INNER JOIN p_user_eaccount t2 ON t1.`usereaccount_id` = t2.`id`"
);
sql
.
push
(
"INNER JOIN p_user t3 ON t2.`user_id` = t3.`id`"
);
sql
.
push
(
"WHERE t1.`etemplate_id` = :etemplate_id AND t1.`eflowstatus` = '2' AND t1.`end_at`>= NOW()"
);
sql
.
push
(
"AND t2.`personsSign` = :idNo"
);
sql
.
push
(
"ORDER BY t1.id ASC LIMIT 1"
);
let
list
=
await
this
.
dao
.
customQuery
(
sql
.
join
(
" "
),
params
);
if
(
!
list
||
list
.
length
==
0
)
{
return
null
;
}
for
(
var
item
of
list
)
{
item
.
signTime
=
await
this
.
formateTime
(
item
.
signTime
);
item
.
beginDate
=
await
this
.
formateTime
(
item
.
beginDate
);
item
.
endDate
=
await
this
.
formateTime
(
item
.
endDate
);
}
return
list
[
0
];
}
async
sinedEcontractStatus
(
params
)
{
async
sinedEcontractStatus
(
params
)
{
...
...
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