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
136ec512
authored
2024-08-02 15:40:04 +0800
by
冯轩
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature/CHINARPA-4660' into feature/uat-tmp
2 parents
a6787ca7
f81cb90d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
22 deletions
src/celery_compare/tasks.py
src/celery_compare/tasks.py
View file @
136ec51
...
...
@@ -954,10 +954,10 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
is_cdfl_bo
=
True
# CHINARPA-4660 是否公户判断
is_bo_
tccor
=
False
is_bo_
corporate
=
False
customersubType
=
individual_info
.
get
(
'customersubType'
,
''
)
if
individual_info
[
'applicantType'
]
==
consts
.
APPLICANT_TYPE_ORDER
[
0
]
and
customersubType
==
'TCCOR'
:
is_bo_
tccor
=
True
if
individual_info
[
'applicantType'
]
==
consts
.
APPLICANT_TYPE_ORDER
[
0
]
and
is_corporate
:
is_bo_
corporate
=
True
for
id_info
in
individual_info
.
get
(
'IDInformation'
,
[]):
if
id_info
.
get
(
'idType'
)
in
consts
.
SE_CMS_FIRST_ID_FIELD_MAPPING
:
...
...
@@ -972,9 +972,7 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
license_dict
[
license_en
]
=
field_input
all_id_num
.
append
(
id_num
)
# 营业执照 --------------------------------------------------------------------------------------------------
# 4660 修改比对营业执照文档必要性的判断条件
# elif id_info.get('idType') in ['Unified Social Credit Code', 'Tax Number', 'Business License Number']:
elif
is_bo_tccor
:
elif
id_info
.
get
(
'idType'
)
in
[
'Unified Social Credit Code'
,
'Tax Number'
,
'Business License Number'
]:
# ['companyName', 'legalRepName', 'businessLicenseNo', 'organizationCreditCode',
# 'taxRegistrationCertificateNo', 'establishmentDate', 'businessLicenseDueDate']
id_num
=
decode_des
(
id_info
.
get
(
'idNum'
,
''
),
des_key
)
...
...
@@ -984,7 +982,7 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
(
'businessLicenseNo'
,
id_num
),
(
'organizationCreditCode'
,
id_num
),
(
'taxRegistrationCertificateNo'
,
id_num
),
(
'businessLicenseDueDate'
,
id_info
.
get
(
'idExpiryDate'
,
''
)),
#
('businessLicenseDueDate', id_info.get('idExpiryDate', '')),
]
if
is_corporate
:
...
...
@@ -1139,7 +1137,7 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
totalAssets
=
corporateFinancialInformation
.
get
(
'totalAssets'
,
0
)
totalLiabilitiesAndOwnersEquity
=
corporateFinancialInformation
.
get
(
'totalLiabilitiesAndOwnersEquity'
,
0
)
netProfit
=
corporateFinancialInformation
.
get
(
'netProfit'
,
0
)
if
is_bo_
tccor
:
if
is_bo_
corporate
:
financial_statement_input
.
append
((
consts
.
SE_FS_FIELD
[
0
],
hashCode
))
financial_statement_input
.
append
((
consts
.
SE_FS_FIELD
[
1
],
consts
.
SE_STAMP_VALUE
))
financial_statement_input
.
append
((
consts
.
SE_FS_FIELD
[
2
],
fiscalYear
))
...
...
@@ -1404,7 +1402,7 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
if
len
(
main_role_info
[
app_type
])
>=
id_idx
+
1
:
is_find
=
True
if
isinstance
(
field_idx
,
int
):
if
key
==
'承租人签字'
and
is_bo_
tccor
:
if
key
==
'承租人签字'
and
is_bo_
corporate
:
hil_contract_1_input
.
append
((
key
,
legal_name
))
else
:
hil_contract_1_input
.
append
((
key
,
main_role_info
[
app_type
][
id_idx
][
field_idx
]))
...
...
@@ -1449,7 +1447,7 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
if
len
(
main_role_info
[
app_type
])
>=
id_idx
+
1
:
is_find
=
True
if
isinstance
(
field_idx
,
int
):
if
key
==
'抵押人签字'
and
is_bo_
tccor
:
if
key
==
'抵押人签字'
and
is_bo_
corporate
:
hil_contract_2_input
.
append
((
key
,
legal_name
))
else
:
hil_contract_2_input
.
append
((
key
,
main_role_info
[
app_type
][
id_idx
][
field_idx
]))
...
...
@@ -1519,7 +1517,7 @@ def get_se_cms_compare_info_auto(application_id, last_obj, application_entity, d
if
len
(
main_role_info
[
app_type
])
>=
id_idx
+
1
:
is_find
=
True
if
isinstance
(
field_idx
,
int
):
if
(
key
==
'借款人签字及时间'
or
key
==
'主借人签字'
)
and
is_bo_
tccor
:
if
(
key
==
'借款人签字及时间'
or
key
==
'主借人签字'
)
and
is_bo_
corporate
:
afc_contract_input
.
append
((
key
,
legal_name
))
else
:
afc_contract_input
.
append
((
key
,
main_role_info
[
app_type
][
id_idx
][
field_idx
]))
...
...
@@ -1593,10 +1591,10 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
is_cdfl_bo
=
True
# CHINARPA-4660 是否公户判断
is_bo_
tccor
=
False
is_bo_
corporate
=
False
customersubType
=
individual_info
.
get
(
'customersubType'
,
''
)
if
individual_info
[
'applicantType'
]
==
consts
.
APPLICANT_TYPE_ORDER
[
0
]
and
customersubType
==
'TCCOR'
:
is_bo_
tccor
=
True
if
individual_info
[
'applicantType'
]
==
consts
.
APPLICANT_TYPE_ORDER
[
0
]
and
is_corporate
:
is_bo_
corporate
=
True
for
id_info
in
individual_info
.
get
(
'IDInformation'
,
[]):
if
id_info
.
get
(
'idType'
)
in
consts
.
SE_CMS_FIRST_ID_FIELD_MAPPING
:
...
...
@@ -1611,9 +1609,7 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
license_dict
[
license_en
]
=
field_input
all_id_num
.
append
(
id_num
)
# 营业执照 --------------------------------------------------------------------------------------------------
# 4660 修改比对营业执照文档必要性的判断条件
# elif id_info.get('idType') in ['Unified Social Credit Code', 'Tax Number', 'Business License Number']:
elif
is_bo_tccor
:
elif
id_info
.
get
(
'idType'
)
in
[
'Unified Social Credit Code'
,
'Tax Number'
,
'Business License Number'
]:
# ['companyName', 'legalRepName', 'businessLicenseNo', 'organizationCreditCode',
# 'taxRegistrationCertificateNo', 'establishmentDate', 'businessLicenseDueDate']
id_num
=
decode_des
(
id_info
.
get
(
'idNum'
,
''
),
des_key
)
...
...
@@ -1778,7 +1774,7 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
totalAssets
=
corporateFinancialInformation
.
get
(
'totalAssets'
,
0
)
totalLiabilitiesAndOwnersEquity
=
corporateFinancialInformation
.
get
(
'totalLiabilitiesAndOwnersEquity'
,
0
)
netProfit
=
corporateFinancialInformation
.
get
(
'netProfit'
,
0
)
if
is_bo_
tccor
:
if
is_bo_
corporate
:
financial_statement_input
.
append
((
consts
.
SE_FS_FIELD
[
0
],
hashCode
))
financial_statement_input
.
append
((
consts
.
SE_FS_FIELD
[
1
],
consts
.
SE_STAMP_VALUE
))
financial_statement_input
.
append
((
consts
.
SE_FS_FIELD
[
2
],
fiscalYear
))
...
...
@@ -2006,7 +2002,7 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
if
len
(
main_role_info
[
app_type
])
>=
id_idx
+
1
:
is_find
=
True
if
isinstance
(
field_idx
,
int
):
if
key
==
'承租人签字'
and
is_bo_
tccor
:
if
key
==
'承租人签字'
and
is_bo_
corporate
:
hil_contract_1_input
.
append
((
key
,
legal_name
))
else
:
hil_contract_1_input
.
append
((
key
,
main_role_info
[
app_type
][
id_idx
][
field_idx
]))
...
...
@@ -2028,7 +2024,7 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
(
consts
.
SE_HIL_CON_3_FIELD
[
6
],
main_id
),
]
if
online_sign
:
if
is_bo_
tccor
:
if
is_bo_
corporate
:
hil_contract_3_input
.
append
((
consts
.
SE_HIL_CON_3_FIELD
[
7
],
legal_name
))
else
:
hil_contract_3_input
.
append
((
consts
.
SE_HIL_CON_3_FIELD
[
7
],
main_name
))
...
...
@@ -2054,7 +2050,7 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
if
len
(
main_role_info
[
app_type
])
>=
id_idx
+
1
:
is_find
=
True
if
isinstance
(
field_idx
,
int
):
if
key
==
'抵押人签字'
and
is_bo_
tccor
:
if
key
==
'抵押人签字'
and
is_bo_
corporate
:
hil_contract_2_input
.
append
((
key
,
legal_name
))
else
:
hil_contract_2_input
.
append
((
key
,
main_role_info
[
app_type
][
id_idx
][
field_idx
]))
...
...
@@ -2124,7 +2120,7 @@ def get_se_cms_compare_info(application_id, last_obj, application_entity, detect
if
len
(
main_role_info
[
app_type
])
>=
id_idx
+
1
:
is_find
=
True
if
isinstance
(
field_idx
,
int
):
if
(
key
==
'借款人签字及时间'
or
key
==
'主借人签字'
)
and
is_bo_
tccor
:
if
(
key
==
'借款人签字及时间'
or
key
==
'主借人签字'
)
and
is_bo_
corporate
:
afc_contract_input
.
append
((
key
,
legal_name
))
else
:
afc_contract_input
.
append
((
key
,
main_role_info
[
app_type
][
id_idx
][
field_idx
]))
...
...
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