modify ht asp
Showing
4 changed files
with
100 additions
and
69 deletions
... | @@ -1585,13 +1585,13 @@ SE_AFC_CON_FIELD = ['-瘥△', '韐剛膠颲遠-撠- | ... | @@ -1585,13 +1585,13 @@ SE_AFC_CON_FIELD = ['-瘥△', '韐剛膠颲遠-撠- |
1585 | '车辆贷款本金金额-重要条款', '附加产品融资贷款本金总额-重要条款', '所购车辆价格', '车架号', '经销商', | 1585 | '车辆贷款本金金额-重要条款', '附加产品融资贷款本金总额-重要条款', '所购车辆价格', '车架号', '经销商', |
1586 | '贷款本金金额', '车辆贷款本金金额', '附加产品融资贷款本金总额', '贷款期限', '还款账号', '户名', '开户行', | 1586 | '贷款本金金额', '车辆贷款本金金额', '附加产品融资贷款本金总额', '贷款期限', '还款账号', '户名', '开户行', |
1587 | '还款计划表', '见证人签字', '见证人日期', 'ASP项目详情-重要条款', '购置税校验', 'ASP项目详情', | 1587 | '还款计划表', '见证人签字', '见证人日期', 'ASP项目详情-重要条款', '购置税校验', 'ASP项目详情', |
1588 | '合同编号-每页(no-asp)'] | 1588 | '合同编号-每页(no-asp)', '无ASP产品'] |
1589 | CON_BANK_FIELD = ['还款账号', '户名', '开户行'] | 1589 | CON_BANK_FIELD = ['还款账号', '户名', '开户行'] |
1590 | 1590 | ||
1591 | # '承租人姓名', '承租人证件号码', '承租人法定代表人或授权代表' | 1591 | # '承租人姓名', '承租人证件号码', '承租人法定代表人或授权代表' |
1592 | SE_HIL_CON_1_FIELD = ['合同编号-每页', '合同编号-正文', '车辆识别代码', '车辆卖方', '车辆原始销售价格', '融资成本总额', '租期', | 1592 | SE_HIL_CON_1_FIELD = ['合同编号-每页', '合同编号-正文', '车辆识别代码', '车辆卖方', '车辆原始销售价格', '融资成本总额', '租期', |
1593 | '还款计划表', 'ASP项目详情', '购置税校验', '承租人法定代表人或授权代表', '还款账号', '户名', '开户行', | 1593 | '还款计划表', 'ASP项目详情', '购置税校验', '承租人法定代表人或授权代表', '还款账号', '户名', '开户行', |
1594 | '共同承租人法定代表人或授权代表'] | 1594 | '共同承租人法定代表人或授权代表', '无ASP产品'] |
1595 | SE_HIL_CON_2_FIELD = ['合同编号', '合同编号-正文', '车辆识别代码', '租金总额', '融资租赁期限'] | 1595 | SE_HIL_CON_2_FIELD = ['合同编号', '合同编号-正文', '车辆识别代码', '租金总额', '融资租赁期限'] |
1596 | SE_HIL_CON_3_FIELD = ['合同编号-每页', '承租人姓名', '承租人证件号码', '销售经销商', '合同编号-正文', '姓名/名称', | 1596 | SE_HIL_CON_3_FIELD = ['合同编号-每页', '承租人姓名', '承租人证件号码', '销售经销商', '合同编号-正文', '姓名/名称', |
1597 | '自然人身份证件号码/法人执照号码', '承租人签字'] | 1597 | '自然人身份证件号码/法人执照号码', '承租人签字'] |
... | @@ -1916,6 +1916,9 @@ HIL_CONTRACT_1_COMPARE_LOGIC = { | ... | @@ -1916,6 +1916,9 @@ HIL_CONTRACT_1_COMPARE_LOGIC = { |
1916 | '保证人姓名2': ('保证人姓名2', 'se_name_compare', {}, '售后回租合同保证人姓名2与系统不一致'), | 1916 | '保证人姓名2': ('保证人姓名2', 'se_name_compare', {}, '售后回租合同保证人姓名2与系统不一致'), |
1917 | '保证人证件号2': ('保证人证件号2', 'se_common_compare', {}, '售后回租合同保证人证件号2与系统不一致'), | 1917 | '保证人证件号2': ('保证人证件号2', 'se_common_compare', {}, '售后回租合同保证人证件号2与系统不一致'), |
1918 | '保证人签字2': ('保证人签字2', 'se_contain_compare', {}, '售后回租合同保证人签字2与系统不一致'), | 1918 | '保证人签字2': ('保证人签字2', 'se_contain_compare', {}, '售后回租合同保证人签字2与系统不一致'), |
1919 | |||
1920 | '购置税校验': ('购置税校验', 'se_self_compare_gzs', {}, GZS_REASON_2), | ||
1921 | '无ASP产品': ('无ASP产品', 'se_self_compare_other_asp', {}, GZS_REASON_1), | ||
1919 | } | 1922 | } |
1920 | 1923 | ||
1921 | # ['合同编号', '合同编号-正文', '车辆识别代码', '租金总额', '融资租赁期限'] | 1924 | # ['合同编号', '合同编号-正文', '车辆识别代码', '租金总额', '融资租赁期限'] |
... | @@ -1995,6 +1998,9 @@ HT_COMPARE_LOGIC = { | ... | @@ -1995,6 +1998,9 @@ HT_COMPARE_LOGIC = { |
1995 | 1998 | ||
1996 | 'ASP项目详情-重要条款': ('ASP项目详情-重要条款', 'se_asp_compare', {}, '合同(重要条款)ASP名称或者金额与系统不一致'), | 1999 | 'ASP项目详情-重要条款': ('ASP项目详情-重要条款', 'se_asp_compare', {}, '合同(重要条款)ASP名称或者金额与系统不一致'), |
1997 | 'ASP项目详情': ('ASP项目详情', 'se_asp_compare', {}, '合同ASP名称或者金额与系统不一致'), | 2000 | 'ASP项目详情': ('ASP项目详情', 'se_asp_compare', {}, '合同ASP名称或者金额与系统不一致'), |
2001 | |||
2002 | '购置税校验': ('购置税校验', 'se_self_compare_gzs', {}, GZS_REASON_2), | ||
2003 | '无ASP产品': ('无ASP产品', 'se_self_compare_other_asp', {}, GZS_REASON_1), | ||
1998 | } | 2004 | } |
1999 | 2005 | ||
2000 | AFC_HT_DATE_FIELDS = ['主借人日期', '共借人日期', '保证人日期1', '保证人日期2'] | 2006 | AFC_HT_DATE_FIELDS = ['主借人日期', '共借人日期', '保证人日期1', '保证人日期2'] | ... | ... |
... | @@ -310,7 +310,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -310,7 +310,7 @@ class Command(BaseCommand, LoggerMixin): |
310 | elif isinstance(sub_value[text_key], str): | 310 | elif isinstance(sub_value[text_key], str): |
311 | page_compare_dict[key][sub_key] = sub_value[text_key] | 311 | page_compare_dict[key][sub_key] = sub_value[text_key] |
312 | 312 | ||
313 | # contract_result_compare.setdefault(classify, dict())[consts.ASP_KEY] = contract_dict.get(consts.ASP_KEY, False) | 313 | contract_result_compare.setdefault(classify, dict())[consts.ASP_KEY] = contract_dict.get(consts.ASP_KEY, False) |
314 | # "position" = [xmin, ymin, xmax, ymax] | 314 | # "position" = [xmin, ymin, xmax, ymax] |
315 | contract_result_compare.setdefault(classify, dict())[page_num_only] = page_compare_dict | 315 | contract_result_compare.setdefault(classify, dict())[page_num_only] = page_compare_dict |
316 | 316 | ... | ... |
... | @@ -1160,20 +1160,17 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore | ... | @@ -1160,20 +1160,17 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore |
1160 | 1160 | ||
1161 | # ASP ------------------------------------------------------------------------------------------------------- | 1161 | # ASP ------------------------------------------------------------------------------------------------------- |
1162 | asp_list = [] | 1162 | asp_list = [] |
1163 | gzs_status = consts.GZS_STATUS[1] | ||
1164 | gzs_list = [gzs_status] | ||
1165 | gzs_price = '0.00' | ||
1166 | is_asp = False | 1163 | is_asp = False |
1167 | # insurance_price = None | 1164 | insurance_price = None |
1165 | gzs_price = None | ||
1166 | have_other_asp = False | ||
1167 | fin_total = 0 | ||
1168 | if str(cms_info.get('financialInformation', {}).get('associatedServicePrincipal', '0.00')) != '0.00': | 1168 | if str(cms_info.get('financialInformation', {}).get('associatedServicePrincipal', '0.00')) != '0.00': |
1169 | is_asp = True | 1169 | is_asp = True |
1170 | # for asp_info in cms_info.get('associatedServices', []): | 1170 | # for asp_info in cms_info.get('associatedServices', []): |
1171 | for asp_info in cms_info.get('associatedServices', {}).get('SubassociatedServices', []): | 1171 | for asp_info in cms_info.get('associatedServices', {}).get('SubassociatedServices', []): |
1172 | tmp_asp_name = asp_info.get('associatedServices') | 1172 | tmp_asp_name = asp_info.get('associatedServices') |
1173 | if isinstance(tmp_asp_name, str) and len(tmp_asp_name) > 0: | 1173 | if isinstance(tmp_asp_name, str) and len(tmp_asp_name) > 0: |
1174 | if gzs_status == consts.GZS_STATUS[1] and tmp_asp_name.find(consts.GZS_NAME) != -1: | ||
1175 | gzs_status = consts.GZS_STATUS[2] | ||
1176 | gzs_price = asp_info.get('price', '0.00') | ||
1177 | asp_list.append( | 1174 | asp_list.append( |
1178 | ( | 1175 | ( |
1179 | tmp_asp_name, | 1176 | tmp_asp_name, |
... | @@ -1181,18 +1178,16 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore | ... | @@ -1181,18 +1178,16 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore |
1181 | asp_info.get('financed', '0.00') | 1178 | asp_info.get('financed', '0.00') |
1182 | ) | 1179 | ) |
1183 | ) | 1180 | ) |
1181 | fin_total += float(asp_info.get('financed', '0.00')) | ||
1182 | # 购置税 | ||
1183 | if tmp_asp_name.find(consts.GZS_NAME) != -1: | ||
1184 | gzs_price = asp_info.get('price', '0.00') | ||
1184 | # 保单费合计 | 1185 | # 保单费合计 |
1185 | # if tmp_asp_name.find('机动车辆保险') != -1: | 1186 | elif tmp_asp_name.find('机动车辆保险') != -1: |
1186 | # insurance_price = asp_info.get('price', '0.00') | 1187 | insurance_price = asp_info.get('price', '0.00') |
1188 | else: | ||
1189 | have_other_asp = True | ||
1187 | 1190 | ||
1188 | fin_total = 0 | ||
1189 | # fin_total_tmp = cms_info.get('associatedServices', {}).get('financed total', '0.00') | ||
1190 | # fin_total = '0.00' if fin_total_tmp.strip() == '' else fin_total_tmp | ||
1191 | for asp_name, _, asp_fin in asp_list: | ||
1192 | if gzs_status == consts.GZS_STATUS[2] and asp_name.find(consts.GZS_NAME) == -1 and \ | ||
1193 | asp_name.find('机动车辆保险') == -1: | ||
1194 | gzs_status = consts.GZS_STATUS[0] | ||
1195 | fin_total += float(asp_fin) | ||
1196 | asp_list.append( | 1191 | asp_list.append( |
1197 | ( | 1192 | ( |
1198 | consts.ASP_SUM_NAME, | 1193 | consts.ASP_SUM_NAME, |
... | @@ -1203,11 +1198,7 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore | ... | @@ -1203,11 +1198,7 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore |
1203 | ) | 1198 | ) |
1204 | 1199 | ||
1205 | # CMS Vehicle Price / 1.13 * 10 % | 1200 | # CMS Vehicle Price / 1.13 * 10 % |
1206 | gzs_list = [gzs_status] | 1201 | # gzs_list = [float(amount) * 0.1 / 1.13, float(gzs_price)] |
1207 | if gzs_status != consts.GZS_STATUS[1]: | ||
1208 | gzs_value = float(amount) * 0.1 / 1.13 | ||
1209 | gzs_list.append(gzs_value) | ||
1210 | gzs_list.append(float(gzs_price)) | ||
1211 | 1202 | ||
1212 | # 保单 ----------------------------------------------------------------------------------------------------------- | 1203 | # 保单 ----------------------------------------------------------------------------------------------------------- |
1213 | # is_insurance = 0 | 1204 | # is_insurance = 0 |
... | @@ -1275,8 +1266,15 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore | ... | @@ -1275,8 +1266,15 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore |
1275 | ] | 1266 | ] |
1276 | 1267 | ||
1277 | if is_asp: | 1268 | if is_asp: |
1269 | # asp各项 | ||
1278 | hil_contract_1_input.append((consts.SE_HIL_CON_1_FIELD[8], asp_list)) | 1270 | hil_contract_1_input.append((consts.SE_HIL_CON_1_FIELD[8], asp_list)) |
1279 | hil_contract_1_input.append((consts.SE_HIL_CON_1_FIELD[9], gzs_list)) | 1271 | # 购置税校验 |
1272 | if isinstance(gzs_price, str): | ||
1273 | hil_contract_1_input.append( | ||
1274 | (consts.SE_HIL_CON_1_FIELD[9], [amount, gzs_price])) | ||
1275 | # 非购置税非车辆保险的其他asp | ||
1276 | if have_other_asp: | ||
1277 | hil_contract_1_input.append((consts.SE_HIL_CON_1_FIELD[15], 'N')) | ||
1280 | 1278 | ||
1281 | if isinstance(company_info, tuple): | 1279 | if isinstance(company_info, tuple): |
1282 | if is_cdfl: | 1280 | if is_cdfl: |
... | @@ -1379,7 +1377,13 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore | ... | @@ -1379,7 +1377,13 @@ def get_se_cms_compare_info_auto(last_obj, application_entity, auto=True, ignore |
1379 | if is_asp: | 1377 | if is_asp: |
1380 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[20], asp_list)) | 1378 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[20], asp_list)) |
1381 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[22], asp_list)) | 1379 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[22], asp_list)) |
1382 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[21], gzs_list)) | 1380 | # 购置税校验 |
1381 | if isinstance(gzs_price, str): | ||
1382 | afc_contract_input.append( | ||
1383 | (consts.SE_AFC_CON_FIELD[21], [amount, gzs_price])) | ||
1384 | # 非购置税非车辆保险的其他asp | ||
1385 | if have_other_asp: | ||
1386 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[24], 'N')) | ||
1383 | else: | 1387 | else: |
1384 | afc_contract_input.pop(5) | 1388 | afc_contract_input.pop(5) |
1385 | afc_contract_input.pop(5) | 1389 | afc_contract_input.pop(5) |
... | @@ -1696,20 +1700,16 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals | ... | @@ -1696,20 +1700,16 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals |
1696 | 1700 | ||
1697 | # ASP ------------------------------------------------------------------------------------------------------- | 1701 | # ASP ------------------------------------------------------------------------------------------------------- |
1698 | asp_list = [] | 1702 | asp_list = [] |
1699 | gzs_status = consts.GZS_STATUS[1] # N-No | ||
1700 | gzs_list = [gzs_status] | ||
1701 | gzs_price = '0.00' | ||
1702 | is_asp = False | 1703 | is_asp = False |
1703 | insurance_price = None | 1704 | insurance_price = None |
1705 | gzs_price = None | ||
1706 | have_other_asp = False | ||
1707 | fin_total = 0 | ||
1704 | if str(cms_info.get('financialInformation', {}).get('associatedServicePrincipal', '0.00')) != '0.00': | 1708 | if str(cms_info.get('financialInformation', {}).get('associatedServicePrincipal', '0.00')) != '0.00': |
1705 | is_asp = True | 1709 | is_asp = True |
1706 | # for asp_info in cms_info.get('associatedServices', []): | ||
1707 | for asp_info in cms_info.get('associatedServices', {}).get('SubassociatedServices', []): | 1710 | for asp_info in cms_info.get('associatedServices', {}).get('SubassociatedServices', []): |
1708 | tmp_asp_name = asp_info.get('associatedServices') | 1711 | tmp_asp_name = asp_info.get('associatedServices') |
1709 | if isinstance(tmp_asp_name, str) and len(tmp_asp_name) > 0: | 1712 | if isinstance(tmp_asp_name, str) and len(tmp_asp_name) > 0: |
1710 | if gzs_status == consts.GZS_STATUS[1] and tmp_asp_name.find(consts.GZS_NAME) != -1: | ||
1711 | gzs_status = consts.GZS_STATUS[2] # O-Only | ||
1712 | gzs_price = asp_info.get('price', '0.00') | ||
1713 | asp_list.append( | 1713 | asp_list.append( |
1714 | ( | 1714 | ( |
1715 | tmp_asp_name, | 1715 | tmp_asp_name, |
... | @@ -1717,18 +1717,16 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals | ... | @@ -1717,18 +1717,16 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals |
1717 | asp_info.get('financed', '0.00') | 1717 | asp_info.get('financed', '0.00') |
1718 | ) | 1718 | ) |
1719 | ) | 1719 | ) |
1720 | fin_total += float(asp_info.get('financed', '0.00')) | ||
1721 | # 购置税 | ||
1722 | if tmp_asp_name.find(consts.GZS_NAME) != -1: | ||
1723 | gzs_price = asp_info.get('price', '0.00') | ||
1720 | # 保单费合计 | 1724 | # 保单费合计 |
1721 | if tmp_asp_name.find('机动车辆保险') != -1: | 1725 | elif tmp_asp_name.find('机动车辆保险') != -1: |
1722 | insurance_price = asp_info.get('price', '0.00') | 1726 | insurance_price = asp_info.get('price', '0.00') |
1727 | else: | ||
1728 | have_other_asp = True | ||
1723 | 1729 | ||
1724 | fin_total = 0 | ||
1725 | # fin_total_tmp = cms_info.get('associatedServices', {}).get('financed total', '0.00') | ||
1726 | # fin_total = '0.00' if fin_total_tmp.strip() == '' else fin_total_tmp | ||
1727 | for asp_name, _, asp_fin in asp_list: | ||
1728 | if gzs_status == consts.GZS_STATUS[2] and asp_name.find(consts.GZS_NAME) == -1 and \ | ||
1729 | asp_name.find('机动车辆保险') == -1: | ||
1730 | gzs_status = consts.GZS_STATUS[0] # Y-Yes | ||
1731 | fin_total += float(asp_fin) | ||
1732 | asp_list.append( | 1730 | asp_list.append( |
1733 | ( | 1731 | ( |
1734 | consts.ASP_SUM_NAME, | 1732 | consts.ASP_SUM_NAME, |
... | @@ -1739,11 +1737,7 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals | ... | @@ -1739,11 +1737,7 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals |
1739 | ) | 1737 | ) |
1740 | 1738 | ||
1741 | # CMS Vehicle Price / 1.13 * 10 % | 1739 | # CMS Vehicle Price / 1.13 * 10 % |
1742 | gzs_list = [gzs_status] | 1740 | # gzs_list = [float(amount) * 0.1 / 1.13, float(gzs_price)] |
1743 | if gzs_status != consts.GZS_STATUS[1]: | ||
1744 | gzs_value = float(amount) * 0.1 / 1.13 | ||
1745 | gzs_list.append(gzs_value) | ||
1746 | gzs_list.append(float(gzs_price)) | ||
1747 | 1741 | ||
1748 | # 保单 ----------------------------------------------------------------------------------------------------------- | 1742 | # 保单 ----------------------------------------------------------------------------------------------------------- |
1749 | is_insurance = 0 | 1743 | is_insurance = 0 |
... | @@ -1810,8 +1804,14 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals | ... | @@ -1810,8 +1804,14 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals |
1810 | ] | 1804 | ] |
1811 | 1805 | ||
1812 | if is_asp: | 1806 | if is_asp: |
1807 | # asp各项 | ||
1813 | hil_contract_1_input.append((consts.SE_HIL_CON_1_FIELD[8], asp_list)) | 1808 | hil_contract_1_input.append((consts.SE_HIL_CON_1_FIELD[8], asp_list)) |
1814 | hil_contract_1_input.append((consts.SE_HIL_CON_1_FIELD[9], gzs_list)) | 1809 | # 购置税校验 |
1810 | if isinstance(gzs_price, str): | ||
1811 | hil_contract_1_input.append((consts.SE_HIL_CON_1_FIELD[9], [amount, gzs_price])) | ||
1812 | # 非购置税非车辆保险的其他asp | ||
1813 | if have_other_asp: | ||
1814 | hil_contract_1_input.append((consts.SE_HIL_CON_1_FIELD[15], 'N')) | ||
1815 | 1815 | ||
1816 | if isinstance(company_info, tuple): | 1816 | if isinstance(company_info, tuple): |
1817 | if is_cdfl: | 1817 | if is_cdfl: |
... | @@ -1911,9 +1911,16 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals | ... | @@ -1911,9 +1911,16 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list, auto=Fals |
1911 | ]) | 1911 | ]) |
1912 | 1912 | ||
1913 | if is_asp: | 1913 | if is_asp: |
1914 | # asp各项 | ||
1914 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[20], asp_list)) | 1915 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[20], asp_list)) |
1915 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[22], asp_list)) | 1916 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[22], asp_list)) |
1916 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[21], gzs_list)) | 1917 | # 购置税校验 |
1918 | if isinstance(gzs_price, str): | ||
1919 | afc_contract_input.append( | ||
1920 | (consts.SE_AFC_CON_FIELD[21], [amount, gzs_price])) | ||
1921 | # 非购置税非车辆保险的其他asp | ||
1922 | if have_other_asp: | ||
1923 | afc_contract_input.append((consts.SE_AFC_CON_FIELD[24], 'N')) | ||
1917 | else: | 1924 | else: |
1918 | afc_contract_input.pop(5) | 1925 | afc_contract_input.pop(5) |
1919 | afc_contract_input.pop(5) | 1926 | afc_contract_input.pop(5) |
... | @@ -2524,27 +2531,33 @@ def se_contract_compare(license_en, ocr_res_dict, strip_list, is_gsyh): | ... | @@ -2524,27 +2531,33 @@ def se_contract_compare(license_en, ocr_res_dict, strip_list, is_gsyh): |
2524 | 2531 | ||
2525 | for name, value in strip_list: | 2532 | for name, value in strip_list: |
2526 | # 购置税校验 | 2533 | # 购置税校验 |
2527 | if name == consts.SE_AFC_CON_FIELD[21]: | 2534 | # if name == consts.SE_AFC_CON_FIELD[21]: |
2528 | if len(value) == 3: | 2535 | # if len(value) == 3: |
2529 | reason = [] | 2536 | # reason = [] |
2530 | gzs_verify = value[1] >= value[2] | 2537 | # gzs_verify = value[1] >= value[2] |
2531 | if gzs_verify: | 2538 | # if gzs_verify: |
2532 | if value[0] == consts.GZS_STATUS[0]: | 2539 | # if value[0] == consts.GZS_STATUS[0]: |
2533 | reason.append(consts.GZS_REASON_1) | 2540 | # reason.append(consts.GZS_REASON_1) |
2534 | result = consts.RESULT_N | 2541 | # result = consts.RESULT_N |
2535 | else: | 2542 | # else: |
2536 | result = consts.RESULT_Y | 2543 | # result = consts.RESULT_Y |
2537 | else: | 2544 | # else: |
2538 | if value[0] == consts.GZS_STATUS[0]: | 2545 | # if value[0] == consts.GZS_STATUS[0]: |
2539 | reason.append(consts.GZS_REASON_1) | 2546 | # reason.append(consts.GZS_REASON_1) |
2540 | result = consts.RESULT_N | 2547 | # result = consts.RESULT_N |
2541 | reason.append(consts.GZS_REASON_2) | 2548 | # reason.append(consts.GZS_REASON_2) |
2542 | else: | 2549 | # else: |
2543 | result = consts.RESULT_N | 2550 | # result = consts.RESULT_N |
2544 | reason = consts.GZS_REASON_1 | 2551 | # reason = consts.GZS_REASON_1 |
2545 | ocr_str = empty_str | 2552 | # ocr_str = empty_str |
2553 | # else: | ||
2554 | |||
2555 | if name == consts.SE_HIL_CON_1_FIELD[9] or name == consts.SE_HIL_CON_1_FIELD[15] or \ | ||
2556 | name == consts.SE_AFC_CON_FIELD[21] or name == consts.SE_AFC_CON_FIELD[24]: | ||
2557 | ocr_str_or_list = '' | ||
2546 | else: | 2558 | else: |
2547 | ocr_str_or_list = ocr_res.get(compare_logic[name][0]) | 2559 | ocr_str_or_list = ocr_res.get(compare_logic[name][0]) |
2560 | |||
2548 | # 招商银行特殊 | 2561 | # 招商银行特殊 |
2549 | # if ocr_str_or_list is None and license_en == consts.AFC_CONTRACT_EN \ | 2562 | # if ocr_str_or_list is None and license_en == consts.AFC_CONTRACT_EN \ |
2550 | # and is_gsyh is True and name in consts.CON_BANK_FIELD: | 2563 | # and is_gsyh is True and name in consts.CON_BANK_FIELD: | ... | ... |
... | @@ -587,6 +587,18 @@ class Comparison: | ... | @@ -587,6 +587,18 @@ class Comparison: |
587 | else: | 587 | else: |
588 | return self.RESULT_N | 588 | return self.RESULT_N |
589 | 589 | ||
590 | def se_self_compare_gzs(self, input_list, ocr_str, **kwargs): | ||
591 | if isinstance(input_list, list) and len(input_list) == 2: | ||
592 | try: | ||
593 | if float(input_list[0]) * 0.1 / 1.13 >= float(input_list[1]): | ||
594 | return self.RESULT_Y | ||
595 | except Exception as e: | ||
596 | return self.RESULT_N | ||
597 | return self.RESULT_N | ||
598 | |||
599 | def se_self_compare_other_asp(self, input_str, ocr_str, **kwargs): | ||
600 | return self.RESULT_N | ||
601 | |||
590 | 602 | ||
591 | cp = Comparison() | 603 | cp = Comparison() |
592 | 604 | ... | ... |
-
Please register or sign in to post a comment