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
cfbe724a
Commit
cfbe724a
authored
Nov 15, 2017
by
Perry_Zhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
非去哪儿白条每日赔付
parent
1e004421
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
白条每日赔付按日期统计V3.py
白条/出表/白条每日赔付按日期统计V3.py
+7
-7
白条直投每日赔付以loan_id为维度展开V3.py
白条/出表/白条直投每日赔付以loan_id为维度展开V3.py
+0
-0
No files found.
白条/出表/白条每日赔付按日期统计V3.py
View file @
cfbe724a
...
...
@@ -11,18 +11,18 @@ reload(sys)
sys
.
setdefaultencoding
(
'utf8'
)
engine_new_transaction
=
create_engine
(
'mysql+mysqldb://
yulong_rw:TouBStYwN8wkdxVt
@172.16.3.201:3306/new_transaction?charset=utf8'
,
'mysql+mysqldb://
shiyao.zhu:#jkl9oplYUGuo99
@172.16.3.201:3306/new_transaction?charset=utf8'
,
echo
=
True
)
engine_xyqb
=
create_engine
(
'mysql+mysqldb://syzhu_data_r:ulk0989742097y43@192.168.4.6:8066/xyqb?charset=utf8'
,
echo
=
True
)
start_time
=
'2017-08-01'
end_time
=
'2017-1
0
-01'
end_time
=
'2017-1
1
-01'
end_y
=
2017
end_m
=
1
0
end_m
=
1
1
end_date
=
datetime
.
date
(
end_y
,
end_m
,
1
)
path
=
u'E:/数据汇总/白条/每日赔付/'
path
=
u'E:/数据汇总/白条/每日赔付/
2017-10/
'
# 还资金方还款计划
loan_plan_hk
=
'''
SELECT t.day_hk,SUM(t.plan_all) plan_all from(
...
...
@@ -84,7 +84,8 @@ loan_hk_online = '''
(ifnull(t1.principle,0)-ifnull(t1.mitigate_principle,0))>0
and t2.bill_time >= '
%
s'
and t2.bill_time < '
%
s'
GROUP BY 1,2 '''
GROUP BY 1,2
'''
loan_hk_ali
=
'''
SELECT DATE(t2.transfer_time) repaid_at,DATE(plan.deadline) deadline ,
...
...
@@ -182,7 +183,6 @@ def spread_date(funding_code):
zbj_amount
,
start_time
,
end_time
),
engine_new_transaction
)
df_zbj
.
rename
(
columns
=
{
'plan_all'
:
'zbj_plan_all'
},
inplace
=
True
)
df_plan
.
fillna
(
0
,
inplace
=
True
)
df_online
=
pd
.
read_sql
(
repay_online
%
(
start_time
,
end_time
),
engine_new_transaction
)
df_ali
=
pd
.
read_sql
(
repay_alipay
%
(
start_time
,
end_time
),
engine_new_transaction
)
...
...
@@ -231,7 +231,7 @@ def spread_date(funding_code):
'tx_plan_all'
:
'提现账户应还资方本息'
,
'sr_plan_all'
:
'收入账户应还资方本息'
,
'zbj_plan_all'
:
'质保金账户应还资方本息'
,
'zbj_yq_principle'
:
'质保金账户客户逾期还款本金'
,
'zbj_tq_principle'
:
'质保金账户客户提前可用本金'
},
inplace
=
True
)
df_hk_new
.
to_excel
(
path
+
str
(
funding_code
)
+
'按日期展开
10-09
.xlsx'
,
index
=
None
,
columns
=
df_hk_new
.
columns
,
df_hk_new
.
to_excel
(
path
+
str
(
funding_code
)
+
'按日期展开
2017-10
.xlsx'
,
index
=
None
,
columns
=
df_hk_new
.
columns
,
encoding
=
'utf8'
)
...
...
白条/出表/白条
每日赔付以loan_id维度展开
.py
→
白条/出表/白条
直投每日赔付以loan_id为维度展开V3
.py
View file @
cfbe724a
This diff is collapsed.
Click to expand it.
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