getphonelist.py 636 B

123456789101112131415161718192021
  1. from .flightDB import flightDB
  2. from unitls.LogerinTxt import app_logger
  3. def getphonelist(fdb:flightDB):
  4. try:
  5. phonelists=fdb.getAlldata("workerinfo")
  6. num = 0
  7. res={}
  8. if len(phonelists) != 0:
  9. for i in phonelists:
  10. phonelist = {}
  11. phonelist["序号"]=num
  12. phonelist["姓名"] = i[1]
  13. phonelist["部门"] = i[2]
  14. phonelist["电话"] = i[5]
  15. phonelist["name"] = i[11]
  16. res[num]=phonelist
  17. num+=1
  18. return res
  19. except Exception as e:
  20. app_logger.log_error(e)