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
ca86ab25
Commit
ca86ab25
authored
4 years ago
by
pengxiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复
parent
c26090c5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
25 deletions
+86
-25
report_service.py
app/service/report_service.py
+6
-25
fund_report.log
logs/fund_report.log
+80
-0
No files found.
app/service/report_service.py
View file @
ca86ab25
...
...
@@ -34,42 +34,23 @@ def get_report_list(args):
conditions
=
()
if
type
==
0
:
conditions
=
[
and_
(
ReportView
.
ifa_id
==
ifa_id
,
ReportView
.
name
.
like
(
'
%
'
+
name
+
'
%
'
),
or_
(
ReportView
.
name
.
like
(
'
%
'
+
name
+
'
%
'
),
ReportView
.
customer_name
.
like
(
'
%
'
+
name
+
'
%
'
)
),
ReportView
.
update_time
>=
start_time
,
HoldReport
.
update_time
<=
end_time
),
and_
(
ReportView
.
ifa_id
==
ifa_id
,
ReportView
.
customer_name
.
like
(
'
%
'
+
name
+
'
%
'
),
ReportView
.
update_time
>=
start_time
,
HoldReport
.
update_time
<=
end_time
)
ReportView
.
update_time
<=
end_time
]
else
:
conditions
=
[
and_
(
ReportView
.
ifa_id
==
ifa_id
,
ReportView
.
type
==
type
,
ReportView
.
name
.
like
(
'
%
'
+
name
+
'
%
'
),
or_
(
ReportView
.
name
.
like
(
'
%
'
+
name
+
'
%
'
),
ReportView
.
customer_name
.
like
(
'
%
'
+
name
+
'
%
'
)
),
ReportView
.
update_time
>=
start_time
,
HoldReport
.
update_time
<=
end_time
),
and_
(
ReportView
.
ifa_id
==
ifa_id
,
ReportView
.
type
==
type
,
ReportView
.
customer_name
.
like
(
'
%
'
+
name
+
'
%
'
),
ReportView
.
update_time
>=
start_time
,
HoldReport
.
update_time
<=
end_time
)
ReportView
.
update_time
<=
end_time
]
allow_field
=
[
'id'
,
'customer_id'
,
'ifa_id'
,
'update_time'
,
'update_status'
,
'file'
,
'be_viewed'
,
'name'
,
'customer_name'
,
'author_name'
,
'type'
]
with
TAMP_SQL
(
tamp_diagnose_app_engine
)
as
tamp_diagnose_app
:
tamp_diagnose_session
=
tamp_diagnose_app
.
session
report_res
=
tamp_diagnose_session
.
query
(
ReportView
)
.
filter
(
or_
(
*
conditions
))
report_res
=
tamp_diagnose_session
.
query
(
ReportView
)
.
filter
(
and_
(
*
conditions
))
totalSize
=
report_res
.
count
()
report_res
=
report_res
.
offset
(
offset
)
.
limit
(
pageSize
)
res
=
[
r
.
to_dict
(
allow_field
=
allow_field
)
for
r
in
report_res
]
...
...
@@ -117,7 +98,7 @@ def get_one_report(args):
res
=
tamp_diagnose_session
.
query
(
ReportView
)
.
filter
(
and_
(
ReportView
.
id
==
id
,
ReportView
.
type
==
type
,
HoldReport
.
ifa_id
==
ifa_id
,
ReportView
.
ifa_id
==
ifa_id
,
))
data
=
[
r
.
to_dict
()
for
r
in
res
]
if
data
:
...
...
This diff is collapsed.
Click to expand it.
logs/fund_report.log
View file @
ca86ab25
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