fbc5ffab by 周伟奇

fix bug

1 parent cc6cdef0
......@@ -1135,6 +1135,7 @@ NYZS_CLASSIFY = 18
SPECIAL_NYZS_CLASSIFY = 50
MS_CLASSIFY = 21
SPECIAL_ZSYH_CLASSIFY = 20
EN_HEADER_LIST = ['Date', 'Currency', 'Amount', 'Balance', 'TransactionType']
MS_ERROR_COL = (5, 6)
WECHART_CLASSIFY = 12
NEW_ZHIFUBAO_CLASSIFY = 48
......
......@@ -503,8 +503,14 @@ class BSWorkbook(Workbook):
is_first_row = True
for row_value in ws.iter_rows(min_row=part[1], max_row=part[2], values_only=True):
if any(row_value):
if classify == consts.SPECIAL_ZSYH_CLASSIFY and is_first_row:
if 'Date' in row_value and 'Balance' in row_value:
if classify == consts.SPECIAL_ZSYH_CLASSIFY and is_first_row: # 招商银行2行表头
find_count = 0
for tmp_idx, value_str in enumerate(row_value):
if tmp_idx >= len(consts.EN_HEADER_LIST):
continue
if value_str.find(consts.EN_HEADER_LIST[tmp_idx]) != -1:
find_count += 1
if find_count > 1:
is_first_row = False
continue
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!