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
4c204b72
authored
2021-07-15 19:53:39 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature/se_compare3' into feature/0611
2 parents
8628572e
6e47748b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
9 deletions
src/apps/doc/consts.py
src/celery_compare/tasks.py
src/common/tools/comparison.py
src/apps/doc/consts.py
View file @
4c204b7
...
...
@@ -1409,7 +1409,7 @@ DDA_COMPARE_LOGIC = {
'companyName'
:
(
'to_company'
,
'se_company_compare'
,
{}),
'customerName'
:
(
DDA_IC_NAME
,
'se_contain_compare_2'
,
{}),
'idNum'
:
(
DDA_IC_ID
,
'se_contain_compare_2'
,
{}),
'accountHolderName'
:
(
DDA_BC_NAME
,
'se_
common
_compare'
,
{}),
'accountHolderName'
:
(
DDA_BC_NAME
,
'se_
name
_compare'
,
{}),
'accountNo'
:
(
DDA_BC_ID
,
'se_common_compare'
,
{}),
}
...
...
src/celery_compare/tasks.py
View file @
4c204b7
...
...
@@ -489,7 +489,7 @@ def get_se_compare_info(last_obj, application_entity):
else
:
id_num
=
individual_info
[
'idNum'
]
main_role_info
.
setdefault
(
individual_info
[
'applicantType'
],
[])
.
append
(
(
individual_info
[
'customerName'
],
id_num
))
(
individual_info
[
'customerName'
],
id_num
,
individual_info
[
'idNum'
]
))
license_dict
=
{}
...
...
@@ -526,11 +526,11 @@ def get_se_compare_info(last_obj, application_entity):
dda_num_list
=
[]
for
applicant_type
in
consts
.
APPLICANT_TYPE
:
if
applicant_type
in
main_role_info
:
main_name
,
main_num
=
main_role_info
[
applicant_type
][
0
]
main_name
,
main_num
,
_
=
main_role_info
[
applicant_type
][
0
]
break
for
applicant_type
in
consts
.
APPLICANT_TYPE
[:
2
]:
if
applicant_type
in
main_role_info
:
for
dda_name_part
,
dda_num_part
in
main_role_info
[
applicant_type
]:
for
dda_name_part
,
_
,
dda_num_part
in
main_role_info
[
applicant_type
]:
dda_name_list
.
append
(
dda_name_part
)
dda_num_list
.
append
(
dda_num_part
)
dda_name
=
'、'
.
join
(
dda_name_list
)
...
...
src/common/tools/comparison.py
View file @
4c204b7
...
...
@@ -144,7 +144,10 @@ class Comparison:
if
input_tmp
.
find
(
ocr_tmp
)
==
-
1
:
return
self
.
RESULT_N
else
:
return
self
.
RESULT_Y
if
ocr_str
.
strip
()
==
''
:
return
self
.
RESULT_N
else
:
return
self
.
RESULT_Y
else
:
# if re.search(r'[a-zA-Z]]', input_str):
# return self.RESULT_NA, ocr_str
...
...
@@ -177,19 +180,28 @@ class Comparison:
if
ocr_str
.
find
(
input_str
)
==
-
1
:
return
self
.
RESULT_N
else
:
return
self
.
RESULT_Y
if
ocr_str
.
strip
()
==
''
:
return
self
.
RESULT_N
else
:
return
self
.
RESULT_Y
def
se_contain_compare_2
(
self
,
input_str
,
ocr_str
,
**
kwargs
):
if
input_str
.
find
(
ocr_str
)
==
-
1
:
return
self
.
RESULT_N
else
:
return
self
.
RESULT_Y
if
ocr_str
.
strip
()
==
''
:
return
self
.
RESULT_N
else
:
return
self
.
RESULT_Y
def
se_both_contain_compare
(
self
,
input_str
,
ocr_str
,
**
kwargs
):
if
ocr_str
.
find
(
input_str
)
==
-
1
and
input_str
.
find
(
ocr_str
)
==
-
1
:
return
self
.
RESULT_N
else
:
return
self
.
RESULT_Y
if
ocr_str
.
strip
()
==
''
:
return
self
.
RESULT_N
else
:
return
self
.
RESULT_Y
def
se_amount_compare
(
self
,
input_str
,
ocr_str
,
**
kwargs
):
if
input_str
==
ocr_str
:
...
...
@@ -235,7 +247,7 @@ class Comparison:
except
Exception
as
e
:
return
self
.
RESULT_N
else
:
return
self
.
build_res
(
input_date
>
=
ocr_date
)
return
self
.
build_res
(
input_date
<
=
ocr_date
)
cp
=
Comparison
()
...
...
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