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
9ea795a7
Commit
9ea795a7
authored
Jul 15, 2020
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代理商历史收入修改
parent
4f3b6907
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Service/IndexService.py
+6
-6
No files found.
Service/IndexService.py
View file @
9ea795a7
...
...
@@ -21,7 +21,7 @@ class IndexService():
'''
income_info
=
db
.
session
.
query
(
Production
.
agent_total
)
.
filter
(
Production
.
spot_id
==
spot_id
,
Production
.
total
>
0
,
Production
.
agent_
total
>
0
,
Production
.
created_at
>=
start_time
,
Production
.
created_at
<=
end_time
)
.
all
()
total
=
0
...
...
@@ -162,7 +162,7 @@ class IndexService():
Production
.
refund_time
>=
start_time
,
Production
.
refund_time
<=
end_time
)
.
all
()
total_income
=
0
for
i
in
info
:
total_income
+=
i
.
Production
.
total
total_income
+=
i
.
Production
.
agent_
total
return
round
(
total_income
/
100
,
2
),
len
(
info
)
@staticmethod
...
...
@@ -171,7 +171,7 @@ class IndexService():
Production
.
spot_id
==
spot_id
,
Production
.
is_refund
==
1
,
Production
.
return_hatch_no
==
127
)
.
all
()
total_income
=
0
for
i
in
info
:
total_income
+=
i
.
Production
.
total
total_income
+=
i
.
Production
.
agent_
total
return
round
(
total_income
/
100
,
2
),
len
(
info
)
@staticmethod
...
...
@@ -186,10 +186,10 @@ class IndexService():
# return round(total / 100, 2)
total
=
0
income_info
=
db
.
session
.
query
(
Production
.
total
)
.
filter
(
Production
.
spot_id
==
spot_id
,
Production
.
total
>
0
)
.
all
()
income_info
=
db
.
session
.
query
(
Production
.
agent_
total
)
.
filter
(
Production
.
spot_id
==
spot_id
,
Production
.
agent_
total
>
0
)
.
all
()
for
info
in
income_info
:
total
+=
info
.
total
total
+=
info
.
agent_
total
return
round
(
total
/
100
,
2
)
@staticmethod
...
...
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