Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tour_business
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏强
tour_business
Commits
332f3a11
Commit
332f3a11
authored
Jul 17, 2020
by
魏强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增代理商无效订单信息;
parent
3c0c1e00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
Controller/IndexController.py
+8
-2
No files found.
Controller/IndexController.py
View file @
332f3a11
...
...
@@ -141,6 +141,9 @@ def index():
agent_history
[
'month_rent'
]
=
month_rent
agent_history
[
'lastmonth_income'
]
=
lastmonth_income
agent_history
[
'lastmonth_rent'
]
=
lastmonth_rent
if
cur_user
.
level
==
2
:
agent_history
[
'history_invalid_rent'
]
=
invalid_rent_history
agent_history
[
'history_invalid_money'
]
=
invalid_money_history
agent_history
[
'spot_info'
]
=
AgentService
.
get_spot_info
(
cur_user
)
return
jsonify
(
BASE_RESPONSE
(
data
=
agent_history
)
.
to_dict
())
else
:
...
...
@@ -155,6 +158,8 @@ def index():
rent_finish
=
IndexService
.
get_total_power
(
spot_id
,
start_time_today
,
end_time_today
)
rent_not_return
=
IndexService
.
get_not_return_production
(
spot_id
,
start_time_today
,
end_time_today
)
today_discount
=
IndexService
.
get_discount_money
(
spot_id
,
start_time_today
,
end_time_today
)
rent_invalid_money
,
rent_invalid_rent
=
IndexService
.
get_invalid_production_info
(
spot_id
,
start_time_today
,
end_time_today
)
if
cur_user
.
level
==
1
:
# 超级管理员
...
...
@@ -165,8 +170,6 @@ def index():
admin_today
[
'yesterday_rent'
]
=
yesterday_rent
admin_today
[
'rent_finish'
]
=
rent_finish
admin_today
[
'rent_not_return'
]
=
rent_not_return
rent_invalid_money
,
rent_invalid_rent
=
IndexService
.
get_invalid_production_info
(
spot_id
,
start_time_today
,
end_time_today
)
admin_today
[
'today_invalid_rent'
]
=
rent_invalid_rent
admin_today
[
'today_invalid_money'
]
=
rent_invalid_money
admin_today
[
'discount'
]
=
today_discount
...
...
@@ -196,6 +199,9 @@ def index():
agent_today
[
'rent_finish'
]
=
rent_finish
agent_today
[
'rent_not_return'
]
=
rent_not_return
agent_today
[
'discount'
]
=
today_discount
if
cur_user
.
level
==
2
:
agent_today
[
'today_invalid_rent'
]
=
0
agent_today
[
'today_invalid_money'
]
=
0
agent_today
[
'spot_info'
]
=
AgentService
.
get_spot_info
(
cur_user
)
return
jsonify
(
BASE_RESPONSE
(
data
=
agent_today
)
.
to_dict
())
else
:
...
...
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