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
5334c9ab
authored
2021-03-30 17:45:52 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add customerType
1 parent
78354bef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
src/apps/doc/views.py
src/celery_compare/tasks.py
src/apps/doc/views.py
View file @
5334c9a
...
...
@@ -48,6 +48,7 @@ usedcar_args = {
}
corporate_args
=
{
'customerType'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
OneOf
(
consts
.
CUSTOMER_TYPE
)),
'customerChineseName'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
256
)),
'legalRepName'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
'idNum'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
256
)),
...
...
@@ -60,6 +61,7 @@ corporate_args = {
individual_args
=
{
'applicantType'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
OneOf
(
consts
.
APPLICANT_TYPE
)),
'customerType'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
OneOf
(
consts
.
CUSTOMER_TYPE
)),
'idType'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
OneOf
(
consts
.
ID_TYPE
)),
'secondIdType'
:
fields
.
Str
(
required
=
False
,
validate
=
validate
.
OneOf
(
consts
.
SECOND_ID_TYPE
)),
'customerChineseName'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
...
...
src/celery_compare/tasks.py
View file @
5334c9a
...
...
@@ -84,7 +84,6 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
individual_cus_info_list
=
json
.
loads
(
last_obj
.
individual_cus_info
)
for
individual_cus_info
in
individual_cus_info_list
:
individual_cus_info
[
'customerType'
]
=
last_obj
.
customer_type
# sep营业执照
if
is_sep
and
individual_cus_info
.
get
(
'companyName'
)
is
not
None
:
field_compare
(
individual_cus_info
,
ocr_res_dict
,
consts
.
BL_OCR_FIELD
,
consts
.
TCSEP
,
res_set
)
...
...
@@ -100,7 +99,6 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
if
last_obj
.
corporate_cus_info
is
not
None
:
corporate_cus_info
=
json
.
loads
(
last_obj
.
corporate_cus_info
)
corporate_cus_info
[
'customerType'
]
=
last_obj
.
customer_type
field_compare
(
corporate_cus_info
,
ocr_res_dict
,
consts
.
BL_OCR_FIELD
,
consts
.
TCCOR
,
res_set
)
comparison_res
[
'OCR_Input'
][
'corporateCusInfo'
]
=
corporate_cus_info
...
...
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