Ejemplo n.º 1
0
def n1PresQ7():
    totalsTAE = list()
    totalsDoc = list()
    try:
        for campus in nUtils.campi:
            to1 = dict()
            utils.initAddInTotals7(to1)
            res = conn.executeAllQuery(
                "SELECT c90 , COUNT(*) total FROM tae_presencial where c6=\'" +
                campus + "\' GROUP  BY c90")
            for value in res:
                utils.addInTotals7(value, to1)
            totalsTAE.append(to1)

            to2 = dict()
            utils.initAddInTotals7(to2)
            res = conn.executeAllQuery(
                "SELECT c89 , COUNT(*) total FROM doc_presencial where c5=\'" +
                campus + "\' GROUP  BY c89")
            for value in res:
                utils.addInTotals7(value, to2)

            totalsDoc.append(to2)
        print(totalsTAE)
        print(totalsDoc)
        resCal = nUtils.calcularConceito(totalsTAE)
        conceitosgerais.append(resCal)
        resCal = nUtils.calcularConceito(totalsDoc)
        conceitosgerais.append(resCal)
    except Exception as e:
        print(e)
Ejemplo n.º 2
0
def n1Pres():
    try:
        for i in range(12):
            if (i != 6):
                totals = list()
                for campus in nUtils.campi:
                    to = dict()
                    utils.initAddInTotals7(to)
                    res = conn.executeAllQuery(
                        "SELECT c" + str(i + 84) +
                        " , COUNT(*) total FROM tae_presencial where c6=\'" +
                        campus + "\' GROUP  BY c" + str(i + 84) + "")
                    for value in res:
                        utils.addInTotals7(value, to)

                    res = conn.executeAllQuery(
                        "SELECT c" + str(i + 83) +
                        " , COUNT(*) total FROM doc_presencial where c5=\'" +
                        campus + "\' GROUP  BY c" + str(i + 83) + "")
                    for value in res:
                        utils.addInTotals7(value, to)

                    if (i < 6):
                        res = conn.executeAllQuery(
                            "SELECT c" + str(i + 30) +
                            " , COUNT(*) total FROM disc_presencial where c6=\'"
                            + campus + "\' GROUP  BY c" + str(i + 30) + "")
                        for value in res:
                            utils.addInTotals7(value, to)
                    else:
                        res = conn.executeAllQuery(
                            "SELECT c" + str((i - 1) + 30) +
                            " , COUNT(*) total FROM disc_presencial where c6=\'"
                            + campus + "\' GROUP  BY c" + str(i + 30) + "")
                        for value in res:
                            utils.addInTotals7(value, to)

                    totals.append(to)
                res = nUtils.calcularConceito(totals)
                conceitosgerais.append(res)
    except Exception as e:
        print(e)

    return totals
Ejemplo n.º 3
0
def g1Pres():
    totals = list()
    try:
        for i in range(12):
            if (i != 6):
                to = dict()
                utils.initAddInTotals7(to)
                res = conn.executeAllQuery(
                    "SELECT c" + str(i + 84) +
                    " , COUNT(*) total FROM tae_presencial GROUP  BY c" +
                    str(i + 84) + "")
                for value in res:
                    utils.addInTotals7(value, to)

                res = conn.executeAllQuery(
                    "SELECT c" + str(i + 83) +
                    " , COUNT(*) total FROM doc_presencial GROUP  BY c" +
                    str(i + 83) + "")
                for value in res:
                    utils.addInTotals7(value, to)

                if (i < 6):
                    res = conn.executeAllQuery(
                        "SELECT c" + str(i + 30) +
                        " , COUNT(*) total FROM disc_presencial GROUP  BY c" +
                        str(i + 30) + "")
                    for value in res:
                        utils.addInTotals7(value, to)
                else:
                    res = conn.executeAllQuery(
                        "SELECT c" + str((i - 1) + 30) +
                        " , COUNT(*) total FROM disc_presencial GROUP  BY c" +
                        str(i + 30) + "")
                    for value in res:
                        utils.addInTotals7(value, to)

                totals.append(to)

    except Exception as e:
        print(e)

    return totals
Ejemplo n.º 4
0
def g1EADQ7(totals):
    try:

        to1 = dict()
        utils.initAddInTotals7(to1)
        res = conn.executeAllQuery(
            "SELECT c91 , COUNT(*) total FROM tae_ead GROUP  BY c91")
        for value in res:
            utils.addInTotals7(value, to1)
        totals.append(to1)

        to2 = dict()
        utils.initAddInTotals7(to2)
        res = conn.executeAllQuery(
            "SELECT c91 , COUNT(*) total FROM doc_ead GROUP  BY c91")
        for value in res:
            utils.addInTotals7(value, to2)
        totals.append(to2)

    except Exception as e:
        print(e)

    return totals
Ejemplo n.º 5
0
def g1PresQ7(totals):
    try:

        to1 = dict()
        utils.initAddInTotals7(to1)
        res = conn.executeAllQuery(
            "SELECT c90 , COUNT(*) total FROM tae_presencial GROUP  BY c90")
        for value in res:
            utils.addInTotals7(value, to1)
        totals.append(to1)

        to2 = dict()
        utils.initAddInTotals7(to2)
        res = conn.executeAllQuery(
            "SELECT c89 , COUNT(*) total FROM doc_presencial GROUP  BY c89")
        for value in res:
            utils.addInTotals7(value, to2)
        totals.append(to2)

    except Exception as e:
        print(e)

    return totals