日常更新

from mac mini(intel)
This commit is contained in:
liubiren 2025-12-13 00:35:33 +08:00
parent c373cb746c
commit b52473a54a
1 changed files with 3 additions and 4 deletions

View File

@ -45,9 +45,9 @@ class SQLiteClient:
self.connection = sqlite3.connect( self.connection = sqlite3.connect(
database=( database=(
Path(__file__).parent.resolve() / database Path(__file__).parent.resolve() / database
), # 当前目录下创建缓存数据库 ), # 当前目录下创建数据库
check_same_thread=False, check_same_thread=False,
timeout=30, # 缓存数据库锁超时时间单位默认为30秒避免并发锁死 timeout=30, # 数据库锁超时时间单位默认为30秒避免并发锁死
) )
# 创建缓存表和索引、清理过期缓存 # 创建缓存表和索引、清理过期缓存
@ -752,7 +752,6 @@ if __name__ == "__main__":
""" """
# 初始化票据数据 # 初始化票据数据
receipt = {"影像件编号": image_index} receipt = {"影像件编号": image_index}
# 请求深圳快瞳票据查验接口(兼容增值税发票、医疗门诊/住院收费票据) # 请求深圳快瞳票据查验接口(兼容增值税发票、医疗门诊/住院收费票据)
response = http_client.post( response = http_client.post(
url=(url := "https://ai.inspirvision.cn/s/api/ocr/invoiceCheckAll"), url=(url := "https://ai.inspirvision.cn/s/api/ocr/invoiceCheckAll"),
@ -970,7 +969,7 @@ if __name__ == "__main__":
], ],
} }
) )
# 若查验为假票或无法查验 # 若查验为假票或无法查验
else: else:
if response.get("status") == 400 and ( if response.get("status") == 400 and (
response.get("code") == 10100 or response.get("code") == 10001 response.get("code") == 10100 or response.get("code") == 10001