为涂抹错误分析添加时间限制
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
x-env:
|
||||
&default-image
|
||||
image: fcb_photo_review:1.10.2
|
||||
image: fcb_photo_review:1.10.3
|
||||
|
||||
services:
|
||||
photo_review_1:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from datetime import date
|
||||
from datetime import date, timedelta
|
||||
|
||||
import cv2
|
||||
from sqlalchemy import update, and_, select, exists
|
||||
@@ -48,10 +48,13 @@ def auto_check_error(error_ocr):
|
||||
|
||||
if __name__ == '__main__':
|
||||
# 默认
|
||||
today = date.today()
|
||||
session = MysqlSession()
|
||||
ocr_error = (session.query(ZxIeOcrerror.pk_phrec, ZxIeOcrerror.cXm, ZxIeOcrerror.cSfzh, ZxIeOcrerror.cfjaddress,
|
||||
ZxIeOcrerror.cfjaddress2)
|
||||
.filter(and_(ZxIeOcrerror.checktime.is_(None), ZxIeOcrerror.paint_date >= date.today()))
|
||||
.filter(and_(ZxIeOcrerror.checktime.is_(None),
|
||||
ZxIeOcrerror.creationtime >= today,
|
||||
ZxIeOcrerror.creationtime < today + timedelta(days=1)))
|
||||
.limit(1).one())
|
||||
session.close()
|
||||
# 手动填充
|
||||
|
||||
Reference in New Issue
Block a user