|
|
|
|
@ -211,6 +211,18 @@ async def get_calculated_top_10_replacement_priorities(db_session: DbSession, co
|
|
|
|
|
message="Top 10 Replacement Priorities Data retrieved successfully",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@router.get(
|
|
|
|
|
"/top-10-replacement-priorities-export-all",
|
|
|
|
|
response_model=StandardResponse[EquipmentTop10Pagination],
|
|
|
|
|
)
|
|
|
|
|
async def get_calculated_top_10_replacement_priorities_all(db_session: DbSession, common: CommonParameters):
|
|
|
|
|
common["all"] = True
|
|
|
|
|
equipment_data = await get_top_10_replacement_priorities(db_session=db_session, common=common)
|
|
|
|
|
return StandardResponse(
|
|
|
|
|
data=equipment_data,
|
|
|
|
|
message="All Replacement Priorities Data retrieved successfully",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@router.get(
|
|
|
|
|
"/top-10-economic-life",
|
|
|
|
|
response_model=StandardResponse[EquipmentTop10Pagination],
|
|
|
|
|
@ -224,6 +236,18 @@ async def get_calculated_top_10_economic_life(db_session: DbSession, common: Com
|
|
|
|
|
message="Top 10 Economic Life Data retrieved successfully",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@router.get(
|
|
|
|
|
"/top-10-economic-life-export-all",
|
|
|
|
|
response_model=StandardResponse[EquipmentTop10Pagination],
|
|
|
|
|
)
|
|
|
|
|
async def get_calculated_top_10_economic_life_all(db_session: DbSession, common: CommonParameters):
|
|
|
|
|
common["all"] = True
|
|
|
|
|
equipment_data = await get_top_10_economic_life(db_session=db_session, common=common)
|
|
|
|
|
return StandardResponse(
|
|
|
|
|
data=equipment_data,
|
|
|
|
|
message="All Economic Life Data retrieved successfully",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@router.get("/tree", response_model=StandardResponse[EquipmentRead])
|
|
|
|
|
async def get_equipment_tree():
|
|
|
|
|
|