|
|
|
@ -49,6 +49,23 @@ async def get_transaction_datas(
|
|
|
|
message="Data retrieved successfully",
|
|
|
|
message="Data retrieved successfully",
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@router.get("/export-all", response_model=StandardResponse[PlantTransactionDataPagination])
|
|
|
|
|
|
|
|
async def get_transaction_datas_export_all(
|
|
|
|
|
|
|
|
db_session: DbSession,
|
|
|
|
|
|
|
|
common: CommonParameters,
|
|
|
|
|
|
|
|
):
|
|
|
|
|
|
|
|
"""Get all transaction_data for export."""
|
|
|
|
|
|
|
|
common["all"] = True
|
|
|
|
|
|
|
|
plant_transaction_data = await get_all(
|
|
|
|
|
|
|
|
db_session=db_session,
|
|
|
|
|
|
|
|
items_per_page=-1,
|
|
|
|
|
|
|
|
common=common,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
return StandardResponse(
|
|
|
|
|
|
|
|
data=plant_transaction_data,
|
|
|
|
|
|
|
|
message="All Plant Transaction Data retrieved successfully",
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
@router.get("/charts", response_model=StandardResponse[PlantChartData])
|
|
|
|
@router.get("/charts", response_model=StandardResponse[PlantChartData])
|
|
|
|
async def get_chart_data(db_session: DbSession, common: CommonParameters):
|
|
|
|
async def get_chart_data(db_session: DbSession, common: CommonParameters):
|
|
|
|
chart_data, bep_year, bep_total_lcc = await get_charts(
|
|
|
|
chart_data, bep_year, bep_total_lcc = await get_charts(
|
|
|
|
|