private void MontarCabecalho(IXLWorksheet worksheet, ConselhoClasseAtaFinalCabecalhoDto dadosCabecalho, int totalColunas) { worksheet.AddPicture(ObterLogo()) .MoveTo(worksheet.Cell(2, 2)) .Scale(0.15); int indiceColunaTitulo = (int)(totalColunas * 0.8) + 1; worksheet.Row(2).Cell(indiceColunaTitulo).Value = "SGP - Sistema de Gestão Pedagógica"; worksheet.Range(2, indiceColunaTitulo, 2, totalColunas).Merge().Style.Font.Bold = true; worksheet.Range(2, indiceColunaTitulo, 2, totalColunas).Style.Font.FontSize = 10; worksheet.Range(2, indiceColunaTitulo, 2, totalColunas).Style.Font.FontName = "Arial"; worksheet.Row(3).Cell(indiceColunaTitulo).Value = "ATA DE RESULTADOS FINAIS"; worksheet.Range(3, indiceColunaTitulo, 3, totalColunas).Merge().Style.Font.FontSize = 10; worksheet.Range(3, indiceColunaTitulo, 3, totalColunas).Style.Font.FontName = "Arial"; int indiceFinal = SetarItemCabecalho(worksheet, $"DRE: {dadosCabecalho.Dre}", 0.4, LINHA_CABECALHO_DRE, 1, totalColunas); indiceFinal = SetarItemCabecalho(worksheet, $"Unidade Escolar (UE): {dadosCabecalho.Ue}", 0.4, LINHA_CABECALHO_DRE, indiceFinal, totalColunas); SetarItemCabecalho(worksheet, $"Turma: {dadosCabecalho.Turma}", 0.2, LINHA_CABECALHO_DRE, indiceFinal, totalColunas); indiceFinal = SetarItemCabecalho(worksheet, $"Ciclo: {dadosCabecalho.Ciclo}", 0.4, LINHA_CABECALHO_CICLO, 1, totalColunas); indiceFinal = SetarItemCabecalho(worksheet, $"Ano Letivo: {dadosCabecalho.AnoLetivo}", 0.4, LINHA_CABECALHO_CICLO, indiceFinal, totalColunas); SetarItemCabecalho(worksheet, $"Data: {dadosCabecalho.Data}", 0.2, LINHA_CABECALHO_CICLO, indiceFinal, totalColunas); }
private async Task <ConselhoClasseAtaFinalDto> MontarEstruturaRelatorio(Modalidade modalidadeCodigo, ConselhoClasseAtaFinalCabecalhoDto cabecalho, IEnumerable <AlunoSituacaoAtaFinalDto> alunos, IEnumerable <ComponenteCurricularPorTurma> componentesCurriculares, IEnumerable <NotaConceitoBimestreComponente> notasFinais, IEnumerable <FrequenciaAluno> frequenciaAlunos, IEnumerable <FrequenciaAluno> frequenciaAlunosGeral, IEnumerable <ConselhoClasseParecerConclusivo> pareceresConclusivos, IEnumerable <PeriodoEscolar> periodosEscolares, string turmaCodigo) { var relatorio = new ConselhoClasseAtaFinalDto(); relatorio.Modalidade = modalidadeCodigo; relatorio.Cabecalho = cabecalho; var gruposMatrizes = componentesCurriculares.Where(c => c.GrupoMatriz != null).GroupBy(c => c.GrupoMatriz); MontarEstruturaGruposMatriz(relatorio, gruposMatrizes, periodosEscolares); await MontarEstruturaLinhas(relatorio, alunos, gruposMatrizes, notasFinais, frequenciaAlunos, frequenciaAlunosGeral, pareceresConclusivos, periodosEscolares, turmaCodigo); return(relatorio); }