afc ht part 3
Showing
3 changed files
with
160 additions
and
68 deletions
| ... | @@ -1209,6 +1209,7 @@ COMPARE_FIELDS = (MVI_OCR_FIELD, | ... | @@ -1209,6 +1209,7 @@ COMPARE_FIELDS = (MVI_OCR_FIELD, |
| 1209 | DDA_OCR_FIELD, | 1209 | DDA_OCR_FIELD, |
| 1210 | HMH_OCR_FIELD, | 1210 | HMH_OCR_FIELD, |
| 1211 | JYPZ_OCR_FIELD, | 1211 | JYPZ_OCR_FIELD, |
| 1212 | HT_FIELD, | ||
| 1212 | ) | 1213 | ) |
| 1213 | 1214 | ||
| 1214 | # 身份证 | 1215 | # 身份证 |
| ... | @@ -1411,36 +1412,62 @@ SE_AFC_CON_MAP = { | ... | @@ -1411,36 +1412,62 @@ SE_AFC_CON_MAP = { |
| 1411 | '还款账号': (2, '还款账号', '账号'), | 1412 | '还款账号': (2, '还款账号', '账号'), |
| 1412 | '户名': (2, '还款账号', '户名'), | 1413 | '户名': (2, '还款账号', '户名'), |
| 1413 | '开户行': (2, '还款账号', '开户行'), | 1414 | '开户行': (2, '还款账号', '开户行'), |
| 1415 | |||
| 1416 | '借款人签字及时间': (1, '借款人签字及时间', None), | ||
| 1417 | |||
| 1418 | '借款人姓名': (2, '借款人及抵押人', 'name'), | ||
| 1419 | '借款人证件号': (2, '借款人及抵押人', 'id'), | ||
| 1420 | '共借人姓名': (2, '共同借款人及共同抵押人', 'name'), | ||
| 1421 | '共借人证件号': (2, '共同借款人及共同抵押人', 'id'), | ||
| 1422 | '保证人姓名1': (2, '保证人1', 'name'), | ||
| 1423 | '保证人证件号1': (2, '保证人1', 'id'), | ||
| 1424 | '保证人姓名2': (2, '保证人2', 'name'), | ||
| 1425 | '保证人证件号2': (2, '保证人2', 'id'), | ||
| 1426 | |||
| 1427 | '主借人签字': (8, '主借人签字', '签字'), | ||
| 1428 | '主借人日期': (8, '主借人签字', '日期'), | ||
| 1429 | '共借人签字': (8, '共借人签字', '签字'), | ||
| 1430 | '共借人日期': (8, '共借人签字', '日期'), | ||
| 1431 | '保证人签字1': (8, '保证人1签字', '签字'), | ||
| 1432 | '保证人日期1': (8, '保证人1签字', '日期'), | ||
| 1433 | '保证人签字2': (8, '保证人2签字', '签字'), | ||
| 1434 | '保证人日期2': (8, '保证人2签字', '日期'), | ||
| 1435 | '见证人签字': (8, '见证人签字', '签字'), | ||
| 1436 | '见证人日期': (8, '见证人签字', '日期'), | ||
| 1437 | |||
| 1438 | '还款计划表': (3, '还款计划表', None), | ||
| 1439 | |||
| 1414 | } | 1440 | } |
| 1415 | 1441 | ||
| 1416 | SE_AFC_CON_FIELD = ['合同编号-每页', '所购车辆价格-小写-重要条款', '车架号-重要条款', '贷款本金金额-重要条款', '贷款期限-重要条款', | 1442 | SE_AFC_CON_FIELD = ['合同编号-每页', '所购车辆价格-小写-重要条款', '车架号-重要条款', '贷款本金金额-重要条款', '贷款期限-重要条款', |
| 1417 | '车辆贷款本金金额-重要条款', '附加产品融资贷款本金总额-重要条款', '所购车辆价格', '车架号', '经销商', | 1443 | '车辆贷款本金金额-重要条款', '附加产品融资贷款本金总额-重要条款', '所购车辆价格', '车架号', '经销商', |
| 1418 | '贷款本金金额', '车辆贷款本金金额', '附加产品融资贷款本金总额', '贷款期限', '还款账号', '户名', '开户行', | 1444 | '贷款本金金额', '车辆贷款本金金额', '附加产品融资贷款本金总额', '贷款期限', '还款账号', '户名', '开户行', |
| 1419 | '还款计划表', '项目1', '用途总金额', '贷款本金', '附加产品融资贷款本金总金额', '购置税校验'] | 1445 | '还款计划表', '见证人签字', '见证人日期'] |
| 1420 | # | 1446 | |
| 1421 | # '借款人签字-重要条款' | 1447 | # '项目1', '用途总金额', '贷款本金', '附加产品融资贷款本金总金额', '购置税校验' |
| 1422 | # '借款人姓名' | 1448 | |
| 1423 | # '借款人证件号' | 1449 | ROLE_LIST = [ |
| 1424 | # '主借人签字' | 1450 | ('借款人签字及时间', 'Borrower', 0, 0, True), |
| 1425 | # '主借人日期' | 1451 | ('借款人姓名', 'Borrower', 0, 0, True), |
| 1426 | # | 1452 | ('借款人证件号', 'Borrower', 0, 2, True), |
| 1427 | # '共借人姓名' | 1453 | ('主借人签字', 'Borrower', 0, 0, True), |
| 1428 | # '共借人证件号' | 1454 | ('主借人日期', 'Borrower', 0, '有', True), |
| 1429 | # '共借人签字' | 1455 | |
| 1430 | # '共借人日期' | 1456 | ('共借人姓名', 'Co-Borrower', 0, 0, False), |
| 1431 | # | 1457 | ('共借人证件号', 'Co-Borrower', 0, 2, False), |
| 1432 | # '保证人姓名1' | 1458 | ('共借人签字', 'Co-Borrower', 0, 0, False), |
| 1433 | # '保证人证件号1' | 1459 | ('共借人日期', 'Co-Borrower', 0, '有', False), |
| 1434 | # '保证人签字1' | 1460 | |
| 1435 | # '保证人日期' | 1461 | ('保证人姓名1', 'Guarantor', 0, 0, False), |
| 1436 | # | 1462 | ('保证人证件号1', 'Guarantor', 0, 2, False), |
| 1437 | # '保证人姓名2' | 1463 | ('保证人签字1', 'Guarantor', 0, 0, False), |
| 1438 | # '保证人证件号2' | 1464 | ('保证人日期1', 'Guarantor', 0, '有', False), |
| 1439 | # '保证人签字2' | 1465 | |
| 1440 | # '保证人日期' | 1466 | ('保证人姓名2', 'Guarantor', 1, 0, False), |
| 1441 | # | 1467 | ('保证人证件号2', 'Guarantor', 1, 2, False), |
| 1442 | # '见证人签字' | 1468 | ('保证人签字2', 'Guarantor', 1, 0, False), |
| 1443 | # '见证人日期' | 1469 | ('保证人日期2', 'Guarantor', 1, '有', False), |
| 1470 | ] | ||
| 1444 | 1471 | ||
| 1445 | GZS_NAME = '车辆购置税' | 1472 | GZS_NAME = '车辆购置税' |
| 1446 | GZS_STATUS = ['Y', 'N', 'O'] | 1473 | GZS_STATUS = ['Y', 'N', 'O'] |
| ... | @@ -1598,11 +1625,6 @@ HMH_COMPARE_LOGIC = { | ... | @@ -1598,11 +1625,6 @@ HMH_COMPARE_LOGIC = { |
| 1598 | '签字': ('借款人签字/盖章', 'se_common_compare', {}, '抵押登记豁免函签字需人工核查'), | 1625 | '签字': ('借款人签字/盖章', 'se_common_compare', {}, '抵押登记豁免函签字需人工核查'), |
| 1599 | } | 1626 | } |
| 1600 | 1627 | ||
| 1601 | SE_AFC_CON_FIELD = ['合同编号-每页', '所购车辆价格-小写-重要条款', '车架号-重要条款', '贷款本金金额-重要条款', '贷款期限-重要条款', | ||
| 1602 | '车辆贷款本金金额-重要条款', '附加产品融资贷款本金总额-重要条款', '所购车辆价格', '车架号', '经销商', | ||
| 1603 | '贷款本金金额', '车辆贷款本金金额', '附加产品融资贷款本金总额', '贷款期限', '还款账号', '户名', '开户行', | ||
| 1604 | '还款计划表', '项目1', '用途总金额', '贷款本金', '附加产品融资贷款本金总金额', '购置税校验'] | ||
| 1605 | |||
| 1606 | HT_COMPARE_LOGIC = { | 1628 | HT_COMPARE_LOGIC = { |
| 1607 | '合同编号-每页': ('合同编号-每页', 'se_list_compare', {}, '合同编号与系统不一致'), | 1629 | '合同编号-每页': ('合同编号-每页', 'se_list_compare', {}, '合同编号与系统不一致'), |
| 1608 | '所购车辆价格-小写-重要条款': ('所购车辆价格-小写-重要条款', 'se_amount_str_compare', {}, '合同首页中车辆价格与系统不一致'), | 1630 | '所购车辆价格-小写-重要条款': ('所购车辆价格-小写-重要条款', 'se_amount_str_compare', {}, '合同首页中车辆价格与系统不一致'), |
| ... | @@ -1621,8 +1643,33 @@ HT_COMPARE_LOGIC = { | ... | @@ -1621,8 +1643,33 @@ HT_COMPARE_LOGIC = { |
| 1621 | '还款账号': ('还款账号', 'se_common_compare', {}, '主合同页中还款账号与系统不一致'), | 1643 | '还款账号': ('还款账号', 'se_common_compare', {}, '主合同页中还款账号与系统不一致'), |
| 1622 | '户名': ('户名', 'se_common_compare', {}, '主合同页中户名与系统不一致'), | 1644 | '户名': ('户名', 'se_common_compare', {}, '主合同页中户名与系统不一致'), |
| 1623 | '开户行': ('开户行', 'se_both_contain_compare', {}, '主合同页中开户行与系统不一致'), | 1645 | '开户行': ('开户行', 'se_both_contain_compare', {}, '主合同页中开户行与系统不一致'), |
| 1646 | |||
| 1647 | '借款人签字及时间': ('借款人签字及时间', 'se_common_compare', {}, '合同首页签字项与系统不一致'), | ||
| 1648 | '借款人姓名': ('借款人姓名', 'se_common_compare', {}, '主合同主借人姓名与系统不一致'), | ||
| 1649 | '借款人证件号': ('借款人证件号', 'se_common_compare', {}, '主合同主借人证件号码与系统不一致'), | ||
| 1650 | '共借人姓名': ('共借人姓名', 'se_common_compare', {}, '主合同共借人姓名与系统不一致'), | ||
| 1651 | '共借人证件号': ('共借人证件号', 'se_common_compare', {}, '主合同共借人证件号码与系统不一致'), | ||
| 1652 | '保证人姓名1': ('保证人姓名1', 'se_common_compare', {}, '主合同担保人1姓名与系统不一致'), | ||
| 1653 | '保证人证件号1': ('保证人证件号1', 'se_common_compare', {}, '主合同担保人1证件号码与系统不一致'), | ||
| 1654 | '保证人姓名2': ('保证人姓名2', 'se_common_compare', {}, '主合同担保人2姓名与系统不一致'), | ||
| 1655 | '保证人证件号2': ('保证人证件号2', 'se_common_compare', {}, '主合同担保人2证件号码与系统不一致'), | ||
| 1656 | |||
| 1657 | '主借人签字': ('主借人签字', 'se_common_compare', {}, '合同主借款人签字与系统不一致'), | ||
| 1658 | '主借人日期': ('主借人日期', 'se_have_compare', {}, '合同主借款人签字日期无'), | ||
| 1659 | '共借人签字': ('共借人签字', 'se_common_compare', {}, '合同共借人签字与系统不一致'), | ||
| 1660 | '共借人日期': ('共借人日期', 'se_have_compare', {}, '合同共借人签字日期无'), | ||
| 1661 | '保证人签字1': ('保证人签字1', 'se_common_compare', {}, '合同担保人1签字与系统不一致'), | ||
| 1662 | '保证人日期1': ('保证人日期1', 'se_have_compare', {}, '合同担保人1签字日期无'), | ||
| 1663 | '保证人签字2': ('保证人签字2', 'se_common_compare', {}, '合同担保人2签字与系统不一致'), | ||
| 1664 | '保证人日期2': ('保证人日期2', 'se_have_compare', {}, '合同担保人2签字日期无'), | ||
| 1665 | |||
| 1666 | '见证人签字': ('见证人签字', 'se_have_compare', {}, '合同见证人无'), | ||
| 1667 | '见证人日期': ('见证人日期', 'se_date_contain_compare', {}, '合同见证人签字日期不符合逻辑'), | ||
| 1668 | |||
| 1669 | '还款计划表': ('见证人日期', 'se_schedule_compare', {}, '还款计划表与系统不一致'), | ||
| 1624 | } | 1670 | } |
| 1625 | 1671 | ||
| 1672 | |||
| 1626 | # MVC_OCR_FIELD = 'mvc_ocr' | 1673 | # MVC_OCR_FIELD = 'mvc_ocr' |
| 1627 | 1674 | ||
| 1628 | SE_DETECT_CARD = [UCI_EN, JYPZ_EN, HMH_EN, DDA_EN] | 1675 | SE_DETECT_CARD = [UCI_EN, JYPZ_EN, HMH_EN, DDA_EN] | ... | ... |
| ... | @@ -1121,44 +1121,58 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list): | ... | @@ -1121,44 +1121,58 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list): |
| 1121 | (consts.SE_AFC_CON_FIELD[17], schedule_list_str), | 1121 | (consts.SE_AFC_CON_FIELD[17], schedule_list_str), |
| 1122 | ] | 1122 | ] |
| 1123 | 1123 | ||
| 1124 | asp_list = [] | 1124 | # asp_list = [] |
| 1125 | for asp_info in cms_info.get('associatedServices', []): | 1125 | # for asp_info in cms_info.get('associatedServices', []): |
| 1126 | asp_list.append( | 1126 | # asp_list.append( |
| 1127 | ( | 1127 | # ( |
| 1128 | asp_info.get('associatedServices', ''), | 1128 | # asp_info.get('associatedServices', ''), |
| 1129 | asp_info.get('price', 0.0), | 1129 | # asp_info.get('price', 0.0), |
| 1130 | asp_info.get('financed', 0.0) | 1130 | # asp_info.get('financed', 0.0) |
| 1131 | ) | 1131 | # ) |
| 1132 | ) | 1132 | # ) |
| 1133 | |||
| 1134 | if len(asp_list) > 0: | ||
| 1135 | fin_total = 0 | ||
| 1136 | gzs_status = consts.GZS_STATUS[1] | ||
| 1137 | for asp_name, asp_price, asp_fin in asp_list: | ||
| 1138 | if gzs_status == consts.GZS_STATUS[1]: | ||
| 1139 | if consts.GZS_NAME in asp_name: | ||
| 1140 | gzs_status = consts.GZS_STATUS[0] | ||
| 1141 | if gzs_status == consts.GZS_STATUS[0]: | ||
| 1142 | if consts.GZS_NAME not in asp_name: | ||
| 1143 | gzs_status = consts.GZS_STATUS[2] | ||
| 1144 | afc_contract_input.extend( | ||
| 1145 | [ | ||
| 1146 | (consts.SE_AFC_CON_FIELD[18], asp_name), | ||
| 1147 | (consts.SE_AFC_CON_FIELD[19], str(asp_price)), | ||
| 1148 | (consts.SE_AFC_CON_FIELD[20], str(asp_fin)), | ||
| 1149 | ] | ||
| 1150 | ) | ||
| 1151 | fin_total += asp_fin | ||
| 1152 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[21], str(fin_total))) | ||
| 1153 | 1133 | ||
| 1154 | # CMS Vehicle Price / 1.13 * 10 % | 1134 | # if len(asp_list) > 0: |
| 1155 | gzs_list = [gzs_status] | 1135 | # fin_total = 0 |
| 1156 | if gzs_status != consts.GZS_STATUS[1]: | 1136 | # gzs_status = consts.GZS_STATUS[1] |
| 1157 | gzs_value = str(cms_info.get('financialInformation', {}).get('vehiclePrincipal', 0.0) * 0.1 / 1.13) | 1137 | # for asp_name, asp_price, asp_fin in asp_list: |
| 1158 | gzs_list.append(gzs_value) | 1138 | # if gzs_status == consts.GZS_STATUS[1]: |
| 1159 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[22], consts.SPLIT_STR.join(gzs_list))) | 1139 | # if consts.GZS_NAME in asp_name: |
| 1140 | # gzs_status = consts.GZS_STATUS[0] | ||
| 1141 | # if gzs_status == consts.GZS_STATUS[0]: | ||
| 1142 | # if consts.GZS_NAME not in asp_name: | ||
| 1143 | # gzs_status = consts.GZS_STATUS[2] | ||
| 1144 | # afc_contract_input.extend( | ||
| 1145 | # [ | ||
| 1146 | # (consts.SE_AFC_CON_FIELD[18], asp_name), | ||
| 1147 | # (consts.SE_AFC_CON_FIELD[19], str(asp_price)), | ||
| 1148 | # (consts.SE_AFC_CON_FIELD[20], str(asp_fin)), | ||
| 1149 | # ] | ||
| 1150 | # ) | ||
| 1151 | # fin_total += asp_fin | ||
| 1152 | # afc_contract_input.append((consts.SE_AFC_CON_FIELD[21], str(fin_total))) | ||
| 1153 | # | ||
| 1154 | # # CMS Vehicle Price / 1.13 * 10 % | ||
| 1155 | # gzs_list = [gzs_status] | ||
| 1156 | # if gzs_status != consts.GZS_STATUS[1]: | ||
| 1157 | # gzs_value = str(cms_info.get('financialInformation', {}).get('vehiclePrincipal', 0.0) * 0.1 / 1.13) | ||
| 1158 | # gzs_list.append(gzs_value) | ||
| 1159 | # afc_contract_input.append((consts.SE_AFC_CON_FIELD[22], consts.SPLIT_STR.join(gzs_list))) | ||
| 1160 | |||
| 1161 | # '借款人签字及时间', 'Borrower', 0, 0, True | ||
| 1162 | for key, app_type, id_idx, field_idx, is_force in consts.ROLE_LIST: | ||
| 1163 | is_find = False | ||
| 1164 | if app_type in main_role_info: | ||
| 1165 | if len(main_role_info[app_type]) >= id_idx+1: | ||
| 1166 | is_find = True | ||
| 1167 | if isinstance(field_idx, int): | ||
| 1168 | afc_contract_input.append((key, main_role_info[app_type][id_idx][field_idx])) | ||
| 1169 | else: | ||
| 1170 | afc_contract_input.append((key, field_idx)) | ||
| 1171 | if not is_find and is_force: | ||
| 1172 | afc_contract_input.append((key, empty_str)) | ||
| 1160 | 1173 | ||
| 1161 | # role_name, _, role_id = main_role_info[applicant_type][0] | 1174 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[18], consts.SE_STAMP_VALUE)) |
| 1175 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[19], empty_str)) | ||
| 1162 | 1176 | ||
| 1163 | contract_info[consts.AFC_CONTRACT_EN] = afc_contract_input | 1177 | contract_info[consts.AFC_CONTRACT_EN] = afc_contract_input |
| 1164 | compare_info['contract'] = contract_info | 1178 | compare_info['contract'] = contract_info |
| ... | @@ -1689,7 +1703,7 @@ def se_afc_contract_compare(license_en, ocr_res_dict, strip_list): | ... | @@ -1689,7 +1703,7 @@ def se_afc_contract_compare(license_en, ocr_res_dict, strip_list): |
| 1689 | if isinstance(ocr_str_or_list, str) or isinstance(ocr_str_or_list, list): | 1703 | if isinstance(ocr_str_or_list, str) or isinstance(ocr_str_or_list, list): |
| 1690 | result = getattr(cp, compare_logic[name][1])(value, ocr_str_or_list, **compare_logic[name][2]) | 1704 | result = getattr(cp, compare_logic[name][1])(value, ocr_str_or_list, **compare_logic[name][2]) |
| 1691 | if isinstance(ocr_str_or_list, list): | 1705 | if isinstance(ocr_str_or_list, list): |
| 1692 | ocr_str = '、'.join(ocr_str_or_list) | 1706 | ocr_str = json.dumps(ocr_str_or_list) |
| 1693 | else: | 1707 | else: |
| 1694 | ocr_str = ocr_str_or_list | 1708 | ocr_str = ocr_str_or_list |
| 1695 | else: | 1709 | else: |
| ... | @@ -1922,7 +1936,15 @@ def se_compare_process(compare_info, ocr_res_dict): | ... | @@ -1922,7 +1936,15 @@ def se_compare_process(compare_info, ocr_res_dict): |
| 1922 | value_str = json.dumps(value) | 1936 | value_str = json.dumps(value) |
| 1923 | reason_list.append('{0}: {1}'.format(key, value_str)) | 1937 | reason_list.append('{0}: {1}'.format(key, value_str)) |
| 1924 | failure_reason_str = '、'.join(reason_list) | 1938 | failure_reason_str = '、'.join(reason_list) |
| 1925 | cn_failure_reason_str = '、'.join(set(cn_reason_list)) | 1939 | tmp_set = set() |
| 1940 | last_cn_reason_list = [] | ||
| 1941 | for i in cn_reason_list: | ||
| 1942 | if i in tmp_set: | ||
| 1943 | continue | ||
| 1944 | else: | ||
| 1945 | tmp_set.add(i) | ||
| 1946 | last_cn_reason_list.append(i) | ||
| 1947 | cn_failure_reason_str = '\n'.join(last_cn_reason_list) | ||
| 1926 | return compare_result, total_fields, failed_count, successful_at_this_level, failure_reason_str, cn_failure_reason_str | 1948 | return compare_result, total_fields, failed_count, successful_at_this_level, failure_reason_str, cn_failure_reason_str |
| 1927 | 1949 | ||
| 1928 | 1950 | ... | ... |
| ... | @@ -17,6 +17,7 @@ class Comparison: | ... | @@ -17,6 +17,7 @@ class Comparison: |
| 17 | self.CSSME = 'CSSME' | 17 | self.CSSME = 'CSSME' |
| 18 | self.CSOTH = 'CSOTH' | 18 | self.CSOTH = 'CSOTH' |
| 19 | self.SPLIT_STR = '_' | 19 | self.SPLIT_STR = '_' |
| 20 | self.SCHEDULE_SPLIT_STR = '、' | ||
| 20 | 21 | ||
| 21 | self.TYPE_MAPPING = ( | 22 | self.TYPE_MAPPING = ( |
| 22 | (r'个体工商户', self.CSIBM), | 23 | (r'个体工商户', self.CSIBM), |
| ... | @@ -162,6 +163,23 @@ class Comparison: | ... | @@ -162,6 +163,23 @@ class Comparison: |
| 162 | else: | 163 | else: |
| 163 | return self.RESULT_N | 164 | return self.RESULT_N |
| 164 | 165 | ||
| 166 | def se_date_contain_compare(self, input_str, ocr_str_or_list, **kwargs): | ||
| 167 | return self.RESULT_Y | ||
| 168 | |||
| 169 | def se_schedule_compare(self, input_str, ocr_str_or_list, **kwargs): | ||
| 170 | if isinstance(ocr_str_or_list, list): | ||
| 171 | if len(ocr_str_or_list) > 0: | ||
| 172 | ocr_str_or_list.pop(0) | ||
| 173 | schedule_list = [] | ||
| 174 | for row_list in ocr_str_or_list: | ||
| 175 | tmp_str = "{1}{0}{2}".format(self.SPLIT_STR, row_list[0], row_list[1]) | ||
| 176 | schedule_list.append(tmp_str) | ||
| 177 | return self.build_res(self.SCHEDULE_SPLIT_STR.join(schedule_list) == input_str) | ||
| 178 | else: | ||
| 179 | return self.RESULT_N | ||
| 180 | else: | ||
| 181 | return self.RESULT_N | ||
| 182 | |||
| 165 | def se_name_compare(self, input_str, ocr_str, **kwargs): | 183 | def se_name_compare(self, input_str, ocr_str, **kwargs): |
| 166 | if kwargs.get('is_passport'): | 184 | if kwargs.get('is_passport'): |
| 167 | input_tmp = input_str.upper().replace(' ', '') | 185 | input_tmp = input_str.upper().replace(' ', '') |
| ... | @@ -280,6 +298,11 @@ class Comparison: | ... | @@ -280,6 +298,11 @@ class Comparison: |
| 280 | else: | 298 | else: |
| 281 | return self.RESULT_Y | 299 | return self.RESULT_Y |
| 282 | 300 | ||
| 301 | def se_have_compare(self, input_str, ocr_str, **kwargs): | ||
| 302 | if ocr_str == '' or ocr_str == '无': | ||
| 303 | return self.RESULT_N | ||
| 304 | return self.RESULT_Y | ||
| 305 | |||
| 283 | def se_both_contain_compare(self, input_str, ocr_str, **kwargs): | 306 | def se_both_contain_compare(self, input_str, ocr_str, **kwargs): |
| 284 | if ocr_str.find(input_str) == -1 and input_str.find(ocr_str) == -1: | 307 | if ocr_str.find(input_str) == -1 and input_str.find(ocr_str) == -1: |
| 285 | return self.RESULT_N | 308 | return self.RESULT_N | ... | ... |
-
Please register or sign in to post a comment