12345678910111213141516171819 |
- from .flightDB import flightDB
- from unitls.LogerinTxt import app_logger
- def maintainAuthCheck(fdb:flightDB,name,flighttype):
- try:
- list = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]
- if name != "清空项目12345678987654321" and str(name) not in list:
- search=fdb.queryTabel("workerinfo","姓名","姓名 = '{}' and 南航授权 like '%{}%'".format(name,flighttype))
- if search ==None or len(search) !=0:
- res = {"返回值":"ok"}
- else:
- res = {"返回值": "fail"}
- return res
- else:
- res = {"返回值": "ok"}
- return res
- except Exception as e:
- app_logger.log_error(e)
- return {"返回值": "fail"}
|