from unitls.LogerinTxt import app_logger
from .flightDB import flightDB


def getWorkjobInfo(database:flightDB,taskid):
    try:
        res={}
        infos=database.queryTabel('workjob','*',"任务编号 ='%s'"%taskid)
        if len(infos) != 0:
            res["taskids"]=infos[0][1]
            res["acno"] = infos[0][8]
            res["taskType"] = infos[0][10]
            res["actype"] = infos[0][9]
            res["startDate"] = infos[0][2]
            res["endDate"] = infos[0][3]
        return res
    except Exception as e:
        app_logger.log_error(e)