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
e1670d0f
authored
2020-11-10 23:08:53 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add eapp skip
1 parent
b0883c72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
src/apps/doc/views.py
src/apps/doc/views.py
View file @
e1670d0
...
...
@@ -106,6 +106,7 @@ class UploadDocView(GenericView, DocHandler):
application_id
=
application_data
.
get
(
'applicationId'
)
document_scheme
=
document
.
get
(
'documentScheme'
)
data_source
=
document
.
get
(
'dataSource'
)
document_name
=
document
.
get
(
'documentName'
)
try
:
# 1. 上传信息记录
UploadDocRecords
.
objects
.
create
(
...
...
@@ -115,7 +116,7 @@ class UploadDocView(GenericView, DocHandler):
co_applicant
=
applicant_data
.
get
(
'coApplicantName'
),
guarantor_1
=
applicant_data
.
get
(
'guarantor1Name'
),
guarantor_2
=
applicant_data
.
get
(
'guarantor2Name'
),
document_name
=
document
.
get
(
'documentName'
)
,
document_name
=
document
_name
,
document_scheme
=
document_scheme
,
business_type
=
business_type
,
data_source
=
data_source
,
...
...
@@ -125,6 +126,12 @@ class UploadDocView(GenericView, DocHandler):
self
.
running_log
.
info
(
'[doc upload fail] [args={0}] [err={1}]'
.
format
(
args
,
e
))
self
.
invalid_params
(
msg
=
'metadataVersionId repeat'
)
else
:
data_source
=
self
.
fix_data_source
(
data_source
)
if
data_source
==
consts
.
DATA_SOURCE_LIST
[
1
]:
if
isinstance
(
document_name
,
str
):
if
document_name
.
endswith
(
'-证书.pdf'
)
or
document_name
.
endswith
(
'-证书'
):
self
.
running_log
.
info
(
'[doc upload success] [eapp license 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