fix idcard bug
Showing
3 changed files
with
9 additions
and
3 deletions
... | @@ -94,6 +94,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -94,6 +94,7 @@ class Command(BaseCommand, LoggerMixin): |
94 | 94 | ||
95 | wb = BSWorkbook(set(), set(), set(), set()) | 95 | wb = BSWorkbook(set(), set(), set(), set()) |
96 | wb.simple_license_rebuild(license_summary, consts.DOC_SCHEME_LIST[0]) | 96 | wb.simple_license_rebuild(license_summary, consts.DOC_SCHEME_LIST[0]) |
97 | wb.remove_base_sheet() | ||
97 | wb.save(excel_path) | 98 | wb.save(excel_path) |
98 | except Exception as e: | 99 | except Exception as e: |
99 | self.folder_log.error('{0} [wb build error] [path={1}] [error={2}]'.format( | 100 | self.folder_log.error('{0} [wb build error] [path={1}] [error={2}]'.format( | ... | ... |
... | @@ -35,8 +35,10 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -35,8 +35,10 @@ class Command(BaseCommand, LoggerMixin): |
35 | else: | 35 | else: |
36 | date_str = date.strftime('%Y-%m-%d') | 36 | date_str = date.strftime('%Y-%m-%d') |
37 | 37 | ||
38 | afc_excel_dir = os.path.join(conf.DATA_DIR, 'AFC', 'IdCard') | 38 | # afc_excel_dir = os.path.join(conf.DATA_DIR, 'AFC', 'IdCard') |
39 | hil_excel_dir = os.path.join(conf.DATA_DIR, 'HIL', 'IdCard') | 39 | # hil_excel_dir = os.path.join(conf.DATA_DIR, 'HIL', 'IdCard') |
40 | afc_excel_dir = conf.IC_REPORT_AFC | ||
41 | hil_excel_dir = conf.IC_REPORT_HIL | ||
40 | if not os.path.exists(afc_excel_dir) or not os.path.exists(hil_excel_dir): | 42 | if not os.path.exists(afc_excel_dir) or not os.path.exists(hil_excel_dir): |
41 | print('excel_dir not exist') | 43 | print('excel_dir not exist') |
42 | return | 44 | return | ... | ... |
... | @@ -19,7 +19,10 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -19,7 +19,10 @@ class Command(BaseCommand, LoggerMixin): |
19 | pre_mouth = end_day_in_mouth - datetime.timedelta(days=1) | 19 | pre_mouth = end_day_in_mouth - datetime.timedelta(days=1) |
20 | 20 | ||
21 | for target_dir in self.dirs: | 21 | for target_dir in self.dirs: |
22 | excel_dir = os.path.join(conf.DATA_DIR, target_dir, 'IdCard') | 22 | if target_dir == 'AFC': |
23 | excel_dir = conf.IC_REPORT_AFC | ||
24 | else: | ||
25 | excel_dir = conf.IC_REPORT_HIL | ||
23 | if not os.path.exists(excel_dir): | 26 | if not os.path.exists(excel_dir): |
24 | print('excel dir not exists: {0}'.format(excel_dir)) | 27 | print('excel dir not exists: {0}'.format(excel_dir)) |
25 | return | 28 | return | ... | ... |
-
Please register or sign in to post a comment