Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
2a430194
authored
2021-12-20 20:07:29 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add auto settlement
1 parent
50de32a9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
234 additions
and
56 deletions
src/apps/doc/consts.py
src/apps/doc/models.py
src/apps/doc/views.py
src/celery_compare/tasks.py
src/common/tools/mssql_script13.py
src/apps/doc/consts.py
View file @
2a43019
...
...
@@ -1477,6 +1477,9 @@ SE_HIL_CON_1_MAP = {
'融资成本总额'
:
(
5
,
4
,
7
,
'融资成本总额'
,
None
),
'租期'
:
(
5
,
4
,
7
,
'租期'
,
None
),
'还款计划表'
:
(
5
,
5
,
7
,
'付款计划表'
,
None
),
'还款账号'
:
(
5
,
5
,
7
,
'银行账户-银行账号'
,
None
),
'户名'
:
(
5
,
5
,
7
,
'银行账户-户名'
,
None
),
'开户行'
:
(
5
,
5
,
7
,
'银行账户-开户行'
,
None
),
'ASP项目详情'
:
(
5
,
4
,
7
,
'车辆附加产品明细表'
,
None
),
'承租人法定代表人或授权代表'
:
(
1
,
1
,
7
,
'承租人-法定代表人或授权代表'
,
None
),
...
...
@@ -1532,11 +1535,11 @@ SE_AFC_CON_FIELD = ['-瘥△', '韐剛膠颲遠-撠-
'车辆贷款本金金额-重要条款'
,
'附加产品融资贷款本金总额-重要条款'
,
'所购车辆价格'
,
'车架号'
,
'经销商'
,
'贷款本金金额'
,
'车辆贷款本金金额'
,
'附加产品融资贷款本金总额'
,
'贷款期限'
,
'还款账号'
,
'户名'
,
'开户行'
,
'还款计划表'
,
'见证人签字'
,
'见证人日期'
,
'ASP项目详情-重要条款'
,
'购置税校验'
,
'ASP项目详情'
]
AFC_
CON_BANK_FIELD
=
[
'还款账号'
,
'户名'
,
'开户行'
]
CON_BANK_FIELD
=
[
'还款账号'
,
'户名'
,
'开户行'
]
# '承租人姓名', '承租人证件号码', '承租人法定代表人或授权代表'
SE_HIL_CON_1_FIELD
=
[
'合同编号-每页'
,
'合同编号-正文'
,
'车辆识别代码'
,
'车辆卖方'
,
'车辆原始销售价格'
,
'融资成本总额'
,
'租期'
,
'还款计划表'
,
'ASP项目详情'
,
'购置税校验'
,
'承租人法定代表人或授权代表'
]
'还款计划表'
,
'ASP项目详情'
,
'购置税校验'
,
'承租人法定代表人或授
权代表'
,
'还款账号'
,
'户名'
,
'开户行'
]
SE_HIL_CON_2_FIELD
=
[
'合同编号'
,
'合同编号-正文'
,
'车辆识别代码'
,
'租金总额'
,
'融资租赁期限'
]
SE_HIL_CON_3_FIELD
=
[
'合同编号-每页'
,
'承租人姓名'
,
'承租人证件号码'
,
'销售经销商'
,
'合同编号-正文'
,
'姓名/名称'
,
'自然人身份证件号码/法人执照号码'
,
'承租人签字'
]
...
...
@@ -1820,6 +1823,9 @@ HIL_CONTRACT_1_COMPARE_LOGIC = {
'还款计划表'
:
(
'还款计划表'
,
'se_schedule_compare'
,
{
"value_idx"
:
1
},
'售后回租合同还款计划表与系统不一致'
),
'ASP项目详情'
:
(
'ASP项目详情'
,
'se_asp_compare'
,
{},
'售后回租合同ASP名称或者金额与系统不一致'
),
'承租人法定代表人或授权代表'
:
(
'承租人法定代表人或授权代表'
,
'se_name_compare'
,
{},
'售后回租合同承租人法定代表人或授权代表与系统不一致'
),
'还款账号'
:
(
'还款账号'
,
'se_common_compare'
,
{
'remove_space'
:
True
},
'售后回租合同还款账号与系统不一致'
),
'户名'
:
(
'户名'
,
'se_common_compare'
,
{},
'售后回租合同户名与系统不一致'
),
'开户行'
:
(
'开户行'
,
'se_both_contain_compare'
,
{},
'售后回租合同开户行与系统不一致'
),
'承租人姓名'
:
(
'承租人姓名'
,
'se_name_compare'
,
{},
'售后回租合同承租人姓名与系统不一致'
),
'承租人证件号'
:
(
'承租人证件号'
,
'se_common_compare'
,
{},
'售后回租合同承租人证件号与系统不一致'
),
...
...
src/apps/doc/models.py
View file @
2a43019
...
...
@@ -806,31 +806,69 @@ class HILCACompareResultRecord(models.Model):
reason10_count
=
models
.
SmallIntegerField
(
default
=
0
,
verbose_name
=
"原因10数目"
)
result
=
models
.
TextField
(
null
=
True
,
verbose_name
=
"比对结果"
)
comments
=
models
.
TextField
(
null
=
True
,
verbose_name
=
"备注"
)
create_time
=
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
'创建时间'
)
# 索引
create_time
=
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
'创建时间'
)
# 索引
class
Meta
:
managed
=
False
db_table
=
'hil_ca_compare_result_record'
# class HILContract(models.Model):
# id = models.AutoField(primary_key=True, verbose_name="id") # 主键
# application_id = models.CharField(max_length=64, verbose_name="申请id") # 索引
# create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间')
class
HILAutoSettlement
(
models
.
Model
):
id
=
models
.
AutoField
(
primary_key
=
True
,
verbose_name
=
"id"
)
# 主键
application_id
=
models
.
CharField
(
max_length
=
64
,
verbose_name
=
"申请id"
)
# 索引
aa_type
=
models
.
CharField
(
null
=
True
,
max_length
=
64
,
verbose_name
=
"aa_type"
)
rpa_result
=
models
.
SmallIntegerField
(
null
=
True
,
verbose_name
=
"原因10数目"
)
rpa_1st_eye_tat
=
models
.
DecimalField
(
null
=
True
,
verbose_name
=
'rpa_1st_eye_tat'
)
rpa_2nd_eye_tat
=
models
.
DecimalField
(
null
=
True
,
verbose_name
=
'rpa_2nd_eye_tat'
)
rpa_3rd_eye_tat
=
models
.
DecimalField
(
null
=
True
,
verbose_name
=
'rpa_3rd_eye_tat'
)
rpa_total_tat
=
models
.
DecimalField
(
null
=
True
,
verbose_name
=
'rpa_total_tat'
)
rpa_activated_time
=
models
.
DateTimeField
(
null
=
True
,
verbose_name
=
'rpa_activated_time'
)
rpa_get_case_from_ocr_time
=
models
.
DateTimeField
(
null
=
True
,
verbose_name
=
'rpa_get_case_from_ocr_time'
)
rpa_get_case_from_oc_time
=
models
.
DateTimeField
(
null
=
True
,
verbose_name
=
'rpa_get_case_from_oc_time'
)
rpa_payment_authorize_time
=
models
.
DateTimeField
(
null
=
True
,
verbose_name
=
'rpa_payment_authorize_time'
)
rpa_second_eye_time
=
models
.
DateTimeField
(
null
=
True
,
verbose_name
=
'rpa_second_eye_time'
)
on_off
=
models
.
BooleanField
(
default
=
True
,
verbose_name
=
"是否有效"
)
ocr_auto_result_pass
=
models
.
BooleanField
(
default
=
False
,
verbose_name
=
"整体结果"
)
ocr_auto_result
=
models
.
TextField
(
null
=
True
,
verbose_name
=
"auto比对结果"
)
ocr_latest_comparison_time
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
,
verbose_name
=
'最新比对时间'
)
# class Meta:
# managed = False
# db_table = 'hil_contract'
update_time
=
models
.
DateTimeField
(
auto_now
=
False
,
verbose_name
=
'修改时间'
)
create_time
=
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
'创建时间'
)
class
Meta
:
managed
=
False
db_table
=
'hil_auto_settlement'
# class AFCContract(models.Model):
# id = models.AutoField(primary_key=True, verbose_name="id") # 主键
# application_id = models.CharField(max_length=64, verbose_name="申请id") # 索引
# create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间')
# class Meta:
# managed = False
# db_table = 'afc_contract'
# situ_db_label = 'afc'
class
AFCAutoSettlement
(
models
.
Model
):
id
=
models
.
AutoField
(
primary_key
=
True
,
verbose_name
=
"id"
)
# 主键
application_id
=
models
.
CharField
(
max_length
=
64
,
verbose_name
=
"申请id"
)
# 索引
aa_type
=
models
.
CharField
(
null
=
True
,
max_length
=
64
,
verbose_name
=
"aa_type"
)
rpa_result
=
models
.
SmallIntegerField
(
null
=
True
,
verbose_name
=
"原因10数目"
)
rpa_1st_eye_tat
=
models
.
DecimalField
(
null
=
True
,
verbose_name
=
'rpa_1st_eye_tat'
)
rpa_2nd_eye_tat
=
models
.
DecimalField
(
null
=
True
,
verbose_name
=
'rpa_2nd_eye_tat'
)
rpa_3rd_eye_tat
=
models
.
DecimalField
(
null
=
True
,
verbose_name
=
'rpa_3rd_eye_tat'
)
rpa_total_tat
=
models
.
DecimalField
(
null
=
True
,
verbose_name
=
'rpa_total_tat'
)
rpa_activated_time
=
models
.
DateTimeField
(
null
=
True
,
verbose_name
=
'rpa_activated_time'
)
rpa_get_case_from_ocr_time
=
models
.
DateTimeField
(
null
=
True
,
verbose_name
=
'rpa_get_case_from_ocr_time'
)
rpa_get_case_from_oc_time
=
models
.
DateTimeField
(
null
=
True
,
verbose_name
=
'rpa_get_case_from_oc_time'
)
rpa_payment_authorize_time
=
models
.
DateTimeField
(
null
=
True
,
verbose_name
=
'rpa_payment_authorize_time'
)
rpa_second_eye_time
=
models
.
DateTimeField
(
null
=
True
,
verbose_name
=
'rpa_second_eye_time'
)
on_off
=
models
.
BooleanField
(
default
=
True
,
verbose_name
=
"是否有效"
)
ocr_auto_result_pass
=
models
.
BooleanField
(
default
=
False
,
verbose_name
=
"整体结果"
)
ocr_auto_result
=
models
.
TextField
(
verbose_name
=
"auto比对结果"
)
ocr_latest_comparison_time
=
models
.
DateTimeField
(
auto_now
=
True
,
null
=
True
,
verbose_name
=
'最新比对时间'
)
update_time
=
models
.
DateTimeField
(
auto_now
=
True
,
verbose_name
=
'修改时间'
)
create_time
=
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
'创建时间'
)
class
Meta
:
managed
=
False
db_table
=
'afc_auto_settlement'
situ_db_label
=
'afc'
...
...
src/apps/doc/views.py
View file @
2a43019
...
...
@@ -6,7 +6,7 @@ import datetime
import
fitz
import
shutil
from
django.utils
import
timezone
from
django.http
import
HttpResponse
#
from django.http import HttpResponse
from
django.db.models
import
Q
from
rest_framework.permissions
import
IsAuthenticated
from
webargs
import
fields
,
validate
...
...
@@ -17,14 +17,15 @@ from common.mixins import GenericView
from
common.tools.file_tools
import
file_write
from
common.redis_cache
import
redis_handler
as
rh
from
.models
import
(
# UploadDocRecords,
DocStatus
,
PriorityApplication
,
GCAPRecords
,
AFCComparisonInfo
,
AFCSEComparisonInfo
,
#
AFCSEComparisonInfo,
AFCSECMSInfo
,
HILComparisonInfo
,
HILSEComparisonInfo
,
#
HILSEComparisonInfo,
HILSECMSInfo
,
AFCCompareOfflineReport
,
HILCompareOfflineReport
,
...
...
@@ -36,6 +37,8 @@ from .models import (
AFCSECompareResultRecord
,
HILCACompareResultRecord
,
HILSECompareResultRecord
,
HILAutoSettlement
,
AFCAutoSettlement
,
)
from
.named_enum
import
ErrorType
from
.mixins
import
DocHandler
...
...
@@ -213,6 +216,7 @@ se_compare_content = {
'customerType'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
OneOf
(
consts
.
CUSTOMER_TYPE
)),
"firstSubmmisonDate"
:
CustomDate
(
required
=
True
),
'propertyDocumentPolicy'
:
fields
.
Str
(
required
=
False
,
validate
=
validate
.
Length
(
max
=
16
)),
'isAutoSettlement'
:
fields
.
Boolean
(
required
=
False
),
'individualCusInfo'
:
fields
.
List
(
fields
.
Nested
(
se_individual_args
),
required
=
True
,
validate
=
validate
.
Length
(
min
=
1
,
max
=
4
)),
...
...
@@ -283,6 +287,7 @@ compare_result_args = {
'scheme'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
OneOf
(
consts
.
COMPARE_DOC_SCHEME_LIST
)),
'id'
:
fields
.
Int
(
required
=
False
,
validate
=
lambda
val
:
val
>=
1
),
'case_id'
:
fields
.
Str
(
required
=
True
,
validate
=
validate
.
Length
(
max
=
64
)),
'auto'
:
fields
.
Int
(
required
=
False
),
}
upload_pdf_args
=
{
...
...
@@ -500,27 +505,29 @@ class UploadDocView(GenericView, DocHandler):
# co_name = self.get_name(applicant_data, 'coApplicantName', 16)
# g1_name = self.get_name(applicant_data, 'guarantor1Name', 16)
# g2_name = self.get_name(applicant_data, 'guarantor2Name', 16)
# try:
# # 1. 上传信息记录
# UploadDocRecords.objects.create(
# metadata_version_id=document.get('metadataVersionId'),
# application_id=application_id,
# main_applicant=
main_name
,
# co_applicant=
co_name
,
# guarantor_1=
g1_name
,
# guarantor_2=
g2_name
,
# main_applicant=
'main_name'
,
# co_applicant=
'co_name'
,
# guarantor_1=
'g1_name'
,
# guarantor_2=
'g2_name'
,
# document_name=document_name,
# document_scheme=document_scheme,
# business_type=business_type,
# data_source=data_source,
# upload_finish_time=document.get('uploadFinishTime'),
# )
# except IntegrityError as e:
# self.running_log.info('[doc upload fail] [args={0}] [err={1}]'.format(args, e))
# self.invalid_params(msg='metadataVersionId repeat')
# else:
# except Exception as e:
# self.running_log.info('[doc upload success] [same file skip] [args={0}]'.format(args))
# # self.invalid_params(msg='metadataVersionId repeat')
# return response.ok()
data_source
=
self
.
fix_data_source
(
data_source
)
document_scheme
=
self
.
fix_scheme
(
document_scheme
)
document_scheme
=
self
.
fix_scheme
(
document_scheme
)
if
document_name
.
endswith
(
'.zip'
):
self
.
running_log
.
info
(
'[doc upload success] [zip file skip] [args={0}]'
.
format
(
args
))
...
...
@@ -531,6 +538,7 @@ class UploadDocView(GenericView, DocHandler):
if
document_name
.
endswith
(
'-证书.pdf'
)
or
document_name
.
endswith
(
'-证书'
):
self
.
running_log
.
info
(
'[doc upload success] [eapp license skip] [args={0}]'
.
format
(
args
))
return
response
.
ok
()
# 2. 根据业务类型分库存储
doc_class
,
prefix
=
self
.
get_doc_class
(
business_type
)
doc
=
doc_class
.
objects
.
create
(
...
...
@@ -707,37 +715,52 @@ class SECompareView(GenericView):
def
post
(
self
,
request
,
args
):
# 存库
content
=
args
.
get
(
'content'
,
{})
uniq_seq
=
content
.
get
(
'uniqSeq'
)
business_type
=
content
.
get
(
'applicationEntity'
)
application_id
=
content
.
get
(
'applicationId'
)
is_auto
=
content
.
get
(
'isAutoSettlement'
,
False
)
if
is_auto
:
# 加入优先级队列
PriorityApplication
.
objects
.
update_or_create
(
application_id
=
application_id
,
defaults
=
{
'on_off'
:
True
})
# 加入auto表
auto_class
=
HILAutoSettlement
if
business_type
in
consts
.
HIL_SET
else
AFCAutoSettlement
is_auto
=
auto_class
.
objects
.
filter
(
application_id
=
application_id
,
on_off
=
True
)
.
exists
()
if
not
is_auto
:
auto_class
.
objects
.
create
(
application_id
=
application_id
,
)
return
response
.
ok
()
individual_cus_info
=
json
.
dumps
(
content
.
get
(
'individualCusInfo'
))
vehicle_info
=
json
.
dumps
(
content
.
get
(
'vehicleInfo'
))
insurance_info
=
json
.
dumps
(
content
.
get
(
'insuranceInfo'
))
bank_info
=
json
.
dumps
(
content
.
get
(
'bankInfo'
))
quotationt_info
=
json
.
dumps
(
content
.
get
(
'quotationtInfo'
))
corporate_cus_info
=
json
.
dumps
(
content
.
get
(
'corporateCusInfo'
))
if
isinstance
(
content
.
get
(
'corporateCusInfo'
),
dict
)
else
None
comparison_class
=
HILSEComparisonInfo
if
business_type
in
consts
.
HIL_SET
else
AFCSEComparisonInfo
comparison_class
.
objects
.
create
(
uniq_seq
=
uniq_seq
,
application_id
=
application_id
,
application_version
=
content
.
get
(
'applicationVersion'
),
customer_type
=
content
.
get
(
'customerType'
),
first_submmison_date
=
content
.
get
(
'firstSubmmisonDate'
),
property_doc_policy
=
content
.
get
(
'propertyDocumentPolicy'
,
None
),
individual_cus_info
=
individual_cus_info
,
corporate_cus_info
=
corporate_cus_info
,
vehicle_info
=
vehicle_info
,
insurance_info
=
insurance_info
,
bank_info
=
bank_info
,
quotationt_info
=
quotationt_info
)
# uniq_seq = content.get('uniqSeq')
# business_type = content.get('applicationEntity')
# application_id = content.get('applicationId')
#
# individual_cus_info = json.dumps(content.get('individualCusInfo'))
# vehicle_info = json.dumps(content.get('vehicleInfo'))
# insurance_info = json.dumps(content.get('insuranceInfo'))
# bank_info = json.dumps(content.get('bankInfo'))
# quotationt_info = json.dumps(content.get('quotationtInfo'))
# corporate_cus_info = json.dumps(content.get('corporateCusInfo')) if isinstance(
# content.get('corporateCusInfo'), dict) else None
# comparison_class = HILSEComparisonInfo if business_type in consts.HIL_SET else AFCSEComparisonInfo
# comparison_class.objects.create(
# uniq_seq=uniq_seq,
# application_id=application_id,
# application_version=content.get('applicationVersion'),
# customer_type=content.get('customerType'),
# first_submmison_date=content.get('firstSubmmisonDate'),
# property_doc_policy=content.get('propertyDocumentPolicy', None),
# individual_cus_info=individual_cus_info,
# corporate_cus_info=corporate_cus_info,
# vehicle_info=vehicle_info,
# insurance_info=insurance_info,
# bank_info=bank_info,
# quotationt_info=quotationt_info
# )
# 触发比对
# compare.apply_async((application_id, business_type, uniq_seq, None, False, False),
# queue='queue_compare')
return
response
.
ok
()
post
.
openapi_doc
=
'''
tags: [info]
...
...
@@ -944,6 +967,38 @@ class CompareResultView(GenericView):
entity
=
args
.
get
(
'entity'
)
scheme
=
args
.
get
(
'scheme'
)
case_id
=
args
.
get
(
'case_id'
)
is_auto
=
args
.
get
(
'auto'
)
if
is_auto
==
1
:
result_table
=
HILAutoSettlement
if
entity
==
consts
.
HIL_PREFIX
else
AFCAutoSettlement
if
result_id
is
not
None
:
result_obj
=
result_table
.
objects
.
filter
(
id
=
result_id
)
.
first
()
else
:
result_obj
=
result_table
.
objects
.
filter
(
application_id
=
case_id
)
.
first
()
if
result_obj
is
None
:
whole_result
=
''
else
:
whole_result
=
consts
.
RESULT_Y
if
result_obj
.
ocr_auto_result_pass
else
consts
.
RESULT_N
source
=
consts
.
INFO_SOURCE
[
1
]
version
=
comments
=
''
compare_result
=
{
'id'
:
0
if
result_obj
is
None
else
result_obj
.
id
,
'application_id'
:
case_id
,
'entity'
:
entity
,
'scheme'
:
consts
.
DOC_SCHEME_LIST
[
0
]
if
scheme
==
consts
.
COMPARE_DOC_SCHEME_LIST
[
0
]
else
consts
.
DOC_SCHEME_LIST
[
1
],
'whole_result'
:
whole_result
,
'latest_compared_time'
:
''
if
result_obj
is
None
else
result_obj
.
ocr_latest_comparison_time
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M'
),
'source'
:
source
,
'version'
:
version
,
'comments'
:
comments
,
'result'
:
[]
if
result_obj
is
None
else
json
.
loads
(
result_obj
.
ocr_auto_result
)
}
return
response
.
ok
(
data
=
compare_result
)
if
entity
==
consts
.
HIL_PREFIX
:
result_table
=
HILCACompareResult
if
scheme
==
consts
.
COMPARE_DOC_SCHEME_LIST
[
0
]
else
HILSECompareResult
...
...
@@ -1132,7 +1187,7 @@ class SECMSView(GenericView):
permission_classes
=
[
IsAuthenticated
]
authentication_classes
=
[
OAuth2AuthenticationWithUser
]
#
pos
上传比对信息接口 SE
#
CMS
上传比对信息接口 SE
# @use_args(se_cms_args, location='data')
def
post
(
self
,
request
):
args
=
request
.
data
...
...
src/celery_compare/tasks.py
View file @
2a43019
This diff is collapsed.
Click to expand it.
src/common/tools/mssql_script13.py
0 → 100644
View file @
2a43019
import
pyodbc
hil_sql
=
"""
create table hil_auto_settlement
(
id bigint identity primary key,
application_id nvarchar(64) not null,
aa_type nvarchar(64),
rpa_result smallint,
rpa_1st_eye_tat decimal(18,0),
rpa_2nd_eye_tat decimal(18,0),
rpa_3rd_eye_tat decimal(18,0),
rpa_total_tat decimal(18,0),
rpa_activated_time datetime,
rpa_get_case_from_ocr_time datetime,
rpa_get_case_from_oc_time datetime,
rpa_payment_authorize_time datetime,
rpa_second_eye_time datetime,
on_off bit default 1 not null,
ocr_auto_result_pass bit default 0 not null,
ocr_auto_result nvarchar(max),
ocr_latest_comparison_time datetime,
update_time datetime not null,
create_time datetime not null
);
create index hil_auto_settlement_application_id_index
on hil_auto_settlement (application_id);
"""
afc_sql
=
"""
create table afc_auto_settlement
(
id bigint identity primary key,
application_id nvarchar(64) not null,
aa_type nvarchar(64),
rpa_result smallint,
rpa_1st_eye_tat decimal(18,0),
rpa_2nd_eye_tat decimal(18,0),
rpa_3rd_eye_tat decimal(18,0),
rpa_total_tat decimal(18,0),
rpa_activated_time datetime,
rpa_get_case_from_ocr_time datetime,
rpa_get_case_from_oc_time datetime,
rpa_payment_authorize_time datetime,
rpa_second_eye_time datetime,
on_off bit default 1 not null,
ocr_auto_result_pass bit default 0 not null,
ocr_auto_result nvarchar(max),
ocr_latest_comparison_time datetime,
update_time datetime not null,
create_time datetime not null
);
create index afc_auto_settlement_application_id_index
on afc_auto_settlement (application_id);
"""
hil_cnxn
=
pyodbc
.
connect
(
'DRIVER={ODBC Driver 17 for SQL Server};'
,
autocommit
=
True
)
hil_cursor
=
hil_cnxn
.
cursor
()
hil_cursor
.
execute
(
hil_sql
)
hil_cursor
.
close
()
hil_cnxn
.
close
()
afc_cnxn
=
pyodbc
.
connect
(
'DRIVER={ODBC Driver 17 for SQL Server};'
,
autocommit
=
True
)
afc_cursor
=
afc_cnxn
.
cursor
()
afc_cursor
.
execute
(
afc_sql
)
afc_cursor
.
close
()
afc_cnxn
.
close
()
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment