from unitls.LogerinTxt import app_logger
from .flightDB import flightDB


def GetPglistInDatabase(fdb:flightDB,bcinfos):
    res=[]
    try:
        datas=fdb.queryTabel('pglist%s'%bcinfos["date"], '*', "班次= '%s'"%bcinfos["bc"])
        if datas:
            for data in datas:
                res.append(data[0])
        return res
    except Exception as e:
        app_logger.log_error(e)
        return res
