ee4c660a by 冯轩

MOD:财报比对条件

1 parent e354e605
......@@ -2605,8 +2605,8 @@ def se_fs_compare(license_en, ocr_res_dict, field_list):
compare_log.info('{0} [se_fs_compare for ... in] [idx:{1}] [name:{2}] [value:{3}]'.format(log_base, idx, name, value))
ocr_str = ocr_res_list[res_idx].get(compare_logic[name][0])
compare_log.info('{0} [se_fs_compare ocr_str] [ocr_str:{1}]'.format(log_base, ocr_str))
#hash值/公章 不需要ocr结果,所以即使为空也可以进入比对
if isinstance(ocr_str, str) or ocr_str == 'code' or ocr_str == 'stamp':
#财年/资产负债表内容/利润表内容 不需要ocr结果,所以即使为空也可以进入比对
if isinstance(ocr_str, str) or isinstance(ocr_str, dict) or compare_logic[name][0] == '财年' or compare_logic[name][0] == '资产负债表内容' or compare_logic[name][0] == '利润表内容':
result = getattr(cp, compare_logic[name][1])(value, ocr_str, **compare_logic[name][2])
compare_log.info('{0} [se_fs_compare result:{1}]'.format(log_base, result))
no_key = False
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!