diff color
Showing
1 changed file
with
7 additions
and
1 deletions
... | @@ -410,6 +410,7 @@ class BSWorkbook(Workbook): | ... | @@ -410,6 +410,7 @@ class BSWorkbook(Workbook): |
410 | 410 | ||
411 | amount_mapping = {} | 411 | amount_mapping = {} |
412 | amount_fill_row = set() | 412 | amount_fill_row = set() |
413 | loan_fill_row = set() | ||
413 | 414 | ||
414 | for rows in new_ws.iter_rows(min_row=2): | 415 | for rows in new_ws.iter_rows(min_row=2): |
415 | length = len(rows) | 416 | length = len(rows) |
... | @@ -431,7 +432,7 @@ class BSWorkbook(Workbook): | ... | @@ -431,7 +432,7 @@ class BSWorkbook(Workbook): |
431 | 432 | ||
432 | # 贷款关键词高亮 | 433 | # 贷款关键词高亮 |
433 | if summary_cell is not None and summary_cell_value in high_light_keyword: | 434 | if summary_cell is not None and summary_cell_value in high_light_keyword: |
434 | amount_fill_row.add(summary_cell.row) | 435 | loan_fill_row.add(summary_cell.row) |
435 | 436 | ||
436 | # 3.3.余额转数值 | 437 | # 3.3.余额转数值 |
437 | over_success = False | 438 | over_success = False |
... | @@ -474,6 +475,7 @@ class BSWorkbook(Workbook): | ... | @@ -474,6 +475,7 @@ class BSWorkbook(Workbook): |
474 | if fill_rows: | 475 | if fill_rows: |
475 | amount_fill_row.add(amount_cell.row) | 476 | amount_fill_row.add(amount_cell.row) |
476 | amount_fill_row.update(fill_rows) | 477 | amount_fill_row.update(fill_rows) |
478 | else: | ||
477 | amount_mapping.setdefault(date_cell_value[:10], {}).setdefault( | 479 | amount_mapping.setdefault(date_cell_value[:10], {}).setdefault( |
478 | amount_cell.value, []).append(amount_cell.row) | 480 | amount_cell.value, []).append(amount_cell.row) |
479 | 481 | ||
... | @@ -505,6 +507,10 @@ class BSWorkbook(Workbook): | ... | @@ -505,6 +507,10 @@ class BSWorkbook(Workbook): |
505 | # if amount_cell is not None: | 507 | # if amount_cell is not None: |
506 | # amount_cell.fill = self.amount_fill | 508 | # amount_cell.fill = self.amount_fill |
507 | 509 | ||
510 | for row in loan_fill_row: | ||
511 | for cell in new_ws[row]: | ||
512 | cell.fill = self.loan_fill | ||
513 | |||
508 | # 3.6.同一天相同进出账高亮 | 514 | # 3.6.同一天相同进出账高亮 |
509 | del amount_mapping | 515 | del amount_mapping |
510 | for row in amount_fill_row: | 516 | for row in amount_fill_row: | ... | ... |
-
Please register or sign in to post a comment