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
6b0a587b
Commit
6b0a587b
authored
Jan 18, 2021
by
pengxiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix2
parent
cff68d2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
tamp_diagnose_app.py
app/model/tamp_diagnose_app.py
+6
-3
report_service.py
app/service/report_service.py
+5
-5
No files found.
app/model/tamp_diagnose_app.py
View file @
6b0a587b
...
...
@@ -138,7 +138,8 @@ class HoldDiagnoseReport(Base, BaseModel):
allow_field
=
set
(
allow_field
)
&
set
(
allow_field
)
else
:
allow_field
=
all_field
self
.
file
=
pdf_folder
+
self
.
file
if
self
.
file
:
self
.
file
=
pdf_folder
+
self
.
file
data
=
{
c
:
int
(
getattr
(
self
,
c
)
.
timestamp
())
if
isinstance
(
getattr
(
self
,
c
),
datetime
.
datetime
)
else
getattr
(
self
,
c
)
for
c
in
allow_field
}
with
TAMP_SQL
(
tamp_user_engine
)
as
tamp_user
,
TAMP_SQL
(
tamp_diagnose_app_engine
)
as
tamp_diagnose_app
:
tamp_user_session
=
tamp_user
.
session
...
...
@@ -181,7 +182,8 @@ class HoldReport(Base, BaseModel):
allow_field
=
set
(
allow_field
)
&
set
(
allow_field
)
else
:
allow_field
=
all_field
self
.
file
=
pdf_folder
+
self
.
file
if
self
.
file
:
self
.
file
=
pdf_folder
+
self
.
file
data
=
{
c
:
int
(
getattr
(
self
,
c
)
.
timestamp
())
if
isinstance
(
getattr
(
self
,
c
),
datetime
.
datetime
)
else
getattr
(
self
,
c
)
for
c
in
allow_field
}
with
TAMP_SQL
(
tamp_user_engine
)
as
tamp_user
,
TAMP_SQL
(
tamp_diagnose_app_engine
)
as
tamp_diagnose_app
:
tamp_user_session
=
tamp_user
.
session
...
...
@@ -224,7 +226,8 @@ class PeriodicReport(Base, BaseModel):
allow_field
=
set
(
allow_field
)
&
set
(
allow_field
)
else
:
allow_field
=
all_field
self
.
file
=
pdf_folder
+
self
.
file
if
self
.
file
:
self
.
file
=
pdf_folder
+
self
.
file
data
=
{
c
:
int
(
getattr
(
self
,
c
)
.
timestamp
())
if
isinstance
(
getattr
(
self
,
c
),
datetime
.
datetime
)
else
getattr
(
self
,
c
)
for
c
in
allow_field
}
with
TAMP_SQL
(
tamp_user_engine
)
as
tamp_user
,
TAMP_SQL
(
tamp_diagnose_app_engine
)
as
tamp_diagnose_app
:
tamp_user_session
=
tamp_user
.
session
...
...
app/service/report_service.py
View file @
6b0a587b
...
...
@@ -189,11 +189,11 @@ def make_report(args):
record_id
=
report_record
.
id
pid
=
os
.
fork
()
if
pid
==
0
:
try
:
dt
=
DataIntegrate
(
ifa_id
=
ifa_id
,
customer_id
=
customer_id
,
pdf_name
=
pdf_name
,
type
=
type
)
dt
.
render_data
(
data
=
report_data
)
except
:
pass
#
try:
dt
=
DataIntegrate
(
ifa_id
=
ifa_id
,
customer_id
=
customer_id
,
pdf_name
=
pdf_name
,
type
=
type
)
dt
.
render_data
(
data
=
report_data
)
#
except:
#
pass
with
TAMP_SQL
(
tamp_diagnose_app_engine
)
as
tamp_diagnose_app
:
tamp_diagnose_session
=
tamp_diagnose_app
.
session
hold_report
=
tamp_diagnose_session
.
query
(
HoldReport
)
.
filter
(
and_
(
...
...
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