feat(report):add delay_donut_all
This commit is contained in:
@@ -244,6 +244,17 @@ class ReportRepository():
|
||||
"totalDeviation": {"$sum": "$deviation"}, }}]).to_list(None)
|
||||
return report
|
||||
|
||||
async def delay_donut_all(self):
|
||||
report = await use_collection(TaskEnv.CLN_BILL_DELAY).aggregate([
|
||||
{'$group': {"_id": None, "total_financial": {"$sum": "$financial.total"},
|
||||
"total_force_major": {"$sum": "$force_major.total"},
|
||||
"total_technical": {"$sum": "$technical.total"},
|
||||
"total_extra_new_work": {"$sum": "$extra_new_work"},
|
||||
"total_other": {"$sum": "$other"},
|
||||
}}
|
||||
]).to_list(None)
|
||||
return report
|
||||
|
||||
async def list_delay_donut(self, _select: str):
|
||||
get_list = []
|
||||
_map = {'1': 'financial.total', '2': 'force_major.total', '3': 'technical.total', '4': 'extra_new_work',
|
||||
|
||||
@@ -58,6 +58,10 @@ def categorize_deviation():
|
||||
def sum_add_time_end_project():
|
||||
pass
|
||||
|
||||
@router.get('/donut/delay/all', tags=_tag_base)
|
||||
@shrink(repo.delay_donut_all)
|
||||
def delay_donut_all():
|
||||
pass
|
||||
#لیست پروژه ها را نمایش میده
|
||||
@router.get('/donut/delay/{_select}', tags=_tag_base)
|
||||
@shrink(repo.list_delay_donut)
|
||||
|
||||
Reference in New Issue
Block a user