Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
F
fund_report
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
fund_report
Commits
4483568b
Commit
4483568b
authored
Jan 19, 2021
by
pengxiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报告列表
parent
543e9273
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
report_service.py
app/service/report_service.py
+14
-4
No files found.
app/service/report_service.py
View file @
4483568b
...
@@ -47,15 +47,23 @@ def get_report_list(args):
...
@@ -47,15 +47,23 @@ def get_report_list(args):
PeriodicReport
.
update_time
<=
end_time
PeriodicReport
.
update_time
<=
end_time
))
))
if
type
==
0
:
if
type
==
0
:
res
=
hold_report
.
union_all
(
hold_diagnose_report
)
.
union_all
(
periodic_report
)
if
hold_report
.
all
():
res
.
extend
(
hold_report
)
if
hold_diagnose_report
.
all
():
res
.
append
(
hold_diagnose_report
)
if
periodic_report
.
all
():
res
.
append
(
periodic_report
)
# res = hold_report.union_all(hold_diagnose_report).union_all(periodic_report)
elif
type
==
1
:
elif
type
==
1
:
res
=
hold_report
res
=
hold_report
elif
type
==
2
:
elif
type
==
2
:
res
=
hold_diagnose_report
res
=
hold_diagnose_report
elif
type
==
3
:
elif
type
==
3
:
res
=
periodic_report
res
=
periodic_report
totalSize
=
res
.
count
()
# totalSize = res.count()
data
=
res
.
offset
(
offset
)
.
limit
(
pageSize
)
# data = res.offset(offset).limit(pageSize)
totalSize
=
len
(
res
)
data
=
res
[
offset
:
pageSize
]
if
data
:
if
data
:
allow_field
=
[
'id'
,
'customer_id'
,
'ifa_id'
,
'update_time'
,
'update_status'
,
'file'
,
'be_viewed'
,
'name'
]
allow_field
=
[
'id'
,
'customer_id'
,
'ifa_id'
,
'update_time'
,
'update_status'
,
'file'
,
'be_viewed'
,
'name'
]
data
=
[
r
.
to_dict
(
allow_field
=
allow_field
)
for
r
in
data
]
data
=
[
r
.
to_dict
(
allow_field
=
allow_field
)
for
r
in
data
]
...
@@ -120,7 +128,9 @@ def get_one_report(args):
...
@@ -120,7 +128,9 @@ def get_one_report(args):
elif
type
==
3
:
elif
type
==
3
:
res
=
periodic_report
res
=
periodic_report
data
=
[
r
.
to_dict
()
for
r
in
res
]
data
=
[
r
.
to_dict
()
for
r
in
res
]
if
data
:
return
data
[
0
]
return
data
[
0
]
return
False
def
edit_report
(
args
):
def
edit_report
(
args
):
...
...
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