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
026ffd5a
authored
2020-12-09 10:50:18 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
modify highlight
1 parent
94c16027
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
src/apps/doc/ocr/wb.py
src/apps/doc/ocr/wb.py
View file @
026ffd5
...
...
@@ -429,6 +429,10 @@ class BSWorkbook(Workbook):
outlay_cell_value
=
None
if
outlay_cell
is
None
else
outlay_cell
.
value
borrow_cell_value
=
None
if
borrow_cell
is
None
else
borrow_cell
.
value
# 贷款关键词高亮
if
summary_cell
is
not
None
and
summary_cell_value
in
high_light_keyword
:
amount_fill_row
.
add
(
summary_cell
.
row
)
# 3.3.余额转数值
over_success
=
False
if
over_cell
is
not
None
:
...
...
@@ -496,17 +500,19 @@ class BSWorkbook(Workbook):
new_amount_cell_value
=
None
if
amount_cell
is
None
else
amount_cell
.
value
tmp_ws
.
append
((
summary_cell_value
,
date_cell_value
,
new_amount_cell_value
))
# 贷款关键词高亮
elif
summary_cell_value
in
high_light_keyword
:
summary_cell
.
fill
=
self
.
amount_fill
if
amount_cell
is
not
None
:
amount_cell
.
fill
=
self
.
amount_fill
#
elif summary_cell_value in high_light_keyword:
#
summary_cell.fill = self.amount_fill
#
if amount_cell is not None:
#
amount_cell.fill = self.amount_fill
# 3.6.同一天相同进出账高亮
del
amount_mapping
for
row
in
amount_fill_row
:
new_ws
[
row
][
amount_cell_idx
]
.
fill
=
self
.
amount_fill
if
summary_cell_idx
is
not
None
:
new_ws
[
row
][
summary_cell_idx
]
.
fill
=
self
.
amount_fill
for
cell
in
new_ws
[
row
]:
cell
.
fill
=
self
.
amount_fill
# new_ws[row][amount_cell_idx].fill = self.amount_fill
# if summary_cell_idx is not None:
# new_ws[row][summary_cell_idx].fill = self.amount_fill
# 关键词2信息提取
ms
.
append
(
self
.
blank_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