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
ea4cbcdc
Commit
ea4cbcdc
authored
Feb 28, 2020
by
zhaoxiqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
3ae8d23b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
127 additions
and
13 deletions
+127
-13
bpo-web/app/base/api/impl/entcontractApi.js
+1
-2
bpo-web/app/base/api/impl/yzcontractApi.js
+73
-4
bpo-web/app/base/service/impl/econtractSve.js
+33
-2
bpo-web/app/front/entry/public/aggreement_yz_merchant.html
+20
-5
No files found.
bpo-web/app/base/api/impl/entcontractApi.js
View file @
ea4cbcdc
...
...
@@ -275,4 +275,4 @@ class EntcontractApi {
}
module
.
exports
=
EntcontractApi
;
\ No newline at end of file
module
.
exports
=
EntcontractApi
;
bpo-web/app/base/api/impl/yzcontractApi.js
View file @
ea4cbcdc
...
...
@@ -126,7 +126,7 @@ class YZContractApi {
}
if
(
!
param
.
idNo
)
{
return
this
.
returnjson
(
-
1
,
"请提供该用户身份证号"
)
}
}
let
busiIds
=
await
this
.
etemplatebusiSve
.
busiIdsByTemplateId
(
param
.
ecid
);
let
num
=
await
this
.
esettleSve
.
isValidAge
(
busiIds
);
...
...
@@ -158,7 +158,7 @@ class YZContractApi {
if
(
!
busi
||
!
busi
.
key
)
{
return
this
.
returnjson
(
1001003
,
"配置信息错误,请联系薪必果人员进行配置"
);
}
// 签名
var
signArr
=
[];
var
keys
=
Object
.
keys
(
param
).
sort
();
...
...
@@ -255,6 +255,76 @@ class YZContractApi {
}
}
async
sinedMerchant3rd
(
obj
,
req
)
{
// 验证合法性
var
appId
=
obj
.
appId
;
var
nonceStr
=
obj
.
nonceStr
;
var
idNo
=
obj
.
idNo
;
var
startId
=
obj
.
startId
||
0
;
var
merchantId
=
obj
.
merchantId
||
""
;
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
(
"merchantId="
+
merchantId
);
signArr
.
push
(
"key="
+
busi
.
key
);
var
sign
=
md5
(
signArr
.
join
(
"&"
)).
toUpperCase
();
console
.
log
(
sign
);
if
(
sign
!=
obj
.
sign
)
{
return
{
code
:
1001001
,
msg
:
"签名失败"
};
}
var
params
=
{
ecompanyId
:
busi
.
ecompany_id
,
startId
:
startId
,
idNo
:
idNo
,
pageSize
:
pageSize
,
userId3rd
:
merchantId
,
};
try
{
var
userList
=
await
this
.
econtractSve
.
findSignedMerchant4Push
(
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
)
{
return
""
;
...
...
@@ -273,4 +343,4 @@ class YZContractApi {
}
module
.
exports
=
YZContractApi
;
\ No newline at end of file
module
.
exports
=
YZContractApi
;
bpo-web/app/base/service/impl/econtractSve.js
View file @
ea4cbcdc
...
...
@@ -903,6 +903,38 @@ class EcontractService extends ServiceBase {
return
list
;
}
async
findSignedMerchant4Push
(
params
)
{
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
setUser
(
list
)
{
if
(
!
list
||
list
.
length
==
0
)
{
return
;
...
...
@@ -1838,4 +1870,4 @@ class EcontractService extends ServiceBase {
}
}
module
.
exports
=
EcontractService
;
\ No newline at end of file
module
.
exports
=
EcontractService
;
bpo-web/app/front/entry/public/aggreement_yz_merchant.html
View file @
ea4cbcdc
...
...
@@ -80,20 +80,35 @@
<p
style=
"line-height:200%"
>
<span
style=
";line-height:200%;font-family:宋体"
>
</span>
</p>
<!-- <p style="line-height:200%">-->
<!-- <span style=";line-height:200%;font-family:宋体">甲方: <span id="merchant">请传入merchant=encodeURI(encodeURI('商户名'))</span></span>-->
<!-- </p>-->
<!-- <p style="line-height:200%">-->
<!-- <span style=";line-height:200%;font-family:宋体">地址: <span id="addr">请传入addr=encodeURI(encodeURI('地址'))</span>-->
<!-- </p>-->
<!-- <p style="line-height:200%">-->
<!-- <span style=";line-height:200%;font-family:宋体">法定代表人: <span id="legal">请传入legal=encodeURI(encodeURI('杨庆菊'))</span></span>-->
<!-- </p>-->
<!-- <p style="line-height:200%">-->
<!-- <span style=";line-height:200%;font-family:宋体">代理人: <span id="proxy">请传入proxy=encodeURI(encodeURI('代理人'))</span></span>-->
<!-- </p>-->
<!-- <p style="line-height:200%">-->
<!-- <span style=";line-height:200%;font-family:宋体">代理人电话: <span id="proxymobile">请传入proxymobile=encodeURI(encodeURI('代理人电话'))</span></span>-->
<!-- </p>-->
<p
style=
"line-height:200%"
>
<span
style=
";line-height:200%;font-family:宋体"
>
甲方:
<span
id=
"merchant"
>
请传入merchant=encodeURI(encodeURI(
'
商户名
'
))
</span>
</span>
<span
style=
";line-height:200%;font-family:宋体"
>
甲方:
</span>
</p>
<p
style=
"line-height:200%"
>
<span
style=
";line-height:200%;font-family:宋体"
>
地址:
<span
id=
"addr"
>
请传入addr=encodeURI(encodeURI(
'
地址
'
))
</span>
<span
style=
";line-height:200%;font-family:宋体"
>
地址:
</span>
</p>
<p
style=
"line-height:200%"
>
<span
style=
";line-height:200%;font-family:宋体"
>
法定代表人:
<span
id=
"legal"
>
请传入legal=encodeURI(encodeURI(
'
杨庆菊
'
))
</span>
</span>
<span
style=
";line-height:200%;font-family:宋体"
>
法定代表人:
</span>
</p>
<p
style=
"line-height:200%"
>
<span
style=
";line-height:200%;font-family:宋体"
>
代理人:
<span
id=
"proxy"
>
请传入proxy=encodeURI(encodeURI(
'
代理人
'
))
</span>
</span>
<span
style=
";line-height:200%;font-family:宋体"
>
代理人:
</span>
</p>
<p
style=
"line-height:200%"
>
<span
style=
";line-height:200%;font-family:宋体"
>
代理人电话:
<span
id=
"proxymobile"
>
请传入proxymobile=encodeURI(encodeURI(
'
代理人电话
'
))
</span>
</span>
<span
style=
";line-height:200%;font-family:宋体"
>
代理人电话:
</span>
</p>
<p
style=
"text-align:center"
>
<span
style=
"font-size:24px;line-height:150%"
>
</span>
...
...
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