82558bf0 by 冯轩

ADD:log

1 parent 93aaae0c
......@@ -2574,6 +2574,7 @@ def se_compare_license(license_en, ocr_res_dict, field_list):
return result_field_list, no_ocr_result, field_img_path_dict
def se_fs_compare(license_en, ocr_res_dict, field_list):
compare_log.info('{0} [se_fs_compare] start'.format(log_base))
ocr_field, compare_logic, special_expiry_date = consts.SE_COMPARE_FIELD[license_en]
is_find = False
......@@ -2583,15 +2584,18 @@ def se_fs_compare(license_en, ocr_res_dict, field_list):
section_img_info = dict()
field_img_path_dict = dict()
ocr_res_str = ocr_res_dict.get(ocr_field)
compare_log.info('{0} [se_fs_compare] ocr_res:{1}'.format(log_base, ocr_res_str))
if ocr_res_str is not None:
ocr_res_list = json.loads(ocr_res_str)
length = len(ocr_res_list)
# 先判断最后一次上传的文件是不是包括3个,如果不是直接返回"未提供财报或财报不完整"
last_ocr_str = ocr_res_list[length-1]
compare_log.info('{0} [se_fs_compare] [code len {1}] [stamp len {2}] ]'.format(log_base, len(last_ocr_str.get('code',{})), len(last_ocr_str.get('stamp',{}))))
if len(last_ocr_str.get('code',{})) != 3 or len(last_ocr_str.get('stamp',{})) != 3:
compare_log.info('{0} [se_fs_compare] last ocr result len < 3'.format(log_base))
# 先判断最后一次上传的文件是不是包括3个,如果不是直接返回"未提供财报或财报不完整"
compare_log.info('{0} [se_fs_compare error] last ocr result len < 3'.format(log_base))
else:
for res_idx in range(length-1, -1, -1):
if is_find:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!