d2a52df8 by 周伟奇

diff color

1 parent 026ffd5a
......@@ -410,6 +410,7 @@ class BSWorkbook(Workbook):
amount_mapping = {}
amount_fill_row = set()
loan_fill_row = set()
for rows in new_ws.iter_rows(min_row=2):
length = len(rows)
......@@ -431,7 +432,7 @@ class BSWorkbook(Workbook):
# 贷款关键词高亮
if summary_cell is not None and summary_cell_value in high_light_keyword:
amount_fill_row.add(summary_cell.row)
loan_fill_row.add(summary_cell.row)
# 3.3.余额转数值
over_success = False
......@@ -474,8 +475,9 @@ class BSWorkbook(Workbook):
if fill_rows:
amount_fill_row.add(amount_cell.row)
amount_fill_row.update(fill_rows)
amount_mapping.setdefault(date_cell_value[:10], {}).setdefault(
amount_cell.value, []).append(amount_cell.row)
else:
amount_mapping.setdefault(date_cell_value[:10], {}).setdefault(
amount_cell.value, []).append(amount_cell.row)
# 3.5.核对结果
if amount_success and over_success and amount_cell.row > 2:
......@@ -505,6 +507,10 @@ class BSWorkbook(Workbook):
# if amount_cell is not None:
# amount_cell.fill = self.amount_fill
for row in loan_fill_row:
for cell in new_ws[row]:
cell.fill = self.loan_fill
# 3.6.同一天相同进出账高亮
del amount_mapping
for row in amount_fill_row:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!