Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
7553f30a
authored
2021-05-31 11:45:17 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
dda report
1 parent
5c7e5769
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/management/commands/ocr_process.py
View file @
7553f30
...
...
@@ -755,7 +755,7 @@ class Command(BaseCommand, LoggerMixin):
# 'idcard': True or False,
# 'bs': None or normal or mobile,
# }
report_list
=
[
None
,
False
,
None
]
report_list
=
[
None
,
False
,
None
,
False
]
do_dda
=
is_hil
and
doc
.
document_scheme
==
consts
.
DOC_SCHEME_LIST
[
1
]
except
Exception
as
e
:
self
.
online_log
.
error
(
'{0} [process error (db filter)] [task={1}] [error={2}]'
.
format
(
...
...
@@ -1206,12 +1206,13 @@ class Command(BaseCommand, LoggerMixin):
'{0} [process error (dda id&bc db save)] [task={1}] '
'[error={2}]'
.
format
(
self
.
log_base
,
task_str
,
traceback
.
format_exc
()))
# TODO report
except
Exception
as
e
:
self
.
online_log
.
error
(
'{0} [process error (dda process)] [task={1}] '
'[error={2}]'
.
format
(
self
.
log_base
,
task_str
,
traceback
.
format_exc
()))
else
:
report_list
[
3
]
=
True
finally
:
# report_dict = {
# 'process': None or pdf or excel or edms
...
...
@@ -1280,6 +1281,21 @@ class Command(BaseCommand, LoggerMixin):
self
.
online_log
.
error
(
'{0} [process error (report db save)] [error={1}]'
.
format
(
self
.
log_base
,
traceback
.
format_exc
()))
try
:
if
report_list
[
3
]:
report_table
.
objects
.
create
(
case_number
=
doc
.
application_id
,
request_team
=
RequestTeam
.
get_value
(
doc
.
document_scheme
,
0
),
request_trigger
=
RequestTrigger
.
DOCUPLOAD
.
value
,
input_file
=
doc
.
document_name
,
transaction_start
=
doc
.
start_time
,
transaction_end
=
end_time
,
process_name
=
ProcessName
.
DDA
.
value
,
)
except
Exception
as
e
:
self
.
online_log
.
error
(
'{0} [process error (report db save)] [error={1}]'
.
format
(
self
.
log_base
,
traceback
.
format_exc
()))
finally
:
try
:
img_save_path
=
os
.
path
.
join
(
doc_data_path
,
'img'
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment