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
f0f669d6
authored
2023-02-13 19:05:52 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature/enhancement-file-name-change' into feature/uat-tmp
2 parents
53e88d69
284b3e1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
src/apps/doc/ocr/wb.py
src/apps/doc/ocr/wb.py
View file @
f0f669d
...
...
@@ -39,17 +39,17 @@ class BSWorkbook(Workbook):
self
.
MAX_MEAN
=
31
self
.
need_follow
=
False
@staticmethod
def
date_calibration
(
date_str
):
result
=
True
try
:
if
date_str
[
-
2
]
not
in
[
'20'
,
'21'
]:
result
=
False
if
date_str
[
-
5
:
-
3
]
not
in
[
'03'
,
'06'
,
'09'
,
'12'
]:
result
=
False
except
Exception
as
e
:
result
=
False
return
result
#
@staticmethod
#
def date_calibration(date_str):
#
result = True
#
try:
#
if date_str[-2] not in ['20', '21']:
#
result = False
#
if date_str[-5:-3] not in ['03', '06', '09', '12']:
#
result = False
#
except Exception as e:
#
result = False
#
return result
@staticmethod
def
replace_newline
(
queryset_value
):
...
...
@@ -673,13 +673,13 @@ class BSWorkbook(Workbook):
# 关键词1信息提取:结息
for
row
in
tmp3_ws
.
iter_rows
(
values_only
=
True
):
ms
.
append
(
row
)
# 建设银行
if
classify
in
consts
.
JSYH_CLASSIFY
:
if
isinstance
(
row
[
1
],
str
)
and
self
.
date_calibration
(
row
[
1
]):
pass
else
:
for
cell
in
ms
[
ms
.
max_row
]:
cell
.
fill
=
self
.
amount_fill
#
#
建设银行
#
if classify in consts.JSYH_CLASSIFY:
#
if isinstance(row[1], str) and self.date_calibration(row[1]):
#
pass
#
else:
#
for cell in ms[ms.max_row]:
#
cell.fill = self.amount_fill
self
.
remove
(
tmp3_ws
)
# 关键词2信息提取
...
...
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