init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
BIN
Kreta.WebApi/.DS_Store
vendored
Normal file
BIN
Kreta.WebApi/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
Kreta.WebApi/Ellenorzo/.DS_Store
vendored
Normal file
BIN
Kreta.WebApi/Ellenorzo/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -0,0 +1,197 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{750E1E45-76DF-4A28-B218-234C560D7C6C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Kreta.Ellenorzo.BL</RootNamespace>
|
||||
<AssemblyName>Kreta.Ellenorzo.BL</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Kreta.Core.Validation, Version=2.0.16.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Kreta.Core.Validation.2.0.16\lib\net452\Kreta.Core.Validation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kreta.Web.Logging.Abstractions, Version=1.0.12.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Kreta.Web.Logging.Abstractions.1.0.12\lib\net48\Kreta.Web.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Runtime.Caching" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\Tools\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="VN\Adatszotar\AdatszotarSubqueries.cs" />
|
||||
<Compile Include="VN\Bejelentes\BejelentesFacade.cs" />
|
||||
<Compile Include="VN\Bejelentes\BejelentesSubqueries.cs" />
|
||||
<Compile Include="VN\Dummy\DummyFacade.cs" />
|
||||
<Compile Include="VN\Ellenorzo\EllenorzoFacade.cs" />
|
||||
<Compile Include="VN\Ellenorzo\EllenorzoFacadeBase.cs" />
|
||||
<Compile Include="VN\Email\EmailFacade.cs" />
|
||||
<Compile Include="VN\Email\EmailSubqueries.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\OsztalyAtlag\OsztalyAtlagFacade.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\OsztalyAtlag\OsztalyAtlagSubqueries.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\TantargyiAtlag\TantargyiAtlagFacade.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\TantargyiAtlag\TantargyiAtlagSubqueries.cs" />
|
||||
<Compile Include="VN\Ertekeles\ErtekelesFacade.cs" />
|
||||
<Compile Include="VN\Faliujsag\FaliujsagFacade.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\AlkalmazottSubqueries.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\Tanar\Osztalyfonok\OsztalyfonokFacade.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\Tanar\TanarSubqueries.cs" />
|
||||
<Compile Include="VN\Felhasznalo\FelhasznaloFacade.cs" />
|
||||
<Compile Include="VN\Felhasznalo\FelhasznaloSubqueries.cs" />
|
||||
<Compile Include="VN\Feljegyzes\FeljegyzesFacade.cs" />
|
||||
<Compile Include="VN\Fogadoora\FogadooraFacade.cs" />
|
||||
<Compile Include="VN\Fogadoora\FogadooraSubqueries.cs" />
|
||||
<Compile Include="VN\HaziFeladat\HaziFeladatFacade.cs" />
|
||||
<Compile Include="VN\Helpers\LambdaComparer.cs" />
|
||||
<Compile Include="VN\Intezmeny\IntezmenyFacade.cs" />
|
||||
<Compile Include="VN\Intezmeny\IntezmenySubqueries.cs" />
|
||||
<Compile Include="VN\Intezmeny\Rendszermodul\RendszermodulSubqueries.cs" />
|
||||
<Compile Include="VN\Intezmeny\TanevRendje\TanevRendjeFacade.cs" />
|
||||
<Compile Include="VN\Intezmeny\TanevRendje\TanevRendjeSubqueries.cs" />
|
||||
<Compile Include="VN\Intezmeny\Hetirend\HetirendFacade.cs" />
|
||||
<Compile Include="VN\Intezmeny\TestreszabasBeallitasok\TestreszabasBeallitasokSubqueries.cs" />
|
||||
<Compile Include="VN\Lep\LepFacade.cs" />
|
||||
<Compile Include="VN\Lep\LepSubqueries.cs" />
|
||||
<Compile Include="VN\Logic\ApiSecurityLogic.cs" />
|
||||
<Compile Include="VN\Logic\AtlagLogic.cs" />
|
||||
<Compile Include="VN\Logic\ErtekelesLogic.cs" />
|
||||
<Compile Include="VN\Logic\OsztalyCsoportLogic.cs" />
|
||||
<Compile Include="VN\Logic\TanuloLogic.cs" />
|
||||
<Compile Include="VN\Logic\TantargyLogic.cs" />
|
||||
<Compile Include="VN\Logic\RequestFilterLogic.cs" />
|
||||
<Compile Include="VN\Logic\ValidatorLogic.cs" />
|
||||
<Compile Include="VN\Logic\FelhasznaloLogic.cs" />
|
||||
<Compile Include="VN\BejelentettSzamonkeres\BejelentettSzamonkeresFacade.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="VN\Ertekeles\ErtekelesSubqueries.cs" />
|
||||
<Compile Include="VN\Feljegyzes\FeljegyzesSubqueries.cs" />
|
||||
<Compile Include="VN\Faliujsag\FaliujsagSubqueries.cs" />
|
||||
<Compile Include="VN\BejelentettSzamonkeres\BejelentettSzamonkeresSubqueries.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Gondviselo\GondviseloSubqueries.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\Tanar\Osztalyfonok\OsztalyfonokSubqueries.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Tanulo\TanuloSubqueries.cs" />
|
||||
<Compile Include="VN\HaziFeladat\HaziFeladatSubqueries.cs" />
|
||||
<Compile Include="VN\Intezmeny\Hetirend\HetirendSubqueries.cs" />
|
||||
<Compile Include="VN\Csatolmany\CsatolmanyFacade.cs" />
|
||||
<Compile Include="VN\Csatolmany\CsatolmanySubqueries.cs" />
|
||||
<Compile Include="VN\OsztalyCsoport\OsztalyCsoportFacade.cs" />
|
||||
<Compile Include="VN\OsztalyCsoport\OsztalyCsoportSubqueries.cs" />
|
||||
<Compile Include="VN\Tantargy\TantargySubqueries.cs" />
|
||||
<Compile Include="VN\Mulasztas\MulasztasSubqueries.cs">
|
||||
<ExcludeFromStyleCop>False</ExcludeFromStyleCop>
|
||||
</Compile>
|
||||
<Compile Include="VN\Mulasztas\MulasztasFacade.cs" />
|
||||
<Compile Include="VN\Orarend\OrarendFacade.cs" />
|
||||
<Compile Include="VN\Orarend\OrarendSubqueries.cs" />
|
||||
<Compile Include="VN\TargyiEszkoz\TargyiEszkozFacade.cs" />
|
||||
<Compile Include="VN\TargyiEszkoz\TargyiEszkozSubqueries.cs" />
|
||||
<Compile Include="VN\Telefon\TelefonFacade.cs" />
|
||||
<Compile Include="VN\Telefon\TelefonSubqueries.cs" />
|
||||
<Compile Include="VN\Logic\JogosultsagLogic.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Framework\Kreta.Framework.csproj">
|
||||
<Project>{320EF478-7155-441D-B1E9-47EC3E57FB45}</Project>
|
||||
<Name>Kreta.Framework</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.BusinessLogic\Kreta.BusinessLogic.csproj">
|
||||
<Project>{8876fe0d-841e-422d-a5a0-59239cd98482}</Project>
|
||||
<Name>Kreta.BusinessLogic</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.Client\Kreta.Client.csproj">
|
||||
<Project>{4B28E52B-B531-403C-A827-2CC178FF8A4F}</Project>
|
||||
<Name>Kreta.Client</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.Core\Kreta.Core.csproj">
|
||||
<Project>{57418D3E-CAF1-482C-9B18-85D147ABD495}</Project>
|
||||
<Name>Kreta.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.DataAccessInterfaceGenerated\Kreta.DataAccess.Interfaces.csproj">
|
||||
<Project>{68318C3F-0779-4755-848E-B270F6BAC40B}</Project>
|
||||
<Name>Kreta.DataAccess.Interfaces</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.DataAccessManual\Kreta.DataAccessManual.csproj">
|
||||
<Project>{3212f2bf-6883-48b4-9f7d-0dff4c826221}</Project>
|
||||
<Name>Kreta.DataAccessManual</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.Job.Tasks\Kreta.Job.Tasks.csproj">
|
||||
<Project>{3359c4c9-e530-4996-98c4-7c3ab513e163}</Project>
|
||||
<Name>Kreta.Job.Tasks</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Sda.DataProvider\Sda.DataProvider.csproj">
|
||||
<Project>{9AC4FD13-81F5-48AC-AA21-BA774C4DC771}</Project>
|
||||
<Name>Sda.DataProvider</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Ellenorzo.Dao\Kreta.Ellenorzo.Dao.csproj">
|
||||
<Project>{29af1e7d-3220-462f-b90d-aba3c984987b}</Project>
|
||||
<Name>Kreta.Ellenorzo.Dao</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Ellenorzo.Domain\Kreta.Ellenorzo.Domain.csproj">
|
||||
<Project>{920ddac6-e3e7-4928-a9b3-2d84daf6d5b4}</Project>
|
||||
<Name>Kreta.Ellenorzo.Domain</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Kreta.Ellenorzo.Enum\Kreta.Ellenorzo.Enums.csproj">
|
||||
<Project>{E8717728-75CA-4F4A-B23D-53C593FF0840}</Project>
|
||||
<Name>Kreta.Ellenorzo.Enums</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.Enums\Kreta.Enums.csproj">
|
||||
<Project>{1D5E0AC2-DFAB-4D32-9AD1-B5788A7D06BD}</Project>
|
||||
<Name>Kreta.Enums</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.KretaServer\Kreta.KretaServer.csproj">
|
||||
<Project>{62EB8504-1C3A-4DB1-AB86-F96B2341E201}</Project>
|
||||
<Name>Kreta.KretaServer</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Kreta.Resources\Kreta.Resources.csproj">
|
||||
<Project>{DFCB4D33-B599-42B2-98C6-B60FD220DB0C}</Project>
|
||||
<Name>Kreta.Resources</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Framework.Caching;
|
||||
using Kreta.Framework.Util;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Adatszotar
|
||||
{
|
||||
internal static class AdatszotarSubqueries
|
||||
{
|
||||
internal static Dictionary<int, DictionaryItem> GetTipusByIdDictionary(int tipusId, int tanevId)
|
||||
=> tipusId.GetItemsByType(tanevId).ToDictionary(x => x.Id, x => x);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Bejelentes
|
||||
{
|
||||
public class BejelentesFacade : EllenorzoFacade
|
||||
{
|
||||
public BejelentesFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public void CovidBejelentes() => RunSubquery(() => BejelentesSubqueries.CovidBejelentes(DefaultConnectionParameters));
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Bejelentes
|
||||
{
|
||||
internal static class BejelentesSubqueries
|
||||
{
|
||||
internal static void CovidBejelentes(DefaultConnectionParameters dcp)
|
||||
{
|
||||
if (dcp.GondviseloId.HasValue)
|
||||
{
|
||||
var dal = dcp.DalHandler.Gondviselo();
|
||||
var gondviselo = dal.Get(dcp.GondviseloId.Value);
|
||||
if (gondviselo.Telefon.Count == 0)
|
||||
{
|
||||
throw new BlException("Hiányzó telefonszám! A bejelentés csak telefonszám beállítása után lehetséges!", Core.Enum.BlExceptionType.ElvartErtekNemTalalhato);
|
||||
}
|
||||
gondviselo.IsCovidBejelento = true;
|
||||
gondviselo.CovidBejelentesDatuma = DateTime.Now;
|
||||
dal.Update(gondviselo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.BejelentettSzamonkeres;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.BejelentettSzamonkeres
|
||||
{
|
||||
public class BejelentettSzamonkeresFacade : EllenorzoFacade
|
||||
{
|
||||
public BejelentettSzamonkeresFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HashSet<BejelentettSzamonkeresListResponse> ListBejelentettSzamonkeres(BejelentettSzamonkeresListRequest request)
|
||||
=> RunSubquery(() => BejelentettSzamonkeresSubqueries.ListBejelentettSzamonkeres(DefaultConnectionParameters, request));
|
||||
|
||||
public BejelentettSzamonkeresListResponse GetBejelentettSzamonkeres(string uid)
|
||||
=> RunSubquery(() => BejelentettSzamonkeresSubqueries.GetBejelentettSzamonkeres(DefaultConnectionParameters, new BejelentettSzamonkeresListRequest(uid)));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual.ParameterClasses;
|
||||
using Kreta.Ellenorzo.BL.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.BejelentettSzamonkeres;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.BejelentettSzamonkeres;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.BejelentettSzamonkeres
|
||||
{
|
||||
internal static class BejelentettSzamonkeresSubqueries
|
||||
{
|
||||
internal static BejelentettSzamonkeresListResponse GetBejelentettSzamonkeres(DefaultConnectionParameters dcp, BejelentettSzamonkeresListRequest request)
|
||||
{
|
||||
return ListBejelentettSzamonkeres(dcp, request).SingleOrDefault() ?? throw new BlException(BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
|
||||
internal static HashSet<BejelentettSzamonkeresListResponse> ListBejelentettSzamonkeres(DefaultConnectionParameters dcp, BejelentettSzamonkeresListRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
var response = new HashSet<BejelentettSzamonkeresListResponse>(new BejelentettSzamonkeresListResponse());
|
||||
|
||||
var tanuloBejelentettSzamonkeresei = dcp.DalHandler.SzamonkeresElorejelzes().GetBejelentettSzamonkeresekGrid(
|
||||
dcp.IntezmenyId,
|
||||
dcp.TanevId,
|
||||
new SzamonkeresElorejelzesSearchPco
|
||||
{
|
||||
SzamonkeresIds = request.Uids?.Select(x => x.Id).ToList(),
|
||||
TanuloId = dcp.TanuloId,
|
||||
DatumTol = request.DatumTol,
|
||||
DatumIg = request.DatumIg
|
||||
}, null).ToDaoList<BejelentettSzamonkeresResponseDao>();
|
||||
|
||||
var targyKategoriaTipusById = AdatszotarSubqueries.GetTipusByIdDictionary((int)GeneratedAdatszotarTipusEnum.TargyKategoriaTipus, dcp.TanevId);
|
||||
|
||||
foreach (var szamonkeres in tanuloBejelentettSzamonkeresei)
|
||||
{
|
||||
var bejelentettSzamonkeres = new BejelentettSzamonkeresListResponse
|
||||
{
|
||||
Datum = szamonkeres.Datum,
|
||||
HetNapja = new Adatszotar<HetNapjaTipusEnum>(szamonkeres.HetNapjaId, szamonkeres.HetNapjaNev),
|
||||
OrarendiOraOraszama = szamonkeres.OrarendiOraOraszama ?? -1,
|
||||
Tantargy = new TantargyResponse(
|
||||
szamonkeres.TantargyId,
|
||||
szamonkeres.TantargyNev,
|
||||
new Adatszotar<TargyKategoriaTipusEnum>(szamonkeres.TantargyKategoriaId, targyKategoriaTipusById[szamonkeres.TantargyKategoriaId].Name)),
|
||||
RogzitoTanar = new TanarSimplifiedResponse
|
||||
{
|
||||
Nev = szamonkeres.RogzitoTanarNev
|
||||
},
|
||||
SzamonkeresTemaja = string.IsNullOrWhiteSpace(szamonkeres.SzamonkeresTemaja) ? null : szamonkeres.SzamonkeresTemaja,
|
||||
SzamonkeresModja = new Adatszotar<ErtekelesModEnum>(szamonkeres.SzamonkeresModjaId, szamonkeres.SzamonkeresModjaNev),
|
||||
BejelentesDatuma = szamonkeres.BejelentesDatuma,
|
||||
OsztalyCsoport = new OsztalyCsoportSimplifiedResponse
|
||||
{
|
||||
Uid = new OsztalyCsoportUid(szamonkeres.OsztalyCsoportId)
|
||||
},
|
||||
Uid = new BejelentettSzamonkeresUid(szamonkeres.Id)
|
||||
};
|
||||
|
||||
_ = response.Add(bejelentettSzamonkeres);
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Net.Http;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Ora
|
||||
{
|
||||
public class CsatolmanyFacade : EllenorzoFacade
|
||||
{
|
||||
private readonly IFileServiceHelper _fileServiceHelper;
|
||||
|
||||
public CsatolmanyFacade(MobileUser mobileUser, IFileServiceHelper fileServiceHelper) : base(mobileUser)
|
||||
{
|
||||
_fileServiceHelper = fileServiceHelper ?? throw new ArgumentNullException(nameof(fileServiceHelper));
|
||||
}
|
||||
|
||||
public HttpResponseMessage GetCsatolmany(CsatolmanyUid uid)
|
||||
=> RunSubquery(() => CsatolmanySubqueries.GetCsatolmany(DefaultConnectionParameters, _fileServiceHelper, uid));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Interfaces;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.Dao.VN.OraFile;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Csatolmany;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Ora
|
||||
{
|
||||
internal static class CsatolmanySubqueries
|
||||
{
|
||||
internal static HttpResponseMessage GetCsatolmany(DefaultConnectionParameters dcp, IFileServiceHelper fileServiceHelper, CsatolmanyUid uid)
|
||||
{
|
||||
var response = new HttpResponseMessage(HttpStatusCode.OK);
|
||||
|
||||
var fileHelper = new DktFileHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), fileServiceHelper);
|
||||
var (jogosult, feltoltottFajl) = fileHelper.GetFile(dcp.DalHandler, dcp.TanuloId, uid.Id);
|
||||
|
||||
if (!jogosult)
|
||||
{
|
||||
throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
|
||||
var memoryStream = new MemoryStream(fileHelper.GetCsatolmanyData(feltoltottFajl).Data)
|
||||
{
|
||||
Position = 0
|
||||
};
|
||||
|
||||
response.Content = new StreamContent(memoryStream);
|
||||
response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment") { FileName = feltoltottFajl.FileNev + "." + feltoltottFajl.Extension };
|
||||
response.Content.Headers.Add("Content-Type", "application/octet-stream");
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
internal static Dictionary<OrarendElemUid, List<CsatolmanySimplifiedResponse>> ListCsatolmanyok(DefaultConnectionParameters dcp, CsatolmanyListRequest request)
|
||||
{
|
||||
var result = new Dictionary<OrarendElemUid, List<CsatolmanySimplifiedResponse>>(new OrarendElemUid());
|
||||
if (!request.OrarendElemUids.Any())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
var oraFiles = new OraFileHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler))
|
||||
.GetOraFilesByDateRange(request.DatumTol, request.DatumIg, (int)OraFileTipusEnum.openboard).ToDaoList<OraFileResponseDao>();
|
||||
foreach (var orarendElemUid in request.OrarendElemUids.Distinct(new OrarendElemUid()))
|
||||
{
|
||||
result.Add(orarendElemUid, oraFiles.Where(x => orarendElemUid.Datum == x.OraDatum &&
|
||||
((orarendElemUid.Tipus == CalendarOraTypeEnum.OrarendiOra && orarendElemUid.Id == x.OrarendiOraId) ||
|
||||
(orarendElemUid.Tipus == CalendarOraTypeEnum.TanitasiOra && orarendElemUid.Id == x.TanitasiOraId) ||
|
||||
(orarendElemUid.Tipus == CalendarOraTypeEnum.TanitasiOra && orarendElemUid.OrarendiOraId == x.OrarendiOraId) ||
|
||||
(orarendElemUid.Tipus == CalendarOraTypeEnum.TanitasiOra && orarendElemUid.OrarendiOraGroupId == x.OrarendiOraId)))
|
||||
.Select(x => new CsatolmanySimplifiedResponse
|
||||
{
|
||||
Uid = new CsatolmanyUid(x.FileId),
|
||||
Nev = x.FileNev
|
||||
}).ToList());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Web.Logging.Abstractions;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Dummy
|
||||
{
|
||||
public class DummyFacade : EllenorzoFacade
|
||||
{
|
||||
public DummyFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public List<object> ListDummy(ITraceLogger logger)
|
||||
{
|
||||
logger.Info("teszt");
|
||||
|
||||
return new List<object>
|
||||
{
|
||||
new { Teszt = "hi" }
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Ellenorzo
|
||||
{
|
||||
public class EllenorzoFacade : EllenorzoFacadeBase
|
||||
{
|
||||
public EllenorzoFacade(MobileUser mobileUser) : this(mobileUser, mobileUser.ApiSecurity)
|
||||
{
|
||||
}
|
||||
|
||||
private EllenorzoFacade(MobileUser mobileUser, ApiSecurity apiSecurity) : base(mobileUser)
|
||||
{
|
||||
new ApiSecurityLogic(apiSecurity).ThrowExceptionIfNotJogosult();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using Kreta.BusinessLogic.Utils;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Ellenorzo.BL.VN.Intezmeny;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Ellenorzo
|
||||
{
|
||||
public class EllenorzoFacadeBase
|
||||
{
|
||||
public EllenorzoFacadeBase(MobileUser mobileUser)
|
||||
{
|
||||
DefaultConnectionParameters = new DefaultConnectionParameters(mobileUser, IntezmenySubqueries.GetIntezmenyAdatokFromCache(CommonUtils.GetOrganizationIdentifier()), CommonUtils.GetOrganizationIdentifier());
|
||||
|
||||
if (!mobileUser.InstituteCode.Equals(DefaultConnectionParameters.IntezmenyAzonosito, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
throw new BlException(BlExceptionType.IntezmenyAzonositoUtkozes);
|
||||
}
|
||||
|
||||
if (mobileUser.SchoolYearId != DefaultConnectionParameters.TanevId)
|
||||
{
|
||||
IntezmenySubqueries.RemoveIntezemenyAdatokCache(DefaultConnectionParameters.IntezmenyAzonosito);
|
||||
throw new BlException(BlExceptionType.IntezmenyMarTanevetValtott);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected DefaultConnectionParameters DefaultConnectionParameters { get; }
|
||||
|
||||
protected T RunSubquery<T>(Func<T> subquery)
|
||||
{
|
||||
return DataAccessManual.Dal.MobileConnection.Run(DefaultConnectionParameters.IntezmenyAzonosito, DefaultConnectionParameters.TanevId, h =>
|
||||
{
|
||||
DefaultConnectionParameters.DalHandler = h;
|
||||
return subquery();
|
||||
}, DefaultConnectionParameters.FelhasznaloId);
|
||||
}
|
||||
|
||||
protected void RunSubquery(Action subquery)
|
||||
{
|
||||
DataAccessManual.Dal.MobileConnection.Run(DefaultConnectionParameters.IntezmenyAzonosito, DefaultConnectionParameters.TanevId, h =>
|
||||
{
|
||||
DefaultConnectionParameters.DalHandler = h;
|
||||
subquery();
|
||||
}, DefaultConnectionParameters.FelhasznaloId);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Email;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Email
|
||||
{
|
||||
public class EmailFacade : EllenorzoFacade
|
||||
{
|
||||
public EmailFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HashSet<EmailListResponse> ListEmail(EmailListRequest request) => RunSubquery(() => EmailSubqueries.ListEmail(DefaultConnectionParameters.DalHandler, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.DataAccessManual.Interfaces;
|
||||
using Kreta.Ellenorzo.Dao.VN.Email;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Email;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Email
|
||||
{
|
||||
internal static class EmailSubqueries
|
||||
{
|
||||
internal static HashSet<EmailListResponse> ListEmail(IDalHandler h, EmailListRequest request)
|
||||
{
|
||||
var response = new HashSet<EmailListResponse>(new EmailListResponse());
|
||||
var felhasznalokEmailCimei = h.Email().GetFelhasznalokEmailCimei(new EmailRequestDao
|
||||
{
|
||||
FelhasznaloIds = request.FelhasznaloIds,
|
||||
IsPublic = request.IsPublic
|
||||
});
|
||||
|
||||
foreach (var felhasznalokEmailCime in felhasznalokEmailCimei)
|
||||
{
|
||||
var felhasznaloEmailcimei = new EmailListResponse { FelhasznaloUid = new FelhasznaloUid(felhasznalokEmailCime.FelhasznaloId) };
|
||||
var emailCim = new EmailResponse
|
||||
{
|
||||
Uid = new EmailUid(felhasznalokEmailCime.Id),
|
||||
Email = felhasznalokEmailCime.Email,
|
||||
Tipus = new Adatszotar<EmailTipusEnum>(felhasznalokEmailCime.Tipus, felhasznalokEmailCime.TipusNeve),
|
||||
IsAlapertelmezett = felhasznalokEmailCime.IsAlapertelmezett
|
||||
};
|
||||
felhasznaloEmailcimei.Emailek.Add(emailCim);
|
||||
|
||||
if (!response.Add(felhasznaloEmailcimei))
|
||||
{
|
||||
_ = response.TryGetValue(felhasznaloEmailcimei, out EmailListResponse foundResponseItem);
|
||||
foundResponseItem.Emailek.Add(emailCim);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.OsztalyAtlag;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Ertekeles.Atlag.OsztalyAtlag
|
||||
{
|
||||
public class OsztalyAtlagFacade : EllenorzoFacade
|
||||
{
|
||||
public OsztalyAtlagFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public HashSet<OsztalyAtlagListResponse> ListAktualisTanuloOsztalyAtlag(OsztalyAtlagListRequest request)
|
||||
=> RunSubquery(() => OsztalyAtlagSubqueries.ListAktualisTanuloOsztalyAtlag(DefaultConnectionParameters, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Ellenorzo.BL.VN.Ertekeles.Atlag.TantargyiAtlag;
|
||||
using Kreta.Ellenorzo.BL.VN.Felhasznalo.Tanulo;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.BL.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.BL.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.OsztalyAtlag;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport.Osztaly;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
using Kreta.Enums;
|
||||
using Kreta.KretaServer.SystemSettings;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Ertekeles.Atlag.OsztalyAtlag
|
||||
{
|
||||
internal static class OsztalyAtlagSubqueries
|
||||
{
|
||||
internal static HashSet<OsztalyAtlagListResponse> ListAktualisTanuloOsztalyAtlag(DefaultConnectionParameters dcp, OsztalyAtlagListRequest request)
|
||||
{
|
||||
var result = new HashSet<OsztalyAtlagListResponse>(new OsztalyAtlagListResponse());
|
||||
|
||||
var isOsztalyAtlagMegjelenik = SystemSettingsManager.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Osztalyatlag_megjelenitese_az_ellenorzo_feluleten, dcp.IntezmenyAzonosito, dcp.TanevId);
|
||||
|
||||
if (!isOsztalyAtlagMegjelenik)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
var osztalyCsoportok = OsztalyCsoportSubqueries
|
||||
.ListOsztalyCsoport(dcp, new OsztalyCsoportListRequest
|
||||
{
|
||||
TanuloIds = new List<int> { dcp.TanuloId },
|
||||
OktatasiNevelesiFeladatId = request.OktatasiNevelesiFeladatUid.Id
|
||||
});
|
||||
|
||||
var aktivOsztalyok = osztalyCsoportok.Where(ocs => ocs.OsztalyCsoportTipus == OsztalyCsoportTipus.Osztaly);
|
||||
|
||||
if (!aktivOsztalyok.Any())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
var osztalyokTanuloi = TanuloSubqueries.ListOsztalyokAktivTanuloIds(dcp, new OsztalyTanuloiListRequest { OsztalyIds = aktivOsztalyok.Select(o => o.Uid.Id).ToList() });
|
||||
|
||||
if (osztalyokTanuloi.Count < 1)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
var tanuloAktualisanTanultTantargyai = TantargySubqueries.ListTanuloAktualisanTanultTantargy(dcp, new TanuloAktualisanTanultTantargyListRequest()
|
||||
{
|
||||
TanuloId = dcp.TanuloId,
|
||||
OktatasiNevelesiFeladatId = request.OktatasiNevelesiFeladatUid.Id,
|
||||
TantargyUids = request.TantargyUids,
|
||||
OsztalyCsoportok = osztalyCsoportok
|
||||
});
|
||||
|
||||
if (tanuloAktualisanTanultTantargyai.Count < 1)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
var tantargyiAtlagokByTanulo = TantargyiAtlagSubqueries.GetTantargyiAtlagByTanulo(dcp,
|
||||
new TantargyiAtlagRequest()
|
||||
{
|
||||
TanuloIds = osztalyokTanuloi,
|
||||
Tantargyak = tanuloAktualisanTanultTantargyai,
|
||||
OktatasiNevelesiFeladatId = request.OktatasiNevelesiFeladatUid.Id
|
||||
});
|
||||
|
||||
foreach (var tantargy in tanuloAktualisanTanultTantargyai)
|
||||
{
|
||||
tantargyiAtlagokByTanulo.TryGetValue((dcp.TanuloId, tantargy.Uid.Id), out var tanuloAtlagByTantargy);
|
||||
var atlagokByTantargy = tantargyiAtlagokByTanulo.Where(x => x.Key.TantargyId == tantargy.Uid.Id && x.Value.HasValue).Select(x => x.Value.Value).ToList();
|
||||
var osztalyCsoportAtlagByTantargy = atlagokByTantargy.Count > 0 ? AtlagLogic.GetSimpleAtlag(atlagokByTantargy) : (decimal?)null;
|
||||
|
||||
if ((request.IsAtlagNeeded && (tanuloAtlagByTantargy.HasValue || osztalyCsoportAtlagByTantargy.HasValue)) ||
|
||||
!request.IsAtlagNeeded ||
|
||||
tantargy == TantargyLogic.MagatartasTantargy ||
|
||||
tantargy == TantargyLogic.SzorgalomTantargy)
|
||||
{
|
||||
if (!result.Add(new OsztalyAtlagListResponse
|
||||
{
|
||||
OsztalyCsoportAtlag = osztalyCsoportAtlagByTantargy,
|
||||
TanuloAtlag = tanuloAtlagByTantargy,
|
||||
OsztalyCsoportAtlagtolValoElteres = (tanuloAtlagByTantargy ?? 0) - (osztalyCsoportAtlagByTantargy ?? 0),
|
||||
Tantargy = tantargy,
|
||||
Uid = tantargy.Uid.UidRaw
|
||||
}))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Core.FeatureToggle;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
public class TantargyiAtlagFacade : EllenorzoFacade
|
||||
{
|
||||
private readonly IFeatureContext _featureContext;
|
||||
|
||||
public TantargyiAtlagFacade(MobileUser mobileUser, IFeatureContext featureContext) : base(mobileUser)
|
||||
{
|
||||
_featureContext = featureContext;
|
||||
}
|
||||
|
||||
public List<TantargyiAtlagListResponse> ListAktualisTanuloTantargyiAtlag(TantargyiAtlagListRequest request)
|
||||
=> RunSubquery(() => TantargyiAtlagSubqueries.ListTanuloTantargyiAtlag(DefaultConnectionParameters,
|
||||
new TantargyiAtlagListRequest
|
||||
{
|
||||
OktatasiNevelesiFeladatUid = request.OktatasiNevelesiFeladatUid,
|
||||
IsAtlagAlakulasaIncluded = request.IsAtlagAlakulasaIncluded,
|
||||
TanuloId = DefaultConnectionParameters.TanuloId,
|
||||
ErtekelesekTipus = ErtekelesekTipusEnum.NemBizonyitvanyErtekelesTipus,
|
||||
TantargyUid = request.TantargyUid,
|
||||
IsMobileApiCacheEnabled = _featureContext.IsEnabled(Core.Constants.FeatureName.MobileEllenorzoApiCache)
|
||||
}));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Caching;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.BL.VN.Helpers;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.BL.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Dao.VN.Ertekeles.Atlag;
|
||||
using Kreta.Ellenorzo.Domain.VN;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ertekeles;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Indexers;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
internal static class TantargyiAtlagSubqueries
|
||||
{
|
||||
internal static List<TantargyiAtlagListResponse> ListTanuloTantargyiAtlag(DefaultConnectionParameters dcp, TantargyiAtlagListRequest request)
|
||||
{
|
||||
var response = new List<TantargyiAtlagListResponse>();
|
||||
|
||||
var tantargyiAtlagCache = KretaServer.KretaServer.Instance.CacheManager.AquireCacheMobile<TantargyiAtlagCache>();
|
||||
var cacheEnabledAndNotNull = request.IsMobileApiCacheEnabled && tantargyiAtlagCache != null;
|
||||
var kesleltetesBeallitva = new TanuloErtekelesHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).GetKesleltetettMegjelenitesOraszam() > 0;
|
||||
|
||||
var tanuloAktualisanTanultTargyai = TantargySubqueries.ListTanuloAktualisanTanultTantargy(dcp, new TanuloAktualisanTanultTantargyListRequest
|
||||
{
|
||||
TanuloId = request.TanuloId,
|
||||
OktatasiNevelesiFeladatId = request.OktatasiNevelesiFeladatUid?.Id,
|
||||
TantargyUids = request.TantargyUid != null ? new List<TantargyUid> { request.TantargyUid } : null
|
||||
});
|
||||
|
||||
if (cacheEnabledAndNotNull && !kesleltetesBeallitva)
|
||||
{
|
||||
foreach (var tantargy in tanuloAktualisanTanultTargyai)
|
||||
{
|
||||
var tantargyiAtlagFromCache = tantargyiAtlagCache.GetTantargyiAtlag(request.TanuloId, dcp.IntezmenyAzonosito, tantargy.Uid.UidRaw, request.OktatasiNevelesiFeladatUid?.Id);
|
||||
|
||||
if (tantargyiAtlagFromCache != null)
|
||||
{
|
||||
if (tantargyiAtlagFromCache.Tantargy != tantargy)
|
||||
{
|
||||
tantargyiAtlagFromCache.Tantargy = tantargy;
|
||||
tantargyiAtlagCache.AddOrUpdateTantargyiAtlag(request.TanuloId, dcp.IntezmenyAzonosito, tantargy.Uid.UidRaw, request.OktatasiNevelesiFeladatUid?.Id, tantargyiAtlagFromCache);
|
||||
}
|
||||
|
||||
response.Add(tantargyiAtlagFromCache);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var tantargyakNotInCache = tanuloAktualisanTanultTargyai.Except(response.Select(t => t.Tantargy), new TantargyResponse()).ToHashSet(new TantargyResponse());
|
||||
if (tantargyakNotInCache.Any())
|
||||
{
|
||||
foreach (var tanuloTantargyiAtlaggal in GetTantargyiAtlagByTanuloDictionary(dcp, new TantargyiAtlagRequest
|
||||
{
|
||||
TanuloIds = new List<int> { request.TanuloId },
|
||||
Tantargyak = tantargyakNotInCache,
|
||||
OktatasiNevelesiFeladatId = request.OktatasiNevelesiFeladatUid?.Id,
|
||||
ErtekelesekTipus = request.ErtekelesekTipus
|
||||
}).Where(x => x.Value.Ertekelesek.Count > 0 || x.Key.Tantargy.TantargyInTtf).ToDictionary(p => p.Key, p => p.Value))
|
||||
{
|
||||
_ = tanuloAktualisanTanultTargyai.TryGetValue(new TantargyResponse(tanuloTantargyiAtlaggal.Key.Tantargy.Uid), out var foundTantargy);
|
||||
|
||||
if (foundTantargy == null)
|
||||
{
|
||||
throw new BlException(BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
|
||||
var (sulyozottOsztalyzatOsszege, sulyozottOsztalyzatSzama, sulyozottAtlag) = AtlagLogic.GetAtlagTuple(tanuloTantargyiAtlaggal.Value.Ertekelesek);
|
||||
|
||||
var tantargyiAtlag = new TantargyiAtlagListResponse
|
||||
{
|
||||
Tanulo = new TanuloSimplifiedResponse { Uid = new TanuloUid(tanuloTantargyiAtlaggal.Key.TanuloId) },
|
||||
Tantargy = new TantargyResponse(tanuloTantargyiAtlaggal.Key.Tantargy.Uid, foundTantargy.Nev, foundTantargy.Kategoria, foundTantargy.SortIndex),
|
||||
Atlag = sulyozottAtlag,
|
||||
SulyozottOsztalyzatOsszege = sulyozottOsztalyzatOsszege,
|
||||
SulyozottOsztalyzatSzama = sulyozottOsztalyzatSzama,
|
||||
SortIndex = foundTantargy.SortIndex,
|
||||
AtlagAlakulasaIdoFuggvenyeben = request.IsAtlagAlakulasaIncluded ? ErtekelesLogic.GetAtlagAlakulasaIdoFuggvenyeben(tanuloTantargyiAtlaggal.Value) : null
|
||||
};
|
||||
|
||||
response.Add(tantargyiAtlag);
|
||||
|
||||
if (cacheEnabledAndNotNull)
|
||||
{
|
||||
tantargyiAtlagCache.AddOrUpdateTantargyiAtlag(request.TanuloId, dcp.IntezmenyAzonosito, tantargyiAtlag.Tantargy.Uid.UidRaw, request.OktatasiNevelesiFeladatUid?.Id, tantargyiAtlag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
internal static Dictionary<(int TanuloId, int TantargyId), decimal?> GetTantargyiAtlagByTanulo(DefaultConnectionParameters dcp, TantargyiAtlagRequest request)
|
||||
{
|
||||
return new TanuloErtekelesHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId))
|
||||
.GetTantargyiAtlagListDataSet(request.Tantargyak.Select(t => t.Uid.Id).ToList(), request.TanuloIds, request.OktatasiNevelesiFeladatId)
|
||||
.ToDaoList<TantargyiAtlagResponseDao>()
|
||||
.ToDictionary(tantargyiAtlag => (tantargyiAtlag.TanuloId, tantargyiAtlag.TantargyId), tantargyiAtlag => tantargyiAtlag.SulyozottAtlag);
|
||||
}
|
||||
|
||||
internal static Dictionary<(int TanuloId, TantargyResponse Tantargy), TantargyiAtlagResponse> GetTantargyiAtlagByTanuloDictionary(DefaultConnectionParameters dcp, TantargyiAtlagRequest request)
|
||||
{
|
||||
var ertekelesek = ErtekelesSubqueries.ListErtekeles(dcp, new ErtekelesListRequest
|
||||
{
|
||||
TanuloIds = request.TanuloIds,
|
||||
TantargyUids = new UidsCollection<TantargyUid>(string.Join(Constant.UidDelimiter.ToString(), request.Tantargyak.Select(t => t.Uid.UidRaw)), s_uidConverter),
|
||||
OktatasiNevelesiFeladatId = request.OktatasiNevelesiFeladatId,
|
||||
ErtekelesekTipus = request.ErtekelesekTipus
|
||||
});
|
||||
|
||||
var tanulokEsTantargyakSzorzat =
|
||||
(from tanulo in request.TanuloIds
|
||||
from tantargy in request.Tantargyak
|
||||
select (tanuloAndTargy: (tanulo, tantargy), tantargyiAtlag: new TantargyiAtlagResponse())).ToDictionary(x => x.tanuloAndTargy, x => x.tantargyiAtlag
|
||||
, new LambdaComparer<(int TanuloId, TantargyResponse Tantargy)>((x, y) => x.TanuloId == y.TanuloId && x.Tantargy.Uid.Equals(y.Tantargy.Uid)));
|
||||
|
||||
foreach (var ertekeles in ertekelesek)
|
||||
{
|
||||
tanulokEsTantargyakSzorzat[(ertekeles.Tanulo.Uid.Id, ertekeles.Tantargy)].Add(ertekeles);
|
||||
}
|
||||
|
||||
return tanulokEsTantargyakSzorzat;
|
||||
}
|
||||
|
||||
private static readonly Converter<string[], TantargyUid> s_uidConverter = uidRaw => new TantargyUid(uidRaw[0]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ertekeles;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Ertekeles
|
||||
{
|
||||
public class ErtekelesFacade : EllenorzoFacade
|
||||
{
|
||||
public ErtekelesFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public ErtekelesListResponse GetErtekeles(string uid)
|
||||
=> ListTanuloErtekeles(new ErtekelesListRequest(uid, null)
|
||||
{
|
||||
IsCallerGetOnlyOneItem = true
|
||||
}).First();
|
||||
|
||||
public HashSet<ErtekelesListResponse> ListTanuloErtekeles(ErtekelesListRequest request, ErtekelesekTipusEnum ertekelesekTipusEnum = ErtekelesekTipusEnum.MindenErtekelesTipus)
|
||||
=> RunSubquery(() =>
|
||||
{
|
||||
request.TanuloIds = new List<int> { DefaultConnectionParameters.TanuloId };
|
||||
request.ErtekelesekTipus = ertekelesekTipusEnum;
|
||||
return ErtekelesSubqueries.ListErtekeles(DefaultConnectionParameters, request);
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,264 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Logic.TanuloErtekeles;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.BL.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Dao.VN.Ertekeles;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ertekeles;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using ErtekelesErtekFajta = Kreta.Ellenorzo.Enums.VN.ErtekelesErtekFajta;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Ertekeles
|
||||
{
|
||||
internal static class ErtekelesSubqueries
|
||||
{
|
||||
////TODO DevKornél: Refaktorálni!
|
||||
internal static HashSet<ErtekelesListResponse> ListErtekeles(DefaultConnectionParameters dcp, ErtekelesListRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
var response = new HashSet<ErtekelesListResponse>(new ErtekelesListResponse());
|
||||
|
||||
if (request.TanuloIds?.Count < 1 || request.TantargyUids?.Count() < 1)
|
||||
{
|
||||
return response;
|
||||
}
|
||||
|
||||
var helper = new TanuloErtekelesHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler));
|
||||
|
||||
var tanuloErtekelesei = helper.GetTanuloErtekelesListDataSet(new TanuloErtekelesListCo
|
||||
{
|
||||
Id = request.Uid?.Id,
|
||||
TanevId = dcp.TanevId,
|
||||
TanuloIds = request.TanuloIds,
|
||||
DatumTol = request.DatumTol,
|
||||
DatumIg = request.DatumIg,
|
||||
OktatasiNevelesiFeladatId = request.OktatasiNevelesiFeladatId,
|
||||
TantargyUids = request.TantargyUids?.Select(t => t.UidRaw).ToList(),
|
||||
ErtekelesekTipus = request.ErtekelesekTipus
|
||||
}).Tables[0];
|
||||
|
||||
if (tanuloErtekelesei.Rows.Count > 0)
|
||||
{
|
||||
var osztalyCsoportok = OsztalyCsoportSubqueries.ListOsztalyCsoport(dcp, new OsztalyCsoportListRequest { TanuloIds = request.TanuloIds }).ToList();
|
||||
|
||||
List<(int tanuloId, int feladatKategoriaId, int? evfolyamTipusId)> tanuloIdAndFeladatKategoriaIdAndEvfolyamTipusIdList =
|
||||
osztalyCsoportok.Select(x => (x.TanuloUid.Id, x.OktatasNevelesiKategoria.Uid.Id, x.OktatasNevelesiKategoria == OktNevelesiKategoriaEnum.AlapfokuMuveszetoktatas ? null : x?.EvfolyamTipus.Uid.Id))
|
||||
.Distinct().ToList();
|
||||
|
||||
helper.RemoveMasEvfolyamTanuloErtekelesek(tanuloErtekelesei, tanuloIdAndFeladatKategoriaIdAndEvfolyamTipusIdList);
|
||||
helper.RemoveTanuloJogosultsagMiattiErtekelesek(request.TanuloIds, tanuloErtekelesei);
|
||||
}
|
||||
|
||||
List<int> egyszerAdhatoErtekelesTipusIdList = EnumExtensions.GetErtekelesTipusDictionaryItems(dcp.TanevId, true).Select(x => x.Id).ToList();
|
||||
foreach (var ertekeles in tanuloErtekelesei.ToDaoList<ErtekelesResponseDao>())
|
||||
{
|
||||
var kozos = new ErtekelesListResponse
|
||||
{
|
||||
Uid = new ErtekelesUid(ertekeles.Id, ErtekelesJelleg.Ertekeles),
|
||||
Datum = ertekeles.Datum,
|
||||
Tipus = new Adatszotar<ErtekelesTipusEnum>(ertekeles.TipusId, ertekeles.TipusNeve),
|
||||
KeszitesDatum = ertekeles.RogzitesDatum,
|
||||
SzovegesErtekelesRovidNev = ertekeles.SzovegesErtekelesRovidNev,
|
||||
ErtekeloTanar = new TanarSimplifiedResponse
|
||||
{
|
||||
Uid = new TanarUid(ertekeles.ErtekeloId),
|
||||
Nev = ertekeles.ErtekeloNyomtatasiNev
|
||||
},
|
||||
OsztalyCsoport = new OsztalyCsoportSimplifiedResponse
|
||||
{
|
||||
Uid = new OsztalyCsoportUid(ertekeles.OsztalyCsoportId)
|
||||
},
|
||||
Tanulo = new TanuloSimplifiedResponse { Uid = new TanuloUid(ertekeles.TanuloId) }
|
||||
};
|
||||
|
||||
if (ertekeles.IsMagatartasSzorgalom)
|
||||
{
|
||||
if (request.TantargyUids == null || request.TantargyUids.Contains(new TantargyUid("Magatartas"), new TantargyUid()))
|
||||
{
|
||||
FillUpMagatartas(response, kozos, ertekeles, egyszerAdhatoErtekelesTipusIdList);
|
||||
}
|
||||
if (request.TantargyUids == null || request.TantargyUids.Contains(new TantargyUid("Szorgalom"), new TantargyUid()))
|
||||
{
|
||||
FillUpSzorgalom(response, kozos, ertekeles, egyszerAdhatoErtekelesTipusIdList);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FillUpErtekeles(response, kozos, ertekeles, egyszerAdhatoErtekelesTipusIdList);
|
||||
}
|
||||
}
|
||||
|
||||
var orderedTantargyHashSet = response.Select(x => x.Tantargy).Distinct(new TantargyResponse()).ToHashSet();
|
||||
TantargyLogic.OrderTantargyList(orderedTantargyHashSet, dcp.TanevId);
|
||||
|
||||
foreach (var ertekeles in response)
|
||||
{
|
||||
var index = orderedTantargyHashSet.Single(x => x.Uid.UidRaw == ertekeles.Tantargy.Uid.UidRaw).SortIndex;
|
||||
ertekeles.SortIndex = index;
|
||||
ertekeles.Tantargy.SortIndex = index;
|
||||
}
|
||||
|
||||
IEnumerable<ErtekelesListResponse> filteredResponse = response.Where(x => request.Uid?.Jelleg == null || x.Uid.Jelleg == request.Uid.Jelleg);
|
||||
|
||||
return RequestFilterLogic.CreateUidFilteredListResponse<HashSet<ErtekelesListResponse>, ErtekelesListRequest, ErtekelesUid>(filteredResponse.OrderBy(x => x.SortIndex).ToHashSet(), request);
|
||||
|
||||
void FillUpErtekeles(HashSet<ErtekelesListResponse> listResponse, ErtekelesListResponse kozos, ErtekelesResponseDao ertekeles, List<int> egyszerAdhatoErtekelesTipusIds)
|
||||
{
|
||||
kozos.Mod = kozos.Tipus.Uid.Id == (int)ErtekelesTipusEnum.evkozi_jegy_ertekeles ?
|
||||
new Adatszotar<ErtekelesModEnum>(ertekeles.ErtekelesModId ?? 0, ertekeles.ErtekelesModNeve)
|
||||
: null;
|
||||
|
||||
kozos.Tema = string.IsNullOrWhiteSpace(ertekeles.ErtekelesTema) ? null
|
||||
: ertekeles.ErtekelesTema;
|
||||
|
||||
kozos.Tantargy = new TantargyResponse(
|
||||
ertekeles.TantargyId.Value,
|
||||
ertekeles.TantargyNev,
|
||||
ertekeles.SorSzam,
|
||||
new Adatszotar<TargyKategoriaTipusEnum>(ertekeles.TantargyKategoriaId.Value, ertekeles.TantargyKategoriaNeve))
|
||||
{
|
||||
IsFotargy = ertekeles.IsFotargy.Value,
|
||||
FotargyNev = ertekeles.FotargyNev,
|
||||
FotargyKategoriaId = ertekeles.FotargyTantargyKategoriaId
|
||||
};
|
||||
|
||||
var ertekelesOsztalyzatText = ertekeles.ErtekelesOsztalyzatNeve;
|
||||
var ertekelesSzovegText = ertekeles.ErtekelesSzovegFormazott ?? ertekeles.ErtekelesSzoveg;
|
||||
var ertekelesSzazalek = ertekeles.ErtekelesSzazalekErteke;
|
||||
var ertekelesOsztalyzatValue = TanuloErtekelesLogicBase.GetOsztalyzatTextShort(ertekeles.ErtekelesOsztalyzatId, egyszerAdhatoErtekelesTipusIds, true);
|
||||
|
||||
kozos.ErtekFajta = !string.IsNullOrWhiteSpace(ertekelesOsztalyzatText) ? ErtekelesErtekFajta.Osztalyzat
|
||||
: !string.IsNullOrWhiteSpace(ertekelesSzovegText) ? ErtekelesErtekFajta.Szoveges
|
||||
: ertekelesSzazalek != null ? ErtekelesErtekFajta.Szazalekos
|
||||
: ErtekelesErtekFajta.None;
|
||||
|
||||
kozos.SulySzazalekErteke = kozos.ErtekFajta == ErtekelesErtekFajta.Osztalyzat ? ertekeles.ErtekelesSuly.HasValue ? ertekeles.ErtekelesSuly.Value : (int?)100
|
||||
: null;
|
||||
|
||||
kozos.SzovegesErtek = kozos.ErtekFajta.Uid.Id == (int)ErtekelesErtekFajta.Osztalyzat ? ertekelesOsztalyzatText
|
||||
: kozos.ErtekFajta.Uid.Id == (int)ErtekelesErtekFajta.Szoveges ? ertekelesSzovegText
|
||||
: kozos.ErtekFajta.Uid.Id == (int)ErtekelesErtekFajta.Szazalekos ? ertekelesSzazalek + "%"
|
||||
: null;
|
||||
|
||||
kozos.SzamErtek = kozos.ErtekFajta.Uid.Id == (int)ErtekelesErtekFajta.Osztalyzat ? Convert.ToInt32(ertekelesOsztalyzatValue)
|
||||
: kozos.ErtekFajta.Uid.Id == (int)ErtekelesErtekFajta.Szoveges ? null
|
||||
: kozos.ErtekFajta.Uid.Id == (int)ErtekelesErtekFajta.Szazalekos ? Convert.ToInt32(ertekelesSzazalek)
|
||||
: (int?)null;
|
||||
if (!listResponse.Add(kozos))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
|
||||
void FillUpMagatartas(HashSet<ErtekelesListResponse> listResponse, ErtekelesListResponse kozos, ErtekelesResponseDao ertekeles, List<int> egyszerAdhatoErtekelesTipusIds)
|
||||
{
|
||||
var magatartasOsztalyzatText = ertekeles.MagatartasOsztalyzatSzovegesen;
|
||||
var magatartasSzovegText = ertekeles.MagatartasSzovegFormazott;
|
||||
var magatartasErtekText = ertekeles.MagatartasErtekSzovegesen;
|
||||
var magatartasOsztalyzatValue = TanuloErtekelesLogicBase.GetOsztalyzatTextShort(ertekeles.MagatartasOsztalyzatId, egyszerAdhatoErtekelesTipusIds, true);
|
||||
|
||||
int? magatartasFajta = !string.IsNullOrWhiteSpace(magatartasOsztalyzatText) ? (int)ErtekelesErtekFajta.Osztalyzat
|
||||
: !string.IsNullOrWhiteSpace(magatartasSzovegText) ? (int)ErtekelesErtekFajta.Szoveges
|
||||
: !string.IsNullOrWhiteSpace(magatartasErtekText) ? (int)ErtekelesErtekFajta.MagatartasErtek
|
||||
: (int?)null;
|
||||
|
||||
if (magatartasFajta.HasValue)
|
||||
{
|
||||
var magatartasErtekeles = new ErtekelesListResponse(kozos)
|
||||
{
|
||||
ErtekFajta = (ErtekelesErtekFajta)magatartasFajta,
|
||||
Uid = new ErtekelesUid(ertekeles.Id, ErtekelesJelleg.Magatartas),
|
||||
Tantargy = TantargyLogic.MagatartasTantargy
|
||||
};
|
||||
switch (magatartasFajta)
|
||||
{
|
||||
case (int)ErtekelesErtekFajta.Osztalyzat:
|
||||
magatartasErtekeles.SzovegesErtek = magatartasOsztalyzatText;
|
||||
magatartasErtekeles.SzamErtek = Convert.ToInt32(magatartasOsztalyzatValue);
|
||||
break;
|
||||
|
||||
case (int)ErtekelesErtekFajta.Szoveges:
|
||||
magatartasErtekeles.SzovegesErtek = magatartasSzovegText;
|
||||
break;
|
||||
|
||||
case (int)ErtekelesErtekFajta.MagatartasErtek:
|
||||
magatartasErtekeles.SzovegesErtek = magatartasErtekText;
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new BlException(BlExceptionType.ValtozoErtekeNemLehetNull);
|
||||
}
|
||||
|
||||
if (!listResponse.Add(magatartasErtekeles))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FillUpSzorgalom(HashSet<ErtekelesListResponse> listResponse, ErtekelesListResponse kozos, ErtekelesResponseDao ertekeles, List<int> egyszerAdhatoErtekelesTipusIds)
|
||||
{
|
||||
var szorgalomOsztalyzatText = ertekeles.SzorgalomOsztalyzatSzovegesen;
|
||||
var szorgalomSzovegText = ertekeles.SzorgalomSzovegFormazott;
|
||||
var szorgalomErtekText = ertekeles.SzorgalomErtekSzoveges;
|
||||
var szorgalomOsztalyzatValue = TanuloErtekelesLogicBase.GetOsztalyzatTextShort(ertekeles.SzorgalomOsztalyzatId, egyszerAdhatoErtekelesTipusIds, true);
|
||||
|
||||
var szorgalomFajta = !string.IsNullOrWhiteSpace(szorgalomOsztalyzatText) ? (int)ErtekelesErtekFajta.Osztalyzat
|
||||
: !string.IsNullOrWhiteSpace(szorgalomSzovegText) ? (int)ErtekelesErtekFajta.Szoveges
|
||||
: !string.IsNullOrWhiteSpace(szorgalomErtekText) ? (int)ErtekelesErtekFajta.SzorgalomErtek
|
||||
: (int?)null;
|
||||
|
||||
if (szorgalomFajta.HasValue)
|
||||
{
|
||||
var szorgalomErtekeles = new ErtekelesListResponse(kozos)
|
||||
{
|
||||
ErtekFajta = (ErtekelesErtekFajta)szorgalomFajta,
|
||||
Uid = new ErtekelesUid(ertekeles.Id, ErtekelesJelleg.Szorgalom),
|
||||
Tantargy = TantargyLogic.SzorgalomTantargy
|
||||
};
|
||||
switch (szorgalomFajta)
|
||||
{
|
||||
case (int)ErtekelesErtekFajta.Osztalyzat:
|
||||
szorgalomErtekeles.SzovegesErtek = szorgalomOsztalyzatText;
|
||||
szorgalomErtekeles.SzamErtek = Convert.ToInt32(szorgalomOsztalyzatValue);
|
||||
break;
|
||||
|
||||
case (int)ErtekelesErtekFajta.Szoveges:
|
||||
szorgalomErtekeles.SzovegesErtek = szorgalomSzovegText;
|
||||
break;
|
||||
|
||||
case (int)ErtekelesErtekFajta.SzorgalomErtek:
|
||||
szorgalomErtekeles.SzovegesErtek = szorgalomErtekText;
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new BlException(BlExceptionType.ValtozoErtekeNemLehetNull);
|
||||
}
|
||||
|
||||
if (!listResponse.Add(szorgalomErtekeles))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Faliujsag;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Faliujsag
|
||||
{
|
||||
public class FaliujsagFacade : EllenorzoFacade
|
||||
{
|
||||
public FaliujsagFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HashSet<FaliujsagListResponse> ListFaliujsag(FaliujsagListRequest request)
|
||||
=> RunSubquery(() => FaliujsagSubqueries.ListFaliujsag(DefaultConnectionParameters, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.Faliujsag;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Faliujsag;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Faliujsag
|
||||
{
|
||||
internal static class FaliujsagSubqueries
|
||||
{
|
||||
internal static HashSet<FaliujsagListResponse> ListFaliujsag(DefaultConnectionParameters dcp, FaliujsagListRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
var response = new HashSet<FaliujsagListResponse>(new FaliujsagListResponse());
|
||||
var tanuloFaliujsagBejegyzeseiOsszes = dcp.DalHandler.Feljegyzes().GetFaliujsagonMegjelenoBejegyzesek(dcp.TanuloId, DateTime.Now, null, 0).ToDaoList<FaliujsagResponseDao>();
|
||||
|
||||
var tanuloFaliujsagBejegyzesei = FilterTanuloFaliujsagBejegyzeseiByErvenyessegKezdete(request.DatumTol, request.DatumIg, tanuloFaliujsagBejegyzeseiOsszes);
|
||||
|
||||
foreach (var faliujsagElem in tanuloFaliujsagBejegyzesei)
|
||||
{
|
||||
var faliujsagEsemeny = new FaliujsagListResponse
|
||||
{
|
||||
Uid = new FaliujsagUid(faliujsagElem.Id),
|
||||
RogzitoNeve = faliujsagElem.RogzitoNeve,
|
||||
ErvenyessegKezdete = faliujsagElem.ErvenyessegKezdete,
|
||||
ErvenyessegVege = faliujsagElem.ErvenyessegVege,
|
||||
Cim = faliujsagElem.Cim,
|
||||
Tartalom = faliujsagElem.Tartalom
|
||||
};
|
||||
|
||||
if (!response.Add(faliujsagEsemeny))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
private static List<FaliujsagResponseDao> FilterTanuloFaliujsagBejegyzeseiByErvenyessegKezdete(DateTime? datumTol, DateTime? datumIg, List<FaliujsagResponseDao> tanuloFaliujsagBejegyzesei)
|
||||
{
|
||||
if (datumTol.HasValue && datumIg.HasValue)
|
||||
{
|
||||
tanuloFaliujsagBejegyzesei = tanuloFaliujsagBejegyzesei.FindAll(x => x.ErvenyessegKezdete >= datumTol && x.ErvenyessegKezdete <= datumIg);
|
||||
}
|
||||
else if (datumTol.HasValue)
|
||||
{
|
||||
tanuloFaliujsagBejegyzesei = tanuloFaliujsagBejegyzesei.FindAll(x => x.ErvenyessegKezdete >= datumTol);
|
||||
}
|
||||
else if (datumIg.HasValue)
|
||||
{
|
||||
tanuloFaliujsagBejegyzesei = tanuloFaliujsagBejegyzesei.FindAll(x => x.ErvenyessegKezdete <= datumIg);
|
||||
}
|
||||
|
||||
return tanuloFaliujsagBejegyzesei;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Ellenorzo.BL.VN.Email;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.BL.VN.Telefon;
|
||||
using Kreta.Ellenorzo.Dao.VN.Felhasznalo.Alkalmazott;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Email;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott;
|
||||
using Kreta.Ellenorzo.Domain.VN.Telefon;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Felhasznalo.Alkalmazott
|
||||
{
|
||||
internal static class AlkalmazottSubqueries
|
||||
{
|
||||
internal static HashSet<AlkalmazottListResponse> ListAlkalmazott(DefaultConnectionParameters dcp, AlkalmazottListRequest request)
|
||||
{
|
||||
if (JogosultsagLogic.ListHozzaferhetoAlkalmazottIds(dcp).Intersect(request.FelhasznaloIds).ToList().Count != request.FelhasznaloIds.Count ||
|
||||
!request.Email.IsPublic.Value || !request.Telefon.IsPublic.Value)
|
||||
{
|
||||
throw new BlException(BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
var response = new HashSet<AlkalmazottListResponse>(new AlkalmazottListResponse());
|
||||
|
||||
var felhasznaloEmailek = EmailSubqueries.ListEmail(dcp.DalHandler, request.Email);
|
||||
var felhasznaloTelefonok = TelefonSubqueries.ListTelefon(dcp.DalHandler, request.Telefon);
|
||||
|
||||
foreach (var item in dcp.DalHandler.Alkalmazott().GetAlkalmazottak(dcp.TanevId, request.FelhasznaloIds).ToDaoList<AlkalmazottResponseDao>())
|
||||
{
|
||||
if (!response.Add(new AlkalmazottListResponse
|
||||
{
|
||||
Uid = new AlkalmazottUid(item.Id),
|
||||
Nev = item.Nev,
|
||||
Emailek = felhasznaloEmailek.TryGetValue(new EmailListResponse { FelhasznaloUid = new FelhasznaloUid(item.Id) }, out EmailListResponse email) ? email.Emailek : new List<EmailResponse>(),
|
||||
Telefonok = felhasznaloTelefonok.TryGetValue(new TelefonListResponse { FelhasznaloUid = new FelhasznaloUid(item.Id) }, out TelefonListResponse telefon) ? telefon.Telefonszamok : new List<TelefonResponse>()
|
||||
}))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Email;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar.Osztalyfonok;
|
||||
using Kreta.Ellenorzo.Domain.VN.Telefon;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Felhasznalo.Alkalmazott.Tanar.Osztalyfonok
|
||||
{
|
||||
public class OsztalyfonokFacade : EllenorzoFacade
|
||||
{
|
||||
public OsztalyfonokFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HashSet<OsztalyfonokListResponse> ListOsztalyfonokForTanuloAndGondviselo(OsztalyfonokListRequest request)
|
||||
{
|
||||
var felhasznaloIds = new HashSet<OsztalyfonokUid>(request?.Uids).Select(x => x.Id).ToList();
|
||||
|
||||
if (!felhasznaloIds.Any())
|
||||
{
|
||||
throw new BlException(string.Format(ErrorResource.ParameterMegadasaKotelezo, "Uid"), BlExceptionType.ModelValidacio);
|
||||
}
|
||||
|
||||
var response = RunSubquery(() => OsztalyfonokSubqueries.ListOsztalyfonok(DefaultConnectionParameters,
|
||||
new OsztalyfonokListRequest
|
||||
{
|
||||
Tanar = new TanarListRequest
|
||||
{
|
||||
Alkalmazott = new AlkalmazottListRequest
|
||||
{
|
||||
Email = new EmailListRequest { FelhasznaloIds = felhasznaloIds, IsPublic = true },
|
||||
Telefon = new TelefonListRequest { FelhasznaloIds = felhasznaloIds, IsPublic = true },
|
||||
FelhasznaloIds = felhasznaloIds
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Ellenorzo.BL.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar.Osztalyfonok;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Felhasznalo.Alkalmazott.Tanar.Osztalyfonok
|
||||
{
|
||||
internal static class OsztalyfonokSubqueries
|
||||
{
|
||||
internal static HashSet<OsztalyfonokListResponse> ListOsztalyfonok(DefaultConnectionParameters dcp, OsztalyfonokListRequest request)
|
||||
{
|
||||
var response = new HashSet<OsztalyfonokListResponse>(new OsztalyfonokListResponse());
|
||||
var tanarok = TanarSubqueries.ListTanar(dcp, request.Tanar);
|
||||
var osztalyokAholOsztalyfonok = OsztalyCsoportSubqueries.ListOsztalyCsoport(dcp, new OsztalyCsoportListRequest { OsztalyfonokIds = request.Tanar.Alkalmazott.FelhasznaloIds });
|
||||
|
||||
foreach (var tanar in tanarok)
|
||||
{
|
||||
var responseItem = new OsztalyfonokListResponse
|
||||
{
|
||||
Uid = new OsztalyfonokUid(tanar.Uid.Id),
|
||||
Tanar = tanar,
|
||||
Osztalyai = osztalyokAholOsztalyfonok.Where(x => x.Osztalyfonok?.Uid.Id == tanar.Uid.Id).ToList()
|
||||
};
|
||||
|
||||
if (!response.Add(responseItem))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Felhasznalo.Alkalmazott.Tanar
|
||||
{
|
||||
internal static class TanarSubqueries
|
||||
{
|
||||
internal static HashSet<TanarListResponse> ListTanar(DefaultConnectionParameters dcp, TanarListRequest request)
|
||||
{
|
||||
var response = new HashSet<TanarListResponse>(new TanarListResponse());
|
||||
|
||||
foreach (var item in AlkalmazottSubqueries.ListAlkalmazott(dcp, request.Alkalmazott))
|
||||
{
|
||||
if (!response.Add(new TanarListResponse
|
||||
{
|
||||
Uid = new TanarUid(item.Uid.Id),
|
||||
Alkalmazott = item
|
||||
}))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.BL.VN.Felhasznalo.Gondviselo;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Gondviselo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Felhasznalo
|
||||
{
|
||||
public class FelhasznaloFacade : EllenorzoFacade
|
||||
{
|
||||
public FelhasznaloFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public TanuloGetResponse GetTanuloAdatlap()
|
||||
=> RunSubquery(() => FelhasznaloSubqueries.GetTanuloAdatlap(DefaultConnectionParameters));
|
||||
|
||||
public GondviseloAdatokResponse GetGondviseloAdatlap()
|
||||
=> RunSubquery(() => GondviseloSubqueries.GetGondviseloAdatlap(DefaultConnectionParameters));
|
||||
|
||||
public bool IsTorvenyesKepviselo()
|
||||
=> RunSubquery(() => FelhasznaloSubqueries.IsGondviseloTorvenyesKepviselo(DefaultConnectionParameters));
|
||||
|
||||
public void SaveBankszamla(BankszamlaRequest request)
|
||||
=> RunSubquery(() => FelhasznaloSubqueries.SaveBankszamla(DefaultConnectionParameters, request));
|
||||
|
||||
public void DeleteBankszamla()
|
||||
=> RunSubquery(() => FelhasznaloSubqueries.DeleteBankszamla(DefaultConnectionParameters));
|
||||
|
||||
public void SaveElerhetoseg(ElerhetosegRequest request)
|
||||
=> RunSubquery(() => FelhasznaloSubqueries.SaveElerhetoseg(DefaultConnectionParameters, request));
|
||||
|
||||
public void UpdateGondviseloAdatlap(GondviseloBaseAdatlapRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
RunSubquery(() => GondviseloSubqueries.UpdateGondviseloAdatlap(DefaultConnectionParameters, request));
|
||||
}
|
||||
|
||||
public NapiErtesitesOsszefoglaloResponse GetNapiErtesitesOsszefoglalo()
|
||||
=> RunSubquery(() => FelhasznaloSubqueries.GetNapiErtesitesOsszefoglalo(DefaultConnectionParameters));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,296 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Caching;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.FeatureToggle;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccess.Interfaces;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.BL.VN.Felhasznalo.Gondviselo;
|
||||
using Kreta.Ellenorzo.BL.VN.Felhasznalo.Tanulo;
|
||||
using Kreta.Ellenorzo.BL.VN.Intezmeny;
|
||||
using Kreta.Ellenorzo.BL.VN.Intezmeny.Rendszermodul;
|
||||
using Kreta.Ellenorzo.BL.VN.Intezmeny.TestreszabasBeallitasok;
|
||||
using Kreta.Ellenorzo.Dao.VN.Email;
|
||||
using Kreta.Ellenorzo.Dao.VN.Ertekeles;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Enums;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Job.Tasks.Cache;
|
||||
using Kreta.Resources;
|
||||
using static Kreta.Ellenorzo.Domain.VN.Converter.ResponseModelConverter;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Felhasznalo
|
||||
{
|
||||
internal static class FelhasznaloSubqueries
|
||||
{
|
||||
internal static TanuloGetResponse GetTanuloAdatlap(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var tanuloAdat = TanuloSubqueries.GetTanuloAdat(dcp);
|
||||
var response = new TanuloGetResponse
|
||||
{
|
||||
Uid = new TanuloUid(dcp.TanuloId),
|
||||
IdpUniqueId = tanuloAdat.IdpUniqueId,
|
||||
TanuloAdat = tanuloAdat,
|
||||
TanevId = dcp.TanevId,
|
||||
Intezmeny = new IntezmenyResponse
|
||||
{
|
||||
IntezmenyAdatok = IntezmenySubqueries.GetSajatIntezmenyAdatok(dcp),
|
||||
Rendszermodulok = RendszermodulSubqueries.ListRendszermodul(dcp),
|
||||
TestreszabasBeallitasok = TestreszabasBeallitasokSubqueries.GetTestreszabasBeallitasok(dcp)
|
||||
},
|
||||
GondviseloLista = ModelToModel(GondviseloSubqueries.ListGondviseloForTanulo(dcp))
|
||||
};
|
||||
|
||||
if (dcp.JogosultsagLista.Contains(FelhasznaloSzerepkor.Gondviselo))
|
||||
{
|
||||
response.TanuloAdat.Bankszamla.IsReadOnly = !response.GondviseloLista.SingleOrDefault(x => x.Uid.Id == dcp.GondviseloId.Value)?.IsTorvenyesKepviselo ?? true;
|
||||
}
|
||||
|
||||
dcp.DalHandler.FelhasznaloBelepes().UpdateLastLoginByUserId(dcp.FelhasznaloId, DateTime.Now, dcp.GondviseloId.HasValue);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
internal static void SaveBankszamla(DefaultConnectionParameters dcp, BankszamlaRequest request)
|
||||
{
|
||||
if (dcp.JogosultsagLista.Contains(FelhasznaloSzerepkor.Tanulo) || IsGondviseloTorvenyesKepviselo(dcp))
|
||||
{
|
||||
|
||||
var validacioError = BankszamlaLogic.KitoltottsegValidacio(request.BankszamlaSzam, request.BankszamlaTulajdonosTipusId, request.BankszamlaTulajdonosNeve);
|
||||
if (!string.IsNullOrWhiteSpace(validacioError))
|
||||
{
|
||||
throw new BlException(validacioError, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
if (!BankszamlaLogic.IsBankAccountNumberValid(request.BankszamlaSzam))
|
||||
{
|
||||
throw new BlException(string.Format(TanuloResource.NemMegfeleloBankszamlaszam, request.BankszamlaSzam), BlExceptionType.ModelValidacio);
|
||||
}
|
||||
validacioError = BankszamlaLogic.CDVValidacio(request.BankszamlaSzam);
|
||||
if (!string.IsNullOrWhiteSpace(validacioError))
|
||||
{
|
||||
throw new BlException(validacioError, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
|
||||
var bankszamlaCo = new BankszamlaCo
|
||||
{
|
||||
BankszamlaSzam = request.BankszamlaSzam,
|
||||
BankszamlaTulajdonos = request.BankszamlaTulajdonosTipusId,
|
||||
BankszamlaTulajdonosNeve = request.BankszamlaTulajdonosNeve,
|
||||
SzamlavezetoBank = request.SzamlavezetoBank
|
||||
};
|
||||
|
||||
new TanuloHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).SaveTanuloBankszamlaAdatok(dcp.TanuloId, dcp.GondviseloId, bankszamlaCo);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void DeleteBankszamla(DefaultConnectionParameters dcp)
|
||||
{
|
||||
if (dcp.JogosultsagLista.Contains(FelhasznaloSzerepkor.Tanulo) || IsGondviseloTorvenyesKepviselo(dcp))
|
||||
{
|
||||
new TanuloHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).SaveTanuloBankszamlaAdatok(dcp.TanuloId, dcp.GondviseloId, new BankszamlaCo());
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void SaveElerhetoseg(DefaultConnectionParameters dcp, ElerhetosegRequest request)
|
||||
{
|
||||
SaveEmail(dcp, request.EmailCim);
|
||||
SaveTelefonszam(dcp, request.Telefonszam);
|
||||
|
||||
var tanuloAdatlapCache = KretaServer.KretaServer.Instance.CacheManager.AquireCacheMobile<TanuloAdatlapCache>();
|
||||
var cacheEnabledAndNotNull = FeatureContext.Instance.IsEnabled(Constants.FeatureName.MobileEllenorzoApiCache, dcp.IntezmenyAzonosito) && tanuloAdatlapCache != null;
|
||||
if (cacheEnabledAndNotNull)
|
||||
{
|
||||
tanuloAdatlapCache.RemoveTanuloAdatlap(dcp.TanuloId, dcp.IntezmenyAzonosito);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void SaveEmail(DefaultConnectionParameters dcp, string emailCim)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(emailCim))
|
||||
{
|
||||
var dal = dcp.DalHandler.Email();
|
||||
var isUjEmail = false;
|
||||
IEmail ujEmail;
|
||||
var emailek = dal.GetFelhasznalokEmailCimei(new EmailRequestDao()
|
||||
{
|
||||
FelhasznaloIds = new List<int>()
|
||||
{
|
||||
dcp.TanuloId
|
||||
},
|
||||
IsPublic = null
|
||||
});
|
||||
if (dcp.JogosultsagLista.Contains(FelhasznaloSzerepkor.Gondviselo))
|
||||
{
|
||||
emailek = emailek.Where(e => e.GondviseloId == dcp.GondviseloId).ToList();
|
||||
}
|
||||
else if (dcp.JogosultsagLista.Contains(FelhasznaloSzerepkor.Tanulo))
|
||||
{
|
||||
emailek = emailek.Where(e => e.FelhasznaloId == dcp.TanuloId && e.GondviseloId == null).ToList();
|
||||
}
|
||||
var alapertelmezettEmail = emailek.FirstOrDefault(e => e.IsAlapertelmezett);
|
||||
var duplikaltEmail = emailek.FirstOrDefault(e => e.Email == emailCim && e.Id != alapertelmezettEmail.Id);
|
||||
if (duplikaltEmail != null)
|
||||
{
|
||||
var regiEmail = dal.Get(alapertelmezettEmail.Id);
|
||||
regiEmail.Alapertelmezett = false;
|
||||
dal.FullUpdate(regiEmail);
|
||||
|
||||
ujEmail = dal.Get(duplikaltEmail.Id);
|
||||
ujEmail.Alapertelmezett = true;
|
||||
ujEmail.IsMobilRogzitett = true;
|
||||
dal.FullUpdate(ujEmail);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (alapertelmezettEmail == null)
|
||||
{
|
||||
ujEmail = dal.Get();
|
||||
isUjEmail = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ujEmail = dal.Get(alapertelmezettEmail.Id);
|
||||
}
|
||||
if (ujEmail.EmailCim != emailCim)
|
||||
{
|
||||
ujEmail.Alapertelmezett = true;
|
||||
ujEmail.EmailCim = emailCim;
|
||||
ujEmail.EmailTipusa = (int)EmailTipusEnum.Hivatalos;
|
||||
ujEmail.GondviseloId = dcp.GondviseloId ?? ujEmail.GondviseloId;
|
||||
ujEmail.FelhasznaloId = dcp.TanuloId;
|
||||
ujEmail.IsMobilRogzitett = true;
|
||||
if (isUjEmail)
|
||||
{
|
||||
ujEmail.IntezmenyId = dcp.IntezmenyId;
|
||||
dal.Insert(ujEmail);
|
||||
}
|
||||
else
|
||||
{
|
||||
dal.FullUpdate(ujEmail);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static void SaveTelefonszam(DefaultConnectionParameters dcp, string telefonszam)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(telefonszam))
|
||||
{
|
||||
var dal = dcp.DalHandler.Telefon();
|
||||
var isUjTelefon = false;
|
||||
ITelefon ujTelefon;
|
||||
var telefonszamok = dal.ListTelefon(new List<int>() { dcp.TanuloId }, null);
|
||||
if (dcp.JogosultsagLista.Contains(FelhasznaloSzerepkor.Gondviselo))
|
||||
{
|
||||
telefonszamok = telefonszamok.Where(e => e.GondviseloId == dcp.GondviseloId).ToList();
|
||||
}
|
||||
else if (dcp.JogosultsagLista.Contains(FelhasznaloSzerepkor.Tanulo))
|
||||
{
|
||||
telefonszamok = telefonszamok.Where(e => e.FelhasznaloId == dcp.TanuloId && e.GondviseloId == null).ToList();
|
||||
}
|
||||
var alapertelmezettTelefon = telefonszamok.FirstOrDefault(e => e.IsAlapertelmezett);
|
||||
var duplikaltTelefon = telefonszamok.FirstOrDefault(e => e.Telefonszam == telefonszam && e.Id != alapertelmezettTelefon.Id);
|
||||
|
||||
if (duplikaltTelefon != null)
|
||||
{
|
||||
var regiTelefon = dal.Get(alapertelmezettTelefon.Id);
|
||||
regiTelefon.Alapertelmezett = false;
|
||||
dal.FullUpdate(regiTelefon);
|
||||
|
||||
ujTelefon = dal.Get(duplikaltTelefon.Id);
|
||||
ujTelefon.Alapertelmezett = true;
|
||||
ujTelefon.IsMobilRogzitett = true;
|
||||
dal.FullUpdate(ujTelefon);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (alapertelmezettTelefon == null)
|
||||
{
|
||||
ujTelefon = dal.Get();
|
||||
isUjTelefon = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ujTelefon = dal.Get(alapertelmezettTelefon.Id);
|
||||
}
|
||||
if (ujTelefon.TelefonSzam != telefonszam)
|
||||
{
|
||||
ujTelefon.Alapertelmezett = true;
|
||||
ujTelefon.TelefonSzam = telefonszam;
|
||||
ujTelefon.TelefonTipusa = (int)TelefonTipusEnum.Mobil;
|
||||
ujTelefon.GondviseloId = dcp.GondviseloId ?? ujTelefon.GondviseloId;
|
||||
ujTelefon.FelhasznaloId = dcp.TanuloId;
|
||||
ujTelefon.IsMobilRogzitett = true;
|
||||
if (isUjTelefon)
|
||||
{
|
||||
ujTelefon.IntezmenyId = dcp.IntezmenyId;
|
||||
dal.Insert(ujTelefon);
|
||||
}
|
||||
else
|
||||
{
|
||||
dal.FullUpdate(ujTelefon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static bool IsGondviseloTorvenyesKepviselo(DefaultConnectionParameters dcp)
|
||||
=> dcp.DalHandler.Gondviselo().Get(dcp.GondviseloId.Value).IsTorvenyesKepviselo;
|
||||
|
||||
internal static NapiErtesitesOsszefoglaloResponse GetNapiErtesitesOsszefoglalo(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var napiErtesitesOsszefoglalo = dcp.DalHandler.Felhasznalo().GetNapiErtesitesOsszefoglalo(dcp.TanuloId, null).ToDaoList<NapiErtesitesOsszefoglaloDao>();
|
||||
|
||||
return new NapiErtesitesOsszefoglaloResponse
|
||||
{
|
||||
Ertekelesek = napiErtesitesOsszefoglalo.First(e => e.ErtesitesTipusa == "Ertekelesek").ErtesitesekSzama,
|
||||
Mulasztasok = napiErtesitesOsszefoglalo.First(e => e.ErtesitesTipusa == "Mulasztasok").ErtesitesekSzama,
|
||||
Feljegyzesek = napiErtesitesOsszefoglalo.First(e => e.ErtesitesTipusa == "Feljegyzesek").ErtesitesekSzama,
|
||||
Bejelentettszamonkeresek = napiErtesitesOsszefoglalo.First(e => e.ErtesitesTipusa == "BejelentettSzamonkeresek").ErtesitesekSzama,
|
||||
Hazifeladatok = napiErtesitesOsszefoglalo.First(e => e.ErtesitesTipusa == "HaziFeladatok").ErtesitesekSzama,
|
||||
Uzenetek = napiErtesitesOsszefoglalo.First(e => e.ErtesitesTipusa == "Uzenetek").ErtesitesekSzama,
|
||||
Orarendvaltozasok = GetOrarendValtozasok(dcp)
|
||||
};
|
||||
}
|
||||
|
||||
private static int GetOrarendValtozasok(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var orarendvaltozasokSzama = 0;
|
||||
var orarendValtozasCache = KretaServer.KretaServer.Instance.CacheManager.AquireCacheMobile<OrarendValtozasCache>();
|
||||
var cacheEnabledAndNotNull = FeatureContext.Instance.IsEnabled(Constants.FeatureName.MobileEllenorzoApiCache, dcp.IntezmenyAzonosito) && orarendValtozasCache != null;
|
||||
if (cacheEnabledAndNotNull)
|
||||
{
|
||||
var orarendValtozasok = orarendValtozasCache.GetOrarendValtozasok(dcp.IntezmenyAzonosito);
|
||||
if (orarendValtozasok.Any())
|
||||
{
|
||||
orarendvaltozasokSzama = orarendValtozasok.Where(e => e.IntezmenyAzonosito == dcp.IntezmenyAzonosito && e.UserId == dcp.TanuloId).Count();
|
||||
}
|
||||
}
|
||||
|
||||
return orarendvaltozasokSzama;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,126 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.BL.VN.Intezmeny.Rendszermodul;
|
||||
using Kreta.Ellenorzo.Dao.VN.Felhasznalo.Gondviselo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Gondviselo;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Felhasznalo.Gondviselo
|
||||
{
|
||||
internal static class GondviseloSubqueries
|
||||
{
|
||||
internal static HashSet<GondviseloResponse> ListGondviseloForTanulo(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var response = new HashSet<GondviseloResponse>(new GondviseloResponse());
|
||||
|
||||
foreach (var gondviselo in dcp.DalHandler.Tanulo().GetGondviseloAlapertelmezettAdatok(dcp.TanuloId, dcp.TanevId).ToDaoList<GondviseloResponseDao>())
|
||||
{
|
||||
if (dcp.JogosultsagLista.Contains(FelhasznaloSzerepkor.Tanulo) || (dcp.UserIdpUniqueId == gondviselo.IdpUniqueId))
|
||||
{
|
||||
var responseItem = new GondviseloResponse
|
||||
{
|
||||
Uid = new GondviseloUid(gondviselo.Id),
|
||||
IdpUniqueId = gondviselo.IdpUniqueId,
|
||||
Nev = gondviselo.Nev,
|
||||
EmailCim = !string.IsNullOrWhiteSpace(gondviselo.EmailCim) ? gondviselo.EmailCim : null,
|
||||
Telefonszam = !string.IsNullOrWhiteSpace(gondviselo.Telefonszam) ? gondviselo.Telefonszam : null,
|
||||
IsTorvenyesKepviselo = gondviselo.IsTorvenyesKepviselo
|
||||
};
|
||||
|
||||
if (!response.Add(responseItem))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
internal static GondviseloAdatokResponse GetGondviseloAdatlap(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var gondviselo = dcp.DalHandler.Gondviselo().Get(dcp.GondviseloId.Value) ?? throw new BlException(BlExceptionType.NemLetezoEntitas);
|
||||
|
||||
return gondviselo.Torolt
|
||||
? throw new BlException(BlExceptionType.NemLetezoEntitas)
|
||||
: new GondviseloAdatokResponse
|
||||
{
|
||||
Elotag = gondviselo.Elotag,
|
||||
Vezeteknev = gondviselo.Vezeteknev,
|
||||
Utonev = gondviselo.Utonev,
|
||||
SzuletesiVezeteknev = gondviselo.SzuletesiVezeteknev,
|
||||
SzuletesiUtonev = gondviselo.SzuletesiUtonev,
|
||||
AnyjaVezeteknev = gondviselo.AnyjaVezeteknev,
|
||||
AnyjaUtonev = gondviselo.AnyjaUtonev,
|
||||
SzuletesiHely = gondviselo.SzuletesiHely,
|
||||
SzuletesiDatum = gondviselo.SzuletesiDatum
|
||||
};
|
||||
}
|
||||
|
||||
internal static void SaveGondviseloEszkozIgenyles(DefaultConnectionParameters dcp, GondviseloEszkozIgenylesRequest request)
|
||||
{
|
||||
if (RendszermodulSubqueries.ListRendszermodul(dcp).First(r => r.Tipus == Enums.VN.RendszermodulTipus.FeltarGondviselo).IsAktiv && FelhasznaloSubqueries.IsGondviseloTorvenyesKepviselo(dcp))
|
||||
{
|
||||
var feltarGondviseloHelper = new FeltarGondviseloHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler));
|
||||
|
||||
if (feltarGondviseloHelper.IsEszkozIgenyelheto(dcp.TanuloId))
|
||||
{
|
||||
UpdateGondviseloAdatlapData(dcp, request);
|
||||
feltarGondviseloHelper.EszkozIgenyles(dcp.TanuloId, dcp.GondviseloId.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BlException(AdminisztracioResource.ATanulonakMarVanBenyujtottRegisztracioja, HttpStatusCode.Forbidden);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
}
|
||||
internal static void UpdateGondviseloAdatlap(DefaultConnectionParameters dcp, GondviseloBaseAdatlapRequest request)
|
||||
{
|
||||
var intezmenyConfigHelper = new IntezmenyConfigHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId));
|
||||
bool gondviseloSzemelyesAdatokSzerkeszteseEnabled = intezmenyConfigHelper.GetIntezmenyConfig<bool>(IntezmenyConfigModulEnum.FeltarGondviselo, IntezmenyConfigTipusEnum.IsEnabled);
|
||||
if (gondviseloSzemelyesAdatokSzerkeszteseEnabled)
|
||||
{
|
||||
UpdateGondviseloAdatlapData(dcp, request);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
}
|
||||
|
||||
private static void UpdateGondviseloAdatlapData(DefaultConnectionParameters dcp, GondviseloBaseAdatlapRequest request)
|
||||
{
|
||||
new GondviseloHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler))
|
||||
.SaveGondviselo4TAdatok(dcp.GondviseloId.Value,
|
||||
new Felhasznalo4TAdatokCo
|
||||
{
|
||||
Elotag = request.Elotag,
|
||||
Vezeteknev = request.Vezeteknev,
|
||||
Utonev = request.Utonev,
|
||||
SzuletesiVezeteknev = request.SzuletesiVezeteknev,
|
||||
SzuletesiUtonev = request.SzuletesiUtonev,
|
||||
SzuletesiHely = request.SzuletesiHely,
|
||||
SzuletesiDatum = request.SzuletesiDatum,
|
||||
AnyjaVezeteknev = request.AnyjaVezeteknev,
|
||||
AnyjaUtonev = request.AnyjaUtonev
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Caching;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.FeatureToggle;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.OsztalyCsoport.Osztaly;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport.Osztaly;
|
||||
using static Kreta.Ellenorzo.BL.VN.Logic.TanuloLogic;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Felhasznalo.Tanulo
|
||||
{
|
||||
internal static class TanuloSubqueries
|
||||
{
|
||||
private static TanuloAdatlapCache TanuloAdatlapCache => KretaServer.KretaServer.Instance.CacheManager.AquireCacheMobile<TanuloAdatlapCache>();
|
||||
|
||||
internal static TanuloAdatResponse GetTanuloAdat(DefaultConnectionParameters dcp)
|
||||
{
|
||||
return FeatureContext.Instance.IsEnabled(featureName: Constants.FeatureName.MobileEllenorzoApiCache, dcp.IntezmenyAzonosito) && TanuloAdatlapCache != null
|
||||
? TanuloAdatlapCache.GetOrAddTanuloAdatlap(dcp.TanuloId, dcp.IntezmenyAzonosito, () => TanuloAdat(dcp))
|
||||
: TanuloAdat(dcp);
|
||||
}
|
||||
|
||||
private static TanuloAdatResponse TanuloAdat(DefaultConnectionParameters dcp)
|
||||
{
|
||||
DataSet tanuloAdatokDataSet = dcp.DalHandler.Tanulo().GetTanuloAdatok(dcp.StudentIdpUniqueId);
|
||||
|
||||
return tanuloAdatokDataSet.Tables[0].Rows.Count != 0
|
||||
? tanuloAdatokDataSet.Tables[0].Rows[0].Field<int>("TanuloId") == dcp.TanuloId
|
||||
? tanuloAdatokDataSet.Tables[0].Rows.Cast<DataRow>().Select(tanuloAdatDataRow =>
|
||||
new TanuloAdatResponse
|
||||
{
|
||||
Nev = tanuloAdatDataRow.Field<string>("NyomtatasiNev"),
|
||||
SzuletesiNev = tanuloAdatDataRow.Field<string>("SzuletesiNev"),
|
||||
SzuletesiDatum = tanuloAdatDataRow.Field<DateTime>("SzuletesiDatum"),
|
||||
SzuletesiHely = tanuloAdatDataRow.Field<string>("SzuletesiHely"),
|
||||
Telefonszam = tanuloAdatDataRow.Field<string>("AlapertelmezettTelefon"),
|
||||
EmailCim = tanuloAdatDataRow.Field<string>("AlapertelmezettEmail"),
|
||||
Cimek = tanuloAdatokDataSet.Tables[1].Rows.Cast<DataRow>().Select(tanuloCimDataRow =>
|
||||
$"{tanuloCimDataRow.Field<string>("Varos")} ({tanuloCimDataRow.Field<string>("Iranyitoszam")}), {tanuloCimDataRow.Field<string>("Kozterulet")} {tanuloCimDataRow.Field<string>("KozteruletJellegeNev")} {tanuloCimDataRow.Field<string>("HazSzam")}{IsNullOrValue(tanuloCimDataRow.Field<string>("Epulet"))}{IsNullOrValue(tanuloCimDataRow.Field<string>("LepcsoHaz"))}{IsNullOrValue(tanuloCimDataRow.Field<string>("Emelet"))}{IsNullOrValue(tanuloCimDataRow.Field<string>("Ajto"))}"
|
||||
).ToList(),
|
||||
AnyjaNeve = tanuloAdatDataRow.Field<string>("AnyjaNeve"),
|
||||
IdpUniqueId = tanuloAdatDataRow.Field<Guid>("IdpEgyediAzonosito"),
|
||||
Bankszamla = new BankszamlaResponse
|
||||
{
|
||||
BankszamlaSzam = TanuloHelper.ConvertSzamlaszam(tanuloAdatDataRow.Field<string>("BankszamlaSzam")),
|
||||
BankszamlaTulajdonosTipusId = tanuloAdatDataRow.Field<int?>("BankszamlaTulajdonosTipusId"),
|
||||
BankszamlaTulajdonosNeve = tanuloAdatDataRow.Field<string>("BankszamlaTulajdonosNeve")
|
||||
},
|
||||
IsEszkozKiosztva = SDAConvert.ToBooleanFromTF(tanuloAdatDataRow["IsEszkozKiosztva"])
|
||||
}).Single()
|
||||
: throw new BlException(BlExceptionType.IntezmenyMarTanevetValtott)
|
||||
: throw new BlException(BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
|
||||
internal static List<int> ListOsztalyokAktivTanuloIds(DefaultConnectionParameters dcp, OsztalyTanuloiListRequest request)
|
||||
{
|
||||
return dcp.DalHandler.TanuloCsoport().OsztalyTanuloi(dcp.TanevId, request.OsztalyIds).ToDaoList<OsztalyTanuloResponseDao>().Select(t => t.Id).ToList();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Feljegyzes;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Feljegyzes
|
||||
{
|
||||
public class FeljegyzesFacade : EllenorzoFacade
|
||||
{
|
||||
public FeljegyzesFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HashSet<FeljegyzesListResponse> ListFeljegyzes(FeljegyzesListRequest request)
|
||||
=> RunSubquery(() => FeljegyzesSubqueries.ListFeljegyzes(DefaultConnectionParameters, request));
|
||||
|
||||
public FeljegyzesListResponse GetFeljegyzes(string uid)
|
||||
=> ListFeljegyzes(new FeljegyzesListRequest(uid)
|
||||
{
|
||||
IsCallerGetOnlyOneItem = true
|
||||
}).First();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Logic;
|
||||
using Kreta.BusinessLogic.Logic.Feljegyzes;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.Feljegyzes;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Feljegyzes;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Feljegyzes
|
||||
{
|
||||
internal static class FeljegyzesSubqueries
|
||||
{
|
||||
internal static HashSet<FeljegyzesListResponse> ListFeljegyzes(DefaultConnectionParameters dcp, FeljegyzesListRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
var response = new HashSet<FeljegyzesListResponse>(new FeljegyzesListResponse());
|
||||
var tanuloFeljegyzesei = dcp.DalHandler.Feljegyzes().GetTanuloFeljegyzesei(dcp.TanuloId, request.DatumTol, request.DatumIg, request.Uid?.Id).Tables[0];
|
||||
|
||||
new FeljegyzesLogic(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).RemoveHiddenRowsFromFeljegyzesDataSet(tanuloFeljegyzesei, "Tipus", dcp.TanuloId);
|
||||
|
||||
var feljegyzesekDv = tanuloFeljegyzesei.DefaultView;
|
||||
feljegyzesekDv.Sort = "Datum DESC";
|
||||
tanuloFeljegyzesei = feljegyzesekDv.ToTable();
|
||||
|
||||
foreach (var item in tanuloFeljegyzesei.ToDaoList<FeljegyzesResponseDao>())
|
||||
{
|
||||
var feljegyzes = new FeljegyzesListResponse
|
||||
{
|
||||
Uid = new FeljegyzesUid(item.Id),
|
||||
Tipus = new Adatszotar<EsemenyTipusEnum>(item.TipusId, item.TipusNev),
|
||||
Cim = item.Cim,
|
||||
Tartalom = RichTextLogic.RemoveHtmlForMobile(item.Tartalom),
|
||||
Tanar = new TanarSimplifiedResponse { Nev = item.TanarNev },
|
||||
Datum = item.Datum,
|
||||
KeszitesDatuma = item.KeszitesDatuma,
|
||||
OsztalyCsoport = item.OsztalyCsoportId.HasValue ? new OsztalyCsoportSimplifiedResponse { Uid = new OsztalyCsoportUid(item.OsztalyCsoportId.Value) } : null
|
||||
};
|
||||
|
||||
if (!response.Add(feljegyzes))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
|
||||
return RequestFilterLogic.CreateUidFilteredListResponse<HashSet<FeljegyzesListResponse>, FeljegyzesListRequest, FeljegyzesUid>(response, request);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Fogadoora;
|
||||
using Kreta.Ellenorzo.Domain.VN.Fogadoora.Idopont;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Fogadoora
|
||||
{
|
||||
public class FogadooraFacade : EllenorzoFacade
|
||||
{
|
||||
public FogadooraFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HashSet<FogadooraListResponse> ListFogadoora(FogadooraListRequest request)
|
||||
=> RunSubquery(() => FogadooraSubqueries.ListFogadoora(DefaultConnectionParameters, request));
|
||||
|
||||
public FogadooraResponse GetFogadoora(string uid)
|
||||
=> RunSubquery(() => FogadooraSubqueries.GetFogadoora(DefaultConnectionParameters, uid));
|
||||
|
||||
public void DeleteFogadooraIdopontJelentkezes(FogadooraIdopontJelentkezesDeleteRequest request) => RunSubquery(()
|
||||
=> FogadooraSubqueries.DeleteSajatFogadooraIdopontJelentkezes(DefaultConnectionParameters, request));
|
||||
|
||||
public void CreateFogadooraIdopontJelentkezes(FogadooraJelentkezesCreateRequest request)
|
||||
=> RunSubquery(() => FogadooraSubqueries.CreateFogadooraIdopontJelentkezes(DefaultConnectionParameters, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,175 @@
|
|||
using System;
|
||||
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.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.Fogadoora;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Fogadoora;
|
||||
using Kreta.Ellenorzo.Domain.VN.Fogadoora.Idopont;
|
||||
using Kreta.Ellenorzo.Domain.VN.Terem;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Fogadoora
|
||||
{
|
||||
internal static class FogadooraSubqueries
|
||||
{
|
||||
internal static HashSet<FogadooraListResponse> ListFogadoora(DefaultConnectionParameters dcp, FogadooraListRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
var fogadoorakAndFogadooraIdopontokDaoList = dcp.DalHandler.Fogadoora().GetTanarFogadoorakByGondviseloId(dcp.GondviseloId.Value, request.Uid?.Id, request.DatumTol).ToDaoList<FogadooraResponseDao>();
|
||||
|
||||
if (!fogadoorakAndFogadooraIdopontokDaoList.Any())
|
||||
{
|
||||
return new HashSet<FogadooraListResponse>();
|
||||
}
|
||||
|
||||
var fogadooraIdopontokByTanarId = fogadoorakAndFogadooraIdopontokDaoList.GroupBy(i => (i.TanarId, i.TanarNev))
|
||||
.ToDictionary(i => i.Key, i => i.GroupBy(l => l.FogadooraId));
|
||||
|
||||
return GetFogadooraListResponse(fogadooraIdopontokByTanarId).ToHashSet();
|
||||
}
|
||||
|
||||
private static IEnumerable<FogadooraListResponse> GetFogadooraListResponse(Dictionary<(int TanarId, string TanarNev), IEnumerable<IGrouping<int, FogadooraResponseDao>>> fogadooraIdopontokByTanarId)
|
||||
{
|
||||
foreach ((var tanarId, var tanarNev) in fogadooraIdopontokByTanarId.Keys)
|
||||
{
|
||||
var tanarFogadoorai = new FogadooraListResponse()
|
||||
{
|
||||
Tanar = new TanarSimplifiedResponse
|
||||
{
|
||||
Uid = new TanarUid(tanarId),
|
||||
Nev = tanarNev
|
||||
},
|
||||
Fogadoorak = fogadooraIdopontokByTanarId[(tanarId, tanarNev)].Select(fogadoora => CreateFogadooraResponse(fogadoora, fogadoora.First())).ToList()
|
||||
};
|
||||
|
||||
yield return tanarFogadoorai;
|
||||
}
|
||||
}
|
||||
|
||||
private static FogadooraResponse CreateFogadooraResponse(IGrouping<int, FogadooraResponseDao> fogadoora, FogadooraResponseDao fogadooraValueFirst)
|
||||
{
|
||||
return new FogadooraResponse
|
||||
{
|
||||
Uid = new FogadooraUid(fogadoora.Key),
|
||||
Terem = new TeremSimplifiedResponse
|
||||
{
|
||||
Uid = new TeremUid(fogadooraValueFirst.TeremId),
|
||||
Nev = fogadooraValueFirst.TeremNev
|
||||
},
|
||||
IsJelentkezesFeatureEnabled = fogadooraValueFirst.TipusId != (int)FogadooraTipusEnum.NemJelentkezheto,
|
||||
KezdoIdopont = fogadooraValueFirst.FogadooraKezdete,
|
||||
VegIdopont = fogadooraValueFirst.FogadooraVege,
|
||||
JelentkezesHatarido = fogadooraValueFirst.JelentkezesHatarido,
|
||||
Idopontok = fogadooraValueFirst.FogadooraIdopontId.HasValue ? GetFogadooraIdopontok(fogadoora).ToList() : new List<FogadooraIdopontResponse>()
|
||||
};
|
||||
}
|
||||
|
||||
private static IEnumerable<FogadooraIdopontResponse> GetFogadooraIdopontok(IGrouping<int, FogadooraResponseDao> fogadoora)
|
||||
{
|
||||
return fogadoora.Where(fogadooraIdopont => fogadooraIdopont.IsSzabadIdopont || (!fogadooraIdopont.IsSzabadIdopont && fogadooraIdopont.IsJelentkeztem))
|
||||
.Select(idopont => new FogadooraIdopontResponse
|
||||
{
|
||||
Uid = new FogadooraIdopontUid(idopont.FogadooraIdopontId.Value),
|
||||
FogadooraUid = new FogadooraUid(idopont.FogadooraId),
|
||||
FogadooraKezdete = idopont.FogadooraKezdete,
|
||||
KezdoIdopont = idopont.FogadooraIdopontKezdete.Value,
|
||||
VegIdopont = idopont.FogadooraIdopontVege.Value,
|
||||
JelentkezesHatarido = idopont.JelentkezesHatarido,
|
||||
IsJelentkeztem = idopont.IsJelentkeztem
|
||||
});
|
||||
}
|
||||
|
||||
internal static FogadooraResponse GetFogadoora(DefaultConnectionParameters dcp, string uid)
|
||||
{
|
||||
return ListFogadoora(dcp, new FogadooraListRequest() { Uid = new FogadooraUid(uid) }).SingleOrDefault()?.Fogadoorak?.SingleOrDefault() ?? throw new BlException(BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
|
||||
internal static void DeleteSajatFogadooraIdopontJelentkezes(DefaultConnectionParameters dcp, FogadooraIdopontJelentkezesDeleteRequest request)
|
||||
{
|
||||
var jogosultElemek = ListHozzaferhetoFogadooraIdopont(dcp);
|
||||
if (jogosultElemek.TryGetValue(new FogadooraIdopontResponse { Uid = new FogadooraIdopontUid(request.FogadooraIdopontUid.Id) }, out var talaltElem))
|
||||
{
|
||||
if (!talaltElem.IsJelentkeztem)
|
||||
{
|
||||
throw new BlException(BlExceptionType.AMuveletNemVegezhetoElTobbszor);
|
||||
}
|
||||
if (DateTime.Now > talaltElem.FogadooraKezdete)
|
||||
{
|
||||
throw new BlException(ErrorResource.FogadooraJelentkezestMarNemLehetLemondani, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
|
||||
var isJelentkezesFeatureEnabled = dcp.DalHandler.Fogadoora().IsFogadooraJelentkezesFeatureEnabled(request.FogadooraIdopontUid.Id);
|
||||
if (!isJelentkezesFeatureEnabled)
|
||||
{
|
||||
throw new BlException(BlExceptionType.FunkcioKikapcsolva);
|
||||
}
|
||||
|
||||
new FogadooraHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler))
|
||||
.FogadooraGondviseloJelentkezesLemondas(request.FogadooraIdopontUid.Id, dcp.GondviseloId.Value);
|
||||
}
|
||||
|
||||
internal static void CreateFogadooraIdopontJelentkezes(DefaultConnectionParameters dcp, FogadooraJelentkezesCreateRequest request)
|
||||
{
|
||||
var jogosultElemek = ListHozzaferhetoFogadooraIdopont(dcp);
|
||||
if (jogosultElemek.TryGetValue(new FogadooraIdopontResponse { Uid = new FogadooraIdopontUid(request.FogadooraIdopontUid.Id) }, out var talaltElem))
|
||||
{
|
||||
if (talaltElem.IsJelentkeztem)
|
||||
{
|
||||
throw new BlException(BlExceptionType.AMuveletNemVegezhetoElTobbszor);
|
||||
}
|
||||
|
||||
if (DateTime.Now > (talaltElem.JelentkezesHatarido ?? talaltElem.FogadooraKezdete))
|
||||
{
|
||||
throw new BlException(ErrorResource.FogadooraJelentkezesHataridejeLejart, BlExceptionType.ModelValidacio);
|
||||
}
|
||||
|
||||
if (jogosultElemek.Any(x => x.FogadooraUid.Id == talaltElem.FogadooraUid.Id && x.IsJelentkeztem))
|
||||
{
|
||||
throw new BlException(BlExceptionType.AMuveletNemVegezhetoElTobbszor);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
|
||||
var isJelentkezesFeatureEnabled = dcp.DalHandler.Fogadoora().IsFogadooraJelentkezesFeatureEnabled(request.FogadooraIdopontUid.Id);
|
||||
if (!isJelentkezesFeatureEnabled)
|
||||
{
|
||||
throw new BlException(BlExceptionType.FunkcioKikapcsolva);
|
||||
}
|
||||
|
||||
new FogadooraHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler))
|
||||
.FogadooraGondviseloJelentkezes(request.FogadooraIdopontUid.Id, dcp.GondviseloId.Value);
|
||||
}
|
||||
|
||||
internal static HashSet<FogadooraIdopontResponse> ListHozzaferhetoFogadooraIdopont(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var response = new HashSet<FogadooraIdopontResponse>();
|
||||
if (FelhasznaloLogic.IsJogosult(false, dcp.JogosultsagLista, FelhasznaloSzerepkor.Gondviselo))
|
||||
{
|
||||
response = ListFogadoora(dcp, new FogadooraListRequest())
|
||||
.SelectMany(x => x.Fogadoorak).SelectMany(f => f.Idopontok).ToHashSet(new FogadooraIdopontResponse());
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.HaziFeladat;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.HaziFeladat
|
||||
{
|
||||
public class HaziFeladatFacade : EllenorzoFacade
|
||||
{
|
||||
public HaziFeladatFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HaziFeladatDetailResponse GetHaziFeladat(string uid) => RunSubquery(() => HaziFeladatSubqueries.GetHaziFeladat(DefaultConnectionParameters, new HaziFeladatGetRequest(uid)));
|
||||
|
||||
public HashSet<HaziFeladatListResponse> ListHaziFeladat(HaziFeladatListRequest request) => RunSubquery(() => HaziFeladatSubqueries.ListHaziFeladat(DefaultConnectionParameters, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Logic;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.BL.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.HaziFeladat;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.HaziFeladat;
|
||||
using Kreta.Ellenorzo.Domain.VN.HaziFeladat.Csatolmany;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.HaziFeladat
|
||||
{
|
||||
internal static class HaziFeladatSubqueries
|
||||
{
|
||||
internal static HaziFeladatDetailResponse GetHaziFeladat(DefaultConnectionParameters dcp, HaziFeladatGetRequest request)
|
||||
{
|
||||
var haziFeladat = new DktFeladatHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.TanuloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).GetTanarHaziFeladatDetail(request.Uid.Id);
|
||||
|
||||
//felesleges html tagek kitörlése kódból- KRETA2-4145
|
||||
//TODO: felesleges lesz ha ha már db-ben se lesznek már ilyenek benne
|
||||
haziFeladat.Szoveg = RichTextLogic.RemoveSpecificHtmlTags(haziFeladat.Szoveg, RichTextLogic.RemovableHtmlTags);
|
||||
|
||||
var targyKategoriaTipusById = AdatszotarSubqueries.GetTipusByIdDictionary((int)GeneratedAdatszotarTipusEnum.TargyKategoriaTipus, dcp.TanevId);
|
||||
|
||||
var response = new HaziFeladatDetailResponse
|
||||
{
|
||||
Uid = new HaziFeladatUid(haziFeladat.Id.Value),
|
||||
OsztalyCsoport = new OsztalyCsoportSimplifiedResponse { Uid = new OsztalyCsoportUid(haziFeladat.OsztalyCsoportId) },
|
||||
Tantargy = new TantargyResponse(haziFeladat.TantargyId, haziFeladat.Tantargy, new Adatszotar<TargyKategoriaTipusEnum>(haziFeladat.TantargyKategoria, targyKategoriaTipusById[haziFeladat.TantargyKategoria].Name)),
|
||||
RogzitoTanar = new TanarSimplifiedResponse { Nev = haziFeladat.Rogzito },
|
||||
IsTanarRogzitette = haziFeladat.IsTanarRogzitette,
|
||||
IsBeadhato = SDAConvert.ToBoolean(haziFeladat.HfBeadandoTipusId),
|
||||
Szoveg = string.IsNullOrWhiteSpace(haziFeladat.Szoveg) ? null : haziFeladat.Szoveg,
|
||||
FeladasDatuma = haziFeladat.FeladasDatuma,
|
||||
HataridoDatuma = haziFeladat.Hatarido,
|
||||
RogzitesIdopontja = haziFeladat.RogzitesIdopontja,
|
||||
Csatolmanyok = haziFeladat.Csatolmanyok.Select(x => new CsatolmanySimplifiedResponse { Uid = new HaziFeladatCsatolmanyUid(x.Key, CsatolmanyTipus.Csatolmany), Nev = x.Value }).ToList(),
|
||||
IsCsatolasEngedelyezes = SDAConvert.ToBoolean(haziFeladat.CsatolasEngedelyezesTipusId)
|
||||
};
|
||||
|
||||
return RequestFilterLogic.CreateUidFilteredResponse<HaziFeladatDetailResponse, HaziFeladatGetRequest, HaziFeladatUid>(response, request);
|
||||
}
|
||||
|
||||
internal static HashSet<HaziFeladatListResponse> ListHaziFeladat(DefaultConnectionParameters dcp, HaziFeladatListRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
var response = new HashSet<HaziFeladatListResponse>(new HaziFeladatListResponse());
|
||||
var helper = new DktFeladatHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.TanuloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler));
|
||||
|
||||
var tanuloHaziFeladatai = helper.GetTanuloHaziFeladat(
|
||||
new TanuloHaziFeladatSearchCO
|
||||
{
|
||||
HaziFeladatHataridoKezdoDatum = request.DatumTol,
|
||||
HaziFeladatHatairdo = request.DatumIg
|
||||
},
|
||||
null,
|
||||
true,
|
||||
true).ToDaoList<HaziFeladatResponseDao>();
|
||||
|
||||
var targyKategoriaTipusById = AdatszotarSubqueries.GetTipusByIdDictionary((int)GeneratedAdatszotarTipusEnum.TargyKategoriaTipus, dcp.TanevId);
|
||||
|
||||
foreach (var item in tanuloHaziFeladatai)
|
||||
{
|
||||
//felesleges html tagek kitörlése kódból- KRETA2-4145
|
||||
//TODO: felesleges lesz ha ha már db-ben se lesznek már ilyenek benne
|
||||
item.Szoveg = RichTextLogic.RemoveSpecificHtmlTags(item.Szoveg, RichTextLogic.RemovableHtmlTags);
|
||||
|
||||
_ = response.Add(new HaziFeladatListResponse
|
||||
{
|
||||
Uid = new HaziFeladatUid(item.Id),
|
||||
Tantargy = new TantargyResponse(item.TantargyId, item.TantargyNev, new Adatszotar<TargyKategoriaTipusEnum>(item.TargyKategoria, targyKategoriaTipusById[item.TargyKategoria].Name)),
|
||||
RogzitoTanar = new TanarSimplifiedResponse { Nev = string.IsNullOrWhiteSpace(item.RogzitoTanarNev) ? string.Empty : item.RogzitoTanarNev }, //KRETA2-5671 miatt fix
|
||||
IsTanarRogzitette = item.IsTanarRogzitette,
|
||||
IsBeadhato = SDAConvert.ToBoolean(item.HfBeadandoTipusId),
|
||||
Szoveg = string.IsNullOrWhiteSpace(item.Szoveg) ? null : item.Szoveg,
|
||||
FeladasDatuma = item.FeladasDatuma ?? item.RogzitesIdopontja,
|
||||
HataridoDatuma = item.HataridoDatuma,
|
||||
RogzitesIdopontja = item.RogzitesIdopontja,
|
||||
OsztalyCsoport = new OsztalyCsoportSimplifiedResponse
|
||||
{
|
||||
Uid = new OsztalyCsoportUid(item.OsztalyCsoportId)
|
||||
},
|
||||
IsCsatolasEngedelyezes = SDAConvert.ToBoolean(item.HaziFeladatCsatolasEngedelyezesTipusId)
|
||||
});
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Helpers
|
||||
{
|
||||
public class LambdaComparer<T> : IEqualityComparer<T>
|
||||
{
|
||||
private readonly Func<T, T, bool> _lambdaComparer;
|
||||
private readonly Func<T, int> _lambdaHash;
|
||||
|
||||
public LambdaComparer(Func<T, T, bool> lambdaComparer) :
|
||||
this(lambdaComparer, o => 0)
|
||||
{
|
||||
}
|
||||
|
||||
public LambdaComparer(Func<T, T, bool> lambdaComparer, Func<T, int> lambdaHash)
|
||||
{
|
||||
_lambdaComparer = lambdaComparer ?? throw new ArgumentNullException(nameof(lambdaComparer));
|
||||
_lambdaHash = lambdaHash ?? throw new ArgumentNullException(nameof(lambdaHash));
|
||||
}
|
||||
|
||||
public bool Equals(T x, T y) => _lambdaComparer(x, y);
|
||||
|
||||
public int GetHashCode(T obj) => _lambdaHash(obj);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny.Hetirend;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Intezmeny.Hetirend
|
||||
{
|
||||
public class HetirendFacade : EllenorzoFacade
|
||||
{
|
||||
public HetirendFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HashSet<HetirendListResponse> ListHetirend(HetirendListRequest request)
|
||||
=> RunSubquery(() => HetirendSubqueries.ListHetirend(DefaultConnectionParameters, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.Intezmeny.Hetirend;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny.Hetirend;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Intezmeny.Hetirend
|
||||
{
|
||||
internal static class HetirendSubqueries
|
||||
{
|
||||
internal static HashSet<HetirendListResponse> ListHetirend(DefaultConnectionParameters dcp, HetirendListRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
var response = new HashSet<HetirendListResponse>(new HetirendListResponse());
|
||||
|
||||
var naptariHetAndOrarendOverlapFilter = new NaptariHetAndOrarendOverlapFilter
|
||||
{
|
||||
OrarendElemKezdoNapDatuma = request.OrarendElemKezdoNapDatuma,
|
||||
OrarendElemVegNapDatuma = request.OrarendElemVegNapDatuma
|
||||
};
|
||||
|
||||
var hetirendElemek = dcp.DalHandler.NaptariHet().GetNaptariHetList(dcp.TanevId, naptariHetAndOrarendOverlapFilter).Tables[0];
|
||||
|
||||
foreach (var hetirendElem in hetirendElemek.ToDaoList<OrarendiResponseDao>())
|
||||
{
|
||||
if (!response.Add(new HetirendListResponse
|
||||
{
|
||||
Uid = new HetirendUid(hetirendElem.Id),
|
||||
HetSorszama = hetirendElem.HetSorszama,
|
||||
KezdoNapDatuma = hetirendElem.KezdoNapDatuma,
|
||||
VegNapDatuma = hetirendElem.VegNapDatuma,
|
||||
Tipus = new Adatszotar<HetiRendTipusEnum>(hetirendElem.HetirendId ?? (int)HetiRendTipusEnum.MindegyikHet, hetirendElem.HetirendNev)
|
||||
}))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.BL.VN.Intezmeny.Rendszermodul;
|
||||
using Kreta.Ellenorzo.BL.VN.Intezmeny.TestreszabasBeallitasok;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Intezmeny
|
||||
{
|
||||
public class IntezmenyFacade : EllenorzoFacade
|
||||
{
|
||||
public IntezmenyFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public IntezmenyResponse GetIntezmeny() => RunSubquery(() =>
|
||||
new IntezmenyResponse
|
||||
{
|
||||
IntezmenyAdatok = IntezmenySubqueries.GetSajatIntezmenyAdatok(DefaultConnectionParameters),
|
||||
Rendszermodulok = RendszermodulSubqueries.ListRendszermodul(DefaultConnectionParameters),
|
||||
TestreszabasBeallitasok = TestreszabasBeallitasokSubqueries.GetTestreszabasBeallitasok(DefaultConnectionParameters)
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using System.Runtime.Caching;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.Dao.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Intezmeny
|
||||
{
|
||||
internal static class IntezmenySubqueries
|
||||
{
|
||||
internal static IntezmenyAdatok GetSajatIntezmenyAdatok(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var intezmenyAdatok = new IntezmenyHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).GetIntezmenyiAdatok();
|
||||
var response = new IntezmenyAdatok
|
||||
{
|
||||
Uid = new IntezmenyUid(intezmenyAdatok.IntezmenyId),
|
||||
Azonosito = intezmenyAdatok.IntezmenyAzonosito,
|
||||
TeljesNev = intezmenyAdatok.Nev,
|
||||
RovidNev = intezmenyAdatok.RovidNev
|
||||
};
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
internal static IntezmenyAdatokDao GetIntezmenyAdatokFromCache(string intezmenyAzonosito)
|
||||
{
|
||||
var cache = MemoryCache.Default;
|
||||
var cacheKey = $"{intezmenyAzonosito}_mobileIntezmenyAdatok";
|
||||
if (!(cache[cacheKey] is IntezmenyAdatokDao intezmenyAdatok))
|
||||
{
|
||||
intezmenyAdatok = new IntezmenyAdatokDao();
|
||||
|
||||
Dal.MobileConnection.Run(
|
||||
intezmenyAzonosito,
|
||||
null,
|
||||
h =>
|
||||
{
|
||||
intezmenyAdatok = h.IntezmenyDal().GetIntezmenyIdAktivTanevIdByAzonosito(intezmenyAzonosito).Tables[0].Rows[0].ToDao<IntezmenyAdatokDao>();
|
||||
});
|
||||
|
||||
var policy = new CacheItemPolicy
|
||||
{
|
||||
AbsoluteExpiration = new DateTimeOffset(DateTime.Now.AddMinutes(20))
|
||||
};
|
||||
|
||||
cache.Set(cacheKey, intezmenyAdatok, policy);
|
||||
}
|
||||
|
||||
return intezmenyAdatok;
|
||||
}
|
||||
|
||||
internal static void RemoveIntezemenyAdatokCache(string intezmenyAzonosito)
|
||||
{
|
||||
_ = MemoryCache.Default.Remove($"{intezmenyAzonosito}_mobileIntezmenyAdatok");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny.Rendszermodul;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.KretaServer.SystemSettings;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Intezmeny.Rendszermodul
|
||||
{
|
||||
internal static class RendszermodulSubqueries
|
||||
{
|
||||
internal static HashSet<RendszermodulListResponse> ListRendszermodul(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var helper = new IntezmenyConfigHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler));
|
||||
var isEugyintezesEnabled = helper.GetIntezmenyConfig<bool>(IntezmenyConfigModulEnum.Eugyintezes, IntezmenyConfigTipusEnum.IsEnabled);
|
||||
var isLepEnabled = SystemSettingsManager.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Lazar_Ervin_Program_kezelese, dcp.IntezmenyAzonosito, dcp.TanevId);
|
||||
var feltarAszfUrl = helper.GetIntezmenyConfig<string>(IntezmenyConfigModulEnum.FeltarASZFGondviselo, IntezmenyConfigTipusEnum.Url);
|
||||
var isFeltarGondviseloEnabled = IsFeltarGondviseloEnabled(dcp, helper);
|
||||
|
||||
var response = new HashSet<RendszermodulListResponse>(new RendszermodulListResponse())
|
||||
{
|
||||
new RendszermodulListResponse
|
||||
{
|
||||
Tipus = RendszermodulTipus.Eugyintezes,
|
||||
IsAktiv = isEugyintezesEnabled
|
||||
},
|
||||
new RendszermodulListResponse
|
||||
{
|
||||
Tipus = RendszermodulTipus.LEP,
|
||||
IsAktiv = isLepEnabled
|
||||
},
|
||||
new RendszermodulListResponse
|
||||
{
|
||||
Tipus = RendszermodulTipus.FeltarGondviselo,
|
||||
IsAktiv = isFeltarGondviseloEnabled
|
||||
},
|
||||
new RendszermodulListResponse
|
||||
{
|
||||
Tipus = RendszermodulTipus.FeltarAszf,
|
||||
IsAktiv = isFeltarGondviseloEnabled,
|
||||
Url = feltarAszfUrl //A FeltarGondviselobe kell athelyezni
|
||||
}
|
||||
};
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
private static bool IsFeltarGondviseloEnabled(DefaultConnectionParameters dcp, IntezmenyConfigHelper helper)
|
||||
{
|
||||
if (!helper.GetIntezmenyConfig<bool>(IntezmenyConfigModulEnum.FeltarGondviselo, IntezmenyConfigTipusEnum.IsEnabled))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return dcp.GondviseloId.HasValue
|
||||
? new GondviseloHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).IsGondviseloTanuloinakEvfolyamTipusaLetezik(dcp.GondviseloId.Value, Core.Constants.FeltarEvfolyamList)
|
||||
: new TanuloHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).IsTanuloFeltarEvfolyamos();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny.TanevRendje;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Intezmeny.TanevRendje
|
||||
{
|
||||
public class TanevRendjeFacade : EllenorzoFacade
|
||||
{
|
||||
public TanevRendjeFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HashSet<TanevRendjeListResponse> ListTanevRendje()
|
||||
=> RunSubquery(() => TanevRendjeSubqueries.ListTanevRendje(DefaultConnectionParameters));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.Intezmeny.TanevRendje;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny.TanevRendje;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
using Kreta.KretaServer.SystemSettings;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Intezmeny.TanevRendje
|
||||
{
|
||||
internal static class TanevRendjeSubqueries
|
||||
{
|
||||
internal static HashSet<TanevRendjeListResponse> ListTanevRendje(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var response = new HashSet<TanevRendjeListResponse>(new TanevRendjeListResponse());
|
||||
|
||||
var tanevRendElemek = dcp.DalHandler.TanevRendjeDal().ListTanevRendekOsztalyCsoportokkal(dcp.TanevId, null, null, dcp.TanuloId, null).ToDaoList<TanevRendjeResponseDao>();
|
||||
var kezdoIdopont = SystemSettingsManager.GetSystemSettingValue<TimeSpan>(RendszerBeallitasTipusEnum.Az_elektronikus_naplo_megjelenesenek_kezdoidopontja, dcp.IntezmenyAzonosito, dcp.TanevId);
|
||||
foreach (var tanevRendElem in tanevRendElemek)
|
||||
{
|
||||
var napTipusNeve = (tanevRendElem.IsMindenOsztalyraVonatkozik ? string.Empty : "* ")
|
||||
+ tanevRendElem.NapTipusNeve
|
||||
+ (tanevRendElem.IsOrarendiNap ? string.Empty : " (Nem órarendi nap)")
|
||||
+ (!string.IsNullOrWhiteSpace(tanevRendElem.HetNapjaNev) ? " (" + tanevRendElem.HetNapjaNev + ")" : string.Empty);
|
||||
var responseItem = new TanevRendjeListResponse
|
||||
{
|
||||
Datum = tanevRendElem.Datum.Add(kezdoIdopont).AddMinutes(-1),
|
||||
Naptipus = new Adatszotar<NapTipusEnum>(tanevRendElem.NapTipusId, napTipusNeve),
|
||||
ElteroOrarendSzerintiTanitasiNap = tanevRendElem.HetNapjaId.HasValue ? new Adatszotar<HetNapjaTipusEnum>(tanevRendElem.HetNapjaId.Value, tanevRendElem.HetNapjaNev) : null,
|
||||
OrarendiNapHetirendje = new Adatszotar<HetiRendTipusEnum>(tanevRendElem.HetirendId, tanevRendElem.HetirendNeve),
|
||||
OsztalyCsoport = tanevRendElem.OsztalyCsoportId.HasValue ? new OsztalyCsoportSimplifiedResponse { Uid = new OsztalyCsoportUid(tanevRendElem.OsztalyCsoportId.Value) } : null
|
||||
};
|
||||
|
||||
responseItem.Uid = new TanevRendjeUid(tanevRendElem.Id, responseItem.OsztalyCsoport?.Uid.Id);
|
||||
|
||||
if (!response.Add(responseItem))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Helpers.SystemSettings;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Intezmeny.TestreszabasBeallitasok;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Intezmeny.TestreszabasBeallitasok
|
||||
{
|
||||
internal static class TestreszabasBeallitasokSubqueries
|
||||
{
|
||||
internal static TestreszabasBeallitasokResponse GetTestreszabasBeallitasok(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var helper = new SystemSettingsHelper(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId));
|
||||
|
||||
return new TestreszabasBeallitasokResponse
|
||||
{
|
||||
IsDiakRogzithetHaziFeladatot = helper.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Diak_altali_hazifeladatok_rogzitese),
|
||||
IsTanorakTemajaMegtekinthetoEllenorzoben = helper.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Tanora_Tema_Az_Ellenorzoben),
|
||||
IsOsztalyAtlagMegjeleniteseEllenorzoben = helper.GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Osztalyatlag_megjelenitese_az_ellenorzo_feluleten),
|
||||
ErtekelesekMegjelenitesenekKesleltetesenekMerteke = helper.GetSystemSettingValue<int>(RendszerBeallitasTipusEnum.Ertekelesek_megjelenese_az_ellenorzo_modulban),
|
||||
KovetkezoTelepitesDatuma = new AdminHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).GetKovTelepitesDatum()
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Core.Configuratiaton.Interface;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Lep;
|
||||
using Kreta.Web.Logging.Abstractions;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Lep
|
||||
{
|
||||
public class LepFacade : EllenorzoFacade
|
||||
{
|
||||
private readonly ILepConfiguration LepConfiguration;
|
||||
private readonly ITraceLogger Logger;
|
||||
|
||||
public LepFacade(MobileUser mobileUser, ILepConfiguration lepConfiguration, ITraceLogger logger) : base(mobileUser)
|
||||
{
|
||||
LepConfiguration = lepConfiguration;
|
||||
Logger = logger;
|
||||
}
|
||||
|
||||
public LepFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public List<EloadasResponse> GetEloadasok()
|
||||
=> RunSubquery(() => LepSubqueries.GetEloadasok(DefaultConnectionParameters, LepConfiguration, Logger));
|
||||
|
||||
public void GondviseloEngedelyezes(GondviseloEngedelyezesRequest request)
|
||||
=> RunSubquery(() => LepSubqueries.GondviseloEngedelyezes(DefaultConnectionParameters, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.Client.LEP;
|
||||
using Kreta.Core.Configuratiaton.Interface;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.Lep;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Lep;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Web.Logging.Abstractions;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Lep
|
||||
{
|
||||
internal static class LepSubqueries
|
||||
{
|
||||
internal static List<EloadasResponse> GetEloadasok(DefaultConnectionParameters dcp, ILepConfiguration lepConfiguration, ITraceLogger logger)
|
||||
{
|
||||
var eloadasok = new List<EloadasResponse>();
|
||||
var kozpontiResults = new List<EloadasIdopontResponseModel>();
|
||||
|
||||
try
|
||||
{
|
||||
kozpontiResults = new LepClient(lepConfiguration.Url, lepConfiguration.ApiKey).GetEloadasok(dcp.IntezmenyAzonosito, Core.Constants.LepEnabledEvfolyam);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.Error(e.Message);
|
||||
return eloadasok;
|
||||
}
|
||||
|
||||
if (kozpontiResults?.Count > 0)
|
||||
{
|
||||
var tanuloEloadasDaoList = dcp.DalHandler.LepEloadasJegyzekDal().GetTanuloEloadasai(dcp.TanuloId).ToDaoList<TanuloEloadasResponseDao>();
|
||||
|
||||
var eloadasokGroupedResult = (from kozpontiResult in kozpontiResults
|
||||
join tanuloEloadas in tanuloEloadasDaoList on kozpontiResult.Id equals tanuloEloadas.EloadasId
|
||||
select new { kozpontiResult.Id, kozpontiResult.IranyitoSzam, kozpontiResult.Telepules, kozpontiResult.KozteruletNev, kozpontiResult.KozteruletJellegNev, kozpontiResult.Hazszam, kozpontiResult.Kezdete, kozpontiResult.Vege, kozpontiResult.SzervezetNev, kozpontiResult.Nev, kozpontiResult.Leiras, tanuloEloadas.GondviseloElfogadas, tanuloEloadas.Megjelent }).Distinct();
|
||||
|
||||
foreach (var item in eloadasokGroupedResult)
|
||||
{
|
||||
eloadasok.Add(new EloadasResponse()
|
||||
{
|
||||
Uid = new EloadasUid($"{item.Id}"),
|
||||
Helyszin = $"{item.IranyitoSzam} {item.Telepules} {item.KozteruletNev} {item.KozteruletJellegNev} {item.Hazszam}",
|
||||
Datum = item.Kezdete.Date,
|
||||
EloadasKezdete = item.Kezdete,
|
||||
EloadasVege = item.Vege,
|
||||
SzervezetNev = item.SzervezetNev,
|
||||
EloadasNev = item.Nev,
|
||||
GondviseloElfogadas = SDAConvert.ToNullableBooleanFromTF(item.GondviseloElfogadas),
|
||||
Megjelent = item.Megjelent
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return eloadasok;
|
||||
}
|
||||
|
||||
internal static void GondviseloEngedelyezes(DefaultConnectionParameters dcp, GondviseloEngedelyezesRequest request)
|
||||
{
|
||||
var result = dcp.DalHandler.LepEloadasJegyzekDal().SaveGondviseloEngedelyezes(dcp.IntezmenyId, dcp.TanevId, request.EloadasId, dcp.TanuloId, dcp.GondviseloId.Value, request.Dontes.HasValue ? SDAConvert.ToSDABoolean(request.Dontes.Value) : string.Empty);
|
||||
if (!result)
|
||||
{
|
||||
throw new BlException(BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,141 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Logic
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: Madách Ferenc, Kovács Kornél (DevKornél), Érsek Zalán Created On: 2019.11.
|
||||
/// </summary>
|
||||
internal class ApiSecurityLogic
|
||||
{
|
||||
private readonly ApiSecurity _apiSecurity;
|
||||
public int ApiSecurityVersion { get; private set; }
|
||||
public bool IsJogosult { get; private set; } = false;
|
||||
|
||||
private const int BitParityPosition1 = 6;
|
||||
private const int BitParityPosition2 = 54;
|
||||
|
||||
private const int SumOfRandomNumbersMinimum = 7;
|
||||
private const int SumOfRandomNumbersMaximum = 38;
|
||||
|
||||
public ApiSecurityLogic(ApiSecurity apiSecurity)
|
||||
{
|
||||
_apiSecurity = apiSecurity;
|
||||
if (_apiSecurity == null) ///Security disabled from config
|
||||
{
|
||||
IsJogosult = true;
|
||||
return;
|
||||
}
|
||||
|
||||
ApiSecurityVersion = int.Parse(_apiSecurity.SecurityKey.Substring(33, 3));///#7
|
||||
}
|
||||
internal void ThrowExceptionIfNotJogosult()
|
||||
{
|
||||
if (IsJogosult)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_apiSecurity.SecurityKey != null && ApiSecurityVersion == 1)
|
||||
{
|
||||
IsJogosult = ApiSecurityValidate();
|
||||
}
|
||||
|
||||
if (!IsJogosult)
|
||||
{
|
||||
throw new BlException(BlExceptionType.NincsJogosultsag);
|
||||
}
|
||||
}
|
||||
|
||||
private bool ApiSecurityValidate()
|
||||
{
|
||||
return _apiSecurity.SecurityKey.Length >= 150 &&
|
||||
_apiSecurity.SecurityKey.Length <= 200 &&
|
||||
IsBitParityValid() && ///#3
|
||||
ContainsSignatureLastChars() && //#6
|
||||
ValidateRandomNumbersSum() && ///#4
|
||||
ValidateSignature() && ///#5
|
||||
IsNoiseAlphaNumeric(); ///#9
|
||||
}
|
||||
|
||||
private bool IsBitParityValid()
|
||||
{
|
||||
bool IsBinary(char c) => c == '0' || c == '1';
|
||||
|
||||
return IsBinary(_apiSecurity.SecurityKey[BitParityPosition1]) &&
|
||||
IsBinary(_apiSecurity.SecurityKey[BitParityPosition2]) &&
|
||||
_apiSecurity.SecurityKey[BitParityPosition1] != _apiSecurity.SecurityKey[BitParityPosition2];
|
||||
}
|
||||
|
||||
private bool ValidateRandomNumbersSum()
|
||||
{
|
||||
int sumOfRandomNumbers = int.Parse(_apiSecurity.SecurityKey[8].ToString());
|
||||
sumOfRandomNumbers += int.Parse(_apiSecurity.SecurityKey[30].ToString());
|
||||
sumOfRandomNumbers += int.Parse(_apiSecurity.SecurityKey[36].ToString());
|
||||
sumOfRandomNumbers += int.Parse(_apiSecurity.SecurityKey[43].ToString());
|
||||
sumOfRandomNumbers += int.Parse(_apiSecurity.SecurityKey[49].ToString());
|
||||
|
||||
return sumOfRandomNumbers >= SumOfRandomNumbersMinimum && sumOfRandomNumbers <= SumOfRandomNumbersMaximum;
|
||||
}
|
||||
|
||||
private bool ValidateSignature()
|
||||
{
|
||||
var secretChars = _apiSecurity.SecurityKey.ToCharArray();
|
||||
|
||||
/// #5-1
|
||||
int step5_1_AsciiValue = _apiSecurity.SecurityKey[28];
|
||||
|
||||
int countRandomChar = _apiSecurity.Signature.ToCharArray().Count(s => s == _apiSecurity.SecurityKey[28]); ///#5-2
|
||||
int constValue = 7234599;
|
||||
|
||||
int sumValue = countRandomChar + step5_1_AsciiValue + constValue;
|
||||
string binaryRepresentation = Convert.ToString(sumValue, 2); ///#5-3
|
||||
|
||||
var arraySize = binaryRepresentation.Length;
|
||||
|
||||
for (int i = 0; i < 31; i++)
|
||||
{
|
||||
secretChars[90 - i] = i < arraySize ? binaryRepresentation[arraySize - i - 1] : '0';
|
||||
}
|
||||
|
||||
///#5-4
|
||||
int offset = int.Parse(secretChars[8].ToString());
|
||||
var startBitPosition = 59;
|
||||
|
||||
void SwapPositions(int xIndex, int yIndex)
|
||||
{
|
||||
(secretChars[xIndex], secretChars[yIndex]) = (secretChars[yIndex], secretChars[xIndex]);
|
||||
}
|
||||
|
||||
SwapPositions(startBitPosition + offset, startBitPosition + 31);
|
||||
SwapPositions(startBitPosition + 10 + int.Parse(secretChars[30].ToString()), startBitPosition + offset);
|
||||
SwapPositions(startBitPosition + int.Parse(secretChars[43].ToString()), startBitPosition + 17 + int.Parse(secretChars[49].ToString()));
|
||||
SwapPositions(startBitPosition + int.Parse(secretChars[49].ToString()), startBitPosition + 30 - int.Parse(secretChars[49].ToString()));
|
||||
|
||||
var generatedSecretKey = new string(secretChars).Substring(startBitPosition, 32);
|
||||
return _apiSecurity.SecurityKey.Substring(startBitPosition, 32) == generatedSecretKey;
|
||||
}
|
||||
|
||||
public bool ContainsSignatureLastChars()
|
||||
{
|
||||
return _apiSecurity.SecurityKey.Substring(99, 3) == _apiSecurity.Signature.Substring(_apiSecurity.Signature.Length - 3, 3);
|
||||
}
|
||||
|
||||
public bool IsNoiseAlphaNumeric() ///#9
|
||||
{
|
||||
int[] expectedNoisePositions = new int[6] { 42, 45, 94, 105, 114, 126 };
|
||||
|
||||
foreach (int i in expectedNoisePositions)
|
||||
{
|
||||
if (!char.IsLetterOrDigit(_apiSecurity.SecurityKey[i]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ertekeles;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Logic
|
||||
{
|
||||
public static class AtlagLogic
|
||||
{
|
||||
public static decimal? GetSubListAtlag(List<ErtekelesListResponse> ertekelesek)
|
||||
=> (decimal?)ertekelesek.WeightedAverage(x => x.SzamErtek.Value, x => x.SulySzazalekErteke.Value, 2); // TODO ne legyen nullable
|
||||
|
||||
public static decimal GetSimpleAtlag(IEnumerable<decimal> ertekelesek)
|
||||
=> Math.Round(ertekelesek.Average(), 2);
|
||||
|
||||
public static (decimal? SulyozottOsztalyzatOsszege, decimal? SulyozottOsztalyzatSzama, decimal? SulyozottAtlag) GetAtlagTuple(List<ErtekelesListResponse> ertekelesek)
|
||||
=> GetSubListAtlagTuple(ErtekelesLogic.ListAtlagbaSzamitoErtekelesek(ertekelesek).ToList());
|
||||
|
||||
public static (decimal? SulyozottOsztalyzatOsszege, decimal? SulyozottOsztalyzatSzama, decimal? SulyozottAtlag) GetSubListAtlagTuple(List<ErtekelesListResponse> atlagbaSzamitoErtekelesek)
|
||||
=> ((decimal? SulyozottOsztalyzatOsszege, decimal? SulyozottOsztalyzatSzama, decimal? SulyozottAtlag))atlagbaSzamitoErtekelesek.WeightedAverageTuple(x => x.SzamErtek.Value, x => x.SulySzazalekErteke.Value, 2);
|
||||
|
||||
private static (double? weightedValueSum, double? weightSum, double? weightAverage) WeightedAverageTuple<T>(this IEnumerable<T> recordEnumeration, Func<T, double> value, Func<T, double> weight, int? round = null)
|
||||
{
|
||||
if (!recordEnumeration.Any())
|
||||
{
|
||||
return (null, null, null);
|
||||
}
|
||||
|
||||
var weightedValueSum = recordEnumeration.Sum(x => value(x) * weight(x));
|
||||
var weightSum = recordEnumeration.Sum(weight);
|
||||
var weightAverage = round.HasValue && round > 0 ? Math.Round(weightedValueSum / weightSum, round.Value) : weightedValueSum / weightSum;
|
||||
|
||||
return (weightedValueSum, weightSum, weightAverage);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ertekeles;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Logic
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: Kovács Kornél (DevKornél) Created On: 2019.10.
|
||||
/// </summary>
|
||||
public static class ErtekelesLogic
|
||||
{
|
||||
public static IEnumerable<ErtekelesListResponse> ListAtlagbaSzamitoErtekelesek(IEnumerable<ErtekelesListResponse> ertekelesek)
|
||||
=> ertekelesek.Where(x => x.SzamErtek.HasValue && x.SulySzazalekErteke.HasValue);
|
||||
|
||||
public static List<AtlagAlakulasaResponse> GetAtlagAlakulasaIdoFuggvenyeben(TantargyiAtlagResponse tantargyiAtlag)
|
||||
{
|
||||
List<AtlagAlakulasaResponse> response = new List<AtlagAlakulasaResponse>();
|
||||
List<ErtekelesListResponse> atlagbaSzamitoErtekelesek = ListAtlagbaSzamitoErtekelesek(tantargyiAtlag.Ertekelesek).OrderBy(e => e.KeszitesDatum).ToList();
|
||||
|
||||
for (int i = 0; i < atlagbaSzamitoErtekelesek.Count; ++i)
|
||||
{
|
||||
response.Add(new AtlagAlakulasaResponse
|
||||
{
|
||||
Atlag = AtlagLogic.GetSubListAtlag(atlagbaSzamitoErtekelesek.Take(i + 1).ToList()).Value,
|
||||
Datum = atlagbaSzamitoErtekelesek[i].KeszitesDatum
|
||||
});
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Ellenorzo.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Logic
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: Kovács Kornél (DevKornél) Created On: 2019.05.
|
||||
/// Felhasználói jogosultágkezelés logika
|
||||
/// </summary>
|
||||
internal static class FelhasznaloLogic
|
||||
{
|
||||
internal static bool IsJogosult(bool needExceptionJogosultsagHianyaban, IEnumerable<FelhasznaloSzerepkor> felhasznaloJogosultsagLista, params FelhasznaloSzerepkor[] szuksegesJogosultsagLista)
|
||||
{
|
||||
bool haveAllJogosultsag = true;
|
||||
if (felhasznaloJogosultsagLista.ToList().Count > 0)
|
||||
{
|
||||
foreach (var szuksegesJogosultsag in szuksegesJogosultsagLista)
|
||||
{
|
||||
if (!felhasznaloJogosultsagLista.ToList().Contains(szuksegesJogosultsag))
|
||||
{
|
||||
haveAllJogosultsag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
needExceptionJogosultsagHianyaban = true;
|
||||
haveAllJogosultsag = false;
|
||||
}
|
||||
|
||||
return !haveAllJogosultsag && needExceptionJogosultsagHianyaban
|
||||
? throw new BlException(BlExceptionType.NincsJogosultsag)
|
||||
: haveAllJogosultsag;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.BL.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Logic
|
||||
{
|
||||
internal static class JogosultsagLogic
|
||||
{
|
||||
internal static List<int> ListHozzaferhetoAlkalmazottIds(DefaultConnectionParameters dcp)
|
||||
{
|
||||
var response = new List<int>();
|
||||
if (FelhasznaloLogic.IsJogosult(false, dcp.JogosultsagLista, FelhasznaloSzerepkor.Tanulo) ||
|
||||
FelhasznaloLogic.IsJogosult(false, dcp.JogosultsagLista, FelhasznaloSzerepkor.Gondviselo))
|
||||
{
|
||||
var tanuloOsztalyCsoportjai = OsztalyCsoportSubqueries.ListOsztalyCsoport(dcp, new OsztalyCsoportListRequest { TanuloIds = new List<int> { dcp.TanuloId } }).ToList();
|
||||
var tanuloOsztalyfonokeiIds = tanuloOsztalyCsoportjai.Where(x => x.Osztalyfonok != null).Select(x => x.Osztalyfonok.Uid.Id).ToList();
|
||||
var tanuloOsztalyfonokHelyetteseiIds = tanuloOsztalyCsoportjai.Where(x => x.OsztalyfonokHelyettes != null).Select(x => x.OsztalyfonokHelyettes.Uid.Id).ToList();
|
||||
|
||||
response.AddRange(tanuloOsztalyfonokeiIds.Union(tanuloOsztalyfonokHelyetteseiIds));
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Logic
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: Réti-Nagy Tamás Created On: 2019.11.
|
||||
/// </summary>
|
||||
internal static class OsztalyCsoportLogic
|
||||
{
|
||||
public static int GetSortIndexByOktatasNevelesiFeladat(OktatasiNevelesiFeladatEnum oktatasNevelesiFeladat)
|
||||
{
|
||||
return s_sortIndexByOktatasNevelesiFeladat.TryGetValue(oktatasNevelesiFeladat, out int value)
|
||||
? value
|
||||
: s_sortIndexByOktatasNevelesiFeladat.Values.Max() + 1;
|
||||
}
|
||||
|
||||
private static readonly Dictionary<OktatasiNevelesiFeladatEnum, int> s_sortIndexByOktatasNevelesiFeladat = new Dictionary<OktatasiNevelesiFeladatEnum, int>
|
||||
{
|
||||
{ OktatasiNevelesiFeladatEnum.ovoda, 1 },
|
||||
{ OktatasiNevelesiFeladatEnum.altalanos_iskola, 2 },
|
||||
{ OktatasiNevelesiFeladatEnum.gimnazium, 3 },
|
||||
{ OktatasiNevelesiFeladatEnum.szakkozepiskola, 4 },
|
||||
{ OktatasiNevelesiFeladatEnum.szakiskola, 5 },
|
||||
{ OktatasiNevelesiFeladatEnum.KonduktivPedagogiaiEllatas, 6 },
|
||||
{ OktatasiNevelesiFeladatEnum.OvodaGyogypedagogia, 7 },
|
||||
{ OktatasiNevelesiFeladatEnum.AltalanosIskolaGyogypedagogia, 8 },
|
||||
{ OktatasiNevelesiFeladatEnum.keszsegfejleszto_iskola, 9 },
|
||||
{ OktatasiNevelesiFeladatEnum.PedagogiaiSzakszolgaltatas, 11 },
|
||||
{ OktatasiNevelesiFeladatEnum.KiegeszitoNemzetisegiNyelvoktatas, 12 },
|
||||
{ OktatasiNevelesiFeladatEnum.szakgimnazium, 13 },
|
||||
{ OktatasiNevelesiFeladatEnum.FejlesztoNevelesOktatas, 14 },
|
||||
{ OktatasiNevelesiFeladatEnum.pedagogiai_szakmai_szolgaltatas, 15 },
|
||||
{ OktatasiNevelesiFeladatEnum.koznevelesi_es_szakkepzesi_hidprogram, 16 },
|
||||
{ OktatasiNevelesiFeladatEnum.ovoda_nemzetisegi_, 17 },
|
||||
{ OktatasiNevelesiFeladatEnum.altalanos_iskola_nemzetisegi_, 18 },
|
||||
{ OktatasiNevelesiFeladatEnum.gimnazium_nemzetisegi_, 19 },
|
||||
{ OktatasiNevelesiFeladatEnum.szakgimnazium_nemzetisegi_, 20 },
|
||||
{ OktatasiNevelesiFeladatEnum.szakkozepiskola_nemzetisegi_, 21 },
|
||||
{ OktatasiNevelesiFeladatEnum.kollegium_nemzetisegi_, 22 },
|
||||
{ OktatasiNevelesiFeladatEnum.MuveszetiSzakgimnazium, 100 },
|
||||
{ OktatasiNevelesiFeladatEnum.AlapfokuMuveszetoktatas, 101 },
|
||||
{ OktatasiNevelesiFeladatEnum.kollegium, 200 },
|
||||
{ OktatasiNevelesiFeladatEnum.GyermekotthoniFeladatok, 201 },
|
||||
{ OktatasiNevelesiFeladatEnum.UtazoGyogypedagogusiHalozat, 300 },
|
||||
{ OktatasiNevelesiFeladatEnum.utazo_konduktori_halozat, 301 },
|
||||
{ OktatasiNevelesiFeladatEnum.felnottoktatas, 400 },
|
||||
{ OktatasiNevelesiFeladatEnum.felnottkepzes, 401 },
|
||||
{ OktatasiNevelesiFeladatEnum.na, 1000 }
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
using System.Collections;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Logic
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: Kovács Kornél (DevKornél) Created On: 2019.06.
|
||||
/// </summary>
|
||||
internal static class RequestFilterLogic
|
||||
{
|
||||
public static TResponse CreateUidFilteredListResponse<TResponse, TRequest, TUid>(TResponse response, TRequest request) where TResponse : class, IEnumerable
|
||||
where TRequest : class, IRequestUidFilter<TUid>
|
||||
where TUid : class, IReadonlyUidRaw
|
||||
{
|
||||
int length = 0;
|
||||
foreach (var element in response)
|
||||
{
|
||||
length++;
|
||||
}
|
||||
|
||||
if (request.Uid == null)
|
||||
{
|
||||
return response;
|
||||
}
|
||||
|
||||
if (request.IsCallerGetOnlyOneItem)
|
||||
{
|
||||
return length < 1
|
||||
? throw new BlException(BlExceptionType.NemLetezoEntitas)
|
||||
: length > 1 ? throw new BlException(BlExceptionType.TulSokVisszateresiElem) : response;
|
||||
}
|
||||
|
||||
if (length > 1)
|
||||
{
|
||||
throw new BlException(BlExceptionType.TulSokVisszateresiElem);
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
public static TResponse CreateUidFilteredResponse<TResponse, TRequest, TUid>(TResponse response, TRequest request) where TResponse : class
|
||||
where TRequest : class, IRequestUidFilter<TUid>
|
||||
where TUid : class, IReadonlyUidRaw
|
||||
{
|
||||
return request.Uid == null || response == null ? throw new BlException(BlExceptionType.NemLetezoEntitas) : response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.BL.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Dao.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Logic
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: Érsek Zalán Created On: 2019.09
|
||||
/// </summary>
|
||||
internal static class TantargyLogic
|
||||
{
|
||||
internal static readonly TantargyResponse MagatartasTantargy = new TantargyResponse(nameof(MagatartasSzorgalomTantargy.Magatartas),
|
||||
EnumLogic.GetDisplayNameAttribute(MagatartasSzorgalomTantargy.Magatartas),
|
||||
new Adatszotar<TargyKategoriaTipusEnum>(nameof(MagatartasSzorgalomTantargy.Magatartas),
|
||||
EnumLogic.GetDisplayNameAttribute(MagatartasSzorgalomTantargy.Magatartas)), 0)
|
||||
{
|
||||
TantargyInTtf = false
|
||||
};
|
||||
|
||||
internal static readonly TantargyResponse SzorgalomTantargy = new TantargyResponse(nameof(MagatartasSzorgalomTantargy.Szorgalom),
|
||||
EnumLogic.GetDisplayNameAttribute(MagatartasSzorgalomTantargy.Szorgalom),
|
||||
new Adatszotar<TargyKategoriaTipusEnum>(nameof(MagatartasSzorgalomTantargy.Szorgalom),
|
||||
EnumLogic.GetDisplayNameAttribute(MagatartasSzorgalomTantargy.Szorgalom)), 1)
|
||||
{
|
||||
TantargyInTtf = false
|
||||
};
|
||||
|
||||
internal static void RemoveOsztalyfonokiKategoriasTantargyak(List<TanultTantargyDao> tantargyList)
|
||||
{
|
||||
_ = tantargyList.RemoveAll(x => x.TargykategoriaId == (int)TargyKategoriaTipusEnum.osztalyfonoki_elet_es_palyatervezes && !x.ErtekelesBol);
|
||||
}
|
||||
|
||||
internal static void OrderTantargyList(HashSet<TantargyResponse> tantargyList, int tanevId)
|
||||
{
|
||||
var targyKategoriaTipusById = AdatszotarSubqueries.GetTipusByIdDictionary((int)GeneratedAdatszotarTipusEnum.TargyKategoriaTipus, tanevId);
|
||||
|
||||
foreach (var tantargy in tantargyList.Where(x => x.Uid.Id != 0))
|
||||
{
|
||||
tantargy.TantargyKategoriaOrderIndex = targyKategoriaTipusById[tantargy.Kategoria.Uid.Id].Order ?? 10000;
|
||||
tantargy.FotargyTantargyKategoriaOrderIndex = tantargy.FotargyKategoriaId.HasValue ? targyKategoriaTipusById[tantargy.FotargyKategoriaId.Value].Order ?? 10000 : (int?)null;
|
||||
}
|
||||
|
||||
int index = 2;
|
||||
foreach (TantargyResponse tantargy in tantargyList.Where(x => x.Uid.Id != 0) // A Magatartás és Szorgalom Id-ja 0, ezeket nem rendezzük, fix első két helyen vannak.
|
||||
.OrderBy(x => x.SorSzam)
|
||||
.ThenBy(x => x.IsFotargy ? x.TantargyKategoriaOrderIndex : x.FotargyTantargyKategoriaOrderIndex)
|
||||
.ThenBy(x => x.IsFotargy ? x.Nev : x.FotargyNev)
|
||||
.ThenBy(x => x.IsFotargy ? 0 : 1)
|
||||
.ThenBy(x => x.Nev)
|
||||
.ToList())
|
||||
{
|
||||
tantargy.SortIndex = index;
|
||||
++index;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
namespace Kreta.Ellenorzo.BL.VN.Logic
|
||||
{
|
||||
internal static class TanuloLogic
|
||||
{
|
||||
internal static string IsNullOrValue(string value) => string.IsNullOrWhiteSpace(value) ? null : " " + value;
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Core;
|
||||
using Kreta.Core.Domain;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Logic
|
||||
{
|
||||
/// <summary>
|
||||
/// Author: Kovács Kornél (DevKornél) Created On: 2019.06.
|
||||
/// Validates the models with "DataAnnotationAttributes" and gives You the option
|
||||
/// to create custom validation if model implements the "IValidatableObject" interface.
|
||||
/// </summary>
|
||||
internal class ValidatorLogic
|
||||
{
|
||||
private readonly List<ValidationResult> _errorList = new List<ValidationResult>();
|
||||
|
||||
private readonly bool _isValid = true;
|
||||
|
||||
internal ValidatorLogic(object instance)
|
||||
{
|
||||
var context = new ValidationContext(instance, serviceProvider: null, items: null);
|
||||
_isValid = Validator.TryValidateObject(instance, context, _errorList, true);
|
||||
}
|
||||
|
||||
internal ValidatorLogic(IEnumerable<object> instance)
|
||||
{
|
||||
foreach (var item in instance)
|
||||
{
|
||||
var context = new ValidationContext(item, serviceProvider: null, items: null);
|
||||
if (!Validator.TryValidateObject(item, context, _errorList, true))
|
||||
{
|
||||
_isValid = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static implicit operator string(ValidatorLogic validator) => validator.GetFirstUserFriendlyError();
|
||||
|
||||
internal BlException ConvertToValidationException()
|
||||
{
|
||||
var exception = new BlException(BlExceptionType.ModelValidacio);
|
||||
var count = 1;
|
||||
foreach (var error in _errorList)
|
||||
{
|
||||
var name = error.MemberNames.FirstOrDefault() ?? "custom_" + count;
|
||||
exception.ErrorList.Add(new DetailedErrorItem(name, error.ErrorMessage, BlExceptionType.ModelValidacio));
|
||||
count++;
|
||||
}
|
||||
|
||||
return exception;
|
||||
}
|
||||
|
||||
internal string GetFirstUserFriendlyError()
|
||||
=> _errorList.Count > 0 ? _errorList[0].ErrorMessage : string.Empty;
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal string GetUserFriendlyError()
|
||||
=> string.Join(Constants.General.LineSeparator, _errorList.Select(x => x.ErrorMessage).ToArray());
|
||||
|
||||
internal void ThrowExceptionIfModelIsNotvalid()
|
||||
{
|
||||
if (!_isValid)
|
||||
{
|
||||
throw ConvertToValidationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Mulasztas;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Mulasztas
|
||||
{
|
||||
public class MulasztasFacade : EllenorzoFacade
|
||||
{
|
||||
public MulasztasFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HashSet<MulasztasListResponse> ListMulasztas(MulasztasListRequest request)
|
||||
=> RunSubquery(() => MulasztasSubqueries.ListMulasztas(DefaultConnectionParameters, request));
|
||||
|
||||
public MulasztasListResponse GetMulasztas(string uid)
|
||||
=> ListMulasztas(new MulasztasListRequest(uid)
|
||||
{
|
||||
IsCallerGetOnlyOneItem = true
|
||||
}).First();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual.ParameterClasses;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.Mulasztas;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Mulasztas;
|
||||
using Kreta.Ellenorzo.Domain.VN.Ora.TanitasiOra;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Mulasztas
|
||||
{
|
||||
internal static class MulasztasSubqueries
|
||||
{
|
||||
internal static HashSet<MulasztasListResponse> ListMulasztas(DefaultConnectionParameters dcp, MulasztasListRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
var response = new HashSet<MulasztasListResponse>(new MulasztasListResponse());
|
||||
int[] validMulasztasTipusIdLista =
|
||||
{
|
||||
(int)MulasztasTipusEnum.keses,
|
||||
(int)MulasztasTipusEnum.hianyzas
|
||||
};
|
||||
|
||||
MulasztasKeresesePCO mulasztasKeresesePco = new MulasztasKeresesePCO
|
||||
{
|
||||
Tol = request.DatumTol,
|
||||
Ig = request.DatumIg,
|
||||
TanuloId = dcp.TanuloId,
|
||||
TanevId = dcp.TanevId,
|
||||
Id = request.Uid?.Id
|
||||
};
|
||||
|
||||
var tanuloMulasztasai = dcp.DalHandler.MulasztasDal().GetHallgatoMulasztasaiDataSet(mulasztasKeresesePco).ToDaoList<MulasztasResponseDao>();
|
||||
|
||||
var tanuloValidMulasztasList =
|
||||
tanuloMulasztasai.AsEnumerable().Where(mulasztas => Array.IndexOf(validMulasztasTipusIdLista, mulasztas.TipusId) > -1).ToList();
|
||||
|
||||
foreach (var tanuloMulasztas in tanuloValidMulasztasList)
|
||||
{
|
||||
var mulasztas = new MulasztasListResponse
|
||||
{
|
||||
Uid = new MulasztasUid(tanuloMulasztas.Id),
|
||||
Tipus = new Adatszotar<MulasztasTipusEnum>(tanuloMulasztas.TipusId, tanuloMulasztas.TipusNev),
|
||||
KesesPercben = tanuloMulasztas.KesesPercben.HasValue ? tanuloMulasztas.KesesPercben : null,
|
||||
KeszitesDatuma = tanuloMulasztas.KeszitesDatuma,
|
||||
IgazolasTipusa = tanuloMulasztas.IgazolasTipusId.HasValue ? new Adatszotar<IgazolasTipusEnum>(tanuloMulasztas.IgazolasTipusId.Value, tanuloMulasztas.IgazolasTipusNev) : null,
|
||||
Tantargy = new TantargyResponse(
|
||||
tanuloMulasztas.TantargyId,
|
||||
tanuloMulasztas.TantargyNev,
|
||||
new Adatszotar<TargyKategoriaTipusEnum>(tanuloMulasztas.TantargyKategoriaId, tanuloMulasztas.TantargyKategoriaNev)),
|
||||
Mod = tanuloMulasztas.IsTanoraiCeluMulasztas ? MulasztasMod.Tanorai : MulasztasMod.TanoranKivuli,
|
||||
Datum = tanuloMulasztas.Datum,
|
||||
Ora = new TanitasiOraResponse
|
||||
{
|
||||
Oraszam = tanuloMulasztas.TanitasiOraOraszam.HasValue ? tanuloMulasztas.TanitasiOraOraszam : null,
|
||||
KezdoDatum = tanuloMulasztas.TanitasiOraKezdoDatum,
|
||||
VegDatum = tanuloMulasztas.TanitasiOraVegDatum
|
||||
},
|
||||
IgazolasAllapota =
|
||||
tanuloMulasztas.Igazolt.HasValue ?
|
||||
tanuloMulasztas.Igazolt.Value ? IgazolasAllapota.Igazolt : IgazolasAllapota.Igazolatlan
|
||||
: IgazolasAllapota.Igazolando,
|
||||
|
||||
RogzitoTanar = !tanuloMulasztas.HelyettesitesTipusa.HasValue ?
|
||||
new TanarSimplifiedResponse { Uid = new TanarUid(tanuloMulasztas.TanarId.Value), Nev = tanuloMulasztas.TanarNev } :
|
||||
new TanarSimplifiedResponse { Uid = new TanarUid(tanuloMulasztas.HelyettesitoTanarId.Value), Nev = tanuloMulasztas.HelyettesitoTanarNev },
|
||||
OsztalyCsoport = new OsztalyCsoportSimplifiedResponse
|
||||
{
|
||||
Uid = new OsztalyCsoportUid(tanuloMulasztas.OsztalyCsoportId)
|
||||
}
|
||||
};
|
||||
|
||||
if (!response.Add(mulasztas))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
|
||||
return RequestFilterLogic.CreateUidFilteredListResponse<HashSet<MulasztasListResponse>, MulasztasListRequest, MulasztasUid>(response, request);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Orarend;
|
||||
using Kreta.Web.Logging.Abstractions;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Orarend
|
||||
{
|
||||
public class OrarendFacade : EllenorzoFacade
|
||||
{
|
||||
public OrarendFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HashSet<OrarendElemListResponse> ListOrarend(ITraceLogger logger, OrarendElemListRequest request) => RunSubquery(() => OrarendSubqueries.ListOrarend(DefaultConnectionParameters, logger, request));
|
||||
|
||||
public OrarendElemListResponse GetOrarendElem(ITraceLogger logger, OrarendElemGetRequest request) => RunSubquery(() => OrarendSubqueries.GetOrarendElem(DefaultConnectionParameters, logger, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,266 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Helpers.SystemSettings;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.DataAccess.Interfaces;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ora;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Csatolmany;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Orarend;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.Terem;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Web.Logging.Abstractions;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Orarend
|
||||
{
|
||||
internal static class OrarendSubqueries
|
||||
{
|
||||
internal static HashSet<OrarendElemListResponse> ListOrarend(DefaultConnectionParameters dcp, ITraceLogger logger, OrarendElemListRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
return ListOrarendElemek(dcp, logger, request.DatumTol, request.DatumIg);
|
||||
}
|
||||
|
||||
internal static OrarendElemListResponse GetOrarendElem(DefaultConnectionParameters dcp, ITraceLogger logger, OrarendElemGetRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
return ListOrarendElemek(dcp, logger, request.OrarendElemUid.Datum, request.OrarendElemUid.Datum, request.OrarendElemUid.Id, request.OrarendElemUid.Tipus).FirstOrDefault() ??
|
||||
throw new BlException(BlExceptionType.NemLetezoEntitas);
|
||||
}
|
||||
|
||||
private static HashSet<OrarendElemListResponse> ListOrarendElemek(DefaultConnectionParameters dcp, ITraceLogger logger, DateTime datumTol, DateTime datumIg, int? orarendElemId = null, CalendarOraTypeEnum? orarendElemTipus = null)
|
||||
{
|
||||
var response = new HashSet<OrarendElemListResponse>(new OrarendElemListResponse());
|
||||
|
||||
var orarend = dcp.DalHandler.OrarendiOra().GetOrarendForMobile(
|
||||
dcp.IntezmenyId,
|
||||
dcp.TanevId,
|
||||
datumTol,
|
||||
datumIg.AddDays(1), /// HACK @DevKornél: DatumIg+1 nap, hogy a filter zárt intervallumot határozzon meg
|
||||
null,
|
||||
null,
|
||||
dcp.TanuloId,
|
||||
false,
|
||||
OrarendTipusEnum.Minden,
|
||||
null,
|
||||
null,
|
||||
false,
|
||||
null);
|
||||
|
||||
/// KRETA2-3484 miatt
|
||||
//var torolhetoSorok = orarend.Tables[0].AsEnumerable().Where(r => r.Field<bool>("Ures_BOOL")).ToList();
|
||||
|
||||
//foreach (var torolhetoSor in torolhetoSorok)
|
||||
//{
|
||||
// orarend.Tables[0].Rows.Remove(torolhetoSor);
|
||||
//}
|
||||
var connection = new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler);
|
||||
var feladatok = new DktFeladatHelper(connection).GetFeladatokByDateRange(datumTol, datumIg, true);
|
||||
|
||||
IEnumerable<OrarendCO.ExtendedEvent> tanuloOraLista = new OrarendHelper(connection).GetTanuloOrarendDataForMobile(
|
||||
orarend,
|
||||
datumTol,
|
||||
datumIg,
|
||||
dcp.TanuloId,
|
||||
haziFeladatok: feladatok.Where(f => f.FeladatTipusId == (int)FeladatTipusEnum.HaziFeladat));
|
||||
|
||||
if (orarendElemId.HasValue && orarendElemTipus.HasValue)
|
||||
{
|
||||
tanuloOraLista = tanuloOraLista.Where(x => x.id == orarendElemId && x.oraType == orarendElemTipus && x.datum == datumTol);
|
||||
}
|
||||
|
||||
var tanuloOraListaTanevRendjeEsemenyekNelkul = tanuloOraLista.Where(x => !x.allDay); ///tanévrendje események skip
|
||||
var isTanoraTemaAzEllenorzobenLathato = new SystemSettingsHelper(connection).GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.Tanora_Tema_Az_Ellenorzoben);
|
||||
|
||||
FillUpTanuloOrai();
|
||||
FillUpTanevRendjeEsemenyek();
|
||||
|
||||
var feladatokTipusSzerint = GetFeladatokTipusSzerint(feladatok);
|
||||
|
||||
foreach (var tanuloOraja in response.Where(o => !o.IsTanevRendjeEsemeny))
|
||||
{
|
||||
if (feladatokTipusSzerint[FeladatTipusEnum.HaziFeladat].Any() && tanuloOraja.HasHaziFeladat)
|
||||
{
|
||||
var haziFeladat = feladatokTipusSzerint[FeladatTipusEnum.HaziFeladat].Where(x =>
|
||||
x.TantargyId == tanuloOraja.Tantargy.Uid.Id &&
|
||||
x.OsztalyCsoportId == tanuloOraja.OsztalyCsoport.Uid.Id &&
|
||||
x.Datum == tanuloOraja.Uid.Datum &&
|
||||
((x.Oraszam.HasValue && tanuloOraja.Oraszam.HasValue && x.Oraszam.Value == tanuloOraja.Oraszam.Value) || (x.Idopont.HasValue && x.Idopont.Value.TimeOfDay == tanuloOraja.KezdetIdopont.TimeOfDay)))
|
||||
.Select(y => y.ID).FirstOrDefault();
|
||||
tanuloOraja.HaziFeladatUid = new HaziFeladatUid(haziFeladat);
|
||||
}
|
||||
if (feladatokTipusSzerint[FeladatTipusEnum.OraiFeladat].Any())
|
||||
{
|
||||
var oraiFeladatGuid = feladatokTipusSzerint[FeladatTipusEnum.OraiFeladat].Where(x =>
|
||||
x.TantargyId == tanuloOraja.Tantargy.Uid.Id &&
|
||||
x.OsztalyCsoportId == tanuloOraja.OsztalyCsoport.Uid.Id &&
|
||||
x.Datum == tanuloOraja.Uid.Datum &&
|
||||
((x.Oraszam.HasValue && tanuloOraja.Oraszam.HasValue && x.Oraszam.Value == tanuloOraja.Oraszam.Value) || (x.Idopont.HasValue && x.Idopont.Value.TimeOfDay == tanuloOraja.KezdetIdopont.TimeOfDay)))
|
||||
.Select(y => y.GroupId).FirstOrDefault();
|
||||
if (oraiFeladatGuid.HasValue)
|
||||
{
|
||||
tanuloOraja.FeladatGroupUid = new OraiFeladatGroupUid(SDAConvert.ToGuid(oraiFeladatGuid));
|
||||
}
|
||||
}
|
||||
if (feladatokTipusSzerint[FeladatTipusEnum.NyelviFeladat].Any())
|
||||
{
|
||||
var nyelviFeladatGuid = feladatokTipusSzerint[FeladatTipusEnum.NyelviFeladat].Where(x =>
|
||||
x.TantargyId == tanuloOraja.Tantargy.Uid.Id &&
|
||||
x.OsztalyCsoportId == tanuloOraja.OsztalyCsoport.Uid.Id &&
|
||||
x.Datum == tanuloOraja.Uid.Datum &&
|
||||
((x.Oraszam.HasValue && tanuloOraja.Oraszam.HasValue && x.Oraszam.Value == tanuloOraja.Oraszam.Value) || (x.Idopont.HasValue && x.Idopont.Value.TimeOfDay == tanuloOraja.KezdetIdopont.TimeOfDay)))
|
||||
.Select(y => y.GroupId).FirstOrDefault();
|
||||
if (nyelviFeladatGuid.HasValue)
|
||||
{
|
||||
tanuloOraja.NyelviFeladatGroupUid = new NyelviFeladatGroupUid(SDAConvert.ToGuid(nyelviFeladatGuid));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
|
||||
void FillUpTanuloOrai()
|
||||
{
|
||||
var helper = new TanoraHelper(connection);
|
||||
var oraFiles = CsatolmanySubqueries.ListCsatolmanyok(dcp, new CsatolmanyListRequest
|
||||
{
|
||||
DatumTol = datumTol,
|
||||
DatumIg = datumIg,
|
||||
OrarendElemUids = tanuloOraListaTanevRendjeEsemenyekNelkul.Select(o => new OrarendElemUid(o.id, o.oraType, o.datum.Value)
|
||||
{
|
||||
OrarendiOraId = o.OrarendiOraId ?? 0,
|
||||
OrarendiOraGroupId = o.OrarendiOraGroupId ?? 0
|
||||
})
|
||||
});
|
||||
|
||||
var helyettesitesLathatosagaAzEllenorzoben = new SystemSettingsHelper(connection).GetSystemSettingValue<bool>(RendszerBeallitasTipusEnum.helyettesites_lathatosaga_az_ellenorzoben);
|
||||
|
||||
var orakAdatai = orarend.Tables[0].Rows.Cast<DataRow>().Select(row => new
|
||||
{
|
||||
TantargyId = SDAConvert.ToInt32(row["TantargyId"], -1),
|
||||
OsztalyCsoportId = SDAConvert.ToInt32(row["OsztCsopId"]),
|
||||
TanarId = SDAConvert.ToInt32(row["TanarID"]),
|
||||
OraKezdete = Convert.ToDateTime(row["OraKezdete"])
|
||||
});
|
||||
var elozoOrakAdatai = new OrarendiOraHelper(connection).GetElozoOrakAdatai(JsonConvert.SerializeObject(orakAdatai));
|
||||
|
||||
foreach (var tanuloOraja in tanuloOraListaTanevRendjeEsemenyekNelkul)
|
||||
{
|
||||
var responseItem = new OrarendElemListResponse
|
||||
{
|
||||
Uid = new OrarendElemUid(tanuloOraja.id, tanuloOraja.oraType, tanuloOraja.datum.Value),
|
||||
OrarendiOraUid = new OrarendElemUid(tanuloOraja.OrarendiOraId ?? tanuloOraja.OrarendiOraGroupId ?? 0, CalendarOraTypeEnum.OrarendiOra, tanuloOraja.datum.Value),
|
||||
Oraszam = tanuloOraja.hanyadikora,
|
||||
KezdetIdopont = tanuloOraja.start.Value,
|
||||
VegIdopont = tanuloOraja.end.Value,
|
||||
Tema = isTanoraTemaAzEllenorzobenLathato && !string.IsNullOrWhiteSpace(tanuloOraja.Tema) ? tanuloOraja.Tema : null,
|
||||
TanuloJelenlet = tanuloOraja.TanuloJelenlet != 0 ? (int?)tanuloOraja.TanuloJelenlet : null,
|
||||
Allapot = (int)tanuloOraja.OraAllapota,
|
||||
IsTanevRendjeEsemeny = tanuloOraja.allDay
|
||||
};
|
||||
|
||||
responseItem.BejelentettSzamonkeresUid = tanuloOraja.hasBejelentettSzamonkeres ? new BejelentettSzamonkeresUid(tanuloOraja.BejelentettSzamonkeresIdList[0]) : null;
|
||||
responseItem.Tantargy = new TantargyResponse(
|
||||
tanuloOraja.TantargyId,
|
||||
tanuloOraja.TantargyTeljesNev, /// Ha ki van töltve a tantárgy rövid neve, akkor az kerül bele, egyébként a teljes neve
|
||||
new Adatszotar<TargyKategoriaTipusEnum>(tanuloOraja.TantargyKategoriaId, tanuloOraja.TantargyKategoria));
|
||||
responseItem.OsztalyCsoport = new OsztalyCsoportResponse { Uid = new OsztalyCsoportUid(tanuloOraja.TanevRendOsztalyCsoportId), Nev = tanuloOraja.OsztalyCsoport };
|
||||
responseItem.Terem = new TeremSimplifiedResponse { Nev = tanuloOraja.Terem };
|
||||
responseItem.OratTartoTanar = new TanarSimplifiedResponse { Nev = tanuloOraja.TanarNev };
|
||||
responseItem.HelyettesTanar = new TanarSimplifiedResponse { Nev = string.IsNullOrWhiteSpace(tanuloOraja.HelyettesNev) || !helyettesitesLathatosagaAzEllenorzoben ? null : tanuloOraja.HelyettesNev };
|
||||
responseItem.HasHaziFeladat = tanuloOraja.hasHaziFeladat;
|
||||
responseItem.Csatolmanyok = oraFiles[responseItem.Uid];
|
||||
responseItem.IsDigitalisOra = tanuloOraja.IsDigitalisOra;
|
||||
responseItem.DigitalisEszkozTipus = tanuloOraja.DigitalisEszkozTipus;
|
||||
responseItem.DigitalisPlatformTipus = tanuloOraja.DigitalisPlatformTipus;
|
||||
responseItem.DigitalisTamogatoEszkozTipusList = tanuloOraja.DigitalisTamogatoEszkozTipusList;
|
||||
responseItem.Letrehozas = tanuloOraja.Letrehozas;
|
||||
responseItem.UtolsoModositas = tanuloOraja.UtolsoModositas;
|
||||
|
||||
if (tanuloOraja.isElmaradt)
|
||||
{
|
||||
responseItem.OraEvesSorszama = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
responseItem.OraEvesSorszama = tanuloOraja.EvesOraSorszam;
|
||||
if (tanuloOraja.OraAllapota == TanoraAllapotaEnum.Nem_naplozott)
|
||||
{
|
||||
responseItem.OraEvesSorszama = (int.TryParse(elozoOrakAdatai.FirstOrDefault(o => o.TantargyId == tanuloOraja.TantargyId && o.OsztalyCsoportId == tanuloOraja.TanevRendOsztalyCsoportId && o.TanarId == tanuloOraja.TanarId && o.OraKezdete == tanuloOraja.start.Value)?.ElozoOraEvesSorszama, out var oraszam) ? oraszam : default) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!response.Add(responseItem))
|
||||
{
|
||||
logger.Warn($"OrarendElemResponse: OrarendElem duplikált. {JsonConvert.SerializeObject(responseItem)}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FillUpTanevRendjeEsemenyek()
|
||||
{
|
||||
foreach (var tanuloOraja in tanuloOraLista.Where(x => x.allDay))
|
||||
{
|
||||
var responseItem = new OrarendElemListResponse
|
||||
{
|
||||
Uid = new OrarendElemUid(tanuloOraja.id, tanuloOraja.oraType, new DateTime(tanuloOraja.start.Value.Year, tanuloOraja.start.Value.Month, tanuloOraja.start.Value.Day)),
|
||||
KezdetIdopont = tanuloOraja.start.Value,
|
||||
VegIdopont = tanuloOraja.end.Value,
|
||||
TanuloJelenlet = tanuloOraja.TanuloJelenlet != 0 ? (int?)tanuloOraja.TanuloJelenlet : null,
|
||||
Allapot = (int)TanoraAllapotaEnum.TanevRendjeEsemeny,
|
||||
IsTanevRendjeEsemeny = tanuloOraja.allDay,
|
||||
TanevRendjeEsemenyNeve = tanuloOraja.title,
|
||||
Csatolmanyok = new List<CsatolmanySimplifiedResponse>()
|
||||
};
|
||||
|
||||
if (!response.Add(responseItem))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Dictionary<FeladatTipusEnum, List<IDKT_Feladat>> GetFeladatokTipusSzerint(List<IDKT_Feladat> feladatok)
|
||||
{
|
||||
var feladatokTipusSzerint = new Dictionary<FeladatTipusEnum, List<IDKT_Feladat>> {
|
||||
{ FeladatTipusEnum.HaziFeladat, new List<IDKT_Feladat>() },
|
||||
{ FeladatTipusEnum.OraiFeladat, new List<IDKT_Feladat>() },
|
||||
{ FeladatTipusEnum.NyelviFeladat, new List<IDKT_Feladat>() }
|
||||
};
|
||||
foreach (var feladat in feladatok)
|
||||
{
|
||||
if (feladat.FeladatTipusId == (int)FeladatTipusEnum.HaziFeladat)
|
||||
{
|
||||
feladatokTipusSzerint[FeladatTipusEnum.HaziFeladat].Add(feladat);
|
||||
}
|
||||
else if (feladat.FeladatTipusId == (int)FeladatTipusEnum.OraiFeladat)
|
||||
{
|
||||
feladatokTipusSzerint[FeladatTipusEnum.OraiFeladat].Add(feladat);
|
||||
}
|
||||
else if (feladat.FeladatTipusId == (int)FeladatTipusEnum.NyelviFeladat)
|
||||
{
|
||||
feladatokTipusSzerint[FeladatTipusEnum.NyelviFeladat].Add(feladat);
|
||||
}
|
||||
}
|
||||
return feladatokTipusSzerint;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.OsztalyCsoport
|
||||
{
|
||||
public class OsztalyCsoportFacade : EllenorzoFacade
|
||||
{
|
||||
public OsztalyCsoportFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HashSet<OsztalyCsoportListResponse> ListTanuloOsztalyCsoport()
|
||||
=> RunSubquery(() => OsztalyCsoportSubqueries.ListOsztalyCsoport(DefaultConnectionParameters, new OsztalyCsoportListRequest
|
||||
{
|
||||
TanuloIds = new List<int> { DefaultConnectionParameters.TanuloId }
|
||||
}));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Alkalmazott.Tanar.Osztalyfonok;
|
||||
using Kreta.Ellenorzo.Domain.VN.OsztalyCsoport;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.OsztalyCsoport
|
||||
{
|
||||
internal static class OsztalyCsoportSubqueries
|
||||
{
|
||||
internal static HashSet<OsztalyCsoportListResponse> ListOsztalyCsoport(DefaultConnectionParameters dcp, OsztalyCsoportListRequest request)
|
||||
{
|
||||
var response = new HashSet<OsztalyCsoportListResponse>(new OsztalyCsoportListResponse());
|
||||
|
||||
var osztalyokEsCsoportok = dcp.DalHandler.OsztalyCsoport().GetOsztalyCsoportok(dcp.TanevId, null, osztalyfonokIds: request?.OsztalyfonokIds, tanuloIds: request?.TanuloIds, oktatasiNevelesiFeladatId: request?.OktatasiNevelesiFeladatId)
|
||||
.ToDaoList<TanuloOsztalyCsoportResponseDao>();
|
||||
|
||||
var ido = DateTime.Now;
|
||||
foreach (var osztalyCsoport in osztalyokEsCsoportok)
|
||||
{
|
||||
var responseItem = new OsztalyCsoportListResponse
|
||||
{
|
||||
Nev = osztalyCsoport.Nev,
|
||||
OktatasNevelesiKategoria = new Adatszotar<OktNevelesiKategoriaEnum>(osztalyCsoport.OktatasNevelesiKategoriaId, osztalyCsoport.OktatasNevelesiKategoriaNeve),
|
||||
OktatasNevelesiFeladat = new Adatszotar<OktatasiNevelesiFeladatEnum>(osztalyCsoport.OktatasiNevelesiFeladatId, osztalyCsoport.OktatasiNevelesiFeladatNeve),
|
||||
Uid = new OsztalyCsoportUid(osztalyCsoport.Id),
|
||||
OsztalyCsoportTipus = osztalyCsoport.IsCsoport ? OsztalyCsoportTipus.Csoport : OsztalyCsoportTipus.Osztaly,
|
||||
Osztalyfonok = osztalyCsoport.OsztalyfonokId.HasValue ? new OsztalyfonokSimplifiedResponse { Uid = new OsztalyfonokUid(osztalyCsoport.OsztalyfonokId.Value) } : null,
|
||||
OsztalyfonokHelyettes = osztalyCsoport.OsztalyfonokHelyettesId.HasValue ? new OsztalyfonokHelyettesSimplifiedResponse { Uid = new OsztalyfonokHelyettesUid(osztalyCsoport.OsztalyfonokHelyettesId.Value) } : null,
|
||||
EvfolyamTipus = osztalyCsoport.EvfolyamTipusId,
|
||||
CsoportTipus = (CsoportTipusEnum?)osztalyCsoport.CsoportTipus,
|
||||
TanuloUid = new TanuloUid(osztalyCsoport.TanuloId),
|
||||
Tagsagok = new HashSet<OsztalyCsoportTagsagResponse>(new OsztalyCsoportTagsagResponse())
|
||||
{
|
||||
new OsztalyCsoportTagsagResponse(ido, osztalyCsoport.ErvenyessegKezdete, osztalyCsoport.ErvenyessegVege)
|
||||
},
|
||||
OktatasiNevelesiFeladatSortIndex = OsztalyCsoportLogic.GetSortIndexByOktatasNevelesiFeladat((OktatasiNevelesiFeladatEnum)osztalyCsoport.OktatasiNevelesiFeladatId),
|
||||
IsTanoraiCeluCsoportTipus = osztalyCsoport.IsTanoraiCeluCsoportTipus
|
||||
};
|
||||
|
||||
if (!response.Add(responseItem))
|
||||
{
|
||||
if (response.TryGetValue(responseItem, out var result))
|
||||
{
|
||||
var tagsag = new OsztalyCsoportTagsagResponse(ido, osztalyCsoport.ErvenyessegKezdete, osztalyCsoport.ErvenyessegVege);
|
||||
if (!result.Tagsagok.Add(tagsag))
|
||||
{
|
||||
throw new BlException(BlExceptionType.DuplikaltKulcs);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.ElvartErtekNemTalalhato);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.Core.Logic;
|
||||
using Kreta.DataAccessManual;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.Dao.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Tantargy
|
||||
{
|
||||
internal static class TantargySubqueries
|
||||
{
|
||||
internal static HashSet<TantargyResponse> ListTanuloAktualisanTanultTantargy(DefaultConnectionParameters dcp, TanuloAktualisanTanultTantargyListRequest request, bool removeOsztalyfonokiTantargyKategoriaHaNincsErtekeles = true)
|
||||
{
|
||||
var response = new HashSet<TantargyResponse>(new TantargyResponse());
|
||||
|
||||
var tantargyIdsWithoutMagatartasSzorgalom = request.TantargyUids?
|
||||
.Where(t => !t.Equals(TantargyLogic.MagatartasTantargy.Uid) && !t.Equals(TantargyLogic.SzorgalomTantargy.Uid))
|
||||
.Select(t => t.Id).ToList();
|
||||
|
||||
if ((tantargyIdsWithoutMagatartasSzorgalom == null || !tantargyIdsWithoutMagatartasSzorgalom.Any()) && request.TantargyUids != null && request.TantargyUids.Any())
|
||||
{
|
||||
if (request.TantargyUids.Contains(TantargyLogic.MagatartasTantargy.Uid))
|
||||
{
|
||||
_ = response.Add(TantargyLogic.MagatartasTantargy);
|
||||
}
|
||||
|
||||
if (request.TantargyUids.Contains(TantargyLogic.SzorgalomTantargy.Uid))
|
||||
{
|
||||
_ = response.Add(TantargyLogic.SzorgalomTantargy);
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
var tanultTantargyak = Dal.CustomConnection.Run(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId),
|
||||
h => h.Tantargy().GetTanuloAktualisanTanultTantargyai(dcp.TanuloId,
|
||||
nameof(MagatartasSzorgalomTantargy.Magatartas),
|
||||
nameof(MagatartasSzorgalomTantargy.Szorgalom),
|
||||
tantargyIdsWithoutMagatartasSzorgalom,
|
||||
request.OktatasiNevelesiFeladatId)).ToDaoList<TanultTantargyDao>();
|
||||
|
||||
if (removeOsztalyfonokiTantargyKategoriaHaNincsErtekeles)
|
||||
{
|
||||
TantargyLogic.RemoveOsztalyfonokiKategoriasTantargyak(tanultTantargyak);
|
||||
}
|
||||
|
||||
foreach (var tantargy in tanultTantargyak)
|
||||
{
|
||||
bool hasMagatartasOrSzorgalom = false;
|
||||
if (tantargy.TantargyUid.Contains(nameof(MagatartasSzorgalomTantargy.Magatartas)))
|
||||
{
|
||||
hasMagatartasOrSzorgalom = true;
|
||||
_ = response.Add(TantargyLogic.MagatartasTantargy);
|
||||
}
|
||||
|
||||
if (tantargy.TantargyUid.Contains(nameof(MagatartasSzorgalomTantargy.Szorgalom)))
|
||||
{
|
||||
hasMagatartasOrSzorgalom = true;
|
||||
_ = response.Add(TantargyLogic.SzorgalomTantargy);
|
||||
}
|
||||
|
||||
if (!hasMagatartasOrSzorgalom)
|
||||
{
|
||||
_ = response.Add(new TantargyResponse(Convert.ToInt32(tantargy.TantargyUid), tantargy.Nev, tantargy.TargykategoriaId, tantargy.TargyKategoriaNev, tantargy.Fotargy.Value, tantargy.FotargyId, tantargy.FotargyNev, tantargy.SorSzam)
|
||||
{
|
||||
FotargyKategoriaId = tantargy.FotargyKategoriaId,
|
||||
TantargyInTtf = tantargy.TtfBol
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
TantargyLogic.OrderTantargyList(response, dcp.TanevId);
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.BL.VN.Felhasznalo.Gondviselo;
|
||||
using Kreta.Ellenorzo.BL.VN.Logic;
|
||||
using Kreta.Ellenorzo.BL.VN.TargyiEszkoz;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Gondviselo;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Felhasznalo
|
||||
{
|
||||
public class TargyiEszkozFacade : EllenorzoFacade
|
||||
{
|
||||
public TargyiEszkozFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public void SaveGondviseloEszkozIgenyles(GondviseloEszkozIgenylesRequest request)
|
||||
{
|
||||
new ValidatorLogic(request).ThrowExceptionIfModelIsNotvalid();
|
||||
|
||||
RunSubquery(() => GondviseloSubqueries.SaveGondviseloEszkozIgenyles(DefaultConnectionParameters, request));
|
||||
}
|
||||
|
||||
public bool IsEszkozKiosztva()
|
||||
=> RunSubquery(() => TargyiEszkozSubqueries.IsEszkozKiosztva(DefaultConnectionParameters));
|
||||
|
||||
public bool? IsRegisztralt()
|
||||
=> RunSubquery(() => TargyiEszkozSubqueries.IsRegistered(DefaultConnectionParameters));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core.ConnectionType;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.TargyiEszkoz
|
||||
{
|
||||
internal static class TargyiEszkozSubqueries
|
||||
{
|
||||
internal static bool IsEszkozKiosztva(DefaultConnectionParameters dcp)
|
||||
{
|
||||
return new EszkozIgenylesHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).IsEszkozKiosztva(dcp.TanuloId);
|
||||
}
|
||||
|
||||
internal static bool? IsRegistered(DefaultConnectionParameters dcp)
|
||||
{
|
||||
return new FeltarGondviseloHelper(new DalHandlerConnectionType(new MobileConnectionType(dcp.FelhasznaloId, dcp.IntezmenyId, dcp.IntezmenyAzonosito, dcp.TanevId), dcp.DalHandler)).IsRegisztralt(dcp.TanuloId, dcp.GondviseloId.Value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.BL.VN.Ellenorzo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Common;
|
||||
using Kreta.Ellenorzo.Domain.VN.Telefon;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Telefon
|
||||
{
|
||||
public class TelefonFacade : EllenorzoFacade
|
||||
{
|
||||
public TelefonFacade(MobileUser mobileUser) : base(mobileUser)
|
||||
{
|
||||
}
|
||||
|
||||
public HashSet<TelefonListResponse> ListTelefonszam(TelefonListRequest request) => RunSubquery(() => TelefonSubqueries.ListTelefon(DefaultConnectionParameters.DalHandler, request));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.DataAccessManual.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
using Kreta.Ellenorzo.Domain.VN.Telefon;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.BL.VN.Telefon
|
||||
{
|
||||
internal static class TelefonSubqueries
|
||||
{
|
||||
internal static HashSet<TelefonListResponse> ListTelefon(IDalHandler h, TelefonListRequest request)
|
||||
{
|
||||
var response = new HashSet<TelefonListResponse>(new TelefonListResponse());
|
||||
var felhasznalokTelefonszamai = h.Telefon().ListTelefon(request.FelhasznaloIds, request.IsPublic);
|
||||
foreach (var felhasznalokTelefonszama in felhasznalokTelefonszamai)
|
||||
{
|
||||
var felhasznaloTelefonszamai = new TelefonListResponse { FelhasznaloUid = new FelhasznaloUid(felhasznalokTelefonszama.FelhasznaloId) };
|
||||
var telefonszam = new TelefonResponse
|
||||
{
|
||||
Uid = new TelefonUid(felhasznalokTelefonszama.Id),
|
||||
Telefonszam = felhasznalokTelefonszama.Telefonszam,
|
||||
Tipus = new Adatszotar<TelefonTipusEnum>(felhasznalokTelefonszama.Tipus, felhasznalokTelefonszama.TipusNeve),
|
||||
IsAlapertelmezett = felhasznalokTelefonszama.IsAlapertelmezett
|
||||
};
|
||||
felhasznaloTelefonszamai.Telefonszamok.Add(telefonszam);
|
||||
|
||||
if (!response.Add(felhasznaloTelefonszamai))
|
||||
{
|
||||
_ = response.TryGetValue(felhasznaloTelefonszamai, out TelefonListResponse foundResponseItem);
|
||||
foundResponseItem.Telefonszamok.Add(telefonszam);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
63
Kreta.WebApi/Ellenorzo/Kreta.Ellenorzo.BL/app.config
Normal file
63
Kreta.WebApi/Ellenorzo/Kreta.Ellenorzo.BL/app.config
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.1.0" newVersion="5.2.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="SimpleInjector" publicKeyToken="984cb50dea722e99" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.FileProviders.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration.FileExtensions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.FileProviders.Physical" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Configuration" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.5.1.0" newVersion="6.5.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Tokens" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.5.1.0" newVersion="6.5.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="CacheManager.Core" publicKeyToken="5b450b4fb65c4cdb" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.0.0" newVersion="1.2.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.6.0" newVersion="5.2.6.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Kreta.Core.Validation" version="2.0.16" targetFramework="net48" />
|
||||
<package id="Kreta.Web.Logging.Abstractions" version="1.0.12" targetFramework="net48" />
|
||||
<package id="Meziantou.Analyzer" version="1.0.688" targetFramework="net48" developmentDependency="true" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
|
||||
</packages>
|
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{29AF1E7D-3220-462F-B90D-ABA3C984987B}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Kreta.Ellenorzo.Dao</RootNamespace>
|
||||
<AssemblyName>Kreta.Ellenorzo.Dao</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\..\Tools\SharedAssemblyInfo.cs">
|
||||
<Link>Properties\SharedAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="VN\BejelentettSzamonkeres\BejelentettSzamonkeresResponseDao.cs" />
|
||||
<Compile Include="VN\DigitalisInformacio\DigitalisInformacioResponseDao.cs" />
|
||||
<Compile Include="VN\Ellenorzo\IntezmenyAdatokDao.cs" />
|
||||
<Compile Include="VN\Email\EmailRequestDao.cs" />
|
||||
<Compile Include="VN\Email\EmailResponseDao.cs" />
|
||||
<Compile Include="VN\Ertekeles\Atlag\TantargyiAtlagResponseDao.cs" />
|
||||
<Compile Include="VN\Ertekeles\ErtekelesResponseDao.cs" />
|
||||
<Compile Include="VN\Felhasznalo\NapiErtesitesOsszefoglaloDao.cs" />
|
||||
<Compile Include="VN\Faliujsag\FaliujsagResponseDao.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Alkalmazott\AlkalmazottResponseDao.cs" />
|
||||
<Compile Include="VN\Feljegyzes\FeljegyzesResponseDao.cs" />
|
||||
<Compile Include="VN\FeltoltottFajl\FileKeresesRequestDao.cs" />
|
||||
<Compile Include="VN\FeltoltottFajl\FileKeresesResponseDao.cs" />
|
||||
<Compile Include="VN\Fogadoora\FogadooraResponseDao.cs" />
|
||||
<Compile Include="VN\Fogadoora\Idopont\FogadooraIdopontJelentkezesDeleteRequestDao.cs" />
|
||||
<Compile Include="VN\HaziFeladat\HaziFeladatResponseDao.cs" />
|
||||
<Compile Include="VN\Intezmeny\Hetirend\OrarendiResponseDao.cs" />
|
||||
<Compile Include="VN\Felhasznalo\Gondviselo\GondviseloResponseDao.cs" />
|
||||
<Compile Include="VN\Intezmeny\Rendszermodul\RendszermodulListResponseDao.cs" />
|
||||
<Compile Include="VN\Intezmeny\TanevRendje\TanevRendjeResponseDao.cs" />
|
||||
<Compile Include="VN\Lep\TanuloEloadasResponseDao.cs" />
|
||||
<Compile Include="VN\Mulasztas\MulasztasResponseDao.cs" />
|
||||
<Compile Include="VN\OraFile\OraFileResponseDao.cs" />
|
||||
<Compile Include="VN\OsztalyCsoport\Osztaly\OsztalyTanuloResponseDao.cs" />
|
||||
<Compile Include="VN\OsztalyCsoport\TanuloOsztalyCsoportResponseDao.cs" />
|
||||
<Compile Include="VN\Tantargy\TanultTantargyDao.cs" />
|
||||
<Compile Include="VN\Telefon\TelefonResponseDao.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Kreta.Core\Kreta.Core.csproj">
|
||||
<Project>{57418D3E-CAF1-482C-9B18-85D147ABD495}</Project>
|
||||
<Name>Kreta.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.BejelentettSzamonkeres
|
||||
{
|
||||
public class BejelentettSzamonkeresResponseDao
|
||||
{
|
||||
[ColumnName("KeszitesDatuma")]
|
||||
public DateTime BejelentesDatuma { get; set; }
|
||||
|
||||
[ColumnName("SzamonkeresDatuma")]
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
[ColumnName("HetNapja")]
|
||||
public int HetNapjaId { get; set; }
|
||||
|
||||
[ColumnName("HetNapja_DNAME")]
|
||||
public string HetNapjaNev { get; set; }
|
||||
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("Oraszam")]
|
||||
public int? OrarendiOraOraszama { get; set; }
|
||||
|
||||
[ColumnName("TanarNev")]
|
||||
public string RogzitoTanarNev { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesModId")]
|
||||
public int SzamonkeresModjaId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesModNev")]
|
||||
public string SzamonkeresModjaNev { get; set; }
|
||||
|
||||
[ColumnName("SzamonkeresMegnevezes")]
|
||||
public string SzamonkeresTemaja { get; set; }
|
||||
|
||||
[ColumnName("TargyNev")]
|
||||
public string TantargyNev { get; set; }
|
||||
|
||||
[ColumnName("TargyId")]
|
||||
public int TantargyId { get; set; }
|
||||
|
||||
[ColumnName("TargyKategoria")]
|
||||
public int TantargyKategoriaId { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportId")]
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.DigitalisInformacio
|
||||
{
|
||||
public class DigitalisInformacioResponseDao
|
||||
{
|
||||
[ColumnName("TanitasiOraId")]
|
||||
public int TanitasiOraId { get; set; }
|
||||
|
||||
[ColumnName("DigitalisEszkozTipusId")]
|
||||
public int? DigitalisEszkozTipusId { get; set; }
|
||||
|
||||
[ColumnName("DigitalisPlatformTipusId")]
|
||||
public int? DigitalisPlatformTipusId { get; set; }
|
||||
|
||||
[ColumnName("DigitalisTamogatoEszkozTipusId")]
|
||||
public int? DigitalisTamogatoEszkozTipusId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Ellenorzo
|
||||
{
|
||||
public class IntezmenyAdatokDao
|
||||
{
|
||||
[ColumnName("IntezmenyId")]
|
||||
public int IntezmenyId { get; set; }
|
||||
|
||||
[ColumnName("AktivTanevId")]
|
||||
public int TanevId { get; set; }
|
||||
|
||||
[ColumnName("TanevSorszam")]
|
||||
public int TanevSorszam { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Email
|
||||
{
|
||||
public class EmailRequestDao
|
||||
{
|
||||
public List<int> FelhasznaloIds { get; set; }
|
||||
|
||||
public bool? IsPublic { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Email
|
||||
{
|
||||
public class EmailResponseDao
|
||||
{
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("Tipus")]
|
||||
public int Tipus { get; set; }
|
||||
|
||||
[ColumnName("Tipus_DNAME")]
|
||||
public string TipusNeve { get; set; }
|
||||
|
||||
[ColumnName("EmailCim")]
|
||||
public string Email { get; set; }
|
||||
|
||||
[ColumnName("Alapertelmezett")]
|
||||
public bool IsAlapertelmezett { get; set; }
|
||||
|
||||
[ColumnName("FelhasznaloId")]
|
||||
public int FelhasznaloId { get; set; }
|
||||
|
||||
[ColumnName("GondviseloId")]
|
||||
public int? GondviseloId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Ertekeles.Atlag
|
||||
{
|
||||
public class TantargyiAtlagResponseDao
|
||||
{
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
[ColumnName("TantargyId")]
|
||||
public int TantargyId { get; set; }
|
||||
[ColumnName("Atlag")]
|
||||
public decimal? Atlag { get; set; }
|
||||
[ColumnName("SulyozottAtlag")]
|
||||
public decimal? SulyozottAtlag { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Ertekeles
|
||||
{
|
||||
public class ErtekelesResponseDao
|
||||
{
|
||||
[ColumnName("TipusId")]
|
||||
public int TipusId { get; set; }
|
||||
|
||||
[ColumnName("TipusId_DNAME")]
|
||||
public string TipusNeve { get; set; }
|
||||
|
||||
[ColumnName("Datum")]
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("ErtekeloId")]
|
||||
public int ErtekeloId { get; set; }
|
||||
|
||||
[ColumnName("ErtekeloNyomtatasiNev")]
|
||||
public string ErtekeloNyomtatasiNev { get; set; }
|
||||
|
||||
[ColumnName("IsMagatartasSzorgalom")]
|
||||
public bool IsMagatartasSzorgalom { get; set; }
|
||||
|
||||
[ColumnName("RogzitesDatum")]
|
||||
public DateTime RogzitesDatum { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportId")]
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesModId")]
|
||||
public int? ErtekelesModId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesModId_DNAME")]
|
||||
public string ErtekelesModNeve { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesTema")]
|
||||
public string ErtekelesTema { get; set; }
|
||||
|
||||
[ColumnName("TantargyId")]
|
||||
public int? TantargyId { get; set; }
|
||||
|
||||
[ColumnName("TantargyNev")]
|
||||
public string TantargyNev { get; set; }
|
||||
|
||||
[ColumnName("TantargyKategoriaId")]
|
||||
public int? TantargyKategoriaId { get; set; }
|
||||
|
||||
[ColumnName("TantargyKategoriaId_DNAME")]
|
||||
public string TantargyKategoriaNeve { get; set; }
|
||||
|
||||
[ColumnName("IsFotargy")]
|
||||
public bool? IsFotargy { get; set; }
|
||||
|
||||
[ColumnName("SorSzam")]
|
||||
public int? SorSzam { get; set; }
|
||||
|
||||
[ColumnName("FotargyId")]
|
||||
public int? FotargyId { get; set; }
|
||||
|
||||
[ColumnName("FotargyNev")]
|
||||
public string FotargyNev { get; set; }
|
||||
|
||||
[ColumnName("FotargyTantargyKategoriaId")]
|
||||
public int? FotargyTantargyKategoriaId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesOsztalyzatId_DNAME")]
|
||||
public string ErtekelesOsztalyzatNeve { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSzoveg")]
|
||||
public string ErtekelesSzoveg { get; set; }
|
||||
|
||||
[ColumnName("SzovegesErtekelesRovidNev")]
|
||||
public string SzovegesErtekelesRovidNev { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSzovegFormazott")]
|
||||
public string ErtekelesSzovegFormazott { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSzazalek")]
|
||||
public int? ErtekelesSzazalekErteke { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesOsztalyzatId")]
|
||||
public int? ErtekelesOsztalyzatId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSuly")]
|
||||
public int? ErtekelesSuly { get; set; }
|
||||
|
||||
[ColumnName("MagatartasOsztalyzatId_DNAME")]
|
||||
public string MagatartasOsztalyzatSzovegesen { get; set; }
|
||||
|
||||
[ColumnName("MagatartasSzoveg")]
|
||||
public string MagatartasSzoveg { get; set; }
|
||||
|
||||
[ColumnName("MagatartasSzovegFormazott")]
|
||||
public string MagatartasSzovegFormazott { get; set; }
|
||||
|
||||
[ColumnName("MagatartasErtekId_DNAME")]
|
||||
public string MagatartasErtekSzovegesen { get; set; }
|
||||
|
||||
[ColumnName("MagatartasOsztalyzatId")]
|
||||
public int? MagatartasOsztalyzatId { get; set; }
|
||||
|
||||
[ColumnName("SzorgalomOsztalyzatId_DNAME")]
|
||||
public string SzorgalomOsztalyzatSzovegesen { get; set; }
|
||||
|
||||
[ColumnName("SzorgalomSzoveg")]
|
||||
public string SzorgalomSzoveg { get; set; }
|
||||
|
||||
[ColumnName("SzorgalomSzovegFormazott")]
|
||||
public string SzorgalomSzovegFormazott { get; set; }
|
||||
|
||||
[ColumnName("SzorgalomErtekId_DNAME")]
|
||||
public string SzorgalomErtekSzoveges { get; set; }
|
||||
|
||||
[ColumnName("SzorgalomOsztalyzatId")]
|
||||
public int? SzorgalomOsztalyzatId { get; set; }
|
||||
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Faliujsag
|
||||
{
|
||||
public class FaliujsagResponseDao
|
||||
{
|
||||
[ColumnName("Erv_kezd")]
|
||||
public DateTime ErvenyessegKezdete { get; set; }
|
||||
|
||||
[ColumnName("Erv_vege")]
|
||||
public DateTime ErvenyessegVege { get; set; }
|
||||
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("Bejegyzo")]
|
||||
public string RogzitoNeve { get; set; }
|
||||
|
||||
[ColumnName("Cim")]
|
||||
public string Cim { get; set; }
|
||||
|
||||
[ColumnName("Szoveg")]
|
||||
public string Tartalom { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Felhasznalo.Alkalmazott
|
||||
{
|
||||
public class AlkalmazottResponseDao
|
||||
{
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("Nev")]
|
||||
public string Nev { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Felhasznalo.Gondviselo
|
||||
{
|
||||
public class GondviseloResponseDao
|
||||
{
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("IdpEgyediAzonosito")]
|
||||
public Guid IdpUniqueId { get; set; }
|
||||
|
||||
[ColumnName("Nev")]
|
||||
public string Nev { get; set; }
|
||||
|
||||
[ColumnName("EmailCim")]
|
||||
public string EmailCim { get; set; }
|
||||
|
||||
[ColumnName("Telefonszam")]
|
||||
public string Telefonszam { get; set; }
|
||||
|
||||
[ColumnName("IsTorvenyesKepviselo")]
|
||||
public bool IsTorvenyesKepviselo { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Ertekeles
|
||||
{
|
||||
public class NapiErtesitesOsszefoglaloDao
|
||||
{
|
||||
[ColumnName("ErtesitesTipusa")]
|
||||
public string ErtesitesTipusa { get; set; }
|
||||
|
||||
[ColumnName("ErtesitesekSzama")]
|
||||
public int ErtesitesekSzama { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Feljegyzes
|
||||
{
|
||||
public class FeljegyzesResponseDao
|
||||
{
|
||||
[ColumnName("Cim")]
|
||||
public string Cim { get; set; }
|
||||
|
||||
[ColumnName("Datum")]
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("KeszitesDatuma")]
|
||||
public DateTime KeszitesDatuma { get; set; }
|
||||
|
||||
[ColumnName("Tanar")]
|
||||
public string TanarNev { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportId")]
|
||||
public int? OsztalyCsoportId { get; set; }
|
||||
|
||||
[ColumnName("Tartalom")]
|
||||
public string Tartalom { get; set; }
|
||||
|
||||
[ColumnName("Tipus")]
|
||||
public int TipusId { get; set; }
|
||||
|
||||
[ColumnName("Tipus_DNAME")]
|
||||
public string TipusNev { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.FeltoltottFajl
|
||||
{
|
||||
public class FileKeresesRequestDao
|
||||
{
|
||||
public int? FeladatKategoriaId { get; set; }
|
||||
|
||||
public int? FeladatEllatasiHelyId { get; set; }
|
||||
|
||||
public DateTime? DatumTol { get; set; }
|
||||
|
||||
public DateTime? DatumIg { get; set; }
|
||||
|
||||
public int? TanarHelyettesitoId { get; set; }
|
||||
|
||||
public int? OsztalyCsoportId { get; set; }
|
||||
|
||||
public int? TantargyId { get; set; }
|
||||
|
||||
public string FajlNeve { get; set; }
|
||||
|
||||
public int? FoglalkozasId { get; set; }
|
||||
|
||||
public int? OrarendiOraId { get; set; }
|
||||
|
||||
public int? OrarendiOraGroupId { get; set; }
|
||||
|
||||
public int? TanitasiOraId { get; set; }
|
||||
|
||||
public int OraFileTipusId { get; set; }
|
||||
|
||||
public int? IsOnlineOra { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.FeltoltottFajl
|
||||
{
|
||||
public class FileKeresesResponseDao
|
||||
{
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("FileID")]
|
||||
public int FileId { get; set; }
|
||||
|
||||
[ColumnName("KepNeve")]
|
||||
public string Nev { get; set; }
|
||||
|
||||
[ColumnName("Megjegyzes")]
|
||||
public string Megjegyzes { get; set; }
|
||||
|
||||
[ColumnName("Datum")]
|
||||
public DateTime FeltoltesDatuma { get; set; }
|
||||
|
||||
[ColumnName("FajlUrl")]
|
||||
public string Utvonal { get; set; }
|
||||
|
||||
[ColumnName("FajlKiterjesztes")]
|
||||
public string Kiterjesztes { get; set; }
|
||||
|
||||
[ColumnName("GUID")]
|
||||
public Guid Guid { get; set; }
|
||||
|
||||
[ColumnName("OrarendiOraId")]
|
||||
public int? OrarendiOraId { get; set; }
|
||||
|
||||
[ColumnName("TanitasiOraId")]
|
||||
public int? TanitasiOraId { get; set; }
|
||||
|
||||
[ColumnName("Megjelenitett")]
|
||||
public bool Megjelenitett { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoport")]
|
||||
public string OsztalyCsoportNev { get; set; }
|
||||
|
||||
[ColumnName("Tantargy")]
|
||||
public string TantargyNev { get; set; }
|
||||
|
||||
[ColumnName("TanarHelyettesito")]
|
||||
public string TanarNev { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Fogadoora
|
||||
{
|
||||
public class FogadooraResponseDao
|
||||
{
|
||||
[ColumnName("FogadooraId")]
|
||||
public int FogadooraId { get; set; }
|
||||
|
||||
[ColumnName("TeremId")]
|
||||
public int TeremId { get; set; }
|
||||
|
||||
[ColumnName("TeremNev")]
|
||||
public string TeremNev { get; set; }
|
||||
|
||||
[ColumnName("FogadooraTipusId")]
|
||||
public int TipusId { get; set; }
|
||||
|
||||
[ColumnName("FogadooraKezdete")]
|
||||
public DateTime FogadooraKezdete { get; set; }
|
||||
|
||||
[ColumnName("FogadooraVege")]
|
||||
public DateTime FogadooraVege { get; set; }
|
||||
|
||||
[ColumnName("JelentkezesHatarido")]
|
||||
public DateTime? JelentkezesHatarido { get; set; }
|
||||
|
||||
[ColumnName("TanarId")]
|
||||
public int TanarId { get; set; }
|
||||
|
||||
[ColumnName("TanarNev")]
|
||||
public string TanarNev { get; set; }
|
||||
|
||||
[ColumnName("FogadooraIdopontId")]
|
||||
public int? FogadooraIdopontId { get; set; }
|
||||
|
||||
[ColumnName("FogadooraIdopontKezdete")]
|
||||
public DateTime? FogadooraIdopontKezdete { get; set; }
|
||||
|
||||
[ColumnName("FogadooraIdopontVege")]
|
||||
public DateTime? FogadooraIdopontVege { get; set; }
|
||||
|
||||
[ColumnName("IsSzabadIdopont")]
|
||||
public bool IsSzabadIdopont { get; set; }
|
||||
|
||||
[ColumnName("IsJelentkeztem")]
|
||||
public bool IsJelentkeztem { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
namespace Kreta.Ellenorzo.Dao.VN.Fogadoora.Idopont
|
||||
{
|
||||
public class FogadooraIdopontJelentkezesDeleteRequestDao
|
||||
{
|
||||
public int FogadooraIdopontId { get; set; }
|
||||
|
||||
public int GondviseloId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.HaziFeladat
|
||||
{
|
||||
public class HaziFeladatResponseDao
|
||||
{
|
||||
[ColumnName("OraDatuma")]
|
||||
public DateTime? FeladasDatuma { get; set; }
|
||||
|
||||
[ColumnName("HaziFeladatHatarido")]
|
||||
public DateTime HataridoDatuma { get; set; }
|
||||
|
||||
[ColumnName("HaziFeladatRogzitesDatuma")]
|
||||
public DateTime RogzitesIdopontja { get; set; }
|
||||
|
||||
[ColumnName("HaziFeladatId")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("IsTanarRogzitette")]
|
||||
public bool IsTanarRogzitette { get; set; }
|
||||
|
||||
[ColumnName("HfBeadandoTipusId")]
|
||||
public int? HfBeadandoTipusId { get; set; }
|
||||
|
||||
[ColumnName("HaziFeladatRogzitoId")]
|
||||
public int RogzitoTanarId { get; set; }
|
||||
|
||||
[ColumnName("TanarNeve")]
|
||||
public string RogzitoTanarNev { get; set; }
|
||||
|
||||
[ColumnName("HaziFeladatSzoveg")]
|
||||
public string Szoveg { get; set; }
|
||||
|
||||
[ColumnName("TantargyId")]
|
||||
public int TantargyId { get; set; }
|
||||
|
||||
[ColumnName("TantargyNev")]
|
||||
public string TantargyNev { get; set; }
|
||||
|
||||
[ColumnName("TargyKategoria")]
|
||||
public int TargyKategoria { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportId")]
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
|
||||
[ColumnName("MegoldottHF")]
|
||||
public bool IsMegoldva { get; set; }
|
||||
|
||||
[ColumnName("HaziFeladatCsatolasEngedelyezesTipusId")]
|
||||
public int? HaziFeladatCsatolasEngedelyezesTipusId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Intezmeny.Hetirend
|
||||
{
|
||||
public class OrarendiResponseDao
|
||||
{
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("HetSorszama")]
|
||||
public int HetSorszama { get; set; }
|
||||
|
||||
[ColumnName("HetKezdoNapja")]
|
||||
public DateTime KezdoNapDatuma { get; set; }
|
||||
|
||||
[ColumnName("HetUtolsoNapja")]
|
||||
public DateTime VegNapDatuma { get; set; }
|
||||
|
||||
[ColumnName("Hetirend")]
|
||||
public int? HetirendId { get; set; }
|
||||
|
||||
[ColumnName("Hetirend_DNAME")]
|
||||
public string HetirendNev { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Intezmeny.Rendszermodul
|
||||
{
|
||||
public class RendszermodulListResponseDao
|
||||
{
|
||||
[ColumnName("C_ALAPKRETA")]
|
||||
public bool AlapKreta { get; set; }
|
||||
|
||||
[ColumnName("C_KRETAESL")]
|
||||
public bool KretaEsl { get; set; }
|
||||
|
||||
[ColumnName("C_KRETAEUGYINTEZES")]
|
||||
public bool KretaEugyintezes { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Intezmeny.TanevRendje
|
||||
{
|
||||
public class TanevRendjeResponseDao
|
||||
{
|
||||
[ColumnName("Datum")]
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
[ColumnName("HetNapja")]
|
||||
public int? HetNapjaId { get; set; }
|
||||
|
||||
[ColumnName("HetNapja_DNAME")]
|
||||
public string HetNapjaNev { get; set; }
|
||||
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("Global")]
|
||||
public bool IsMindenOsztalyraVonatkozik { get; set; }
|
||||
|
||||
[ColumnName("OrarendiNap")]
|
||||
public bool IsOrarendiNap { get; set; }
|
||||
|
||||
[ColumnName("NapTip_DNAME")]
|
||||
public string NapTipusNeve { get; set; }
|
||||
|
||||
[ColumnName("NapTip")]
|
||||
public int NapTipusId { get; set; }
|
||||
|
||||
[ColumnName("Hetirend_DNAME")]
|
||||
public string HetirendNeve { get; set; }
|
||||
|
||||
[ColumnName("Hetirend")]
|
||||
public int HetirendId { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportId")]
|
||||
public int? OsztalyCsoportId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Lep
|
||||
{
|
||||
public class TanuloEloadasResponseDao
|
||||
{
|
||||
[ColumnName("EloadasId")]
|
||||
public int EloadasId { get; set; }
|
||||
|
||||
[ColumnName("GondviseloElfogadas")]
|
||||
public string GondviseloElfogadas { get; set; }
|
||||
|
||||
[ColumnName("Megjelent")]
|
||||
public bool Megjelent { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Mulasztas
|
||||
{
|
||||
public class MulasztasResponseDao
|
||||
{
|
||||
[ColumnName("MulasztasDatum")]
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
[ColumnName("HelyettesitesTipusa")]
|
||||
public int? HelyettesitesTipusa { get; set; }
|
||||
|
||||
[ColumnName("HelyettesitoTanarId")]
|
||||
public int? HelyettesitoTanarId { get; set; }
|
||||
|
||||
[ColumnName("HelyettesitoTanarNeve")]
|
||||
public string HelyettesitoTanarNev { get; set; }
|
||||
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("IgazolasTipus")]
|
||||
public int? IgazolasTipusId { get; set; }
|
||||
|
||||
[ColumnName("IgazolasTipus_DNAME")]
|
||||
public string IgazolasTipusNev { get; set; }
|
||||
|
||||
[ColumnName("Igazolt")]
|
||||
public bool? Igazolt { get; set; }
|
||||
|
||||
[ColumnName("IsTanorankivuliFoglalkozas")]
|
||||
public bool IsTanorankivuliFoglalkozas { get; set; }
|
||||
|
||||
[ColumnName("Perc")]
|
||||
public int? KesesPercben { get; set; }
|
||||
|
||||
[ColumnName("RogzitesDatum")]
|
||||
public DateTime KeszitesDatuma { get; set; }
|
||||
|
||||
[ColumnName("TanarId")]
|
||||
public int? TanarId { get; set; }
|
||||
|
||||
[ColumnName("TanarNeve")]
|
||||
public string TanarNev { get; set; }
|
||||
|
||||
[ColumnName("TanitasiOraKezdete")]
|
||||
public DateTime TanitasiOraKezdoDatum { get; set; }
|
||||
|
||||
[ColumnName("Oraszam")]
|
||||
public byte? TanitasiOraOraszam { get; set; }
|
||||
|
||||
[ColumnName("TanitasiOraVege")]
|
||||
public DateTime TanitasiOraVegDatum { get; set; }
|
||||
|
||||
[ColumnName("TantargyId")]
|
||||
public int TantargyId { get; set; }
|
||||
|
||||
[ColumnName("TantargyKategoria")]
|
||||
public int TantargyKategoriaId { get; set; }
|
||||
|
||||
[ColumnName("TantargyKategoria_DNAME")]
|
||||
public string TantargyKategoriaNev { get; set; }
|
||||
|
||||
[ColumnName("Targy")]
|
||||
public string TantargyNev { get; set; }
|
||||
|
||||
[ColumnName("MulasztasTipus")]
|
||||
public int TipusId { get; set; }
|
||||
|
||||
[ColumnName("MulasztasTipus_DNAME")]
|
||||
public string TipusNev { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportId")]
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
|
||||
[ColumnName("TanoraiCeluMulasztas")]
|
||||
public bool IsTanoraiCeluMulasztas { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.OraFile
|
||||
{
|
||||
public class OraFileResponseDao
|
||||
{
|
||||
[ColumnName("Id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("FileId")]
|
||||
public int FileId { get; set; }
|
||||
|
||||
[ColumnName("Datum")]
|
||||
public DateTime OraDatum { get; set; }
|
||||
|
||||
[ColumnName("FileNev")]
|
||||
public string FileNev { get; set; }
|
||||
|
||||
[ColumnName("OrarendiOraId")]
|
||||
public int? OrarendiOraId { get; set; }
|
||||
|
||||
[ColumnName("TanitasiOraId")]
|
||||
public int? TanitasiOraId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.OsztalyCsoport.Osztaly
|
||||
{
|
||||
public class OsztalyTanuloResponseDao
|
||||
{
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportId")]
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.OsztalyCsoport
|
||||
{
|
||||
public class TanuloOsztalyCsoportResponseDao
|
||||
{
|
||||
[ColumnName("FeladatKategoriaId")]
|
||||
public int OktatasNevelesiKategoriaId { get; set; }
|
||||
|
||||
[ColumnName("FeladatKategoriaId_DNAME")]
|
||||
public string OktatasNevelesiKategoriaNeve { get; set; }
|
||||
|
||||
[ColumnName("OktatasiNevelesiFeladatId")]
|
||||
public int OktatasiNevelesiFeladatId { get; set; }
|
||||
|
||||
[ColumnName("OktatasiNevelesiFeladatId_DNAME")]
|
||||
public string OktatasiNevelesiFeladatNeve { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportId")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("Nev")]
|
||||
public string Nev { get; set; }
|
||||
|
||||
[ColumnName("ErvKezd")]
|
||||
public DateTime ErvenyessegKezdete { get; set; }
|
||||
|
||||
[ColumnName("ErvVeg")]
|
||||
public DateTime? ErvenyessegVege { get; set; }
|
||||
|
||||
[ColumnName("IsCsoport")]
|
||||
public bool IsCsoport { get; set; }
|
||||
|
||||
[ColumnName("OsztalyfonokId")]
|
||||
public int? OsztalyfonokId { get; set; }
|
||||
|
||||
[ColumnName("OsztalyfonokHelyettesId")]
|
||||
public int? OsztalyfonokHelyettesId { get; set; }
|
||||
|
||||
[ColumnName("EvfolyamTipus")]
|
||||
public int? EvfolyamTipusId { get; set; }
|
||||
|
||||
[ColumnName("CsoportTipus")]
|
||||
public int? CsoportTipus { get; set; }
|
||||
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[ColumnName("IsTanoraiCeluCsoportTipus")]
|
||||
public bool? IsTanoraiCeluCsoportTipus { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.Ellenorzo.Dao.VN.Tantargy
|
||||
{
|
||||
public class TanultTantargyDao
|
||||
{
|
||||
[ColumnName("TantargyUid")]
|
||||
public string TantargyUid { get; set; }
|
||||
|
||||
[ColumnName("TTFBol")]
|
||||
public bool TtfBol { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesBol")]
|
||||
public bool ErtekelesBol { get; set; }
|
||||
|
||||
[ColumnName("Nev")]
|
||||
public string Nev { get; set; }
|
||||
|
||||
[ColumnName("TargykategoriaId")]
|
||||
public int? TargykategoriaId { get; set; }
|
||||
|
||||
[ColumnName("TargyKategoriaNev")]
|
||||
public string TargyKategoriaNev { get; set; }
|
||||
|
||||
[ColumnName("SorSzam")]
|
||||
public int? SorSzam { get; set; }
|
||||
|
||||
[ColumnName("IsFotargy")]
|
||||
public bool? Fotargy { get; set; }
|
||||
|
||||
[ColumnName("FotargyId")]
|
||||
public int? FotargyId { get; set; }
|
||||
|
||||
[ColumnName("FotargyNev")]
|
||||
public string FotargyNev { get; set; }
|
||||
|
||||
[ColumnName("FotargyKategoriaId")]
|
||||
public int? FotargyKategoriaId { get; set; }
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue