Merge branch 'feature/fsm-contract' into feature/uat-tmp
Showing
7 changed files
with
114 additions
and
17 deletions
| ... | @@ -10,7 +10,7 @@ PAGE_SIZE_DEFAULT = 10 | ... | @@ -10,7 +10,7 @@ PAGE_SIZE_DEFAULT = 10 |
| 10 | 10 | ||
| 11 | FIXED_APPLICATION_ID_PREFIX = 'CH-S' | 11 | FIXED_APPLICATION_ID_PREFIX = 'CH-S' |
| 12 | 12 | ||
| 13 | DOC_SCHEME_LIST = ['ACCEPTANCE', 'SETTLEMENT', 'CONTRACTMANAGEMENT'] | 13 | DOC_SCHEME_LIST = ['ACCEPTANCE', 'SETTLEMENT', 'CONTRACTMANAGEMENT', 'INSURANCE'] |
| 14 | DATA_SOURCE_LIST = ['POS', 'EAPP', 'ECONTRACT', 'OVP'] | 14 | DATA_SOURCE_LIST = ['POS', 'EAPP', 'ECONTRACT', 'OVP'] |
| 15 | COMPARE_DOC_SCHEME_LIST = ['CA', 'SE'] | 15 | COMPARE_DOC_SCHEME_LIST = ['CA', 'SE'] |
| 16 | 16 | ||
| ... | @@ -1541,6 +1541,9 @@ SE_AFC_CON_MAP = { | ... | @@ -1541,6 +1541,9 @@ SE_AFC_CON_MAP = { |
| 1541 | '还款账号': (2, 2, '还款账户', '账号'), | 1541 | '还款账号': (2, 2, '还款账户', '账号'), |
| 1542 | '户名': (2, 2, '还款账户', '户名'), | 1542 | '户名': (2, 2, '还款账户', '户名'), |
| 1543 | '开户行': (2, 2, '还款账户', '开户行'), | 1543 | '开户行': (2, 2, '还款账户', '开户行'), |
| 1544 | '收款账号': (2, 2, '借款人收款账户', '账号'), | ||
| 1545 | '收款户名': (2, 2, '借款人收款账户', '户名'), | ||
| 1546 | '收款开户行': (2, 2, '借款人收款账户', '开户行'), | ||
| 1544 | 1547 | ||
| 1545 | '借款人签字及时间': (1, 1, '借款人签字及时间', None), | 1548 | '借款人签字及时间': (1, 1, '借款人签字及时间', None), |
| 1546 | 1549 | ||
| ... | @@ -1580,9 +1583,12 @@ SE_HIL_CON_1_MAP = { | ... | @@ -1580,9 +1583,12 @@ SE_HIL_CON_1_MAP = { |
| 1580 | '融资成本总额': (5, 4, 7, '融资成本总额', None), | 1583 | '融资成本总额': (5, 4, 7, '融资成本总额', None), |
| 1581 | '租期': (5, 4, 7, '租期', None), | 1584 | '租期': (5, 4, 7, '租期', None), |
| 1582 | '还款计划表': (5, 5, 7, '付款计划表', None), | 1585 | '还款计划表': (5, 5, 7, '付款计划表', None), |
| 1583 | '还款账号': (5, 5, 7, '银行账户-银行账号', None), | 1586 | '还款账号': (5, 6, 7, '银行账户-银行账号', None), |
| 1584 | '户名': (5, 5, 7, '银行账户-户名', None), | 1587 | '户名': (5, 6, 7, '银行账户-户名', None), |
| 1585 | '开户行': (5, 5, 7, '银行账户-开户行', None), | 1588 | '开户行': (5, 6, 7, '银行账户-开户行', None), |
| 1589 | '收款账号': (5, 5, 7, '收款银行账户-银行账号', None), | ||
| 1590 | '收款户名': (5, 5, 7, '收款银行账户-户名', None), | ||
| 1591 | '收款开户行': (5, 5, 7, '收款银行账户-开户行', None), | ||
| 1586 | 'ASP项目详情': (5, 4, 7, '车辆附加产品明细表', None), | 1592 | 'ASP项目详情': (5, 4, 7, '车辆附加产品明细表', None), |
| 1587 | '承租人法定代表人或授权代表': (1, 1, 7, '承租人-法定代表人或授权代表', None), | 1593 | '承租人法定代表人或授权代表': (1, 1, 7, '承租人-法定代表人或授权代表', None), |
| 1588 | '共同承租人法定代表人或授权代表': (1, 1, 7, '共同承租人-法定代表人或授权代表', None), | 1594 | '共同承租人法定代表人或授权代表': (1, 1, 7, '共同承租人-法定代表人或授权代表', None), |
| ... | @@ -1638,6 +1644,39 @@ SE_HIL_CON_MAP = { | ... | @@ -1638,6 +1644,39 @@ SE_HIL_CON_MAP = { |
| 1638 | HIL_CONTRACT_3_CLASSIFY: SE_HIL_CON_3_MAP, | 1644 | HIL_CONTRACT_3_CLASSIFY: SE_HIL_CON_3_MAP, |
| 1639 | } | 1645 | } |
| 1640 | 1646 | ||
| 1647 | SE_FSM_WEP_MAP = { | ||
| 1648 | '客户姓名': (1, '客户姓名'), | ||
| 1649 | '证件类型': (1, '证件类型'), | ||
| 1650 | '证件号码': (1, '证件号码'), | ||
| 1651 | '合同价格(小写)': (1, '合同价格(小写)'), | ||
| 1652 | '客户签名': (1, '客户签名'), | ||
| 1653 | '签单日期': (1, '签单日期'), | ||
| 1654 | } | ||
| 1655 | |||
| 1656 | SE_FSM_MSI_MAP = { | ||
| 1657 | '客户姓名': (1, '客户姓名'), | ||
| 1658 | '证件类型': (1, '证件类型'), | ||
| 1659 | '证件号码': (1, '证件号码'), | ||
| 1660 | '合同价格(小写)': (1, '合同价格(小写)'), | ||
| 1661 | '客户签名': (2, '客户签名'), | ||
| 1662 | '签单日期': (2, '签单日期'), | ||
| 1663 | } | ||
| 1664 | |||
| 1665 | SE_FSM_SC_MAP = { | ||
| 1666 | '姓名': (1, '姓名'), | ||
| 1667 | '证件类型': (1, '证件类型'), | ||
| 1668 | '证件号码': (1, '证件号码'), | ||
| 1669 | '总价': (1, '总价'), | ||
| 1670 | '客户签名': (12, '客户签名'), | ||
| 1671 | '签单日期': (12, '签单日期'), | ||
| 1672 | } | ||
| 1673 | |||
| 1674 | SE_FSM_CON_MAP = { | ||
| 1675 | FSM_CONTRACT_WEP_CLASSIFY: SE_FSM_WEP_MAP, | ||
| 1676 | FSM_CONTRACT_MSI_CLASSIFY: SE_FSM_MSI_MAP, | ||
| 1677 | FSM_CONTRACT_SC_CLASSIFY: SE_FSM_SC_MAP, | ||
| 1678 | } | ||
| 1679 | |||
| 1641 | SE_AFC_CON_QRS_FIELD = ['合同编号'] | 1680 | SE_AFC_CON_QRS_FIELD = ['合同编号'] |
| 1642 | SE_AFC_CON_FIELD = ['合同编号-每页', '所购车辆价格-小写-重要条款', '车架号-重要条款', '贷款本金金额-重要条款', '贷款期限-重要条款', | 1681 | SE_AFC_CON_FIELD = ['合同编号-每页', '所购车辆价格-小写-重要条款', '车架号-重要条款', '贷款本金金额-重要条款', '贷款期限-重要条款', |
| 1643 | '车辆贷款本金金额-重要条款', '附加产品融资贷款本金总额-重要条款', '所购车辆价格', '车架号', '经销商', | 1682 | '车辆贷款本金金额-重要条款', '附加产品融资贷款本金总额-重要条款', '所购车辆价格', '车架号', '经销商', | ... | ... |
| ... | @@ -998,7 +998,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -998,7 +998,7 @@ class Command(BaseCommand, LoggerMixin): |
| 998 | res.setdefault(consts.ALL_POSITION_KEY, dict())[key] = page_info_dict.get(str(pno), {}).get( | 998 | res.setdefault(consts.ALL_POSITION_KEY, dict())[key] = page_info_dict.get(str(pno), {}).get( |
| 999 | consts.ALL_POSITION_KEY, {}).get(key1, []) | 999 | consts.ALL_POSITION_KEY, {}).get(key1, []) |
| 1000 | license_summary[classify] = [res] | 1000 | license_summary[classify] = [res] |
| 1001 | elif classify in consts.SE_HIL_CON_MAP: # TODO FSM新合同写入数据库用于比对 | 1001 | elif classify in consts.SE_HIL_CON_MAP: |
| 1002 | res = {} | 1002 | res = {} |
| 1003 | for key, (pno1, pno2, end_idx, key1, key2) in consts.SE_HIL_CON_MAP[classify].items(): | 1003 | for key, (pno1, pno2, end_idx, key1, key2) in consts.SE_HIL_CON_MAP[classify].items(): |
| 1004 | if pno1 is None: | 1004 | if pno1 is None: |
| ... | @@ -1022,7 +1022,14 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -1022,7 +1022,14 @@ class Command(BaseCommand, LoggerMixin): |
| 1022 | res[key] = tmp_res | 1022 | res[key] = tmp_res |
| 1023 | res.setdefault(consts.IMG_PATH_KEY, dict())[key] = page_info_dict.get(str(img_pno), {}).get( | 1023 | res.setdefault(consts.IMG_PATH_KEY, dict())[key] = page_info_dict.get(str(img_pno), {}).get( |
| 1024 | consts.IMG_PATH_KEY, '') | 1024 | consts.IMG_PATH_KEY, '') |
| 1025 | license_summary[classify] = [res] | ||
| 1025 | 1026 | ||
| 1027 | elif classify in consts.SE_FSM_CON_MAP: | ||
| 1028 | res = {} | ||
| 1029 | for key, (pno1, key1) in consts.SE_FSM_CON_MAP[classify].items(): | ||
| 1030 | res[key] = page_info_dict.get(str(pno1), {}).get(key1) | ||
| 1031 | res.setdefault(consts.IMG_PATH_KEY, dict())[key] = page_info_dict.get(str(img_pno), {}).get( | ||
| 1032 | consts.IMG_PATH_KEY, '') | ||
| 1026 | license_summary[classify] = [res] | 1033 | license_summary[classify] = [res] |
| 1027 | 1034 | ||
| 1028 | def rebuild_bs_summary(self, bs_summary, unknown_summary): | 1035 | def rebuild_bs_summary(self, bs_summary, unknown_summary): | ... | ... |
| ... | @@ -329,6 +329,9 @@ class AFCOCRResult(models.Model): | ... | @@ -329,6 +329,9 @@ class AFCOCRResult(models.Model): |
| 329 | hil_contract_2_ocr = models.TextField(null=True, verbose_name="HIL合同2") | 329 | hil_contract_2_ocr = models.TextField(null=True, verbose_name="HIL合同2") |
| 330 | hil_contract_3_ocr = models.TextField(null=True, verbose_name="HIL合同3") | 330 | hil_contract_3_ocr = models.TextField(null=True, verbose_name="HIL合同3") |
| 331 | qrs_ocr = models.TextField(null=True, verbose_name="AFC合同确认书") | 331 | qrs_ocr = models.TextField(null=True, verbose_name="AFC合同确认书") |
| 332 | fsm_wep_ocr = models.TextField(null=True, verbose_name="FSM-WEP") | ||
| 333 | fsm_msi_ocr = models.TextField(null=True, verbose_name="FSM-MSI") | ||
| 334 | fsm_sc_ocr = models.TextField(null=True, verbose_name="FSM-SC") | ||
| 332 | 335 | ||
| 333 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') | 336 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') |
| 334 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') | 337 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') |
| ... | @@ -365,6 +368,9 @@ class HILOCRResult(models.Model): | ... | @@ -365,6 +368,9 @@ class HILOCRResult(models.Model): |
| 365 | hil_contract_2_ocr = models.TextField(null=True, verbose_name="HIL合同2") | 368 | hil_contract_2_ocr = models.TextField(null=True, verbose_name="HIL合同2") |
| 366 | hil_contract_3_ocr = models.TextField(null=True, verbose_name="HIL合同3") | 369 | hil_contract_3_ocr = models.TextField(null=True, verbose_name="HIL合同3") |
| 367 | qrs_ocr = models.TextField(null=True, verbose_name="AFC合同确认书") | 370 | qrs_ocr = models.TextField(null=True, verbose_name="AFC合同确认书") |
| 371 | fsm_wep_ocr = models.TextField(null=True, verbose_name="FSM-WEP") | ||
| 372 | fsm_msi_ocr = models.TextField(null=True, verbose_name="FSM-MSI") | ||
| 373 | fsm_sc_ocr = models.TextField(null=True, verbose_name="FSM-SC") | ||
| 368 | 374 | ||
| 369 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') | 375 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') |
| 370 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') | 376 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') |
| ... | @@ -400,6 +406,9 @@ class AFCSEOCRResult(models.Model): | ... | @@ -400,6 +406,9 @@ class AFCSEOCRResult(models.Model): |
| 400 | hil_contract_2_ocr = models.TextField(null=True, verbose_name="HIL合同2") | 406 | hil_contract_2_ocr = models.TextField(null=True, verbose_name="HIL合同2") |
| 401 | hil_contract_3_ocr = models.TextField(null=True, verbose_name="HIL合同3") | 407 | hil_contract_3_ocr = models.TextField(null=True, verbose_name="HIL合同3") |
| 402 | qrs_ocr = models.TextField(null=True, verbose_name="AFC合同确认书") | 408 | qrs_ocr = models.TextField(null=True, verbose_name="AFC合同确认书") |
| 409 | fsm_wep_ocr = models.TextField(null=True, verbose_name="FSM-WEP") | ||
| 410 | fsm_msi_ocr = models.TextField(null=True, verbose_name="FSM-MSI") | ||
| 411 | fsm_sc_ocr = models.TextField(null=True, verbose_name="FSM-SC") | ||
| 403 | 412 | ||
| 404 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') | 413 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') |
| 405 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') | 414 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') |
| ... | @@ -436,6 +445,9 @@ class HILSEOCRResult(models.Model): | ... | @@ -436,6 +445,9 @@ class HILSEOCRResult(models.Model): |
| 436 | hil_contract_2_ocr = models.TextField(null=True, verbose_name="HIL合同2") | 445 | hil_contract_2_ocr = models.TextField(null=True, verbose_name="HIL合同2") |
| 437 | hil_contract_3_ocr = models.TextField(null=True, verbose_name="HIL合同3") | 446 | hil_contract_3_ocr = models.TextField(null=True, verbose_name="HIL合同3") |
| 438 | qrs_ocr = models.TextField(null=True, verbose_name="AFC合同确认书") | 447 | qrs_ocr = models.TextField(null=True, verbose_name="AFC合同确认书") |
| 448 | fsm_wep_ocr = models.TextField(null=True, verbose_name="FSM-WEP") | ||
| 449 | fsm_msi_ocr = models.TextField(null=True, verbose_name="FSM-MSI") | ||
| 450 | fsm_sc_ocr = models.TextField(null=True, verbose_name="FSM-SC") | ||
| 439 | 451 | ||
| 440 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') | 452 | update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间') |
| 441 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') | 453 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') | ... | ... |
| ... | @@ -34,6 +34,7 @@ class ECM: | ... | @@ -34,6 +34,7 @@ class ECM: |
| 34 | 'ACCEPTANCE': ('acceptance', conf.ECM_FOLDER_CA, conf.ECM_FOLDER_CA_HIL), | 34 | 'ACCEPTANCE': ('acceptance', conf.ECM_FOLDER_CA, conf.ECM_FOLDER_CA_HIL), |
| 35 | 'SETTLEMENT': (self.settlement_type, conf.ECM_FOLDER_SE, conf.ECM_FOLDER_SE_HIL), | 35 | 'SETTLEMENT': (self.settlement_type, conf.ECM_FOLDER_SE, conf.ECM_FOLDER_SE_HIL), |
| 36 | 'CONTRACTMANAGEMENT': ('contract_management', conf.ECM_FOLDER_CA, conf.ECM_FOLDER_CA_HIL), | 36 | 'CONTRACTMANAGEMENT': ('contract_management', conf.ECM_FOLDER_CA, conf.ECM_FOLDER_CA_HIL), |
| 37 | 'INSURANCE': ('insurance', conf.ECM_FOLDER_INSURANCE, conf.ECM_FOLDER_INSURANCE_HIL), | ||
| 37 | } | 38 | } |
| 38 | self.doc_base_map = { | 39 | self.doc_base_map = { |
| 39 | 'AFC': 'SF5_CN', | 40 | 'AFC': 'SF5_CN', | ... | ... |
| ... | @@ -56,12 +56,12 @@ class Finder: | ... | @@ -56,12 +56,12 @@ class Finder: |
| 56 | "融资成本总额": self.item, | 56 | "融资成本总额": self.item, |
| 57 | "租期": self.item, | 57 | "租期": self.item, |
| 58 | "付款计划表": self.item, | 58 | "付款计划表": self.item, |
| 59 | "承租人收款账户-户名": self.item, | 59 | "收款银行账户-户名": self.item, |
| 60 | "承租人收款账户-银行账号": self.item, | 60 | "收款银行账户-银行账号": self.item, |
| 61 | "承租人收款账户-开户行": self.item, | 61 | "收款银行账户-开户行": self.item, |
| 62 | "承租人扣款账户-户名": self.item, | 62 | "银行账户-户名": self.item, |
| 63 | "承租人扣款账户-银行账号": self.item, | 63 | "银行账户-银行账号": self.item, |
| 64 | "承租人扣款账户-开户行": self.item, | 64 | "银行账户-开户行": self.item, |
| 65 | "签字页-承租人姓名": self.item, | 65 | "签字页-承租人姓名": self.item, |
| 66 | "签字页-承租人签章": self.item, | 66 | "签字页-承租人签章": self.item, |
| 67 | 67 | ||
| ... | @@ -1260,18 +1260,18 @@ class Finder: | ... | @@ -1260,18 +1260,18 @@ class Finder: |
| 1260 | self.init_result['付款计划表'] = repayment_schedule | 1260 | self.init_result['付款计划表'] = repayment_schedule |
| 1261 | # 找承租人收款账户户名、银行账号、银行 | 1261 | # 找承租人收款账户户名、银行账号、银行 |
| 1262 | name = self.get_key_value(key='户名:', page_num='4') | 1262 | name = self.get_key_value(key='户名:', page_num='4') |
| 1263 | self.init_result['承租人收款账户-户名'] = name | 1263 | self.init_result['收款银行账户-户名'] = name |
| 1264 | account = self.get_key_value(key='银行账号:', page_num='4') | 1264 | account = self.get_key_value(key='银行账号:', page_num='4') |
| 1265 | self.init_result['承租人收款账户-银行账号'] = account | 1265 | self.init_result['收款银行账户-银行账号'] = account |
| 1266 | bank = self.get_key_value(key='开户银行:', page_num='4') | 1266 | bank = self.get_key_value(key='开户银行:', page_num='4') |
| 1267 | self.init_result['承租人收款账户-开户行'] = bank | 1267 | self.init_result['承租人收款账户-开户行'] = bank |
| 1268 | # 找承租人扣款账户户名、银行账号、银行 | 1268 | # 找承租人扣款账户户名、银行账号、银行 |
| 1269 | name = self.get_key_value(key='户名:', page_num='5') | 1269 | name = self.get_key_value(key='户名:', page_num='5') |
| 1270 | self.init_result['承租人扣款账户-户名'] = name | 1270 | self.init_result['银行账户-户名'] = name |
| 1271 | account = self.get_key_value(key='银行账号:', page_num='5') | 1271 | account = self.get_key_value(key='银行账号:', page_num='5') |
| 1272 | self.init_result['承租人扣款账户-银行账号'] = account | 1272 | self.init_result['银行账户-银行账号'] = account |
| 1273 | bank = self.get_key_value(key='开户银行:', page_num='5') | 1273 | bank = self.get_key_value(key='开户银行:', page_num='5') |
| 1274 | self.init_result['承租人扣款账户-开户行'] = bank | 1274 | self.init_result['银行账户-开户行'] = bank |
| 1275 | 1275 | ||
| 1276 | # 找签字页上的系列信息 | 1276 | # 找签字页上的系列信息 |
| 1277 | # 承租人姓名、签章 | 1277 | # 承租人姓名、签章 | ... | ... |
| ... | @@ -195,7 +195,9 @@ class Retriever: | ... | @@ -195,7 +195,9 @@ class Retriever: |
| 195 | pdf_result = dict() | 195 | pdf_result = dict() |
| 196 | 196 | ||
| 197 | for pno_str, fields_dict in self.target_fields.items(): | 197 | for pno_str, fields_dict in self.target_fields.items(): |
| 198 | is_last_pno = False | ||
| 198 | if pno_str == '-1': | 199 | if pno_str == '-1': |
| 200 | is_last_pno = True | ||
| 199 | pno_int_list = [int(pno_str) for pno_str in pdf_text_list.keys()] | 201 | pno_int_list = [int(pno_str) for pno_str in pdf_text_list.keys()] |
| 200 | pno_str = str(max(pno_int_list)) | 202 | pno_str = str(max(pno_int_list)) |
| 201 | 203 | ||
| ... | @@ -248,6 +250,7 @@ class Retriever: | ... | @@ -248,6 +250,7 @@ class Retriever: |
| 248 | self.position_str: list(coordinates), | 250 | self.position_str: list(coordinates), |
| 249 | } | 251 | } |
| 250 | 252 | ||
| 251 | pdf_result['page_{0}'.format(int(pno_str) + 1)] = page_result | 253 | page_key = 'page_12' if is_last_pno else 'page_{0}'.format(int(pno_str) + 1) |
| 254 | pdf_result[page_key] = page_result | ||
| 252 | 255 | ||
| 253 | return pdf_result | 256 | return pdf_result | ... | ... |
src/common/tools/mssql_script24.py
0 → 100644
| 1 | import pyodbc | ||
| 2 | |||
| 3 | hil_sql = """ | ||
| 4 | ALTER TABLE hil_ocr_result ADD fsm_wep_ocr nvarchar(max); | ||
| 5 | ALTER TABLE hil_ocr_result ADD fsm_msi_ocr nvarchar(max); | ||
| 6 | ALTER TABLE hil_ocr_result ADD fsm_sc_ocr nvarchar(max); | ||
| 7 | ALTER TABLE hil_se_ocr_result ADD fsm_wep_ocr nvarchar(max); | ||
| 8 | ALTER TABLE hil_se_ocr_result ADD fsm_msi_ocr nvarchar(max); | ||
| 9 | ALTER TABLE hil_se_ocr_result ADD fsm_sc_ocr nvarchar(max); | ||
| 10 | """ | ||
| 11 | |||
| 12 | afc_sql = """ | ||
| 13 | ALTER TABLE afc_ocr_result ADD fsm_wep_ocr nvarchar(max); | ||
| 14 | ALTER TABLE afc_ocr_result ADD fsm_msi_ocr nvarchar(max); | ||
| 15 | ALTER TABLE afc_ocr_result ADD fsm_sc_ocr nvarchar(max); | ||
| 16 | ALTER TABLE afc_se_ocr_result ADD fsm_wep_ocr nvarchar(max); | ||
| 17 | ALTER TABLE afc_se_ocr_result ADD fsm_msi_ocr nvarchar(max); | ||
| 18 | ALTER TABLE afc_se_ocr_result ADD fsm_sc_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