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
a8660b52
authored
2022-12-19 16:06:06 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature/fsm-contract' into fix/report_ca
2 parents
4b929fd6
30a3b7b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
src/apps/doc/consts.py
src/apps/doc/ocr/wb.py
src/apps/doc/consts.py
View file @
a8660b5
...
...
@@ -1086,9 +1086,10 @@ CONTRACT_MAP = {
FSM_CONTRACT_WEP_CLASSIFY
:
FSM_CONTRACT_WEP_CN_NAME
,
FSM_CONTRACT_MSI_CLASSIFY
:
FSM_CONTRACT_MSI_CN_NAME
,
FSM_CONTRACT_SC_CLASSIFY
:
FSM_CONTRACT_SC_CN_NAME
,
}
FSM_CONTRACT_CLASSIFY_SET
=
{
FSM_CONTRACT_WEP_CLASSIFY
,
FSM_CONTRACT_MSI_CLASSIFY
,
FSM_CONTRACT_SC_CLASSIFY
}
# 保单
INSURANCE_CN_NAME
=
'保单'
INSURANCE_CLASSIFY
=
42
...
...
src/apps/doc/ocr/wb.py
View file @
a8660b5
...
...
@@ -780,10 +780,12 @@ class BSWorkbook(Workbook):
if
field_str
is
not
None
:
count_list
.
append
((
field_str
,
count
))
def
contract_rebuild
(
self
,
contract_result_dict
):
def
contract_rebuild
(
self
,
contract_result_dict
,
is_ca
=
False
):
for
classify
,
contract_result
in
contract_result_dict
.
items
():
if
len
(
contract_result
)
==
0
:
continue
if
is_ca
and
classify
not
in
consts
.
FSM_CONTRACT_CLASSIFY_SET
:
continue
ws
=
self
.
create_sheet
(
consts
.
CONTRACT_MAP
.
get
(
classify
))
for
i
in
range
(
30
):
if
str
(
i
)
in
contract_result
:
...
...
@@ -906,6 +908,7 @@ class BSWorkbook(Workbook):
else
:
self
.
bs_rebuild
(
bs_summary
,
res_count_tuple
,
metadata
)
self
.
license_rebuild
(
license_summary
,
document_scheme
,
count_list
)
self
.
contract_rebuild
(
contract_result
,
True
)
self
.
move_res_sheet
()
self
.
remove_base_sheet
()
return
count_list
...
...
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