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
ce95c8f4
authored
2022-05-06 15:48:41 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
che dai fen li
1 parent
e6486884
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
40 deletions
src/apps/doc/consts.py
src/celery_compare/tasks.py
src/common/tools/comparison.py
src/apps/doc/consts.py
View file @
ce95c8f
...
...
@@ -1571,55 +1571,55 @@ SE_HIL_CON_3_FIELD = ['合同编号-每页', '承租人姓名', '承租人证件
ROLE_LIST
=
[
(
'借款人签字及时间'
,
'Borrower'
,
0
,
0
,
True
,
False
),
(
'借款人姓名'
,
'Borrower'
,
0
,
0
,
True
,
True
),
(
'借款人证件号'
,
'Borrower'
,
0
,
2
,
True
,
True
),
(
'主借人签字'
,
'Borrower'
,
0
,
0
,
True
,
False
),
(
'主借人日期'
,
'Borrower'
,
0
,
'有'
,
True
,
False
),
(
'共借人姓名'
,
'Co-Borrower'
,
0
,
0
,
False
,
True
),
(
'共借人证件号'
,
'Co-Borrower'
,
0
,
2
,
False
,
True
),
(
'共借人签字'
,
'Co-Borrower'
,
0
,
0
,
False
,
False
),
(
'共借人日期'
,
'Co-Borrower'
,
0
,
'有'
,
False
,
False
),
(
'保证人姓名1'
,
'Guarantor'
,
0
,
0
,
False
,
True
),
(
'保证人证件号1'
,
'Guarantor'
,
0
,
2
,
False
,
True
),
(
'保证人签字1'
,
'Guarantor'
,
0
,
0
,
False
,
False
),
(
'保证人日期1'
,
'Guarantor'
,
0
,
'有'
,
False
,
False
),
(
'保证人姓名2'
,
'Guarantor'
,
1
,
0
,
False
,
True
),
(
'保证人证件号2'
,
'Guarantor'
,
1
,
2
,
False
,
True
),
(
'保证人签字2'
,
'Guarantor'
,
1
,
0
,
False
,
False
),
(
'保证人日期2'
,
'Guarantor'
,
1
,
'有'
,
False
,
False
),
(
'借款人签字及时间'
,
'
借款人签字及时间'
,
'
Borrower'
,
0
,
0
,
True
,
False
),
(
'借款人姓名'
,
'
借款人姓名'
,
'
Borrower'
,
0
,
0
,
True
,
True
),
(
'借款人证件号'
,
'
借款人证件号'
,
'
Borrower'
,
0
,
2
,
True
,
True
),
(
'主借人签字'
,
'
主借人签字'
,
'
Borrower'
,
0
,
0
,
True
,
False
),
(
'主借人日期'
,
'
主借人日期'
,
'
Borrower'
,
0
,
'有'
,
True
,
False
),
(
'共借人姓名'
,
'
共借人&抵押人姓名'
,
'
Co-Borrower'
,
0
,
0
,
False
,
True
),
(
'共借人证件号'
,
'
共借人&抵押人证件号'
,
'
Co-Borrower'
,
0
,
2
,
False
,
True
),
(
'共借人签字'
,
'
共借人签字'
,
'
Co-Borrower'
,
0
,
0
,
False
,
False
),
(
'共借人日期'
,
'
共借人日期'
,
'
Co-Borrower'
,
0
,
'有'
,
False
,
False
),
(
'保证人姓名1'
,
'
保证人姓名1'
,
'
Guarantor'
,
0
,
0
,
False
,
True
),
(
'保证人证件号1'
,
'
保证人证件号1'
,
'
Guarantor'
,
0
,
2
,
False
,
True
),
(
'保证人签字1'
,
'
保证人签字1'
,
'
Guarantor'
,
0
,
0
,
False
,
False
),
(
'保证人日期1'
,
'
保证人日期1'
,
'
Guarantor'
,
0
,
'有'
,
False
,
False
),
(
'保证人姓名2'
,
'
保证人姓名2'
,
'
Guarantor'
,
1
,
0
,
False
,
True
),
(
'保证人证件号2'
,
'
保证人证件号2'
,
'
Guarantor'
,
1
,
2
,
False
,
True
),
(
'保证人签字2'
,
'
保证人签字2'
,
'
Guarantor'
,
1
,
0
,
False
,
False
),
(
'保证人日期2'
,
'
保证人日期2'
,
'
Guarantor'
,
1
,
'有'
,
False
,
False
),
]
# key, app_type, id_idx, field_idx, is_force, e_write, 公户跳过
ROLE_LIST_2
=
[
(
'抵押人'
,
'Borrower'
,
0
,
0
,
True
,
True
,
False
),
(
'抵押人证件号码'
,
'Borrower'
,
0
,
2
,
True
,
True
,
False
),
(
'抵押人签字'
,
'Borrower'
,
0
,
0
,
True
,
False
,
False
),
(
'抵押人'
,
'Borrower'
,
'Co-Borrower'
,
0
,
0
,
True
,
True
,
False
),
(
'抵押人证件号码'
,
'Borrower'
,
'Co-Borrower'
,
0
,
2
,
True
,
True
,
False
),
(
'抵押人签字'
,
'Borrower'
,
'Co-Borrower'
,
0
,
0
,
True
,
False
,
False
),
(
'抵押人配偶'
,
'Co-Borrower'
,
0
,
0
,
False
,
True
,
True
),
(
'抵押人配偶证件号码'
,
'Co-Borrower'
,
0
,
2
,
False
,
True
,
True
),
(
'抵押人配偶签字'
,
'Co-Borrower'
,
0
,
0
,
False
,
False
,
True
),
(
'抵押人配偶'
,
'Co-Borrower'
,
'Co-Borrower'
,
0
,
0
,
False
,
True
,
True
),
(
'抵押人配偶证件号码'
,
'Co-Borrower'
,
'Co-Borrower'
,
0
,
2
,
False
,
True
,
True
),
(
'抵押人配偶签字'
,
'Co-Borrower'
,
'Co-Borrower'
,
0
,
0
,
False
,
False
,
True
),
]
ROLE_LIST_1
=
[
(
'承租人姓名'
,
'Borrower'
,
0
,
0
,
True
,
True
),
(
'承租人证件号'
,
'Borrower'
,
0
,
2
,
True
,
True
),
(
'承租人签字'
,
'Borrower'
,
0
,
0
,
True
,
False
),
(
'承租人姓名'
,
'
承租人姓名'
,
'
Borrower'
,
0
,
0
,
True
,
True
),
(
'承租人证件号'
,
'
承租人证件号'
,
'
Borrower'
,
0
,
2
,
True
,
True
),
(
'承租人签字'
,
'
承租人签字'
,
'
Borrower'
,
0
,
0
,
True
,
False
),
(
'共同承租人姓名'
,
'Co-Borrower'
,
0
,
0
,
False
,
True
),
(
'共同承租人证件号'
,
'Co-Borrower'
,
0
,
2
,
False
,
True
),
(
'共同承租人签字'
,
'Co-Borrower'
,
0
,
0
,
False
,
False
),
(
'共同承租人姓名'
,
'
共同承租人&抵押人姓名'
,
'
Co-Borrower'
,
0
,
0
,
False
,
True
),
(
'共同承租人证件号'
,
'
共同承租人&抵押人证件号'
,
'
Co-Borrower'
,
0
,
2
,
False
,
True
),
(
'共同承租人签字'
,
'
共同承租人签字'
,
'
Co-Borrower'
,
0
,
0
,
False
,
False
),
(
'保证人姓名1'
,
'Guarantor'
,
0
,
0
,
False
,
True
),
(
'保证人证件号1'
,
'Guarantor'
,
0
,
2
,
False
,
True
),
(
'保证人签字1'
,
'Guarantor'
,
0
,
0
,
False
,
False
),
(
'保证人姓名1'
,
'
保证人姓名1'
,
'
Guarantor'
,
0
,
0
,
False
,
True
),
(
'保证人证件号1'
,
'
保证人证件号1'
,
'
Guarantor'
,
0
,
2
,
False
,
True
),
(
'保证人签字1'
,
'
保证人签字1'
,
'
Guarantor'
,
0
,
0
,
False
,
False
),
(
'保证人姓名2'
,
'Guarantor'
,
1
,
0
,
False
,
True
),
(
'保证人证件号2'
,
'Guarantor'
,
1
,
2
,
False
,
True
),
(
'保证人签字2'
,
'Guarantor'
,
1
,
0
,
False
,
False
),
(
'保证人姓名2'
,
'
保证人姓名2'
,
'
Guarantor'
,
1
,
0
,
False
,
True
),
(
'保证人证件号2'
,
'
保证人证件号2'
,
'
Guarantor'
,
1
,
2
,
False
,
True
),
(
'保证人签字2'
,
'
保证人签字2'
,
'
Guarantor'
,
1
,
0
,
False
,
False
),
]
GZS_REASON_1
=
'此申请有ASP产品,需人工核查'
...
...
@@ -1797,8 +1797,8 @@ HMH_COMPARE_LOGIC = {
}
BD_COMPARE_LOGIC
=
{
'被保险人姓名'
:
(
'被保险人姓名'
,
's
e_name_compare'
,
{
},
'保单被保险人姓名与系统不一致'
),
'被保险人证件号码'
:
(
'被保险人证件号码'
,
's
e_common_compare'
,
{
'is_bd_id'
:
True
},
'保单身份证号需人工核查'
),
'被保险人姓名'
:
(
'被保险人姓名'
,
's
uper_list_compare'
,
{
'method'
:
'name'
},
'保单被保险人姓名与系统不一致'
),
'被保险人证件号码'
:
(
'被保险人证件号码'
,
's
uper_list_compare'
,
{
'method'
:
'common'
,
'is_bd_id'
:
True
},
'保单身份证号需人工核查'
),
'车架号'
:
(
'车架号'
,
'se_common_compare'
,
{},
'保单车架号与系统不一致'
),
'机动车损失保险金额'
:
(
'机动车损失保险金额'
,
'se_amount_lte_compare'
,
{},
'保单车损险异常'
),
'第三者责任保险金额'
:
(
'机动车第三者责任保险金额'
,
'se_amount_lte_compare'
,
{},
'保单三者险异常'
),
...
...
@@ -1868,7 +1868,9 @@ HIL_CONTRACT_1_COMPARE_LOGIC = {
'承租人签字'
:
(
'承租人签字'
,
'se_contain_compare'
,
{},
'售后回租合同承租人签字与系统不一致'
),
'共同承租人姓名'
:
(
'共同承租人姓名'
,
'se_name_compare'
,
{},
'售后回租合同共同承租人姓名与系统不一致'
),
'共同承租人&抵押人姓名'
:
(
'共同承租人姓名'
,
'se_name_compare'
,
{},
'售后回租合同共同承租人&抵押人姓名与系统不一致'
),
'共同承租人证件号'
:
(
'共同承租人证件号'
,
'se_common_compare'
,
{},
'售后回租合同共同承租人证件号与系统不一致'
),
'共同承租人&抵押人证件号'
:
(
'共同承租人证件号'
,
'se_common_compare'
,
{},
'售后回租合同共同承租人&抵押人证件号与系统不一致'
),
'共同承租人签字'
:
(
'共同承租人签字'
,
'se_contain_compare'
,
{},
'售后回租合同共同承租人签字与系统不一致'
),
'保证人姓名1'
:
(
'保证人姓名1'
,
'se_name_compare'
,
{},
'售后回租合同保证人姓名1与系统不一致'
),
...
...
@@ -1931,7 +1933,9 @@ HT_COMPARE_LOGIC = {
'借款人姓名'
:
(
'借款人姓名'
,
'se_common_compare'
,
{},
'主合同主借人姓名与系统不一致'
),
'借款人证件号'
:
(
'借款人证件号'
,
'se_common_compare'
,
{},
'主合同主借人证件号码与系统不一致'
),
'共借人姓名'
:
(
'共借人姓名'
,
'se_common_compare'
,
{},
'主合同共借人姓名与系统不一致'
),
'共借人&抵押人姓名'
:
(
'共借人姓名'
,
'se_common_compare'
,
{},
'主合同共借人&抵押人姓名与系统不一致'
),
'共借人证件号'
:
(
'共借人证件号'
,
'se_common_compare'
,
{},
'主合同共借人证件号码与系统不一致'
),
'共借人&抵押人证件号'
:
(
'共借人证件号'
,
'se_common_compare'
,
{},
'主合同共借人&抵押人证件号与系统不一致'
),
'保证人姓名1'
:
(
'保证人姓名1'
,
'se_common_compare'
,
{},
'主合同担保人1姓名与系统不一致'
),
'保证人证件号1'
:
(
'保证人证件号1'
,
'se_common_compare'
,
{},
'主合同担保人1证件号码与系统不一致'
),
'保证人姓名2'
:
(
'保证人姓名2'
,
'se_common_compare'
,
{},
'主合同担保人2姓名与系统不一致'
),
...
...
src/celery_compare/tasks.py
View file @
ce95c8f
This diff is collapsed.
Click to expand it.
src/common/tools/comparison.py
View file @
ce95c8f
...
...
@@ -180,6 +180,16 @@ class Comparison:
else
:
return
self
.
RESULT_N
def
super_list_compare
(
self
,
input_list
,
ocr_str
,
**
kwargs
):
for
input_str
in
input_list
:
if
kwargs
.
get
(
'method'
,
'common'
)
==
'name'
:
if
self
.
se_name_compare
(
input_str
,
ocr_str
,
**
kwargs
)
==
self
.
RESULT_Y
:
return
self
.
RESULT_Y
else
:
if
self
.
se_common_compare
(
input_str
,
ocr_str
,
**
kwargs
)
==
self
.
RESULT_Y
:
return
self
.
RESULT_Y
return
self
.
RESULT_N
def
se_date_contain_compare
(
self
,
input_str
,
ocr_str_or_list
,
**
kwargs
):
return
self
.
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