fix: repair upload status and queue filtering
This commit is contained in:
@@ -34,6 +34,7 @@ class DocumentStatusItemVO(BaseModel):
|
||||
documentId: int = Field(..., description="文档ID")
|
||||
processingStatus: str | None = Field(None, description="处理状态")
|
||||
runStatus: str | None = Field(None, description="当前运行状态")
|
||||
phase: str | None = Field(None, description="当前运行阶段")
|
||||
resultStatus: str | None = Field(None, description="当前结果状态")
|
||||
updatedAt: str | None = Field(None, description="更新时间")
|
||||
|
||||
|
||||
@@ -346,7 +346,9 @@ class DocumentServiceImpl(IDocumentService):
|
||||
filters.append("d.type_id = ANY(:type_ids)")
|
||||
params["type_ids"] = normalizedTypeIds
|
||||
if EntryModuleId is not None and int(EntryModuleId) > 0:
|
||||
filters.append("dt.entry_module_id = :entry_module_id")
|
||||
filters.append(
|
||||
"COALESCE(eg.entry_module_id, eg_parent.entry_module_id, dt.entry_module_id) = :entry_module_id"
|
||||
)
|
||||
params["entry_module_id"] = int(EntryModuleId)
|
||||
if ProcessingStatus:
|
||||
filters.append("d.processing_status = :processing_status")
|
||||
@@ -412,6 +414,8 @@ class DocumentServiceImpl(IDocumentService):
|
||||
ON dt.id = d.type_id
|
||||
LEFT JOIN leaudit_evaluation_point_groups eg
|
||||
ON eg.id = d.group_id
|
||||
LEFT JOIN leaudit_evaluation_point_groups eg_parent
|
||||
ON eg_parent.id = eg.pid
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
document_type_id,
|
||||
@@ -469,6 +473,8 @@ class DocumentServiceImpl(IDocumentService):
|
||||
ON dt.id = d.type_id
|
||||
LEFT JOIN leaudit_evaluation_point_groups eg
|
||||
ON eg.id = d.group_id
|
||||
LEFT JOIN leaudit_evaluation_point_groups eg_parent
|
||||
ON eg_parent.id = eg.pid
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
document_type_id,
|
||||
@@ -822,6 +828,7 @@ class DocumentServiceImpl(IDocumentService):
|
||||
d.id AS document_id,
|
||||
d.processing_status,
|
||||
ar.status AS run_status,
|
||||
ar.phase,
|
||||
ar.result_status,
|
||||
d.updated_at
|
||||
FROM leaudit_documents d
|
||||
@@ -842,6 +849,7 @@ class DocumentServiceImpl(IDocumentService):
|
||||
documentId=int(row["document_id"]),
|
||||
processingStatus=row["processing_status"],
|
||||
runStatus=row["run_status"],
|
||||
phase=row["phase"],
|
||||
resultStatus=row["result_status"],
|
||||
updatedAt=row["updated_at"].isoformat() if row["updated_at"] else None,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user