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
d2114106
authored
2021-11-16 20:13:20 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
bb43f703
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
src/apps/doc/consts.py
src/celery_compare/tasks.py
src/common/tools/comparison.py
src/apps/doc/consts.py
View file @
d211410
...
...
@@ -1572,7 +1572,7 @@ HMH_COMPARE_LOGIC = {
'借款人/承租人姓名'
:
(
'借款/承租人姓名'
,
'se_name_compare'
,
{},
'抵押登记豁免函借款人/承租人姓名与系统不符'
),
'借款人/承租人证件号'
:
(
'证件号码'
,
'se_common_compare'
,
{},
'抵押登记豁免函借款人/承租人证件号码与系统不符'
),
'申请号'
:
(
'合同编号'
,
'se_common_compare'
,
{},
'抵押登记豁免函申请号与系统不符'
),
'渠道'
:
(
'渠道'
,
'se_c
ommon
_compare'
,
{},
'抵押登记豁免函渠道与系统不符'
),
'渠道'
:
(
'渠道'
,
'se_c
hannel
_compare'
,
{},
'抵押登记豁免函渠道与系统不符'
),
'签字'
:
(
'借款人签字/盖章'
,
'se_common_compare'
,
{},
'抵押登记豁免函签字需人工核查'
),
}
...
...
src/celery_compare/tasks.py
View file @
d211410
...
...
@@ -922,7 +922,7 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list):
]
if
is_prc
:
# field_input.append(('hukouProvince', province))
field_input
.
append
((
'真伪'
,
province
))
field_input
.
append
((
'真伪'
,
consts
.
IC_RES_MAPPING
.
get
(
1
)
))
field_input
.
append
((
'idExpiryDate'
,
id_info
.
get
(
'idExpiryDate'
,
''
)))
license_dict
[
license_en
]
=
field_input
all_id_num
.
append
(
id_num
)
...
...
@@ -1882,7 +1882,7 @@ def se_compare_process(compare_info, ocr_res_dict):
value_str
=
json
.
dumps
(
value
)
reason_list
.
append
(
'{0}: {1}'
.
format
(
key
,
value_str
))
failure_reason_str
=
'、'
.
join
(
reason_list
)
cn_failure_reason_str
=
'
、
'
.
join
(
set
(
cn_reason_list
))
cn_failure_reason_str
=
'
\n
'
.
join
(
set
(
cn_reason_list
))
return
compare_result
,
total_fields
,
failed_count
,
successful_at_this_level
,
failure_reason_str
,
cn_failure_reason_str
...
...
src/common/tools/comparison.py
View file @
d211410
...
...
@@ -59,6 +59,11 @@ class Comparison:
ocr_tmp
=
re
.
sub
(
self
.
re_obj
,
''
,
ocr_str
)
.
strip
()
return
self
.
build_res
(
input_tmp
==
ocr_tmp
),
ocr_str
def
se_channel_compare
(
self
,
input_str
,
ocr_str
,
**
kwargs
):
input_tmp
=
re
.
sub
(
self
.
re_obj
,
''
,
input_str
)
.
strip
()
ocr_tmp
=
re
.
sub
(
self
.
re_obj
,
''
,
ocr_str
)
.
strip
()
return
self
.
build_res
(
input_tmp
==
ocr_tmp
)
def
name_compare
(
self
,
input_str
,
ocr_str
,
idx
,
**
kwargs
):
if
not
isinstance
(
ocr_str
,
str
)
or
not
isinstance
(
input_str
,
str
):
return
self
.
RESULT_NA
,
ocr_str
...
...
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