026ffd5a by 周伟奇

modify highlight

1 parent 94c16027
...@@ -429,6 +429,10 @@ class BSWorkbook(Workbook): ...@@ -429,6 +429,10 @@ class BSWorkbook(Workbook):
429 outlay_cell_value = None if outlay_cell is None else outlay_cell.value 429 outlay_cell_value = None if outlay_cell is None else outlay_cell.value
430 borrow_cell_value = None if borrow_cell is None else borrow_cell.value 430 borrow_cell_value = None if borrow_cell is None else borrow_cell.value
431 431
432 # 贷款关键词高亮
433 if summary_cell is not None and summary_cell_value in high_light_keyword:
434 amount_fill_row.add(summary_cell.row)
435
432 # 3.3.余额转数值 436 # 3.3.余额转数值
433 over_success = False 437 over_success = False
434 if over_cell is not None: 438 if over_cell is not None:
...@@ -496,17 +500,19 @@ class BSWorkbook(Workbook): ...@@ -496,17 +500,19 @@ class BSWorkbook(Workbook):
496 new_amount_cell_value = None if amount_cell is None else amount_cell.value 500 new_amount_cell_value = None if amount_cell is None else amount_cell.value
497 tmp_ws.append((summary_cell_value, date_cell_value, new_amount_cell_value)) 501 tmp_ws.append((summary_cell_value, date_cell_value, new_amount_cell_value))
498 # 贷款关键词高亮 502 # 贷款关键词高亮
499 elif summary_cell_value in high_light_keyword: 503 # elif summary_cell_value in high_light_keyword:
500 summary_cell.fill = self.amount_fill 504 # summary_cell.fill = self.amount_fill
501 if amount_cell is not None: 505 # if amount_cell is not None:
502 amount_cell.fill = self.amount_fill 506 # amount_cell.fill = self.amount_fill
503 507
504 # 3.6.同一天相同进出账高亮 508 # 3.6.同一天相同进出账高亮
505 del amount_mapping 509 del amount_mapping
506 for row in amount_fill_row: 510 for row in amount_fill_row:
507 new_ws[row][amount_cell_idx].fill = self.amount_fill 511 for cell in new_ws[row]:
508 if summary_cell_idx is not None: 512 cell.fill = self.amount_fill
509 new_ws[row][summary_cell_idx].fill = self.amount_fill 513 # new_ws[row][amount_cell_idx].fill = self.amount_fill
514 # if summary_cell_idx is not None:
515 # new_ws[row][summary_cell_idx].fill = self.amount_fill
510 516
511 # 关键词2信息提取 517 # 关键词2信息提取
512 ms.append(self.blank_row) 518 ms.append(self.blank_row)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!