init
Showing
1 changed file
with
5 additions
and
1 deletions
| ... | @@ -11,9 +11,10 @@ from openpyxl import Workbook | ... | @@ -11,9 +11,10 @@ from openpyxl import Workbook |
| 11 | from openpyxl.styles import PatternFill, numbers | 11 | from openpyxl.styles import PatternFill, numbers |
| 12 | from openpyxl.utils import get_column_letter | 12 | from openpyxl.utils import get_column_letter |
| 13 | from apps.doc import consts | 13 | from apps.doc import consts |
| 14 | from common.mixins import LoggerMixin | ||
| 14 | 15 | ||
| 15 | 16 | ||
| 16 | class BSWorkbook(Workbook): | 17 | class BSWorkbook(Workbook, LoggerMixin): |
| 17 | 18 | ||
| 18 | def __init__(self, interest_keyword, salary_keyword, loan_keyword, wechat_keyword, repayments_keyword, *args, **kwargs): | 19 | def __init__(self, interest_keyword, salary_keyword, loan_keyword, wechat_keyword, repayments_keyword, *args, **kwargs): |
| 19 | super().__init__(*args, **kwargs) | 20 | super().__init__(*args, **kwargs) |
| ... | @@ -38,6 +39,7 @@ class BSWorkbook(Workbook): | ... | @@ -38,6 +39,7 @@ class BSWorkbook(Workbook): |
| 38 | # self.border = Border(left=self.bd, top=self.bd, right=self.bd, bottom=self.bd) | 39 | # self.border = Border(left=self.bd, top=self.bd, right=self.bd, bottom=self.bd) |
| 39 | self.MAX_MEAN = 31 | 40 | self.MAX_MEAN = 31 |
| 40 | self.need_follow = False | 41 | self.need_follow = False |
| 42 | self.log_base = '[workbook excel]' | ||
| 41 | 43 | ||
| 42 | # @staticmethod | 44 | # @staticmethod |
| 43 | # def date_calibration(date_str): | 45 | # def date_calibration(date_str): |
| ... | @@ -710,6 +712,8 @@ class BSWorkbook(Workbook): | ... | @@ -710,6 +712,8 @@ class BSWorkbook(Workbook): |
| 710 | # 'sheet': ['sheet_name'] | 712 | # 'sheet': ['sheet_name'] |
| 711 | # } | 713 | # } |
| 712 | # } | 714 | # } |
| 715 | self.online_log.warn('{0} [bs_rebuild] [bs_summary={1}] [res_count_tuple={2}]'.format( | ||
| 716 | self.log_base, bs_summary, res_count_tuple)) | ||
| 713 | for card, summary in bs_summary.items(): | 717 | for card, summary in bs_summary.items(): |
| 714 | special_nhzs = False | 718 | special_nhzs = False |
| 715 | new_card = self.get_new_card(card) | 719 | new_card = self.get_new_card(card) | ... | ... |
-
Please register or sign in to post a comment