feat: OCR 自动重跑 tracking 为空的已识别订单

This commit is contained in:
yeuimu
2026-08-08 06:41:36 +00:00
parent a0e27ae738
commit 320f5ed40a
+4 -1
View File
@@ -115,7 +115,10 @@ class SyncDB:
sql = (
'SELECT "orderNo","createdAt","labelPdfUrl","countryRegion" '
'FROM "Orders" '
'WHERE "labelPdfUrl" IS NOT NULL AND "ocrLayout" IS NULL'
'WHERE "labelPdfUrl" IS NOT NULL '
'AND ("ocrLayout" IS NULL '
' OR ("ocrLayout" NOT IN (\'ERROR\',\'UNSUPPORTED\') '
' AND COALESCE("ocrTracking", \'\') = \'\'))'
)
params: list = []
if country_regions: