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
9d17c60c
authored
2025-08-29 16:17:54 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
MOD:模拟下单的文件不支持重新识别
1 parent
75499efe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
src/apps/doc/management/commands/ocr_process.py
src/apps/doc/views.py
src/apps/doc/management/commands/ocr_process.py
View file @
9d17c60
...
...
@@ -145,7 +145,7 @@ class Command(BaseCommand, LoggerMixin):
self
.
online_log
.
warn
(
'{0} [get_doc_info] [doc not exist] [task_str={1}] [is_priority={2}]'
.
format
(
self
.
log_base
,
task_str
,
is_priority
))
return
None
,
None
,
None
,
None
,
None
elif
doc
.
status
!=
DocStatus
.
INIT
.
value
or
(
re_ocr_flag
==
'Y'
and
doc
.
status
!=
DocStatus
.
PROCESS_FAILED
.
value
):
elif
(
re_ocr_flag
==
'N'
and
doc
.
status
!=
DocStatus
.
INIT
.
value
)
or
(
re_ocr_flag
==
'Y'
and
doc
.
status
!=
DocStatus
.
PROCESS_FAILED
.
value
):
self
.
online_log
.
warn
(
'{0} [get_doc_info] [doc status error] [task_str={1}] [is_priority={2}] '
'[doc_status={3}]'
.
format
(
self
.
log_base
,
task_str
,
is_priority
,
doc
.
status
))
return
None
,
None
,
None
,
None
,
None
...
...
src/apps/doc/views.py
View file @
9d17c60
...
...
@@ -2095,6 +2095,9 @@ class DocReOcrView(GenericView, DocHandler):
doc_class
,
prefix
=
self
.
get_doc_class
(
application_entity
)
doc
=
doc_class
.
objects
.
filter
(
id
=
doc_id
)
.
first
()
if
doc
.
application_id
.
startswith
(
consts
.
FIXED_APPLICATION_ID_PREFIX
):
self
.
running_log
.
info
(
'[doc re-ocr fail not support CH-S] [application_entity={0}] [doc_id={1}]'
.
format
(
application_entity
,
doc_id
))
return
response
.
error_msg
(
'模拟下单的文件不支持重新识别'
)
# 3. 选择队列进入
is_priority
=
PriorityApplication
.
objects
.
filter
(
application_id
=
doc
.
application_id
,
on_off
=
True
)
.
exists
()
...
...
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