123456789 |
- from .flightDB import flightDB
- def getRiskData(fdb:flightDB,bay,time,acno,actype):
- res = fdb.queryTabel("RiskTable","提示内容","状态='生效' and 触发条件1 ='%s' and 触发条件2 ='%s' "%(bay,time))
- res1 = fdb.queryTabel("RiskTable","提示内容","状态='生效' and 触发条件3 ='%s' and 触发条件2 ='%s' " % (acno,time))
- res2 = fdb.queryTabel("RiskTable","提示内容","状态='生效' and 触发条件4 ='%s' and 触发条件2 ='%s' " % (actype,time))#触发条件4是机型
- 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
- tips = tips + "\n [机型风险]:"+res2[0][0] if res2 !=None and res2 !=[] and len(res2) !=0 else tips
- return tips
|