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
61ebcf44
Commit
61ebcf44
authored
Feb 28, 2020
by
zhaoxiqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
d05f3668
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
16 deletions
+30
-16
bpo-web/app/base/api/impl/yzcontractApi.js
+1
-2
bpo-web/app/base/db/models/entcontract.js
+4
-4
bpo-web/app/base/service/impl/entcontractSve.js
+25
-10
No files found.
bpo-web/app/base/api/impl/yzcontractApi.js
View file @
61ebcf44
...
...
@@ -19,7 +19,7 @@ class YZContractApi {
async
syncSignedFile
()
{
this
.
entcontractSve
.
downloadCompleteUrl
();
return
"start success"
return
"start success"
;
}
async
merchantSign
(
pobj
)
{
...
...
@@ -176,7 +176,6 @@ class YZContractApi {
if
(
param
.
sign
!=
sign
)
{
return
this
.
returnjson
(
1001001
,
"签名错误"
);
}
try
{
var
result
=
await
this
.
econtractSve
.
autoSignNoBank
(
param
);
return
result
;
...
...
bpo-web/app/base/db/models/entcontract.js
View file @
61ebcf44
...
...
@@ -33,10 +33,10 @@ module.exports = (db, DataTypes) => {
begin_at
:
DataTypes
.
DATE
,
end_at
:
DataTypes
.
DATE
,
isPush
:
{
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
true
},
//
isPush: {
//
type: DataTypes.BOOLEAN,
//
defaultValue: true
//
},
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
...
...
bpo-web/app/base/service/impl/entcontractSve.js
View file @
61ebcf44
...
...
@@ -556,8 +556,6 @@ class EntcontractService extends ServiceBase {
},
}
return
res
;
}
// e签宝流程
...
...
@@ -708,6 +706,7 @@ class EntcontractService extends ServiceBase {
}
if
(
!
contract
.
fileurl
)
{
await
this
.
syncYzSign
(
2134
);
// 请求文件地址
let
fileRs
=
await
this
.
utilesignbaoSve
.
downloadUserContractFile
(
contract
.
eflowid
,
"econtractSve"
);
if
(
fileRs
.
code
==
1
&&
fileRs
.
data
.
selfossUrl
)
{
...
...
@@ -753,16 +752,15 @@ class EntcontractService extends ServiceBase {
if
(
!
account
)
{
return
null
;
}
// 查用户
var
user
=
await
this
.
userDao
.
findById
(
account
.
user_id
);
// 查商户签约返回值
let
signInfo
=
this
.
yzmerchantsignedDao
.
findOne
({
entcontract_id
:
contractId
});
let
signInfo
=
await
this
.
yzmerchantsignedDao
.
findOne
({
entcontract_id
:
contractId
});
if
(
!
signInfo
)
{
return
null
;
}
// 获取yz配置
let
conf
=
this
.
getAppConfig
();
let
conf
=
await
this
.
getAppConfig
();
// 推送数据
var
param
=
{
"appId"
:
conf
.
appId
,
// appId
...
...
@@ -771,17 +769,18 @@ class EntcontractService extends ServiceBase {
"fileUrl"
:
contract
.
fileurl
,
// 签约合同pdf文件
"idName"
:
account
.
userName
,
// 代理人姓名
"idNo"
:
account
.
personsSign
,
// 代理人身份证
"mobile"
:
account
.
mobile
,
//代理人手机号
"nonceStr"
:
await
this
.
getUidStr
(
16
),
// 随机码
"beginDate"
:
await
this
.
formateTime
(
contract
.
begin_at
),
// 合同开始时间
"endDate"
:
await
this
.
formateTime
(
contract
.
end_at
),
// 合同结束时间
}
}
;
// 签名
var
signArr
=
[];
signArr
.
push
(
"appId="
+
param
.
appId
);
// ...补全签名信息
signArr
.
push
(
"nonceStr="
+
param
.
nonceStr
);
signArr
.
push
(
"key="
+
busi
.
key
);
signArr
.
push
(
"key="
+
this
.
YZKEY
);
param
.
sign
=
md5
(
signArr
.
join
(
"&"
)).
toUpperCase
();
console
.
log
(
JSON
.
stringify
(
param
));
var
rs
=
""
;
...
...
@@ -802,6 +801,22 @@ class EntcontractService extends ServiceBase {
}
}
async
formateTime
(
inputTime
)
{
var
date
=
new
Date
(
inputTime
);
var
y
=
date
.
getFullYear
();
var
m
=
date
.
getMonth
()
+
1
;
m
=
m
<
10
?
(
'0'
+
m
)
:
m
;
var
d
=
date
.
getDate
();
d
=
d
<
10
?
(
'0'
+
d
)
:
d
;
var
h
=
date
.
getHours
();
h
=
h
<
10
?
(
'0'
+
h
)
:
h
;
var
minute
=
date
.
getMinutes
();
var
second
=
date
.
getSeconds
();
minute
=
minute
<
10
?
(
'0'
+
minute
)
:
minute
;
second
=
second
<
10
?
(
'0'
+
second
)
:
second
;
return
y
+
'-'
+
m
+
'-'
+
d
+
' '
+
h
+
':'
+
minute
+
':'
+
second
;
}
}
module
.
exports
=
EntcontractService
;
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