from .flightDB import flightDB def getRiskData(fdb:flightDB,bay,time,acno): res = fdb.queryTabel("RiskTable","提示内容","状态='生效' and 触发条件1 ='%s' and 触发条件2 ='%s' "%(bay,time)) res1 = fdb.queryTabel("RiskTable","提示内容","状态='生效' and 触发条件3 ='%s'" % acno) tips = "\n [机位风险]:"+res[0][0] if res !=None and res !=[] and len(res) !=0 else "" tips = tips + "\n [机号风险]:"+res1[0][0] if res1 !=None and res1 !=[] and len(res1) !=0 else tips return tips