|
|
|
@ -95,6 +95,10 @@ async def get_all(
|
|
|
|
).distinct()
|
|
|
|
).distinct()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
num_equipments = len((await common['db_session'].execute(query)).scalars().all())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
material_cost = get_material_cost("B", num_equipments)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
equipments = await search_filter_sort_paginate(model=query, **common)
|
|
|
|
equipments = await search_filter_sort_paginate(model=query, **common)
|
|
|
|
data = equipments['items']
|
|
|
|
data = equipments['items']
|
|
|
|
@ -106,7 +110,7 @@ async def get_all(
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
res = OverhaulActivityRead(
|
|
|
|
res = OverhaulActivityRead(
|
|
|
|
id=equipment.id,
|
|
|
|
id=equipment.id,
|
|
|
|
material_cost=350000000000,
|
|
|
|
material_cost=material_cost,
|
|
|
|
service_cost=200000000,
|
|
|
|
service_cost=200000000,
|
|
|
|
location_tag=equipment.location_tag,
|
|
|
|
location_tag=equipment.location_tag,
|
|
|
|
equipment_name=equipment.master_equipment.name if equipment.master_equipment else None,
|
|
|
|
equipment_name=equipment.master_equipment.name if equipment.master_equipment else None,
|
|
|
|
|