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
a7a3ee2a
Commit
a7a3ee2a
authored
Sep 27, 2019
by
李尚科
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://t-git.51gjj.com/fangbin/51business
parents
1b38b17d
9394c4d4
Pipeline
#14351
passed with stage
in 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
14 deletions
+29
-14
blacklist.js
app/service/credit/blacklist.js
+29
-14
No files found.
app/service/credit/blacklist.js
View file @
a7a3ee2a
...
@@ -97,15 +97,15 @@ class BlacklistService extends Service {
...
@@ -97,15 +97,15 @@ class BlacklistService extends Service {
credit_count_1month
:
reportData
.
credit_count_1month
,
//近1月放款笔数
credit_count_1month
:
reportData
.
credit_count_1month
,
//近1月放款笔数
credit_count_3month
:
reportData
.
credit_count_3month
,
//近3月放款笔数
credit_count_3month
:
reportData
.
credit_count_3month
,
//近3月放款笔数
credit_count_6month
:
reportData
.
credit_count_6month
,
//近6月放款笔数
credit_count_6month
:
reportData
.
credit_count_6month
,
//近6月放款笔数
credit_amount_1month
:
reportData
.
credit_amount_1month
,
//近1月放款金额
credit_amount_1month
:
this
.
dealSection
(
reportData
.
credit_amount_1month
)
,
//近1月放款金额
credit_amount_3month
:
reportData
.
credit_amount_3month
,
//近3月放款金额
credit_amount_3month
:
this
.
dealSection
(
reportData
.
credit_amount_3month
)
,
//近3月放款金额
credit_amount_6month
:
reportData
.
credit_amount_6month
,
//近6月放款金额
credit_amount_6month
:
this
.
dealSection
(
reportData
.
credit_amount_6month
)
,
//近6月放款金额
credit_closed_count_1month
:
reportData
.
credit_closed_count_1month
,
//近1月已结清放款笔数
credit_closed_count_1month
:
reportData
.
credit_closed_count_1month
,
//近1月已结清放款笔数
credit_closed_count_3month
:
reportData
.
credit_closed_count_3month
,
//近3月已结清放款笔数
credit_closed_count_3month
:
reportData
.
credit_closed_count_3month
,
//近3月已结清放款笔数
credit_closed_count_6month
:
reportData
.
credit_closed_count_6month
,
//近6月已结清放款笔数
credit_closed_count_6month
:
reportData
.
credit_closed_count_6month
,
//近6月已结清放款笔数
credit_closed_amount_1month
:
reportData
.
credit_closed_amount_1month
,
//近1月已结清放款金额
credit_closed_amount_1month
:
this
.
dealSection
(
reportData
.
credit_closed_amount_1month
)
,
//近1月已结清放款金额
credit_closed_amount_3month
:
reportData
.
credit_closed_amount_3month
,
//近3月已结清放款金额
credit_closed_amount_3month
:
this
.
dealSection
(
reportData
.
credit_closed_amount_3month
)
,
//近3月已结清放款金额
credit_closed_amount_6month
:
reportData
.
credit_closed_amount_6month
,
//近6月已结清放款金额
credit_closed_amount_6month
:
this
.
dealSection
(
reportData
.
credit_closed_amount_6month
)
,
//近6月已结清放款金额
consume_credit_count_1month
:
reportData
.
consume_credit_count_1month
,
//近1月消金机构放款笔数
consume_credit_count_1month
:
reportData
.
consume_credit_count_1month
,
//近1月消金机构放款笔数
consume_credit_count_3month
:
reportData
.
consume_credit_count_3month
,
//近3月消金机构放款笔数
consume_credit_count_3month
:
reportData
.
consume_credit_count_3month
,
//近3月消金机构放款笔数
consume_credit_count_6month
:
reportData
.
consume_credit_count_6month
,
//近6月消金机构放款笔数
consume_credit_count_6month
:
reportData
.
consume_credit_count_6month
,
//近6月消金机构放款笔数
...
@@ -269,15 +269,8 @@ class BlacklistService extends Service {
...
@@ -269,15 +269,8 @@ class BlacklistService extends Service {
}
else
if
(
overdueInfo
[
i
].
overdue_amount
===
'>1000000'
)
{
}
else
if
(
overdueInfo
[
i
].
overdue_amount
===
'>1000000'
)
{
amount
=
'100万以上'
amount
=
'100万以上'
}
else
{
}
else
{
let
amountLen
=
overdueInfo
[
i
].
overdue_amount
.
length
;
amount
=
await
this
.
dealSection
(
overdueInfo
[
i
].
overdue_amount
);
let
amountArr
=
overdueInfo
[
i
].
overdue_amount
.
substring
(
1
,
amountLen
-
1
).
split
(
','
);
if
(
amountArr
[
0
]
>
1000
)
{
amount
=
(
Number
(
amountArr
[
0
])
/
10000
)
+
'-'
+
(
Number
(
amountArr
[
1
])
/
10000
)
+
'万'
;
}
else
{
amount
=
Number
(
amountArr
[
0
])
+
'-'
+
Number
(
amountArr
[
1
]);
}
}
}
let
timeLen
=
overdueInfo
[
i
].
overdue_time
.
length
;
let
timeLen
=
overdueInfo
[
i
].
overdue_time
.
length
;
let
temp
=
{
let
temp
=
{
overdue_date
:
overdueInfo
[
i
].
overdue_date
,
overdue_date
:
overdueInfo
[
i
].
overdue_date
,
...
@@ -290,6 +283,28 @@ class BlacklistService extends Service {
...
@@ -290,6 +283,28 @@ class BlacklistService extends Service {
return
ret
;
return
ret
;
}
}
/**
* 处理类似(3000,50000]这样的区间的数字
* @param {*} section
*/
async
dealSection
(
section
)
{
const
{
ctx
}
=
this
;
let
firstLetter
=
section
.
substring
(
0
,
1
);
if
(
!
[
'('
,
'['
].
includes
(
firstLetter
))
{
return
section
;
}
let
len
=
section
.
length
;
let
arr
=
section
.
substring
(
1
,
len
-
1
).
split
(
','
);
let
amount
=
''
;
if
(
arr
[
0
]
>
1000
)
{
amount
=
(
Number
(
arr
[
0
])
/
10000
)
+
'-'
+
(
Number
(
arr
[
1
])
/
10000
)
+
'万'
;
}
else
{
amount
=
Number
(
arr
[
0
])
+
'-'
+
Number
(
arr
[
1
]);
}
ctx
.
logger
.
info
(
'amount:'
+
amount
);
return
amount
;
}
/**
/**
* 获取多头借贷的分值
* 获取多头借贷的分值
...
...
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