feat(monitor physical):add update
This commit is contained in:
@@ -41,7 +41,7 @@ class PhysicalProgressRepository(BaseRepository):
|
|||||||
if three_month:
|
if three_month:
|
||||||
send['three_month'] = three_month
|
send['three_month'] = three_month
|
||||||
_avg = await use_collection(TaskEnv.CLN_MONITOR_PYSICAL).aggregate([
|
_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}}}
|
{'$group': {'_id': None, 'avg': {'$avg': "$real"}, 'sum':{'$sum': "$real"}, 'count':{'$sum': 1}}}
|
||||||
]).to_list(None)
|
]).to_list(None)
|
||||||
if _avg:
|
if _avg:
|
||||||
|
|||||||
Reference in New Issue
Block a user