Add API getallburstlocateresults

This commit is contained in:
DingZQ
2025-05-07 21:06:08 +08:00
parent 99c19f94f4
commit bf6116aa46
4 changed files with 20 additions and 0 deletions

View File

@@ -171,3 +171,5 @@ from .s40_schema import get_scheme_schema, get_scheme, get_all_schemes
from .s41_pipe_risk_probability import get_pipe_risk_probability_now, get_pipe_risk_probability, get_network_pipe_risk_probability_now, get_pipes_risk_probability, get_pipe_risk_probability_geometries
from .s42_sensor_placement import get_all_sensor_placements
from .s43_burst_locate_result import get_all_burst_locate_results

View File

@@ -0,0 +1,6 @@
from .database import *
from .s0_base import *
import json
def get_all_burst_locate_results(name: str) -> list[dict[Any, Any]]:
return read_all(name, "select * from burst_locate_result")

View File

@@ -2245,6 +2245,12 @@ async def fastapi_get_all_sensor_placements(network: str) -> list[dict[Any, Any]
return get_all_sensor_placements(network)
############################################################
# burst_locate_result 43
############################################################
@app.get('/getallburstlocateresults/')
async def fastapi_get_all_burst_locate_results(network: str) -> list[dict[Any, Any]]:
return get_all_burst_locate_results(network)

View File

@@ -1338,5 +1338,11 @@ def get_pipe_risk_probability_geometries(name: str) -> dict[str, Any]:
def get_all_sensor_placements(name: str) -> list[dict[Any, Any]]:
return api.get_all_sensor_placements(name)
############################################################
# burst_locate_result 43
############################################################
def get_all_burst_locate_results(name: str) -> list[dict[Any, Any]]:
return api.get_all_burst_locate_results(name)