feat:add report

This commit is contained in:
shahzeydyfah
2024-10-05 21:07:21 +03:30
parent 23b91330e1
commit acde281f59
+2 -2
View File
@@ -129,7 +129,7 @@ class ReportRepository():
return report
async def list_donut(self,_inp:DonutList):
_filter = {'design.nature_id':_inp.donut_select}
_filter = {'design.nature_id':int(_inp.donut_select)}
if _inp.type == 2:
if _inp.donut_select == "less_than_1000":
_filter = {'design.building_infrastructure': {'$lt': 1000}}
@@ -142,7 +142,7 @@ class ReportRepository():
else:
_filter = {'design.building_infrastructure': {'$gte': 30000}}
elif _inp.type == 3 :
_filter = {'design.type_id': _inp.donut_select}
_filter = {'design.type_id': int(_inp.donut_select)}
report = await use_collection(TaskEnv.CLN_PROJECT).find(_filter).to_list(None)
return report