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
ec40e23a
Commit
ec40e23a
authored
Jan 19, 2021
by
pengxiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
file拼接
parent
8a571a17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
tamp_diagnose_app.py
app/model/tamp_diagnose_app.py
+9
-3
No files found.
app/model/tamp_diagnose_app.py
View file @
ec40e23a
...
@@ -138,8 +138,9 @@ class HoldDiagnoseReport(Base, BaseModel):
...
@@ -138,8 +138,9 @@ class HoldDiagnoseReport(Base, BaseModel):
allow_field
=
set
(
allow_field
)
&
set
(
allow_field
)
allow_field
=
set
(
allow_field
)
&
set
(
allow_field
)
else
:
else
:
allow_field
=
all_field
allow_field
=
all_field
file
=
''
if
self
.
file
:
if
self
.
file
:
self
.
file
=
pdf_folder
+
self
.
file
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
}
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
:
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
tamp_user_session
=
tamp_user
.
session
...
@@ -151,6 +152,7 @@ class HoldDiagnoseReport(Base, BaseModel):
...
@@ -151,6 +152,7 @@ class HoldDiagnoseReport(Base, BaseModel):
res
=
res
.
fetchone
()
res
=
res
.
fetchone
()
res2
=
res2
.
fetchone
()
res2
=
res2
.
fetchone
()
if
data
:
if
data
:
data
[
'file'
]
=
file
if
res
:
if
res
:
data
[
'author_name'
]
=
res
[
0
]
data
[
'author_name'
]
=
res
[
0
]
else
:
else
:
...
@@ -182,8 +184,9 @@ class HoldReport(Base, BaseModel):
...
@@ -182,8 +184,9 @@ class HoldReport(Base, BaseModel):
allow_field
=
set
(
allow_field
)
&
set
(
allow_field
)
allow_field
=
set
(
allow_field
)
&
set
(
allow_field
)
else
:
else
:
allow_field
=
all_field
allow_field
=
all_field
file
=
''
if
self
.
file
:
if
self
.
file
:
self
.
file
=
pdf_folder
+
self
.
file
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
}
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
:
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
tamp_user_session
=
tamp_user
.
session
...
@@ -195,6 +198,7 @@ class HoldReport(Base, BaseModel):
...
@@ -195,6 +198,7 @@ class HoldReport(Base, BaseModel):
res
=
res
.
fetchone
()
res
=
res
.
fetchone
()
res2
=
res2
.
fetchone
()
res2
=
res2
.
fetchone
()
if
data
:
if
data
:
data
[
'file'
]
=
file
if
res
:
if
res
:
data
[
'author_name'
]
=
res
[
0
]
data
[
'author_name'
]
=
res
[
0
]
else
:
else
:
...
@@ -226,8 +230,9 @@ class PeriodicReport(Base, BaseModel):
...
@@ -226,8 +230,9 @@ class PeriodicReport(Base, BaseModel):
allow_field
=
set
(
allow_field
)
&
set
(
allow_field
)
allow_field
=
set
(
allow_field
)
&
set
(
allow_field
)
else
:
else
:
allow_field
=
all_field
allow_field
=
all_field
file
=
''
if
self
.
file
:
if
self
.
file
:
self
.
file
=
pdf_folder
+
self
.
file
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
}
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
:
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
tamp_user_session
=
tamp_user
.
session
...
@@ -239,6 +244,7 @@ class PeriodicReport(Base, BaseModel):
...
@@ -239,6 +244,7 @@ class PeriodicReport(Base, BaseModel):
res
=
res
.
fetchone
()
res
=
res
.
fetchone
()
res2
=
res2
.
fetchone
()
res2
=
res2
.
fetchone
()
if
data
:
if
data
:
data
[
'file'
]
=
file
if
res
:
if
res
:
data
[
'author_name'
]
=
res
[
0
]
data
[
'author_name'
]
=
res
[
0
]
else
:
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