|
|
|
|
@ -226,7 +226,6 @@ async def save_simulation_result(
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not node:
|
|
|
|
|
if result["nodeType"] != "RegularNode" and result["nodeType"] != "Schematic":
|
|
|
|
|
continue
|
|
|
|
|
@ -492,17 +491,20 @@ async def get_simulation_with_calc_result(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if schematic_name:
|
|
|
|
|
query = query.join(
|
|
|
|
|
AerosNode, AerosNode.id == AerosSimulationCalcResult.aeros_node_id
|
|
|
|
|
).filter(AerosNode.structure_name.contains(schematic_name))
|
|
|
|
|
if schematic_name == "WTP":
|
|
|
|
|
query = query.join(
|
|
|
|
|
AerosNode, AerosNode.id == AerosSimulationCalcResult.aeros_node_id
|
|
|
|
|
).filter(AerosNode.structure_name.contains(schematic_name))
|
|
|
|
|
else:
|
|
|
|
|
query = query.join(
|
|
|
|
|
AerosNode, AerosNode.id == AerosSimulationCalcResult.aeros_node_id
|
|
|
|
|
).filter(AerosNode.structure_name.contains(schematic_name))
|
|
|
|
|
|
|
|
|
|
query = query.options(
|
|
|
|
|
selectinload(AerosSimulationCalcResult.aeros_node).options(
|
|
|
|
|
selectinload(AerosNode.equipment)
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
simulation = await db_session.execute(query)
|
|
|
|
|
|
|
|
|
|
return simulation.scalars().all()
|
|
|
|
|
|