对于没有图片的案子(照片同步出现问题)不再做处理
This commit is contained in:
@@ -245,9 +245,11 @@ def photo_mask(pk_phhd, name, id_card_num):
|
|||||||
def main():
|
def main():
|
||||||
while 1:
|
while 1:
|
||||||
session = MysqlSession()
|
session = MysqlSession()
|
||||||
phhds = session.query(ZxPhhd.pk_phhd, ZxPhhd.cXm, ZxPhhd.cSfzh).filter(
|
phhds = (session.query(ZxPhhd.pk_phhd, ZxPhhd.cXm, ZxPhhd.cSfzh)
|
||||||
ZxPhhd.paint_flag == "1"
|
.join(ZxPhrec, ZxPhhd.pk_phhd == ZxPhrec.pk_phhd, isouter=True)
|
||||||
).limit(PHHD_BATCH_SIZE).all()
|
.filter(ZxPhhd.paint_flag == "1")
|
||||||
|
.filter(ZxPhrec.pk_phrec.isnot(None))
|
||||||
|
.distinct().limit(PHHD_BATCH_SIZE).all())
|
||||||
# 将状态改为正在涂抹中
|
# 将状态改为正在涂抹中
|
||||||
pk_phhd_values = [phhd.pk_phhd for phhd in phhds]
|
pk_phhd_values = [phhd.pk_phhd for phhd in phhds]
|
||||||
update_flag = (update(ZxPhhd).where(ZxPhhd.pk_phhd.in_(pk_phhd_values)).values(paint_flag="2"))
|
update_flag = (update(ZxPhhd).where(ZxPhhd.pk_phhd.in_(pk_phhd_values)).values(paint_flag="2"))
|
||||||
|
|||||||
@@ -278,7 +278,11 @@ def photo_review(pk_phhd):
|
|||||||
def main():
|
def main():
|
||||||
while 1:
|
while 1:
|
||||||
session = MysqlSession()
|
session = MysqlSession()
|
||||||
phhds = session.query(ZxPhhd.pk_phhd).filter(ZxPhhd.exsuccess_flag == '1').limit(PHHD_BATCH_SIZE).all()
|
phhds = (session.query(ZxPhhd.pk_phhd)
|
||||||
|
.join(ZxPhrec, ZxPhhd.pk_phhd == ZxPhrec.pk_phhd, isouter=True)
|
||||||
|
.filter(ZxPhhd.exsuccess_flag == "1")
|
||||||
|
.filter(ZxPhrec.pk_phrec.isnot(None))
|
||||||
|
.distinct().limit(PHHD_BATCH_SIZE).all())
|
||||||
# 将状态改为正在识别中
|
# 将状态改为正在识别中
|
||||||
pk_phhd_values = [phhd.pk_phhd for phhd in phhds]
|
pk_phhd_values = [phhd.pk_phhd for phhd in phhds]
|
||||||
update_flag = (update(ZxPhhd).where(ZxPhhd.pk_phhd.in_(pk_phhd_values)).values(exsuccess_flag=2))
|
update_flag = (update(ZxPhhd).where(ZxPhhd.pk_phhd.in_(pk_phhd_values)).values(exsuccess_flag=2))
|
||||||
|
|||||||
Reference in New Issue
Block a user