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
0c1dfd7a
Commit
0c1dfd7a
authored
Nov 10, 2017
by
Data-韩正辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10月份开始使用
parent
98ed28dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
人工控制-现金贷-银行流水明细.py
人工控制/现金贷/人工控制-现金贷-银行流水明细.py
+7
-7
No files found.
人工控制/现金贷/人工控制-现金贷-银行流水明细.py
View file @
0c1dfd7a
...
...
@@ -19,7 +19,7 @@ max_limit = 900000
注意 is_active = 1 的订单
使用之前需要先修改时间点,sql_query_flowid中的 t1.repaid_at,比如出9月份的表,t1.repaid_at<'2017-10-01'
'''
path
=
u'E:/审计出表/
人工控制/现金贷-银行流水相关
/'
path
=
u'E:/审计出表/
11月份开始使用表数据/11月份现金贷出表
/'
engine_new_transaction
=
create_engine
(
'mysql+mysqldb://internal_r:ArbNgtvlJzZHXsEu@172.16.3.201:3306/?charset=utf8'
,
echo
=
False
)
.
connect
()
...
...
@@ -27,19 +27,19 @@ engine_new_transaction = create_engine('mysql+mysqldb://internal_r:ArbNgtvlJzZHX
# 还资金方流水明细--1
sql_query_flowid
=
"""
SELECT DISTINCT t1.flow_id flow_id
FROM a
ll_back_0930
.funding_repayment_record t1
JOIN a
ll_back_0930
.loan_manifest t2 ON t1.ref_id = t2.ref_id AND t2.is_active = 1
FROM a
udit
.funding_repayment_record t1
JOIN a
udit
.loan_manifest t2 ON t1.ref_id = t2.ref_id AND t2.is_active = 1
AND t2.loan_paid_at >= '
%
s' AND t2.loan_paid_at < '
%
s'
AND t1.repaid_at < '2017-1
0
-01' AND t1.lkb_to_fund_type = 2 AND t1.lkb2fund_id IS NOT NULL
AND t1.repaid_at < '2017-1
1
-01' AND t1.lkb_to_fund_type = 2 AND t1.lkb2fund_id IS NOT NULL
"""
# 流水明细对应的实还资金方表
sql_query_detail
=
"""
SELECT t1.loan_id,t2.`name` '资金方',date(t3.loan_paid_at) '放款时间',t1.term_no '期数',date(t1.repaid_at) '实还时间',t1.current_repayment '实还总额',
t1.principle '实还本金',t1.interest '实还利息',t1.flow_id '流水号'
FROM a
ll_back_0930
.funding_repayment_record t1
FROM a
udit
.funding_repayment_record t1
JOIN new_transaction.funding_corp t2 ON t1.funding_code = t2.id
JOIN a
ll_back_0930
.loan_manifest t3 ON t1.ref_id = t3.ref_id AND t3.is_active =1 AND t1.lkb_to_fund_type = 2 AND t1.flow_id IN
%
s
JOIN a
udit
.loan_manifest t3 ON t1.ref_id = t3.ref_id AND t3.is_active =1 AND t1.lkb_to_fund_type = 2 AND t1.flow_id IN
%
s
"""
'''
...
...
@@ -110,7 +110,7 @@ if __name__ == '__main__':
# handle(2016, 12)
# pool = mtp.Pool(processes=6)
for
year
in
[
2017
]:
for
month
in
range
(
9
,
10
,
1
):
for
month
in
range
(
10
,
11
,
1
):
handle
(
year
,
month
)
# handle(year, month)
# pool.apply_async(handle, (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