Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
duizhang_tools
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data—王林芳
duizhang_tools
Commits
b6b07a78
Commit
b6b07a78
authored
Nov 01, 2017
by
Data-韩正辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
本地可用版
parent
22f377b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
人工控制-现金贷-还资金方表.py
人工控制/现金贷/人工控制-现金贷-还资金方表.py
+8
-8
No files found.
人工控制/现金贷/人工控制-现金贷-还资金方表.py
View file @
b6b07a78
...
...
@@ -21,7 +21,7 @@ max_limit = 800000
sql_lm
=
'''
select ref_id,loan_id,fc.name '资金方',date(loan_paid_at) '放款时间',contract_term '期数'
from all_back_0
930
.loan_manifest lm
from all_back_0
831
.loan_manifest lm
join basic.funding_corp fc on fc.funding_code = lm.funding_code
where loan_paid_at>='
%
s' and loan_paid_at <'
%
s'
and is_active in (1, -2)
...
...
@@ -34,8 +34,8 @@ sql_repay_frr_2 = '''
urp.term_no '应还期数',
date(urp.deadline) '应还资金方时间',
urp.principle+urp.interest '应还资金方本息'
from all_back_0
930
.user_repayment_plan urp
join all_back_0
930
.loan_manifest lm on lm.ref_id = urp.ref_id
from all_back_0
831
.user_repayment_plan urp
join all_back_0
831
.loan_manifest lm on lm.ref_id = urp.ref_id
where lm.loan_paid_at>='
%
s' and loan_paid_at<'
%
s'
and urp.fund_code in (210,270,310,320,410,430)
'''
...
...
@@ -49,7 +49,7 @@ sql_repay_frr_3 = '''
frp.interest+frp.principle '应还资金方本息'
from audit.funding_repayment_plan frp
join all_back_0
930
.loan_manifest lm on lm.ref_id = frp.ref_id
join all_back_0
831
.loan_manifest lm on lm.ref_id = frp.ref_id
WHERE lm.loan_paid_at>='
%
s' and loan_paid_at<'
%
s'
and lm.funding_code not in (210,270,310,320,410,430)
'''
...
...
@@ -65,8 +65,8 @@ sql_refund = '''
frr.flow_id '流水号',
frr.term_no '应还期数'
FROM
all_back_0
930
.funding_repayment_record frr
join all_back_0
930
.loan_manifest lm on lm.ref_id = frr.ref_id
all_back_0
831
.funding_repayment_record frr
join all_back_0
831
.loan_manifest lm on lm.ref_id = frr.ref_id
JOIN basic.funding_corp fc ON fc.funding_code = frr.funding_code
WHERE lm.loan_paid_at>='
%
s'
and lm.loan_paid_at <'
%
s'
...
...
@@ -153,11 +153,11 @@ def refund(year,month):
df
[
i
:
i
+
max_limit
]
.
to_excel
(
os
.
path
.
join
(
path
,
u'0927现金贷—还资金方表-(
%
s-
%02
d)-
%
d.xlsx'
%
(
year
,
month
,
i
/
max_limit
+
1
)),
index
=
None
,
columns
=
columns
)
else
:
df
.
to_excel
(
path
+
u'人工控制-现金贷—还资金方表-(
%
d-
%
d)-V
1
.xlsx'
%
(
year
,
month
),
index
=
None
,
columns
=
columns
)
df
.
to_excel
(
path
+
u'人工控制-现金贷—还资金方表-(
%
d-
%
d)-V
4
.xlsx'
%
(
year
,
month
),
index
=
None
,
columns
=
columns
)
if
__name__
==
'__main__'
:
year
=
[
2017
]
month
=
range
(
9
,
10
,
1
)
month
=
range
(
1
,
2
,
1
)
for
year
,
month
in
product
(
year
,
month
):
print
(
'-----------
%
s-
%
s begins'
)
%
(
year
,
month
)
...
...
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