为涂抹错误分析添加时间限制

This commit is contained in:
2024-08-09 16:37:58 +08:00
parent 4120f6b5b1
commit 6fd5c059c2
3 changed files with 14 additions and 4 deletions

View File

@@ -1,14 +1,21 @@
from datetime import date, timedelta
import cv2
from sqlalchemy import and_
from db import MysqlSession
from db.mysql import ZxIeOcrerror
from photo_mask_error_check import check_error
if __name__ == '__main__':
today = date.today()
session = MysqlSession()
# 对涂抹错误的进行测试比较
ocr_errors = (session.query(ZxIeOcrerror.pk_phrec, ZxIeOcrerror.cXm, ZxIeOcrerror.cSfzh, ZxIeOcrerror.cfjaddress)
.filter(ZxIeOcrerror.checktime.is_(None)).order_by(ZxIeOcrerror.pk_phrec.desc()).limit(50).all())
.filter(and_(ZxIeOcrerror.checktime.is_(None),
ZxIeOcrerror.creationtime >= today,
ZxIeOcrerror.creationtime < today + timedelta(days=1)))
.order_by(ZxIeOcrerror.pk_phrec.desc()).limit(50).all())
# 对已涂抹的进行测试比较
# ocr_errors = (session.query(ZxPhrec.pk_phrec, ZxPhhd.cXm, ZxPhhd.cSfzh, ZxPhrec.cfjaddress)