This commit is contained in:
DingZQ
2025-04-17 21:02:26 +08:00
parent 52097bb58c
commit ec4f72f508
3 changed files with 17 additions and 1 deletions

View File

@@ -13,4 +13,14 @@ def get_pipe_risk_probability_now(name: str, pipe_id: str) -> dict[str, Any]:
return d
def get_pipe_risk_probability(name: str, pipe_id: str) -> dict[str, Any]:
t = try_read(name, f"select * from pipe_risk_probability where pipeid = '{pipe_id}'")
if t == None:
return {}
d = {}
d['pipeid'] = t['pipeid']
d['x'] = t['x']
d['y'] = t['y']
return d