public async Task <IEnumerable <ComponenteCurricularDto> > Executar(AlunoBimestresTurmaDto notaAlunoDto) { var notasConceitosBimestreComponente = await mediator.Send(new ObterNotasPorBimestresUeAlunoTurmaQuery(notaAlunoDto.Bimestres, notaAlunoDto.TurmaCodigo, notaAlunoDto.UeCodigo, notaAlunoDto.AlunoCodigo)); var componentes = notasConceitosBimestreComponente.Select(a => new ComponenteCurricularDto(a.ComponenteCurricularCodigo, a.ComponenteCurricularNome)).ToList(); return(componentes.Distinct()); }
public async Task <IEnumerable <NotaConceitoBimestreComponenteDto> > Executar(AlunoBimestresTurmaDto notaAlunoDto) { var notasConceitosBimestreComponente = await mediator.Send(new ObterNotasPorBimestresUeAlunoTurmaQuery(notaAlunoDto.Bimestres, notaAlunoDto.TurmaCodigo, notaAlunoDto.UeCodigo, notaAlunoDto.AlunoCodigo)); var notaAlunoCores = await mediator.Send(new ObterNotaAlunoCoresQuery()); foreach (var notaConceito in notasConceitosBimestreComponente) { notaConceito.CorDaNota = decimal.TryParse(notaConceito.NotaConceito, out var notaEmValor) ? DefinirCorDaNotaPorValor(notaEmValor, notaAlunoCores) : DefinirCorDaNotaPorConceito(notaConceito.NotaConceito, notaAlunoCores); } return(notasConceitosBimestreComponente); }