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
1a89d0da
authored
2022-04-13 10:18:53 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
SE logic modify
1 parent
bedc2671
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
17 deletions
src/apps/doc/ocr/wb.py
src/celery_compare/tasks.py
src/common/mixins.py
src/apps/doc/ocr/wb.py
View file @
1a89d0d
...
...
@@ -540,7 +540,7 @@ class BSWorkbook(Workbook):
row_num
=
2
for
cell
in
rows
:
row_num
=
cell
.
row
if
isinstance
(
cell
.
value
,
str
)
and
cell
.
value
.
find
(
role_name
)
!=
-
1
:
if
isinstance
(
cell
.
value
,
str
)
and
cell
.
value
.
find
(
role_name
)
!=
-
1
and
summary_cell
is
not
None
:
fill_row
.
add
(
summary_cell
.
row
)
break
...
...
@@ -666,7 +666,9 @@ class BSWorkbook(Workbook):
new_card
=
self
.
get_new_card
(
card
)
# 1.原表表头收集、按照月份分割
# 1.1 总结首行信息
role_name
=
summary
.
get
(
'role'
,
consts
.
UNKNOWN_ROLE
)
.
translate
(
consts
.
SHEET_TITLE_TRANS
)
.
strip
()[:
3
]
src_role_name
=
summary
.
get
(
'role'
,
consts
.
UNKNOWN_ROLE
)
role_name
=
src_role_name
.
translate
(
consts
.
SHEET_TITLE_TRANS
)
.
strip
()[:
3
]
if
isinstance
(
src_role_name
,
str
)
\
else
consts
.
UNKNOWN_ROLE
classify
=
summary
.
get
(
'classify'
,
0
)
sheet_header_info
=
{}
header_info
=
{}
...
...
src/celery_compare/tasks.py
View file @
1a89d0d
...
...
@@ -1269,8 +1269,8 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True):
(
consts
.
SE_HIL_CON_3_FIELD
[
5
],
hmh_name
),
(
consts
.
SE_HIL_CON_3_FIELD
[
6
],
hmh_id
),
]
if
online_sign
:
hil_contract_3_input
.
append
((
consts
.
SE_HIL_CON_3_FIELD
[
7
],
hmh_name
))
#
if online_sign:
#
hil_contract_3_input.append((consts.SE_HIL_CON_3_FIELD[7], hmh_name))
contract_info
[
consts
.
HIL_CONTRACT_3_EN
]
=
hil_contract_3_input
# HIL合同 车辆租赁抵押合同 --------------------------------------------------------------------------------------
...
...
@@ -1552,18 +1552,18 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals
bank_info
[
consts
.
BC_EN
]
=
bank_field_input
# DDA------------------------------------------------------------------------------------------------------------
if
is_gsyh
or
not
detect_list
[
-
1
]:
dda_field_input
=
[
(
'applicationId(1)'
,
last_obj
.
application_id
),
(
'applicationId(2)'
,
last_obj
.
application_id
),
(
'bankName'
,
bank_name
),
(
'companyName'
,
consts
.
HIL_COMPANY_NAME
if
application_entity
in
consts
.
HIL_SET
else
consts
.
AFC_COMPANY_NAME
),
(
'customerName'
,
dda_name
),
(
'idNum'
,
dda_num
),
(
'accountHolderName'
,
account_holder_name
),
(
'accountNo'
,
account_no
),
]
bank_info
[
consts
.
DDA_EN
]
=
dda_field_input
#
if is_gsyh or not detect_list[-1]:
#
dda_field_input = [
#
('applicationId(1)', last_obj.application_id),
#
('applicationId(2)', last_obj.application_id),
#
('bankName', bank_name),
#
('companyName', consts.HIL_COMPANY_NAME if application_entity in consts.HIL_SET else consts.AFC_COMPANY_NAME),
#
('customerName', dda_name),
#
('idNum', dda_num),
#
('accountHolderName', account_holder_name),
#
('accountNo', account_no),
#
]
#
bank_info[consts.DDA_EN] = dda_field_input
if
len
(
bank_info
)
>
0
:
compare_info
[
'bankInfo'
]
=
bank_info
...
...
src/common/mixins.py
View file @
1a89d0d
...
...
@@ -130,7 +130,7 @@ class IWABaseView:
def
get_q_number
(
self
,
iwa_url_base
,
code
,
redirect_uri
,
client_id_base64
):
access_token
=
self
.
get_token
(
iwa_url_base
,
code
,
redirect_uri
,
client_id_base64
)
headers
=
{
'Authorization'
,
'Bearer {0}'
.
format
(
access_token
)
'Authorization'
:
'Bearer {0}'
.
format
(
access_token
)
}
iwa_user_url
=
'{0}userinfo'
.
format
(
iwa_url_base
)
res
=
requests
.
get
(
iwa_user_url
,
headers
=
headers
)
...
...
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