infoConfirm.py 1.5 KB

12345678910111213141516171819202122232425
  1. from .flightDB import flightDB
  2. from unitls.LogerinTxt import app_logger
  3. def infoConfirm(fdb:flightDB,flighttype,flightid,displayMode,selectedtime):
  4. try:
  5. peopleSchedule_sts2en={3:"放行",4:"勤务1",5:"勤务2",6:"工1",7:"工2",8:"工3"}
  6. if displayMode =="A":
  7. if flighttype =="短停接" or flighttype =="航后" or flighttype =="特后前接" or flighttype =="停场":
  8. flightid_new=flightid+"-1"+"-A"
  9. elif flighttype =="短停送" or flighttype =="航前" or flighttype =="特后前送":
  10. flightid_new = flightid + "-2" + "-A"
  11. elif displayMode =="B":
  12. if flighttype =="短停接" or flighttype =="航后" or flighttype =="特后前接" or flighttype =="停场":
  13. flightid_new=flightid+"-1"+"-B"
  14. elif flighttype =="短停送" or flighttype =="航前" or flighttype =="特后前送":
  15. flightid_new = flightid + "-2" + "-B"
  16. peopleSchedule_sts=fdb.queryTabel("peopleSchedule{}".format(selectedtime),"*","编号='%s'"%flightid_new)
  17. newdic={}
  18. if len(peopleSchedule_sts) != 0:
  19. for i in range(3,8):
  20. if "√" not in peopleSchedule_sts[0][i] and peopleSchedule_sts[0][i] !="":
  21. newitem=peopleSchedule_sts[0][i]+"√"
  22. newdic[peopleSchedule_sts2en[i]]="'%s'"%newitem
  23. fdb.upDateItem("peopleSchedule{}".format(selectedtime),newdic,"编号='%s'"%flightid_new)
  24. except Exception as e:
  25. app_logger.log_error(e)