hil contract part 1
Showing
4 changed files
with
65 additions
and
1 deletions
| ... | @@ -1180,6 +1180,9 @@ JYPZ_OCR_FIELD = 'jypz_ocr' | ... | @@ -1180,6 +1180,9 @@ JYPZ_OCR_FIELD = 'jypz_ocr' |
| 1180 | HT_FIELD = 'ht_ocr' | 1180 | HT_FIELD = 'ht_ocr' |
| 1181 | BD_FIELD = 'bd_ocr' | 1181 | BD_FIELD = 'bd_ocr' |
| 1182 | BS_FIELD = 'bss_ocr' | 1182 | BS_FIELD = 'bss_ocr' |
| 1183 | HIL_CONTRACT_1_FIELD = 'hil_contract_1_ocr' | ||
| 1184 | HIL_CONTRACT_2_FIELD = 'hil_contract_2_ocr' | ||
| 1185 | HIL_CONTRACT_3_FIELD = 'hil_contract_3_ocr' | ||
| 1183 | BS_CLASSIFY = 10087 | 1186 | BS_CLASSIFY = 10087 |
| 1184 | 1187 | ||
| 1185 | RESULT_MAPPING = { | 1188 | RESULT_MAPPING = { |
| ... | @@ -1200,6 +1203,9 @@ RESULT_MAPPING = { | ... | @@ -1200,6 +1203,9 @@ RESULT_MAPPING = { |
| 1200 | CONTRACT_CLASSIFY: HT_FIELD, | 1203 | CONTRACT_CLASSIFY: HT_FIELD, |
| 1201 | INSURANCE_CLASSIFY: BD_FIELD, | 1204 | INSURANCE_CLASSIFY: BD_FIELD, |
| 1202 | BS_CLASSIFY: BS_FIELD, | 1205 | BS_CLASSIFY: BS_FIELD, |
| 1206 | HIL_CONTRACT_1_CLASSIFY: HIL_CONTRACT_1_FIELD, | ||
| 1207 | HIL_CONTRACT_2_CLASSIFY: HIL_CONTRACT_2_FIELD, | ||
| 1208 | HIL_CONTRACT_3_CLASSIFY: HIL_CONTRACT_3_FIELD, | ||
| 1203 | } | 1209 | } |
| 1204 | 1210 | ||
| 1205 | CA_ADD_COMPARE_FIELDS = (IC_OCR_FIELD, BL_OCR_FIELD, BS_FIELD) | 1211 | CA_ADD_COMPARE_FIELDS = (IC_OCR_FIELD, BL_OCR_FIELD, BS_FIELD) |
| ... | @@ -1220,6 +1226,9 @@ COMPARE_FIELDS = (MVI_OCR_FIELD, | ... | @@ -1220,6 +1226,9 @@ COMPARE_FIELDS = (MVI_OCR_FIELD, |
| 1220 | HT_FIELD, | 1226 | HT_FIELD, |
| 1221 | BD_FIELD, | 1227 | BD_FIELD, |
| 1222 | BS_FIELD, | 1228 | BS_FIELD, |
| 1229 | HIL_CONTRACT_1_FIELD, | ||
| 1230 | HIL_CONTRACT_2_FIELD, | ||
| 1231 | HIL_CONTRACT_3_FIELD, | ||
| 1223 | ) | 1232 | ) |
| 1224 | 1233 | ||
| 1225 | # 身份证 | 1234 | # 身份证 |
| ... | @@ -1514,6 +1523,9 @@ JYPZ_EN = 'Used Car Document' | ... | @@ -1514,6 +1523,9 @@ JYPZ_EN = 'Used Car Document' |
| 1514 | AFC_CONTRACT_EN = 'AFC Contract' | 1523 | AFC_CONTRACT_EN = 'AFC Contract' |
| 1515 | BD_EN = 'Insurance' | 1524 | BD_EN = 'Insurance' |
| 1516 | BS_EN = 'Bank Statement' | 1525 | BS_EN = 'Bank Statement' |
| 1526 | HIL_CONTRACT_1_EN = '售后回租合同' | ||
| 1527 | HIL_CONTRACT_2_EN = '车辆租赁抵押合同' | ||
| 1528 | HIL_CONTRACT_3_EN = '车辆处置协议' | ||
| 1517 | 1529 | ||
| 1518 | SKIP_CARD = {SME_BL_EN} | 1530 | SKIP_CARD = {SME_BL_EN} |
| 1519 | 1531 | ||
| ... | @@ -1750,6 +1762,9 @@ SE_COMPARE_FIELD = { | ... | @@ -1750,6 +1762,9 @@ SE_COMPARE_FIELD = { |
| 1750 | AFC_CONTRACT_EN: (HT_FIELD, HT_COMPARE_LOGIC, False), | 1762 | AFC_CONTRACT_EN: (HT_FIELD, HT_COMPARE_LOGIC, False), |
| 1751 | BD_EN: (BD_FIELD, BD_COMPARE_LOGIC, False), | 1763 | BD_EN: (BD_FIELD, BD_COMPARE_LOGIC, False), |
| 1752 | BS_EN: (BS_FIELD, BS_COMPARE_LOGIC, False), | 1764 | BS_EN: (BS_FIELD, BS_COMPARE_LOGIC, False), |
| 1765 | HIL_CONTRACT_1_EN: (HIL_CONTRACT_1_FIELD, HIL_CONTRACT_1_COMPARE_LOGIC, False), | ||
| 1766 | HIL_CONTRACT_2_EN: (HIL_CONTRACT_1_FIELD, HIL_CONTRACT_2_COMPARE_LOGIC, False), | ||
| 1767 | HIL_CONTRACT_3_EN: (HIL_CONTRACT_1_FIELD, HIL_CONTRACT_3_COMPARE_LOGIC, False), | ||
| 1753 | } | 1768 | } |
| 1754 | 1769 | ||
| 1755 | 1770 | ... | ... |
| ... | @@ -316,6 +316,9 @@ class AFCOCRResult(models.Model): | ... | @@ -316,6 +316,9 @@ class AFCOCRResult(models.Model): |
| 316 | ht_ocr = models.TextField(null=True, verbose_name="AFC合同") | 316 | ht_ocr = models.TextField(null=True, verbose_name="AFC合同") |
| 317 | bd_ocr = models.TextField(null=True, verbose_name="保单") | 317 | bd_ocr = models.TextField(null=True, verbose_name="保单") |
| 318 | bss_ocr = models.TextField(null=True, verbose_name="银行流水") | 318 | bss_ocr = models.TextField(null=True, verbose_name="银行流水") |
| 319 | hil_contract_1_ocr = models.TextField(null=True, verbose_name="HIL合同1") | ||
| 320 | hil_contract_2_ocr = models.TextField(null=True, verbose_name="HIL合同2") | ||
| 321 | hil_contract_3_ocr = models.TextField(null=True, verbose_name="HIL合同3") | ||
| 319 | 322 | ||
| 320 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') | 323 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') |
| 321 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') | 324 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') |
| ... | @@ -348,6 +351,9 @@ class HILOCRResult(models.Model): | ... | @@ -348,6 +351,9 @@ class HILOCRResult(models.Model): |
| 348 | ht_ocr = models.TextField(null=True, verbose_name="AFC合同") | 351 | ht_ocr = models.TextField(null=True, verbose_name="AFC合同") |
| 349 | bd_ocr = models.TextField(null=True, verbose_name="保单") | 352 | bd_ocr = models.TextField(null=True, verbose_name="保单") |
| 350 | bss_ocr = models.TextField(null=True, verbose_name="银行流水") | 353 | bss_ocr = models.TextField(null=True, verbose_name="银行流水") |
| 354 | hil_contract_1_ocr = models.TextField(null=True, verbose_name="HIL合同1") | ||
| 355 | hil_contract_2_ocr = models.TextField(null=True, verbose_name="HIL合同2") | ||
| 356 | hil_contract_3_ocr = models.TextField(null=True, verbose_name="HIL合同3") | ||
| 351 | 357 | ||
| 352 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') | 358 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') |
| 353 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') | 359 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') |
| ... | @@ -379,6 +385,9 @@ class AFCSEOCRResult(models.Model): | ... | @@ -379,6 +385,9 @@ class AFCSEOCRResult(models.Model): |
| 379 | ht_ocr = models.TextField(null=True, verbose_name="AFC合同") | 385 | ht_ocr = models.TextField(null=True, verbose_name="AFC合同") |
| 380 | bd_ocr = models.TextField(null=True, verbose_name="保单") | 386 | bd_ocr = models.TextField(null=True, verbose_name="保单") |
| 381 | bss_ocr = models.TextField(null=True, verbose_name="银行流水") | 387 | bss_ocr = models.TextField(null=True, verbose_name="银行流水") |
| 388 | hil_contract_1_ocr = models.TextField(null=True, verbose_name="HIL合同1") | ||
| 389 | hil_contract_2_ocr = models.TextField(null=True, verbose_name="HIL合同2") | ||
| 390 | hil_contract_3_ocr = models.TextField(null=True, verbose_name="HIL合同3") | ||
| 382 | 391 | ||
| 383 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') | 392 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') |
| 384 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') | 393 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') |
| ... | @@ -411,6 +420,9 @@ class HILSEOCRResult(models.Model): | ... | @@ -411,6 +420,9 @@ class HILSEOCRResult(models.Model): |
| 411 | ht_ocr = models.TextField(null=True, verbose_name="AFC合同") | 420 | ht_ocr = models.TextField(null=True, verbose_name="AFC合同") |
| 412 | bd_ocr = models.TextField(null=True, verbose_name="保单") | 421 | bd_ocr = models.TextField(null=True, verbose_name="保单") |
| 413 | bss_ocr = models.TextField(null=True, verbose_name="银行流水") | 422 | bss_ocr = models.TextField(null=True, verbose_name="银行流水") |
| 423 | hil_contract_1_ocr = models.TextField(null=True, verbose_name="HIL合同1") | ||
| 424 | hil_contract_2_ocr = models.TextField(null=True, verbose_name="HIL合同2") | ||
| 425 | hil_contract_3_ocr = models.TextField(null=True, verbose_name="HIL合同3") | ||
| 414 | 426 | ||
| 415 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') | 427 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') |
| 416 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') | 428 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') | ... | ... |
| ... | @@ -1191,8 +1191,10 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list): | ... | @@ -1191,8 +1191,10 @@ def get_se_cms_compare_info(last_obj, application_entity, detect_list): |
| 1191 | compare_info['other'] = other_info | 1191 | compare_info['other'] = other_info |
| 1192 | 1192 | ||
| 1193 | if application_entity in consts.HIL_SET: | 1193 | if application_entity in consts.HIL_SET: |
| 1194 | return compare_info, cms_info.get('applicationVersion', 1) | 1194 | # HIL合同----------------------------------------------------------------------------------------- |
| 1195 | 1195 | ||
| 1196 | return compare_info, cms_info.get('applicationVersion', 1) | ||
| 1197 | else: | ||
| 1196 | # AFC合同----------------------------------------------------------------------------------------------------------- | 1198 | # AFC合同----------------------------------------------------------------------------------------------------------- |
| 1197 | contract_info = {} | 1199 | contract_info = {} |
| 1198 | 1200 | ... | ... |
src/common/tools/mssql_script12.py
0 → 100644
| 1 | import pyodbc | ||
| 2 | |||
| 3 | hil_sql = """ | ||
| 4 | ALTER TABLE hil_ocr_result ADD hil_contract_1_ocr nvarchar(max); | ||
| 5 | ALTER TABLE hil_ocr_result ADD hil_contract_2_ocr nvarchar(max); | ||
| 6 | ALTER TABLE hil_ocr_result ADD hil_contract_3_ocr nvarchar(max); | ||
| 7 | ALTER TABLE hil_se_ocr_result ADD hil_contract_1_ocr nvarchar(max); | ||
| 8 | ALTER TABLE hil_se_ocr_result ADD hil_contract_2_ocr nvarchar(max); | ||
| 9 | ALTER TABLE hil_se_ocr_result ADD hil_contract_3_ocr nvarchar(max); | ||
| 10 | """ | ||
| 11 | |||
| 12 | afc_sql = """ | ||
| 13 | ALTER TABLE afc_ocr_result ADD hil_contract_1_ocr nvarchar(max); | ||
| 14 | ALTER TABLE afc_ocr_result ADD hil_contract_2_ocr nvarchar(max); | ||
| 15 | ALTER TABLE afc_ocr_result ADD hil_contract_3_ocr nvarchar(max); | ||
| 16 | ALTER TABLE afc_se_ocr_result ADD hil_contract_1_ocr nvarchar(max); | ||
| 17 | ALTER TABLE afc_se_ocr_result ADD hil_contract_2_ocr nvarchar(max); | ||
| 18 | ALTER TABLE afc_se_ocr_result ADD hil_contract_3_ocr nvarchar(max); | ||
| 19 | """ | ||
| 20 | |||
| 21 | hil_cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};', autocommit=True) | ||
| 22 | |||
| 23 | hil_cursor = hil_cnxn.cursor() | ||
| 24 | hil_cursor.execute(hil_sql) | ||
| 25 | |||
| 26 | hil_cursor.close() | ||
| 27 | hil_cnxn.close() | ||
| 28 | |||
| 29 | afc_cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};', autocommit=True) | ||
| 30 | |||
| 31 | afc_cursor = afc_cnxn.cursor() | ||
| 32 | afc_cursor.execute(afc_sql) | ||
| 33 | |||
| 34 | afc_cursor.close() | ||
| 35 | afc_cnxn.close() |
-
Please register or sign in to post a comment