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
d63800d3
authored
2021-01-22 14:15:27 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix idcard bug
1 parent
1762216b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
src/apps/doc/management/commands/folder_ocr_process.py
src/apps/doc/management/commands/idcard_daily.py
src/apps/doc/management/commands/idcard_monthly.py
src/apps/doc/management/commands/folder_ocr_process.py
View file @
d63800d
...
...
@@ -94,6 +94,7 @@ class Command(BaseCommand, LoggerMixin):
wb
=
BSWorkbook
(
set
(),
set
(),
set
(),
set
())
wb
.
simple_license_rebuild
(
license_summary
,
consts
.
DOC_SCHEME_LIST
[
0
])
wb
.
remove_base_sheet
()
wb
.
save
(
excel_path
)
except
Exception
as
e
:
self
.
folder_log
.
error
(
'{0} [wb build error] [path={1}] [error={2}]'
.
format
(
...
...
src/apps/doc/management/commands/idcard_daily.py
View file @
d63800d
...
...
@@ -35,8 +35,10 @@ class Command(BaseCommand, LoggerMixin):
else
:
date_str
=
date
.
strftime
(
'
%
Y-
%
m-
%
d'
)
afc_excel_dir
=
os
.
path
.
join
(
conf
.
DATA_DIR
,
'AFC'
,
'IdCard'
)
hil_excel_dir
=
os
.
path
.
join
(
conf
.
DATA_DIR
,
'HIL'
,
'IdCard'
)
# afc_excel_dir = os.path.join(conf.DATA_DIR, 'AFC', 'IdCard')
# hil_excel_dir = os.path.join(conf.DATA_DIR, 'HIL', 'IdCard')
afc_excel_dir
=
conf
.
IC_REPORT_AFC
hil_excel_dir
=
conf
.
IC_REPORT_HIL
if
not
os
.
path
.
exists
(
afc_excel_dir
)
or
not
os
.
path
.
exists
(
hil_excel_dir
):
print
(
'excel_dir not exist'
)
return
...
...
src/apps/doc/management/commands/idcard_monthly.py
View file @
d63800d
...
...
@@ -19,7 +19,10 @@ class Command(BaseCommand, LoggerMixin):
pre_mouth
=
end_day_in_mouth
-
datetime
.
timedelta
(
days
=
1
)
for
target_dir
in
self
.
dirs
:
excel_dir
=
os
.
path
.
join
(
conf
.
DATA_DIR
,
target_dir
,
'IdCard'
)
if
target_dir
==
'AFC'
:
excel_dir
=
conf
.
IC_REPORT_AFC
else
:
excel_dir
=
conf
.
IC_REPORT_HIL
if
not
os
.
path
.
exists
(
excel_dir
):
print
(
'excel dir not exists: {0}'
.
format
(
excel_dir
))
return
...
...
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