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
d2a52df8
authored
2020-12-09 11:21:16 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
diff color
1 parent
026ffd5a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
src/apps/doc/ocr/wb.py
src/apps/doc/ocr/wb.py
View file @
d2a52df
...
...
@@ -410,6 +410,7 @@ class BSWorkbook(Workbook):
amount_mapping
=
{}
amount_fill_row
=
set
()
loan_fill_row
=
set
()
for
rows
in
new_ws
.
iter_rows
(
min_row
=
2
):
length
=
len
(
rows
)
...
...
@@ -431,7 +432,7 @@ class BSWorkbook(Workbook):
# 贷款关键词高亮
if
summary_cell
is
not
None
and
summary_cell_value
in
high_light_keyword
:
amount
_fill_row
.
add
(
summary_cell
.
row
)
loan
_fill_row
.
add
(
summary_cell
.
row
)
# 3.3.余额转数值
over_success
=
False
...
...
@@ -474,6 +475,7 @@ class BSWorkbook(Workbook):
if
fill_rows
:
amount_fill_row
.
add
(
amount_cell
.
row
)
amount_fill_row
.
update
(
fill_rows
)
else
:
amount_mapping
.
setdefault
(
date_cell_value
[:
10
],
{})
.
setdefault
(
amount_cell
.
value
,
[])
.
append
(
amount_cell
.
row
)
...
...
@@ -505,6 +507,10 @@ class BSWorkbook(Workbook):
# if amount_cell is not None:
# amount_cell.fill = self.amount_fill
for
row
in
loan_fill_row
:
for
cell
in
new_ws
[
row
]:
cell
.
fill
=
self
.
loan_fill
# 3.6.同一天相同进出账高亮
del
amount_mapping
for
row
in
amount_fill_row
:
...
...
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