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
6051569d
authored
2022-12-09 20:22:13 +0800
by
王聪
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'fix/1118上线问题反馈' into 'feature/uat-tmp'
1118压缩包ocr识别问题修复 See merge request !4
2 parents
5073ca54
52647aaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
src/apps/doc/views.py
src/apps/doc/views.py
View file @
6051569
...
...
@@ -576,6 +576,15 @@ class UploadDocView(GenericView, DocHandler):
self
.
running_log
.
info
(
'[doc upload success] [eapp license skip] [args={0}]'
.
format
(
args
))
return
response
.
ok
()
if
data_source
==
consts
.
DATA_SOURCE_LIST
[
-
1
]
and
document_scheme
==
consts
.
DOC_SCHEME_LIST
[
1
]:
# 电子合同来源的压缩包直接返回,避免被ocr识别导致线上问题
if
document_name
.
endswith
(
'.zip'
)
\
or
document_name
.
endswith
(
'.rar'
)
\
or
document_name
.
endswith
(
'.ZIP'
)
\
or
document_name
.
endswith
(
'.RAR'
):
self
.
running_log
.
info
(
'[doc upload success] [SETTLEMENT ECONTRACT zip skip] [args={0}]'
.
format
(
args
))
return
response
.
ok
()
# 2. 根据业务类型分库存储
doc_class
,
prefix
=
self
.
get_doc_class
(
business_type
)
doc
=
doc_class
.
objects
.
create
(
...
...
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