fix: exclude cross-review task documents from regular document list
This commit is contained in:
@@ -355,6 +355,13 @@ class DocumentServiceImpl(IDocumentService):
|
|||||||
filters.append("d.created_at < (CAST(:date_to AS date) + INTERVAL '1 day')")
|
filters.append("d.created_at < (CAST(:date_to AS date) + INTERVAL '1 day')")
|
||||||
params["date_to"] = date_type.fromisoformat(DateTo.strip())
|
params["date_to"] = date_type.fromisoformat(DateTo.strip())
|
||||||
|
|
||||||
|
filters.append(
|
||||||
|
"NOT EXISTS ("
|
||||||
|
"SELECT 1 FROM leaudit_cross_review_task_documents crtd"
|
||||||
|
" WHERE crtd.document_id = d.id AND crtd.delete_time IS NULL"
|
||||||
|
")"
|
||||||
|
)
|
||||||
|
|
||||||
where_clause = " AND ".join(filters)
|
where_clause = " AND ".join(filters)
|
||||||
|
|
||||||
derivedAuditStatusExpr = """
|
derivedAuditStatusExpr = """
|
||||||
|
|||||||
Reference in New Issue
Block a user