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
d78669c5
authored
2021-07-21 10:33:44 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix ca compare
1 parent
ce86bdd5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
src/apps/doc/consts.py
src/celery_compare/tasks.py
src/apps/doc/consts.py
View file @
d78669c
...
...
@@ -1060,7 +1060,6 @@ IC_RES_MAPPING = {
# ----------------- CA compare ---------------------
ENTITY
=
[
'HIL'
,
'AFC'
]
CUSTOMER_TYPE
=
[
'TCCOR'
,
'TCDAS'
,
'TCFRE'
,
'TCIAS'
,
'TCIND'
,
'TCSEP'
,
'TCURE'
]
NO_COMPARE_CUSTOMER_TYPE
=
[
'TCFRE'
,
'TCIND'
]
VEHICLE_STATUS
=
[
'PCUSD'
,
'PCNEW'
]
APPLICANT_TYPE
=
[
'CUSTR'
,
'COAPP'
,
'GAUTR1'
,
'GAUTR2'
]
...
...
src/celery_compare/tasks.py
View file @
d78669c
...
...
@@ -237,7 +237,7 @@ def ca_compare(application_id, application_entity, ocr_res_id, last_obj, ocr_res
# 个人信息证件
id_type
=
order_individual_cus_info
.
get
(
'idType'
)
if
cus_type
in
consts
.
NO_COMPARE_CUSTOMER_TYPE
or
id_type
not
in
consts
.
ID_TYPE_COMPARE
:
if
id_type
not
in
consts
.
ID_TYPE_COMPARE
:
do_not_compare
(
order_individual_cus_info
,
consts
.
ITPRC
)
else
:
ocr_field
,
compare_list
,
has_expiry_date
=
consts
.
ID_TYPE_COMPARE
.
get
(
id_type
)
...
...
@@ -247,7 +247,7 @@ def ca_compare(application_id, application_entity, ocr_res_id, last_obj, ocr_res
# 第二证件
second_id_type
=
order_individual_cus_info
.
get
(
'secondIdType'
)
if
second_id_type
is
not
None
:
if
cus_type
in
consts
.
NO_COMPARE_CUSTOMER_TYPE
or
second_id_type
not
in
consts
.
SECOND_ID_TYPE_COMPARE
:
if
second_id_type
not
in
consts
.
SECOND_ID_TYPE_COMPARE
:
do_not_compare
(
order_individual_cus_info
,
consts
.
SECOND_ITPRC
)
else
:
second_ocr_field
,
second_compare_list
=
consts
.
SECOND_ID_TYPE_COMPARE
.
get
(
second_id_type
)
...
...
@@ -398,16 +398,14 @@ def ca_compare(application_id, application_entity, ocr_res_id, last_obj, ocr_res
for
individual
in
individual_list
:
field_list
=
[]
if
individual
.
get
(
'customerType'
)
not
in
consts
.
NO_COMPARE_CUSTOMER_TYPE
and
\
individual
.
get
(
'idType'
)
in
consts
.
ID_TYPE_COMPARE
:
if
individual
.
get
(
'idType'
)
in
consts
.
ID_TYPE_COMPARE
:
total_fields
+=
4
if
not
successful_at_this_level
:
for
field_name
,
_
,
_
,
_
,
result_field
in
consts
.
ITPRC
:
if
individual
.
get
(
result_field
)
!=
consts
.
RESULT_Y
:
field_list
.
append
(
field_name
)
if
individual
.
get
(
'customerType'
)
not
in
consts
.
NO_COMPARE_CUSTOMER_TYPE
and
\
individual
.
get
(
'secondIdType'
)
in
consts
.
SECOND_ID_TYPE_COMPARE
:
if
individual
.
get
(
'secondIdType'
)
in
consts
.
SECOND_ID_TYPE_COMPARE
:
total_fields
+=
1
if
not
successful_at_this_level
:
if
individual
.
get
(
consts
.
SECOND_ID_RES
)
!=
consts
.
RESULT_Y
:
...
...
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