maintainAuthCheck.py 763 B

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