Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
financial-system
Project
Project
Details
Activity
Releases
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
xianyang
financial-system
Commits
000df4fc
Commit
000df4fc
authored
Apr 18, 2023
by
xupeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询新增实得总金额
parent
16f0204d
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
43 deletions
+67
-43
views.py
app/api/export/views.py
+1
-1
crud.py
app/api/statement/crud.py
+56
-31
guild.py
app/api/statement/guild.py
+1
-1
views.py
app/api/statement/views.py
+7
-6
functions.py
libs/functions.py
+2
-4
No files found.
app/api/export/views.py
View file @
000df4fc
...
@@ -101,7 +101,7 @@ def month_to_export(param: schemas.MonthStatistics, request: Request, token=Depe
...
@@ -101,7 +101,7 @@ def month_to_export(param: schemas.MonthStatistics, request: Request, token=Depe
@
router
.
get
(
"/referenceType/total"
)
@
router
.
get
(
"/referenceType/total"
)
def
reference_type_total
(
date
:
str
,
type
:
str
,
token
=
Depends
(
login_required
)
):
def
reference_type_total
(
date
:
str
,
type
:
str
):
"""消费类型分类汇总"""
"""消费类型分类汇总"""
if
not
all
([
date
,
type
]):
if
not
all
([
date
,
type
]):
return
HttpResultResponse
(
code
=
500
,
msg
=
'缺少必传参数'
)
return
HttpResultResponse
(
code
=
500
,
msg
=
'缺少必传参数'
)
...
...
app/api/statement/crud.py
View file @
000df4fc
This diff is collapsed.
Click to expand it.
app/api/statement/guild.py
View file @
000df4fc
...
@@ -500,7 +500,7 @@ def transfer_query(data):
...
@@ -500,7 +500,7 @@ def transfer_query(data):
platform
=
LinkMysql
(
env
.
DB_3YV2
)
.
perform_mysql
(
payment_sql
)
platform
=
LinkMysql
(
env
.
DB_3YV2
)
.
perform_mysql
(
payment_sql
)
params
=
{}
params
=
{}
referNum
=
f
'platomOutMoney_{platform}'
referNum
=
f
'platomOutMoney_{platform}'
reference_type
=
'
finance_admin_fix
'
reference_type
=
'
Payment
'
uuid
=
data
.
uuid
uuid
=
data
.
uuid
ip
=
get_ip
()
ip
=
get_ip
()
money
=
data
.
money
*
-
1
if
data
.
money
<
0
else
data
.
money
money
=
data
.
money
*
-
1
if
data
.
money
<
0
else
data
.
money
...
...
app/api/statement/views.py
View file @
000df4fc
...
@@ -27,7 +27,7 @@ def statement_recharge_list(request: Request,db: Session = Depends(get_db),page:
...
@@ -27,7 +27,7 @@ def statement_recharge_list(request: Request,db: Session = Depends(get_db),page:
return
HttpResultResponse
(
code
=
500
,
msg
=
'时间为必传参数'
)
return
HttpResultResponse
(
code
=
500
,
msg
=
'时间为必传参数'
)
query_params
=
request
.
query_params
query_params
=
request
.
query_params
menu_id
=
query_params
.
getlist
(
"menu_id[]"
)
menu_id
=
query_params
.
getlist
(
"menu_id[]"
)
total
,
statement_list
,
money
=
RechargeStatement
()
.
query_data
(
db
,
page
,
size
,
order_number
,
uuid
,
sid
,
start_time
,
end_time
,
types
,
menu_id
,
month_type
)
total
,
statement_list
,
money
=
RechargeStatement
()
.
query_data
(
db
,
page
,
size
,
order_number
,
uuid
,
sid
,
start_time
,
end_time
,
types
,
menu_id
,
month_type
,
''
)
return
HttpResultResponse
(
total
=
total
,
count
=
float
(
money
),
data
=
statement_list
)
return
HttpResultResponse
(
total
=
total
,
count
=
float
(
money
),
data
=
statement_list
)
...
@@ -35,9 +35,10 @@ def statement_recharge_list(request: Request,db: Session = Depends(get_db),page:
...
@@ -35,9 +35,10 @@ def statement_recharge_list(request: Request,db: Session = Depends(get_db),page:
def
statement_derive_excel
(
request
:
Request
,
data
:
schemas
.
StatementList
,
db
:
Session
=
Depends
(
get_db
),
token
=
Depends
(
login_required
)):
def
statement_derive_excel
(
request
:
Request
,
data
:
schemas
.
StatementList
,
db
:
Session
=
Depends
(
get_db
),
token
=
Depends
(
login_required
)):
"""充值报表导出"""
"""充值报表导出"""
header_list
=
request
.
get
(
"headers"
)
header_list
=
request
.
get
(
"headers"
)
export_status
=
1
total
,
statement_list
,
money
=
RechargeStatement
()
.
query_data
(
db
,
data
.
page
,
data
.
size
,
data
.
order_number
,
data
.
uuid
,
total
,
statement_list
,
money
=
RechargeStatement
()
.
query_data
(
db
,
data
.
page
,
data
.
size
,
data
.
order_number
,
data
.
uuid
,
data
.
sid
,
data
.
start_time
,
data
.
end_time
,
data
.
types
,
data
.
sid
,
data
.
start_time
,
data
.
end_time
,
data
.
types
,
data
.
menu_id
,
data
.
month_type
)
data
.
menu_id
,
data
.
month_type
,
export_status
)
field_list
=
[
"id"
,
"uuid"
,
"充值金额(元)"
,
"支付时间"
,
"类型"
,
"订单号"
]
field_list
=
[
"id"
,
"uuid"
,
"充值金额(元)"
,
"支付时间"
,
"类型"
,
"订单号"
]
return
crud
.
data_to_file
(
db
,
statement_list
,
"充值报表"
,
header_list
,
field_list
)
return
crud
.
data_to_file
(
db
,
statement_list
,
"充值报表"
,
header_list
,
field_list
)
...
@@ -47,8 +48,8 @@ def user_withdrawal_list(request:Request,db: Session = Depends(get_db),page: Opt
...
@@ -47,8 +48,8 @@ def user_withdrawal_list(request:Request,db: Session = Depends(get_db),page: Opt
"""用户提现列表"""
"""用户提现列表"""
query_params
=
request
.
query_params
query_params
=
request
.
query_params
menu_id
=
query_params
.
getlist
(
"menu_id[]"
)
menu_id
=
query_params
.
getlist
(
"menu_id[]"
)
total
,
statement_list
,
money
=
WithdrawStatement
()
.
get_user_withdraw_cash
(
db
,
page
,
size
,
uuid
,
status
,
start_time
,
end_time
,
month_type
,
menu_id
)
total
,
statement_list
,
money
,
reality_moeny
=
WithdrawStatement
()
.
get_user_withdraw_cash
(
db
,
page
,
size
,
uuid
,
status
,
start_time
,
end_time
,
month_type
,
menu_id
)
return
HttpResultResponse
(
total
=
total
,
count
=
float
(
money
),
data
=
statement_list
)
return
HttpResultResponse
(
total
=
total
,
count
=
float
(
money
),
data
=
statement_list
,
reality_moeny
=
reality_moeny
)
@
router
.
get
(
"/guildWithdrawal/list"
)
@
router
.
get
(
"/guildWithdrawal/list"
)
...
@@ -56,8 +57,8 @@ def guild_withdrawal_list(request:Request,db: Session = Depends(get_db),page: Op
...
@@ -56,8 +57,8 @@ def guild_withdrawal_list(request:Request,db: Session = Depends(get_db),page: Op
"""公会提现列表 暂无"""
"""公会提现列表 暂无"""
query_params
=
request
.
query_params
query_params
=
request
.
query_params
menu_id
=
query_params
.
getlist
(
"menu_id[]"
)
menu_id
=
query_params
.
getlist
(
"menu_id[]"
)
total
,
statement_list
,
money
=
WithdrawStatement
()
.
get_guild_withdraw_cash
(
db
,
page
,
size
,
guild_id
,
status
,
start_time
,
end_time
,
month_type
,
menu_id
)
total
,
statement_list
,
money
,
reality_moeny
=
WithdrawStatement
()
.
get_guild_withdraw_cash
(
db
,
page
,
size
,
guild_id
,
status
,
start_time
,
end_time
,
month_type
,
menu_id
)
return
HttpResultResponse
(
total
=
total
,
count
=
float
(
money
),
data
=
statement_list
)
return
HttpResultResponse
(
total
=
total
,
count
=
float
(
money
),
data
=
statement_list
,
reality_moeny
=
reality_moeny
)
@
router
.
get
(
"/guild/settlement"
)
@
router
.
get
(
"/guild/settlement"
)
...
...
libs/functions.py
View file @
000df4fc
...
@@ -113,10 +113,8 @@ def search(params, method):
...
@@ -113,10 +113,8 @@ def search(params, method):
if
response
.
status_code
!=
200
:
if
response
.
status_code
!=
200
:
return
{}
return
{}
text
=
json
.
loads
(
response
.
text
)
text
=
json
.
loads
(
response
.
text
)
if
text
.
get
(
"data"
)
.
get
(
"result"
)
.
get
(
"msg"
)
==
'success'
:
print
(
text
)
return
True
return
text
else
:
return
False
def
get_ip
():
def
get_ip
():
...
...
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