|
|
|
|
@ -293,8 +293,8 @@ async def get_critical_equipment(db_session:DbSession, simulation_id: str):
|
|
|
|
|
SELECT 1
|
|
|
|
|
FROM jsonb_array_elements(a.timestamp_outs) AS elem
|
|
|
|
|
WHERE
|
|
|
|
|
(elem ->> 'currentEQStatus') = 'OoS' AND
|
|
|
|
|
(elem ->> 'cumulativeTime')::numeric = :cumulative_time
|
|
|
|
|
(elem ->> 'currentEQStatus') = 'OoS'
|
|
|
|
|
AND ABS((elem ->> 'cumulativeTime')::numeric - 5425.848679666753) <= 5
|
|
|
|
|
)
|
|
|
|
|
AND a.aeros_simulation_id = :simulation_id
|
|
|
|
|
AND b.node_type = 'RegularNode';
|
|
|
|
|
|