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
b6896a10
authored
2020-07-27 14:52:39 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix excel extention
1 parent
eb21c5bc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
requirements/prd.txt
src/apps/doc/management/commands/doc_process.py
src/apps/doc/mixins.py
requirements/prd.txt
View file @
b6896a1
...
...
@@ -2,3 +2,4 @@
supervisor==4.2.0
gunicorn==20.0.4
gevent==20.6.2
...
...
src/apps/doc/management/commands/doc_process.py
View file @
b6896a1
...
...
@@ -84,7 +84,7 @@ class Command(BaseCommand, LoggerMixin):
if
not
doc
.
application_id
.
startswith
(
consts
.
FIXED_APPLICATION_ID_PREFIX
):
self
.
edms
.
download
(
pdf_path
,
doc
.
metadata_version_id
)
excel_path
=
os
.
path
.
join
(
doc_data_path
,
'{0}.xls'
.
format
(
doc
.
id
))
excel_path
=
os
.
path
.
join
(
doc_data_path
,
'{0}.xls
x
'
.
format
(
doc
.
id
))
self
.
cronjob_log
.
info
(
'{0} [pdf download success] [business_type={1}] [doc_id={2}] [pdf_path={3}]'
.
format
(
self
.
log_base
,
business_type
,
doc
.
id
,
pdf_path
))
return
doc_data_path
,
excel_path
,
pdf_path
...
...
src/apps/doc/mixins.py
View file @
b6896a1
...
...
@@ -12,7 +12,7 @@ class DocHandler:
elif
file
==
'img'
:
return
'/data/{1}/{0}/{0}_img.zip'
.
format
(
doc_id
,
business_type
)
else
:
return
'/data/{1}/{0}/{0}.xls'
.
format
(
doc_id
,
business_type
)
return
'/data/{1}/{0}/{0}.xls
x
'
.
format
(
doc_id
,
business_type
)
def
get_doc_list
(
self
,
doc_queryset
,
business_type
):
for
doc_dict
in
doc_queryset
:
...
...
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