import datetime

from unitls.LogerinTxt import app_logger
from .flightDB import flightDB


def dealLogs(database:flightDB,name:str,number:str):
    try:
        now=datetime.datetime.now()
        nowDay = datetime.datetime.now()
        nowDayStr = nowDay.strftime("%Y%m%d")
        id=number
        newdic={"处理人":"'%s'"%name,"处理时间":"'%s'"%now}
        database.upDateItem('logs',newdic,"编号='%s'"%id)
    except Exception as e:
        app_logger.log_error(e)