fix(phisycal progress):change avg
This commit is contained in:
@@ -81,7 +81,7 @@ class PhysicalProgressRepository(BaseRepository):
|
||||
for i in _list:
|
||||
_i_model = MODEL(**i)
|
||||
_avg = await use_collection(TaskEnv.CLN_MONITOR_PYSICAL).aggregate([
|
||||
{'$match': {'project_id': update.project_id, "date_at": {"$lt": _i_model.date_at}}},
|
||||
{'$match': {'project_id': update.project_id, "date_at": {"$lte": _i_model.date_at}}},
|
||||
{'$group': {'_id': None, 'avg': {'$avg': "$real"}}}
|
||||
]).to_list(None)
|
||||
_model = LastRecord(
|
||||
|
||||
Reference in New Issue
Block a user