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
a8c68474
authored
2020-09-17 15:24:52 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug
1 parent
793920a0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
src/apps/doc/management/commands/doc_ocr_process.py
src/apps/doc/ocr/wb.py
src/apps/doc/management/commands/doc_ocr_process.py
View file @
a8c6847
...
...
@@ -373,7 +373,7 @@ class Command(BaseCommand, LoggerMixin):
# 4.获取OCR结果并且构建excel文件
bs_summary
=
{}
license_summary
=
{}
unknown_summary
=
[]
unknown_summary
=
{}
interest_keyword
=
Keywords
.
objects
.
filter
(
type
=
KeywordsType
.
INTEREST
.
value
)
.
values_list
(
'keyword'
,
flat
=
True
)
salary_keyword
=
Keywords
.
objects
.
filter
(
...
...
src/apps/doc/ocr/wb.py
View file @
a8c6847
...
...
@@ -169,6 +169,10 @@ class BSWorkbook(Workbook):
0
,
(
ws
.
title
,
idx_list
[
-
1
]
+
min_row
,
ws
.
max_row
,
0
))
def
build_metadata_rows
(
self
,
classify
,
confidence
,
role
,
code
,
print_time
,
start_date
,
end_date
):
if
start_date
is
None
or
end_date
is
None
:
timedelta
=
None
else
:
timedelta
=
(
end_date
-
start_date
)
.
days
metadata_rows
=
[
(
'流水识别置信度'
,
confidence
),
self
.
blank_row
,
...
...
@@ -182,7 +186,7 @@ class BSWorkbook(Workbook):
metadata_rows
.
extend
(
[
self
.
blank_row
,
self
.
date_header
,
(
print_time
,
start_date
,
end_date
,
(
end_date
-
start_date
)
.
days
),
(
print_time
,
start_date
,
end_date
,
timedelta
),
self
.
blank_row
,
self
.
keyword_header
]
)
...
...
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