feat(report):add design_progress_status_state

This commit is contained in:
shahzeydyfah
2025-01-24 00:39:05 +03:30
parent b08d2f6f4e
commit d1859a5c46
4 changed files with 21 additions and 0 deletions
+12
View File
@@ -421,4 +421,16 @@ class ReportRepository():
]).to_list(None)
return result
async def design_progress_status_state(self):
result = await use_collection("design_progress").aggregate([
{'$match':{'complete_at':{"$exists":0},'parent_id':{"$exists":0}}},
{"$group":
{'_id': {'state':"$state",'type':'$type'},
'count': {'$sum': 1},
"projectIds": {"$addToSet": "$project_id"},
},
}
]).to_list(None)
return result