def g3Pres(): totals = list() try: for i in range(3): to = dict() utils.initAddInTotals16(to) res = conn.executeAllQuery( "SELECT c" + str(i + 102) + " , COUNT(*) total FROM tae_presencial GROUP BY c" + str(i + 102) + "") for value in res: utils.addInTotals16(value, to) res = conn.executeAllQuery( "SELECT c" + str(i + 101) + " , COUNT(*) total FROM doc_presencial GROUP BY c" + str(i + 101) + "") for value in res: utils.addInTotals16(value, to) res = conn.executeAllQuery( "SELECT c" + str(i + 47) + " , COUNT(*) total FROM disc_presencial GROUP BY c" + str(i + 47) + "") for value in res: utils.addInTotals16(value, to) totals.append(to) except Exception as e: print(e) return totals
def n4Pres(): try: for i in range(12): totals = list() for campus in nUtils.campi: to = dict() utils.initAddInTotals3(to) res = conn.executeAllQuery( "SELECT c" + str(i + 10) + " , COUNT(*) total FROM tae_presencial where c6=\'" + campus + "\' GROUP BY c10") for value in res: utils.addInTotals3(value, to) res = conn.executeAllQuery( "SELECT c" + str(i + 10) + " , COUNT(*) total FROM disc_presencial where c6=\'" + campus + "\' GROUP BY c" + str(i + 10) + "") for value in res: utils.addInTotals3(value, to) res = conn.executeAllQuery( "SELECT c" + str(i + 9) + " , COUNT(*) total FROM doc_presencial where c5=\'" + campus + "\' GROUP BY c" + str(i + 9) + "") for value in res: utils.addInTotals3(value, to) totals.append(to) res = nUtils.calcularConceito(totals) conceitosgerais.append(res) except Exception as e: print(e)
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)
def g1Pres(): totals = list() try: dict1 = dict() utils.initAddInTotals4(dict1) res = conn.executeAllQuery( "SELECT c97 , COUNT(*) total FROM tae_presencial GROUP BY c97") for value in res: utils.addInTotals4(value, dict1) totals.append(dict1) dict2 = dict() utils.initAddInTotals4(dict2) res = conn.executeAllQuery( "SELECT c96 , COUNT(*) total FROM doc_presencial GROUP BY c96") for value in res: utils.addInTotals4(value, dict2) totals.append(dict2) dict3 = dict() utils.initAddInTotals4(dict3) res = conn.executeAllQuery( "SELECT c42 , COUNT(*) total FROM disc_presencial GROUP BY c42") for value in res: utils.addInTotals4(value, dict3) totals.append(dict3) except Exception as e: print(e) return totals
def g1EAD(): totals = list() try: dict1 = dict() utils.initAddInTotals4(dict1) res = conn.executeAllQuery( "SELECT c105 , COUNT(*) total FROM tae_ead GROUP BY c105") for value in res: utils.addInTotals4(value, dict1) totals.append(dict1) dict2 = dict() utils.initAddInTotals4(dict2) res = conn.executeAllQuery( "SELECT c105 , COUNT(*) total FROM doc_ead GROUP BY c105") for value in res: utils.addInTotals4(value, dict2) totals.append(dict2) dict2 = dict() utils.initAddInTotals4(dict2) res = conn.executeAllQuery( "SELECT c47 , COUNT(*) total FROM disc_ead GROUP BY c47") for value in res: utils.addInTotals4(value, dict2) totals.append(dict2) except Exception as e: print(e) return totals
def g2EAD(): totals = list() try: for i in range(7): if (i != 1): to = dict() utils.initAddInTotals8(to) res = conn.executeAllQuery( "SELECT c" + str(i + 97) + " , COUNT(*) total FROM tae_ead GROUP BY c" + str(i + 97) + "") for value in res: utils.addInTotals8(value, to) res = conn.executeAllQuery( "SELECT c" + str(i + 97) + " , COUNT(*) total FROM doc_ead GROUP BY c" + str(i + 97) + "") for value in res: utils.addInTotals8(value, to) if ((i < 5)): res = conn.executeAllQuery( "SELECT c" + str(i + 42) + " , COUNT(*) total FROM disc_ead GROUP BY c" + str(i + 42) + "") for value in res: utils.addInTotals8(value, to) totals.append(to) except Exception as e: print(e) return totals
def n3Pres(): totals = list() try: for campus in nUtils.campi: totals1 = dict() utils.initAddInTotals2(totals1) res = conn.executeAllQuery( "SELECT c9 , COUNT(*) total FROM tae_presencial where c6=\'" + campus + "\' GROUP BY c9") for value in res: utils.addInTotals2(value, totals1) totals2 = dict() utils.initAddInTotals2(totals2) res = conn.executeAllQuery( "SELECT c9 , COUNT(*) total FROM disc_presencial where c6=\'" + campus + "\' GROUP BY c9") for value in res: utils.addInTotals2(value, totals1) totals3 = dict() utils.initAddInTotals2(totals3) res = conn.executeAllQuery( "SELECT c8 , COUNT(*) total FROM doc_presencial where c5=\'" + campus + "\' GROUP BY c8") for value in res: utils.addInTotals2(value, totals1) totals.append(totals1) except Exception as e: print(e) return totals
def g2EADQ1(totals): try: to = dict() utils.initAddInTotals8(to) res = conn.executeAllQuery( "SELECT c98 , COUNT(*) total FROM tae_ead GROUP BY c98") for value in res: utils.addInTotals8(value, to) res = conn.executeAllQuery( "SELECT c98 , COUNT(*) total FROM doc_ead GROUP BY c98") for value in res: utils.addInTotals8(value, to) totals.append(to) except Exception as e: print(e) return totals
def g1Pres(): totals=list() try: for i in range(6): to = dict() res = conn.executeAllQuery("SELECT c"+str(i+30)+" , COUNT(*) total FROM tae_presencial GROUP BY c"+str(i+30)+"") for value in res: utils.addInTotals3(value, to) res = conn.executeAllQuery("SELECT c"+str(i+29)+" , COUNT(*) total FROM doc_presencial GROUP BY c"+str(i+29)+"") for value in res: utils.addInTotals3(value, to) totals.append(to) except Exception as e: print(e) return totals
def g1EAD(): totals=list() try: for i in range(6): to = dict() utils.initAddInTotals3(to) res = conn.executeAllQuery("SELECT c"+str(i+31)+" , COUNT(*) total FROM tae_ead GROUP BY c"+str(i+31)+"") for value in res: utils.addInTotals3(value, to) res = conn.executeAllQuery("SELECT c"+str(i+31)+" , COUNT(*) total FROM doc_ead GROUP BY c"+str(i+31)+"") for value in res: utils.addInTotals3(value, to) totals.append(to) except Exception as e: print(e) return totals
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
def g2Pres(): totals=list() try: totals1=dict() utils.initAddInTotals9(totals1) res = conn.executeAllQuery("SELECT c36 , COUNT(*) total FROM tae_presencial GROUP BY c36") for value in res: utils.addInTotals9(value, totals1) totals.append(totals1) totals3=dict() utils.initAddInTotals9(totals3) res = conn.executeAllQuery("SELECT c35 , COUNT(*) total FROM doc_presencial GROUP BY c35") for value in res: utils.addInTotals9(value, totals3) totals.append(totals3) except Exception as e: print(e) return totals
def g8Pres(): totals=list() try: dict1 = dict() utils.initAddInTotals13(dict1) res = conn.executeAllQuery("SELECT c74 , COUNT(*) total FROM tae_presencial GROUP BY c74") for value in res: utils.addInTotals13(value, dict1) totals.append(dict1) dict2 = dict() utils.initAddInTotals13(dict2) res = conn.executeAllQuery("SELECT c73 , COUNT(*) total FROM doc_presencial GROUP BY c73") for value in res: utils.addInTotals13(value, dict2) totals.append(dict2) except Exception as e: print(e) return totals
def getTotalsbyCampiPres(): totals = dict() try: res = conn.executeAllQuery( "SELECT c97 , COUNT(*) total FROM tae_presencial GROUP BY c97") utils.initAddInTotals4(totals) for value in res: utils.addInTotals4(value, totals) res = conn.executeAllQuery( "SELECT c42 , COUNT(*) total FROM disc_presencial GROUP BY c42") for value in res: utils.addInTotals4(value, totals) res = conn.executeAllQuery( "SELECT c96 , COUNT(*) total FROM doc_presencial GROUP BY c96") for value in res: utils.addInTotals4(value, totals) except Exception as e: print(e) return totals
def getTotalsbyCampiEAD(): totals = dict() utils.initAddInTotals4(totals) try: res = conn.executeAllQuery( "SELECT c105 , COUNT(*) total FROM tae_ead GROUP BY c105") for value in res: utils.addInTotals4(value, totals) res = conn.executeAllQuery( "SELECT c47 , COUNT(*) total FROM disc_ead GROUP BY c47") for value in res: utils.addInTotals4(value, totals) res = conn.executeAllQuery( "SELECT c105 , COUNT(*) total FROM doc_ead GROUP BY c105") for value in res: utils.addInTotals4(value, totals) except Exception as e: print(e) return totals
def g11EAD(): totals=list() try: totals1=dict() utils.initAddInTotals14(totals1) res = conn.executeAllQuery("SELECT c83 , COUNT(*) total FROM tae_ead GROUP BY c83") for value in res: utils.addInTotals14(value, totals1) totals.append(totals1) totals3=dict() utils.initAddInTotals14(totals3) res = conn.executeAllQuery("SELECT c83 , COUNT(*) total FROM doc_ead GROUP BY c83") for value in res: utils.addInTotals14(value, totals3) totals.append(totals3) except Exception as e: print(e) return totals
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
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
def baseSearch(): totals = list() try: for i in range(12): to = dict() res = conn.executeAllQuery( "SELECT c" + str(i + 10) + " , COUNT(*) total FROM tae_presencial GROUP BY c10") for value in res: utils.addInTotals3(value, to) res = conn.executeAllQuery( "SELECT c" + str(i + 10) + " , COUNT(*) total FROM tae_ead GROUP BY c" + str(i + 10) + "") for value in res: utils.addInTotals3(value, to) res = conn.executeAllQuery( "SELECT c" + str(i + 10) + " , COUNT(*) total FROM disc_presencial GROUP BY c" + str(i + 10) + "") for value in res: utils.addInTotals3(value, to) res = conn.executeAllQuery( "SELECT c" + str(i + 11) + " , COUNT(*) total FROM disc_ead GROUP BY c" + str(i + 11) + "") for value in res: utils.addInTotals3(value, to) res = conn.executeAllQuery( "SELECT c" + str(i + 9) + " , COUNT(*) total FROM doc_presencial GROUP BY c" + str(i + 9) + "") for value in res: utils.addInTotals3(value, to) res = conn.executeAllQuery( "SELECT c" + str(i + 10) + " , COUNT(*) total FROM doc_ead GROUP BY c" + str(i + 10) + "") for value in res: utils.addInTotals3(value, to) totals.append(to) except Exception as e: print(e) return totals