init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,56 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Naplo.Dao.V3.Ora;
|
||||
using Kreta.Naplo.Domain.V3.Common;
|
||||
using Kreta.Naplo.Domain.V3.Ora;
|
||||
|
||||
namespace Kreta.Naplo.BusinessLogic.V3.Ora
|
||||
{
|
||||
public class OraSubqueries
|
||||
{
|
||||
public static List<OraFeljegyzesResponse> GetOraFeljegyzesek(DefaultConnectionParameters dcp, OraFeljegyzesRequest request)
|
||||
{
|
||||
var result = new List<OraFeljegyzesResponse>();
|
||||
|
||||
var tanoraHelper = new TanoraHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId));
|
||||
if (!tanoraHelper.IsValidTanoraId(request.TanoraId))
|
||||
{
|
||||
throw new BlException(BlExceptionType.ElvartErtekNemTalalhato);
|
||||
}
|
||||
var tanulokFeljegyzesek = tanoraHelper.GetTanuloFeljegyzesek(request.TanoraId).ToDaoList<FeljegyzesResponseDao>().GroupBy(f => f.TanuloId);
|
||||
|
||||
foreach (var tanuloFeljegyzesek in tanulokFeljegyzesek)
|
||||
{
|
||||
result.Add(new OraFeljegyzesResponse
|
||||
{
|
||||
TanuloId = tanuloFeljegyzesek.Key,
|
||||
FeljegyzesLista = tanuloFeljegyzesek.Select(f => new FeljegyzesResponse
|
||||
{
|
||||
Id = f.Id,
|
||||
Tipus = f.Tipus
|
||||
}).ToList()
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static HashSet<TanuloJelenletResponse> GetTanuloJelenlet(DefaultConnectionParameters dcp, TanuloJelenletRequest request)
|
||||
{
|
||||
return dcp.DalHandler.MulasztasDal()
|
||||
.GetTanuloJelenletDataSet(dcp.TanevId, request.TanoraId)
|
||||
.ToDaoList<MulasztasResponseDao>()
|
||||
.Select(m => new TanuloJelenletResponse
|
||||
{
|
||||
TanuloId = m.TanuloId,
|
||||
MulasztasTipus = m.Tipus ?? (int)MulasztasTipusEnum.jelenlet,
|
||||
Keses = m.Keses
|
||||
}).ToHashSet();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue