This commit is contained in:
DingZQ
2025-04-17 20:59:36 +08:00
parent 32bc4e0553
commit 510fe520e8

View File

@@ -1,15 +1,15 @@
from .database import *
from .s0_base import *
def get_pipe_risk_probability_now(name: str, pipe_id: str) -> dict[str, float]:
def get_pipe_risk_probability_now(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'] = str(t['pipeid'])
d['pipeage'] = str(t['pipeage'])
d['risk_probability_now'] = str(t['risk_probability_now'])
d['pipeage'] = t['pipeage']
d['risk_probability_now'] = t['risk_probability_now']
return d