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