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
fdb85ee1
authored
2021-07-09 14:53:53 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix TCSEP selfEmployedSubType
1 parent
4eccdb7d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
src/celery_compare/tasks.py
src/celery_compare/tasks.py
View file @
fdb85ee
...
...
@@ -88,9 +88,6 @@ def field_compare(info_dict, ocr_res_dict, ocr_field, compare_list, res_set,
break
for
idx
,
compare_tuple
in
enumerate
(
compare_list
):
input_str
=
info_dict
.
get
(
compare_tuple
[
0
])
if
not
isinstance
(
input_str
,
str
)
and
compare_tuple
[
0
]
==
'selfEmployedSubType'
:
continue
ocr_str
=
ocr_res
.
get
(
compare_tuple
[
1
])
compare_res
,
ocr_output
=
getattr
(
cp
,
compare_tuple
[
2
])(
input_str
,
ocr_str
,
idx
,
**
compare_tuple
[
3
])
...
...
@@ -117,7 +114,11 @@ def field_compare(info_dict, ocr_res_dict, ocr_field, compare_list, res_set,
del
info_dict
[
compare_tuple
[
0
]]
else
:
info_dict
[
compare_tuple
[
0
]]
=
ocr_output
if
not
capital_ignore
or
idx
!=
1
:
if
capital_ignore
and
idx
==
1
:
pass
elif
capital_ignore
and
idx
==
2
and
input_str
is
None
:
pass
else
:
res_set
.
add
(
compare_res
)
if
not
is_find
:
res_set
.
add
(
consts
.
RESULT_N
)
...
...
@@ -431,7 +432,7 @@ def compare(application_id, application_entity, uniq_seq, ocr_res_id):
total_fields
+=
3
if
not
successful_at_this_level
:
for
field_name
,
_
,
_
,
_
,
result_field
in
consts
.
TCSEP
:
if
result_field
in
individual
and
individual
.
get
(
result_field
)
!=
consts
.
RESULT_Y
:
if
individual
.
get
(
result_field
)
!=
consts
.
RESULT_Y
:
field_list
.
append
(
field_name
)
if
len
(
field_list
)
>
0
:
...
...
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