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
022dba8b
authored
2022-10-14 15:14:34 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
16f2b62f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
11 deletions
src/prese/compare.py
src/prese/consts.py
src/prese/compare.py
View file @
022dba8
...
...
@@ -92,7 +92,9 @@ def get_pos_compare_info(pos_info):
# 合同准备项
# 还款计划表
schedule_list
=
[]
for
schedule_dict
in
quotationt_info
.
get
(
'monthlyPaymentInfo'
,
[]):
no_sort_tmp_list
=
quotationt_info
.
get
(
'monthlyPaymentInfo'
,
[])
no_sort_tmp_list
.
sort
(
key
=
lambda
x
:
x
[
'term'
])
for
schedule_dict
in
no_sort_tmp_list
:
tmp_str
=
"{1}{0}{2}"
.
format
(
consts
.
SPLIT_STR
,
str
(
schedule_dict
.
get
(
'term'
,
''
)),
str
(
schedule_dict
.
get
(
'amount'
,
''
)))
schedule_list
.
append
(
tmp_str
)
...
...
@@ -113,7 +115,7 @@ def get_pos_compare_info(pos_info):
(
consts
.
ASP_SUM_NAME
,
''
,
format
(
quotationt_info
.
get
(
'associatedServicePrincipal'
,
0
),
'.2f'
),
str
(
quotationt_info
.
get
(
'associatedServicePrincipal'
,
0
)
),
)
)
...
...
@@ -318,7 +320,7 @@ def pre_compare_license_id(license_en, id_res_list, field_list, applicant_type):
result_field_list
.
append
((
value
,
ocr_str
,
result
,
'{0}{1}'
.
format
(
applicant_type
,
comments
)))
if
not
is_find
:
result_field_list
=
[(
empty_str
,
empty_str
,
consts
.
RESULT_N
,
'{0}{1}'
.
format
(
applicant_type
,
no_find_comment
))]
result_field_list
=
[(
empty_str
,
empty_str
,
consts
.
RESULT_N
,
no_find_comment
.
format
(
applicant_type
))]
return
result_field_list
...
...
src/prese/consts.py
View file @
022dba8
...
...
@@ -110,17 +110,22 @@ HT_COMPARE_LOGIC = {
AFC_CON_FIELDS
[
8
]:
(
'ASP项目详情-重要条款'
,
'se_asp_compare'
,
{},
'合同(重要条款)ASP名称或者金额与系统不一致'
),
AFC_CON_FIELDS
[
9
]:
(
'ASP项目详情'
,
'se_asp_compare'
,
{},
'合同ASP名称或者金额与系统不一致'
),
'主借人日期'
:
(
'主借人日期'
,
'se_have_compare'
,
{},
'合同主借款人签字日期无'
),
'共借人日期'
:
(
'共借人日期'
,
'se_have_compare'
,
{},
'合同共借人签字日期无'
),
'保证人日期1'
:
(
'保证人日期1'
,
'se_have_compare'
,
{},
'合同担保人1签字日期无'
),
'保证人日期2'
:
(
'保证人日期2'
,
'se_have_compare'
,
{},
'合同担保人2签字日期无'
),
}
ID_COMPARE_LOGIC
=
{
'customerName'
:
(
'姓名'
,
'se_name_compare'
,
{},
'身份证姓名与系统不一致'
),
'idNum'
:
(
'公民身份号码'
,
'se_common_compare'
,
{},
'身份证号码与系统不一致'
),
ID_FIELDS
[
0
]
:
(
'姓名'
,
'se_name_compare'
,
{},
'身份证姓名与系统不一致'
),
ID_FIELDS
[
1
]
:
(
'公民身份号码'
,
'se_common_compare'
,
{},
'身份证号码与系统不一致'
),
'idExpiryDate'
:
(
'有效期限'
,
'se_date_compare_pre'
,
{},
'身份证有效期疑似过期'
),
ID_FIELDS
[
2
]
:
(
'有效期限'
,
'se_date_compare_pre'
,
{},
'身份证有效期疑似过期'
),
}
PRE_COMPARE_LOGIC_MAP
=
{
ID_EN
:
(
ID_OCR_FIELD
,
ID_COMPARE_LOGIC
,
'请确认是否提供身份证件'
),
ID_EN
:
(
ID_OCR_FIELD
,
ID_COMPARE_LOGIC
,
'请确认是否提供
{0}
身份证件'
),
MVI_EN
:
(
MVI_OCR_FIELD
,
MVI_COMPARE_LOGIC
,
'请确认是否提供发票'
),
BC_EN
:
(
BC_OCR_FIELD
,
BC_COMPARE_LOGIC
,
'请确认是否提供银行卡'
),
HMH_EN
:
(
HMH_OCR_FIELD
,
HMH_COMPARE_LOGIC
,
'请确认是否已完成抵押登记豁免函签署'
),
...
...
@@ -143,8 +148,8 @@ ID_DATE_MAP = {
}
APPLICANT_TYPE_MAP
=
{
'CUSTR'
:
'
Applicant
'
,
'COAPP'
:
'
Co Applicant
'
,
'GAUTR1'
:
'
guarantor
1'
,
'GAUTR2'
:
'
guarantor
2'
,
'CUSTR'
:
'
主借人
'
,
'COAPP'
:
'
共借人
'
,
'GAUTR1'
:
'
担保人
1'
,
'GAUTR2'
:
'
担保人
2'
,
}
...
...
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