feat(monitor physical):add update

This commit is contained in:
shahzeydyfah
2024-11-30 06:56:09 +03:30
parent bc6e6b6fd3
commit a01be5c9ef
@@ -41,7 +41,7 @@ class PhysicalProgressRepository(BaseRepository):
if three_month:
send['three_month'] = three_month
_avg = await use_collection(TaskEnv.CLN_MONITOR_PYSICAL).aggregate([
{'$match':{'project_id':_inp.project_id}},
{'$match':{'project_id':_inp.project_id, "date_at": {"$lt": _inp.date_at}}},
{'$group': {'_id': None, 'avg': {'$avg': "$real"}, 'sum':{'$sum': "$real"}, 'count':{'$sum': 1}}}
]).to_list(None)
if _avg: