selftaxiLogs.py 697 B

1234567891011121314
  1. from .flightDB import flightDB
  2. import datetime
  3. from unitls.LogerinTxt import app_logger
  4. def selftaxiLogs(database:flightDB,TEXT:str,flightid:str):
  5. try:
  6. now = datetime.datetime.now()
  7. noteid=database.queryTabel("logs","*","航班编号='%s' and 警告信息='%s'"%(flightid,TEXT))
  8. if len(noteid) == 0:
  9. newdic = {"航班编号":flightid, "警告信息":TEXT, "信息状态": "",
  10. "提示信息": "","产生时间": "%s" % now, "处理人": "", "处理时间": "", "变更字段": "自滑提示","显示对象":"","提示内容":""}
  11. database.insertData("logs", newdic)
  12. except Exception as e:
  13. app_logger.log_error(e)