Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
方斌
51business
Commits
accec00d
Commit
accec00d
authored
Oct 12, 2019
by
李尚科
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
callrisk fix
parent
b3295a84
Pipeline
#14782
passed with stage
in 36 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
credit_callrisk_report.js
app/model/prometheus/credit_callrisk_report.js
+8
-8
callrisk.js
app/service/credit/callrisk.js
+4
-2
No files found.
app/model/prometheus/credit_callrisk_report.js
View file @
accec00d
...
...
@@ -64,14 +64,14 @@ module.exports = app => {
// return date ? moment(date).format('YYYY-MM-DD HH:mm:ss') : undefined;
// },
// },
//
created_at: {
//
type: DATE,
//
allowNull: false,
//
get() {
//
const date = this.getDataValue('created_at');
//
return date ? moment(date).format('YYYY-MM-DD HH:mm:ss') : undefined;
//
},
//
}
created_at
:
{
type
:
DATE
,
allowNull
:
false
,
get
()
{
const
date
=
this
.
getDataValue
(
'created_at'
);
return
date
?
moment
(
date
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
undefined
;
},
}
},
{
timestamps
:
false
,
tableName
:
'credit_callrisk_report'
,
...
...
app/service/credit/callrisk.js
View file @
accec00d
...
...
@@ -87,9 +87,11 @@ class CallriskService extends Service {
const
days
=
net_time
%
30
;
basics
.
net_time
=
months
+
'月'
+
(
days
?
days
+
'天'
:
''
);
basics
.
mobile
=
basics
.
mobile
.
substring
(
0
,
3
)
+
'****'
+
basics
.
mobile
.
substring
(
7
,
11
);
//手机号(只展示前三位和后四位)
basics
.
dataValues
.
report_time
=
moment
(
basics
.
created_at
).
format
(
'YYYY-MM-DD'
);
delete
basics
.
created_at
;
const
diff
=
function
(
a
,
b
)
{
return
b
.
call_count
-
a
.
call_count
};
const
city_active
=
R
.
sort
(
diff
)(
call_active
.
city_active
).
slice
(
0
,
3
);
console
.
info
(
city_active
);
call_active
.
city_active
=
JSON
.
stringify
(
city_active
);
const
report_valid
=
await
ctx
.
service
.
credit
.
order
.
getReportValid
(
'callrisk'
,
report_id
);
let
report
=
{
...
...
@@ -519,7 +521,7 @@ class CallriskService extends Service {
illegal_text
=
'高'
;
advantage_text
=
'不利于'
;
}
const
call_type_msg
=
`解读:近6个月,贷款类通话累计为【
${
loan_call_count
}
次】,金融业务通话【
${
loan_call_status
}
】您在短期内可能的申请贷款次数较正常,有利于贷款机构对您的评估;近6个月来,您的疑似风险通话次数较【
${
risk_call_status
}
】,您与违法违规事件关联度较【
${
illegal_text
}
】,【
${
advantage_text
}
】贷款机构对您的评估`
;
const
call_type_msg
=
`解读:近6个月,贷款类通话累计为【
${
loan_call_count
}
次】,金融业务通话【
${
loan_call_status
}
】
,
您在短期内可能的申请贷款次数较正常,有利于贷款机构对您的评估;近6个月来,您的疑似风险通话次数较【
${
risk_call_status
}
】,您与违法违规事件关联度较【
${
illegal_text
}
】,【
${
advantage_text
}
】贷款机构对您的评估`
;
//通话活跃度解析
...
...
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