fbc5ffab by 周伟奇

fix bug

1 parent cc6cdef0
...@@ -1135,6 +1135,7 @@ NYZS_CLASSIFY = 18 ...@@ -1135,6 +1135,7 @@ NYZS_CLASSIFY = 18
1135 SPECIAL_NYZS_CLASSIFY = 50 1135 SPECIAL_NYZS_CLASSIFY = 50
1136 MS_CLASSIFY = 21 1136 MS_CLASSIFY = 21
1137 SPECIAL_ZSYH_CLASSIFY = 20 1137 SPECIAL_ZSYH_CLASSIFY = 20
1138 EN_HEADER_LIST = ['Date', 'Currency', 'Amount', 'Balance', 'TransactionType']
1138 MS_ERROR_COL = (5, 6) 1139 MS_ERROR_COL = (5, 6)
1139 WECHART_CLASSIFY = 12 1140 WECHART_CLASSIFY = 12
1140 NEW_ZHIFUBAO_CLASSIFY = 48 1141 NEW_ZHIFUBAO_CLASSIFY = 48
......
...@@ -503,8 +503,14 @@ class BSWorkbook(Workbook): ...@@ -503,8 +503,14 @@ class BSWorkbook(Workbook):
503 is_first_row = True 503 is_first_row = True
504 for row_value in ws.iter_rows(min_row=part[1], max_row=part[2], values_only=True): 504 for row_value in ws.iter_rows(min_row=part[1], max_row=part[2], values_only=True):
505 if any(row_value): 505 if any(row_value):
506 if classify == consts.SPECIAL_ZSYH_CLASSIFY and is_first_row: 506 if classify == consts.SPECIAL_ZSYH_CLASSIFY and is_first_row: # 招商银行2行表头
507 if 'Date' in row_value and 'Balance' in row_value: 507 find_count = 0
508 for tmp_idx, value_str in enumerate(row_value):
509 if tmp_idx >= len(consts.EN_HEADER_LIST):
510 continue
511 if value_str.find(consts.EN_HEADER_LIST[tmp_idx]) != -1:
512 find_count += 1
513 if find_count > 1:
508 is_first_row = False 514 is_first_row = False
509 continue 515 continue
510 if classify == consts.WECHART_CLASSIFY: 516 if classify == consts.WECHART_CLASSIFY:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!