feature/reliability_stat
Cizz22 4 months ago
parent 2fbc636d38
commit adef9d53a2

@ -126,7 +126,7 @@ async def get_all(
res = OverhaulActivityRead(
id=equipment.id,
material_cost=float(cost),
service_cost=float(service_cost),
service_cost=equipment.service_cost,
overhaul_cost=float(oh_cost),
location_tag=equipment.location_tag,
equipment_name=equipment.master_equipment.name if equipment.master_equipment else None,
@ -175,7 +175,7 @@ async def get_standard_scope_by_session_id(*, db_session: DbSession, overhaul_se
results = []
material_cost = await get_cm_cost_summary(collector_db=collector_db, last_oh_date=prev_oh_scope.end_date, upcoming_oh_date=overhaul.start_date)
service_cost = get_service_cost(scope=overhaul.maintenance_type.name, total_equipment=len(eqs))
#service_cost = get_service_cost(scope=overhaul.maintenance_type.name, total_equipment=len(eqs))
overhaul_cost = await get_oh_cost_summary(collector_db=collector_db, last_oh_date=prev_oh_scope.end_date, upcoming_oh_date=overhaul.start_date)
for equipment in eqs:
@ -184,7 +184,7 @@ async def get_standard_scope_by_session_id(*, db_session: DbSession, overhaul_se
res = OverhaulActivityRead(
id=equipment.id,
material_cost=float(cost),
service_cost=float(service_cost),
service_cost=equipment.service_cost,
overhaul_cost=float(oh_cost),
location_tag=equipment.location_tag,
equipment_name=equipment.master_equipment.name if equipment.master_equipment else None,

@ -13,6 +13,7 @@ class StandardScope(Base, DefaultMixin):
location_tag = Column(String, nullable=False)
is_alternating_oh = Column(Boolean, nullable=False, default=False)
assigned_date = Column(Date, nullable=True)
service_cost = Column(Float, nullable=True)
master_equipment = relationship(
"MasterEquipment",

Loading…
Cancel
Save