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
9f8fe75f
Commit
9f8fe75f
authored
Dec 27, 2019
by
赵庆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
1f929d3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
113 additions
and
0 deletions
+113
-0
bpo-web/app/base/api/impl/entcontractApi.js
+69
-0
bpo-web/app/base/service/impl/entcontractSve.js
+44
-0
No files found.
bpo-web/app/base/api/impl/entcontractApi.js
View file @
9f8fe75f
...
...
@@ -77,6 +77,75 @@ class EntcontractApi {
}
}
async
sinedUsers3rd
(
obj
,
req
)
{
// 验证合法性
var
appId
=
obj
.
appId
;
var
nonceStr
=
obj
.
nonceStr
;
var
idNo
=
obj
.
idNo
;
var
startId
=
obj
.
startId
||
0
;
var
userId
=
obj
.
userId
||
""
;
var
pageSize
=
20
;
var
busi
=
await
this
.
ecompanybusiSve
.
findOne
({
appId
:
appId
});
if
(
!
busi
)
{
return
{
code
:
1001003
,
msg
:
"配置信息错误,请联系薪必果人员进行配置"
};
}
var
signArr
=
[];
signArr
.
push
(
"appId="
+
appId
);
signArr
.
push
(
"idNo="
+
idNo
);
signArr
.
push
(
"nonceStr="
+
nonceStr
);
signArr
.
push
(
"startId="
+
startId
);
signArr
.
push
(
"userId="
+
userId
);
signArr
.
push
(
"key="
+
busi
.
key
);
var
sign
=
md5
(
signArr
.
join
(
"&"
)).
toUpperCase
();
if
(
sign
!=
obj
.
sign
)
{
return
{
code
:
1001001
,
msg
:
"签名失败"
};
}
var
params
=
{
ecompanyId
:
busi
.
ecompany_id
,
startId
:
startId
,
idNo
:
idNo
,
pageSize
:
pageSize
,
userId3rd
:
userId
,
};
try
{
var
userList
=
await
this
.
entcontractSve
.
findSignedUses4Push
(
params
);
var
result
=
{
code
:
0
,
msg
:
"success"
,
};
result
.
data
=
userList
;
return
result
;
}
catch
(
e
)
{
var
result
=
{
code
:
500
,
msg
:
"接口异常"
};
console
.
log
(
e
.
stack
);
//日志记录
logCtl
.
error
({
optitle
:
"校验是否签约error"
,
op
:
"api/econtractApi/validContract"
,
content
:
e
.
stack
,
clientIp
:
req
.
clientIp
});
return
result
;
}
}
trim
(
o
)
{
if
(
!
o
)
{
...
...
bpo-web/app/base/service/impl/entcontractSve.js
View file @
9f8fe75f
...
...
@@ -291,6 +291,50 @@ class EntcontractService extends ServiceBase {
}
}
async
findSignedUses4Push
(
params
)
{
// var params = {
// ecompanyId: busi.ecompany_id,
// startId: startId,
// idNo: idNo,
// pageSize: pageSize,
// userId3rd: userId,
// userCode3rd: userCode,
// branchCode3rd: branchCode,
// };
var
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.id > :startId AND t1.`ecompany_id` = :ecompanyId AND t1.`eflowstatus` = '2' AND t1.`end_at`>= NOW()"
);
if
(
params
.
idNo
)
{
sql
.
push
(
"AND t2.`personsSign` = :idNo"
);
}
if
(
params
.
userId3rd
)
{
sql
.
push
(
"AND t3.`userId3rd` = :userId3rd"
);
}
if
(
params
.
userCode3rd
)
{
sql
.
push
(
"AND t3.`userCode3rd` = :userCode3rd"
);
}
if
(
params
.
branchCode3rd
)
{
sql
.
push
(
"AND t3.`branchCode3rd` = :branchCode3rd"
);
}
sql
.
push
(
"ORDER BY t1.id ASC LIMIT :pageSize "
);
var
list
=
await
this
.
dao
.
customQuery
(
sql
.
join
(
" "
),
params
);
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
;
}
async
getUidStr
(
len
,
radix
)
{
var
chars
=
'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
.
split
(
''
);
var
uuid
=
[],
...
...
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