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
ac7820d8
Commit
ac7820d8
authored
Sep 27, 2019
by
Hsinli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
8642eee3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
14 deletions
+27
-14
blacklist.js
app/service/credit/blacklist.js
+27
-14
No files found.
app/service/credit/blacklist.js
View file @
ac7820d8
...
...
@@ -97,15 +97,15 @@ class BlacklistService extends Service {
credit_count_1month
:
reportData
.
credit_count_1month
,
//近1月放款笔数
credit_count_3month
:
reportData
.
credit_count_3month
,
//近3月放款笔数
credit_count_6month
:
reportData
.
credit_count_6month
,
//近6月放款笔数
credit_amount_1month
:
reportData
.
credit_amount_1month
,
//近1月放款金额
credit_amount_3month
:
reportData
.
credit_amount_3month
,
//近3月放款金额
credit_amount_6month
:
reportData
.
credit_amount_6month
,
//近6月放款金额
credit_amount_1month
:
this
.
dealSection
(
reportData
.
credit_amount_1month
)
,
//近1月放款金额
credit_amount_3month
:
this
.
dealSection
(
reportData
.
credit_amount_3month
)
,
//近3月放款金额
credit_amount_6month
:
this
.
dealSection
(
reportData
.
credit_amount_6month
)
,
//近6月放款金额
credit_closed_count_1month
:
reportData
.
credit_closed_count_1month
,
//近1月已结清放款笔数
credit_closed_count_3month
:
reportData
.
credit_closed_count_3month
,
//近3月已结清放款笔数
credit_closed_count_6month
:
reportData
.
credit_closed_count_6month
,
//近6月已结清放款笔数
credit_closed_amount_1month
:
reportData
.
credit_closed_amount_1month
,
//近1月已结清放款金额
credit_closed_amount_3month
:
reportData
.
credit_closed_amount_3month
,
//近3月已结清放款金额
credit_closed_amount_6month
:
reportData
.
credit_closed_amount_6month
,
//近6月已结清放款金额
credit_closed_amount_1month
:
this
.
dealSection
(
reportData
.
credit_closed_amount_1month
)
,
//近1月已结清放款金额
credit_closed_amount_3month
:
this
.
dealSection
(
reportData
.
credit_closed_amount_3month
)
,
//近3月已结清放款金额
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_3month
:
reportData
.
consume_credit_count_3month
,
//近3月消金机构放款笔数
consume_credit_count_6month
:
reportData
.
consume_credit_count_6month
,
//近6月消金机构放款笔数
...
...
@@ -269,15 +269,8 @@ class BlacklistService extends Service {
}
else
if
(
overdueInfo
[
i
].
overdue_amount
===
'>1000000'
)
{
amount
=
'100万以上'
}
else
{
let
amountLen
=
overdueInfo
[
i
].
overdue_amount
.
length
;
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
]);
}
amount
=
await
this
.
dealSection
(
overdueInfo
[
i
].
overdue_amount
);
}
let
timeLen
=
overdueInfo
[
i
].
overdue_time
.
length
;
let
temp
=
{
overdue_date
:
overdueInfo
[
i
].
overdue_date
,
...
...
@@ -290,6 +283,26 @@ class BlacklistService extends Service {
return
ret
;
}
/**
* 处理类似(3000,50000]这样的区间的数字
* @param {*} section
*/
async
dealSection
(
section
)
{
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
]);
}
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