From 32b77f54fa0cce154c1c10cfdf2c9f63d1465d47 Mon Sep 17 00:00:00 2001 From: Cizz22 Date: Fri, 25 Jul 2025 16:30:09 +0700 Subject: [PATCH] add powerplant reliability --- src/overhaul_activity/service.py | 4 +++- src/standard_scope/service.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/overhaul_activity/service.py b/src/overhaul_activity/service.py index 23773c5..48702d3 100644 --- a/src/overhaul_activity/service.py +++ b/src/overhaul_activity/service.py @@ -102,9 +102,11 @@ async def get_all( results = [] for equipment in data: + if not equipment.master_equipment: + continue res = OverhaulActivityRead( id=equipment.id, - material_cost=35000000000, + material_cost=350000000000, service_cost=200000000, location_tag=equipment.location_tag, equipment_name=equipment.master_equipment.name if equipment.master_equipment else None, diff --git a/src/standard_scope/service.py b/src/standard_scope/service.py index 1b0f12c..f2889ae 100644 --- a/src/standard_scope/service.py +++ b/src/standard_scope/service.py @@ -49,6 +49,8 @@ async def get_all(*, common, oh_scope: Optional[str] = None): .join(EquipmentWorkscopeGroup.workscope_group) .join(MasterActivity.oh_types) .join(WorkscopeOHType.oh_type) + .join(StandardScope.master_equipment) + .filter(MasterEquipment.location_tag.is_not(None)) .filter(MaintenanceType.name == oh_scope) # .filter(