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
34df21f0
authored
2023-01-29 16:47:45 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ADD:scheme=INSURANCE的文件入库
1 parent
eef759e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
src/apps/doc/named_enum.py
src/apps/doc/views.py
src/apps/doc/named_enum.py
View file @
34df21f
...
...
@@ -27,6 +27,7 @@ class RequestTeam(NamedEnum):
SETTLEMENT
=
(
1
,
'SETTLEMENT'
)
CONTRACTMANAGEMENT
=
(
2
,
'CONTRACTMANAGEMENT'
)
CONTROLLING
=
(
3
,
'CONTROLLING'
)
INSURANCE
=
(
4
,
'INSURANCE'
)
class
RequestTrigger
(
NamedEnum
):
...
...
src/apps/doc/views.py
View file @
34df21f
...
...
@@ -587,12 +587,12 @@ class UploadDocView(GenericView, DocHandler):
if
business_type
==
consts
.
HIL_PREFIX
:
if
document_scheme
==
RequestTeam
.
ACCEPTANCE
.
name
:
result_class
=
HILOCRResult
elif
document_scheme
==
RequestTeam
.
SETTLEMENT
.
name
:
elif
document_scheme
==
RequestTeam
.
SETTLEMENT
.
name
or
document_scheme
==
RequestTeam
.
INSURANCE
.
name
:
result_class
=
HILSEOCRResult
elif
business_type
==
consts
.
AFC_PREFIX
:
if
document_scheme
==
RequestTeam
.
ACCEPTANCE
.
name
:
result_class
=
AFCOCRResult
elif
document_scheme
==
RequestTeam
.
SETTLEMENT
.
name
:
elif
document_scheme
==
RequestTeam
.
SETTLEMENT
.
name
or
document_scheme
==
RequestTeam
.
INSURANCE
.
name
:
result_class
=
AFCSEOCRResult
ocr_result_obj
=
result_class
.
objects
.
filter
(
application_id
=
application_id
)
.
first
()
...
...
@@ -605,6 +605,7 @@ class UploadDocView(GenericView, DocHandler):
ocr_result_obj
.
fsm_activited
=
1
ocr_result_obj
.
save
()
self
.
running_log
.
info
(
'[doc upload applicationId-{0}] [ocr result saved]'
.
format
(
application_id
))
if
data_source
==
consts
.
DATA_SOURCE_LIST
[
1
]:
if
document_name
.
endswith
(
'-证书.pdf'
)
or
document_name
.
endswith
(
'-证书'
):
self
.
running_log
.
info
(
'[doc upload success] [eapp license skip] [args={0}]'
.
format
(
args
))
...
...
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