d63800d3 by 周伟奇

fix idcard bug

1 parent 1762216b
......@@ -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(
......
......@@ -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
......
......@@ -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
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!