17 lines
418 B
Python
17 lines
418 B
Python
from .database import *
|
|
from .s0_base import *
|
|
|
|
def get_pipe_risk_probability_now(name: str, pipe_id: str) -> dict[str, float]:
|
|
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['pipepage'])
|
|
d['risk_probability_now'] = str(t['risk_probability_now'])
|
|
|
|
return d
|
|
|
|
|