init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.OsztalyAtlag
|
||||
{
|
||||
public class OsztalyAtlagListRequest
|
||||
{
|
||||
public OsztalyAtlagListRequest()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public OsztalyAtlagListRequest(string tantargyUid)
|
||||
{
|
||||
TantargyUids = string.IsNullOrWhiteSpace(tantargyUid) ? null : new List<TantargyUid> { new TantargyUid(tantargyUid) };
|
||||
}
|
||||
public OktatasiNevelesiFeladatUid OktatasiNevelesiFeladatUid { get; set; }
|
||||
|
||||
public List<TantargyUid> TantargyUids { get; set; }
|
||||
|
||||
public bool IsAtlagNeeded { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.OsztalyAtlag
|
||||
{
|
||||
public class OsztalyAtlagListResponse : IEqualityComparer<OsztalyAtlagListResponse>
|
||||
{
|
||||
public decimal? OsztalyCsoportAtlag { get; set; }
|
||||
|
||||
public decimal? OsztalyCsoportAtlagtolValoElteres { get; set; }
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public decimal? TanuloAtlag { get; set; }
|
||||
|
||||
public string Uid { get; set; }
|
||||
|
||||
public bool Equals(OsztalyAtlagListResponse x, OsztalyAtlagListResponse y) => x == y || x.Tantargy.Equals(y.Tantargy);
|
||||
|
||||
public int GetHashCode(OsztalyAtlagListResponse obj) => obj.Tantargy.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
[Serializable]
|
||||
public class AtlagAlakulasaResponse
|
||||
{
|
||||
public decimal Atlag { get; set; }
|
||||
|
||||
public DateTime Datum { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
public class TantargyiAtlagListRequest
|
||||
{
|
||||
public OktatasiNevelesiFeladatUid OktatasiNevelesiFeladatUid { get; set; }
|
||||
|
||||
public bool IsAtlagAlakulasaIncluded { get; set; }
|
||||
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
public ErtekelesekTipusEnum ErtekelesekTipus { get; set; } = ErtekelesekTipusEnum.MindenErtekelesTipus;
|
||||
|
||||
public TantargyUid TantargyUid { get; set; }
|
||||
|
||||
public bool IsMobileApiCacheEnabled { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Felhasznalo.Tanulo;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
[Serializable]
|
||||
public class TantargyiAtlagListResponse
|
||||
{
|
||||
public decimal? Atlag { get; set; }
|
||||
|
||||
public decimal? SulyozottOsztalyzatOsszege { get; set; }
|
||||
|
||||
public decimal? SulyozottOsztalyzatSzama { get; set; }
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public TanuloSimplifiedResponse Tanulo { get; set; }
|
||||
|
||||
public List<AtlagAlakulasaResponse> AtlagAlakulasaIdoFuggvenyeben { get; set; }
|
||||
|
||||
public int SortIndex { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
public class TantargyiAtlagRequest
|
||||
{
|
||||
public HashSet<TantargyResponse> Tantargyak { get; set; }
|
||||
|
||||
public List<int> TanuloIds { get; set; }
|
||||
|
||||
public int? OktatasiNevelesiFeladatId { get; set; }
|
||||
|
||||
public ErtekelesekTipusEnum ErtekelesekTipus { get; set; } = ErtekelesekTipusEnum.MindenErtekelesTipus;
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
public class TantargyiAtlagResponse
|
||||
{
|
||||
public readonly List<ErtekelesListResponse> Ertekelesek = new List<ErtekelesListResponse>();
|
||||
|
||||
public void Add(ErtekelesListResponse ertekeles)
|
||||
{
|
||||
Ertekelesek.Add(ertekeles);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
public class TanuloOsztalyCsoporthozViszonyitottTantargyiAtlagRequest
|
||||
{
|
||||
public TanuloOsztalyCsoporthozViszonyitottTantargyiAtlagRequest(string osztalyCsoportUid)
|
||||
{
|
||||
OsztalyCsoportUid = new OsztalyCsoportUid(osztalyCsoportUid);
|
||||
}
|
||||
|
||||
public TanuloOsztalyCsoporthozViszonyitottTantargyiAtlagRequest()
|
||||
{
|
||||
}
|
||||
|
||||
public OsztalyCsoportUid OsztalyCsoportUid { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
using Kreta.Ellenorzo.Domain.VN.Tantargy;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles.Atlag.TantargyiAtlag
|
||||
{
|
||||
public class TanuloOsztalyCsoporthozViszonyitottTantargyiAtlagResponse
|
||||
{
|
||||
public decimal? OsztalyCsoportAtlag { get; set; }
|
||||
|
||||
public decimal? OsztalyCsoportAtlagtolValoElteres => TanuloAtlag - OsztalyCsoportAtlag;
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public decimal? TanuloAtlag { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using Kreta.Ellenorzo.Domain.VN.Indexers;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.UniqueIdentifier;
|
||||
using Kreta.Ellenorzo.Domain.VN.Utility.ValidationAttributes;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.Ertekeles
|
||||
{
|
||||
public class ErtekelesListRequest : IValidatableObject, IRequestUidFilter<ErtekelesUid>, IModelValidacio<ErtekelesListRequest>
|
||||
{
|
||||
public ErtekelesListRequest()
|
||||
{
|
||||
}
|
||||
|
||||
public ErtekelesListRequest(string uidRaw, string tantargyUids)
|
||||
{
|
||||
Uid = uidRaw == null ? null : new ErtekelesUid(uidRaw);
|
||||
TantargyUids = string.IsNullOrWhiteSpace(tantargyUids) ? null : new UidsCollection<TantargyUid>(tantargyUids, s_uidConverter);
|
||||
}
|
||||
|
||||
[ShortDateTime]
|
||||
public DateTime? DatumIg { get; set; }
|
||||
|
||||
[ShortDateTime]
|
||||
public DateTime? DatumTol { get; set; }
|
||||
|
||||
public List<int> TanuloIds { get; set; }
|
||||
|
||||
public UidsCollection<TantargyUid> TantargyUids { get; set; }
|
||||
|
||||
public int? OktatasiNevelesiFeladatId { get; set; }
|
||||
|
||||
public bool IsCallerGetOnlyOneItem { get; set; }
|
||||
|
||||
public ErtekelesekTipusEnum ErtekelesekTipus { get; set; } = ErtekelesekTipusEnum.MindenErtekelesTipus;
|
||||
|
||||
public Dictionary<Predicate<ErtekelesListRequest>, string> ModelValidaciok => new Dictionary<Predicate<ErtekelesListRequest>, string>
|
||||
{
|
||||
{
|
||||
x => x.DatumIg.HasValue && x.DatumTol.HasValue && (x.DatumIg < x.DatumTol),
|
||||
$"A {nameof(DatumTol)} és a {nameof(DatumIg)} paraméterek meg vannak adva, de a {nameof(DatumTol)} nagyobb, mint a {nameof(DatumIg)} értek!"
|
||||
},
|
||||
};
|
||||
|
||||
public ErtekelesUid Uid { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) => ModelValidaciok.Where(x => x.Key.Invoke(this)).AsEnumerable().Select(x => new ValidationResult(x.Value));
|
||||
|
||||
private static readonly Converter<string[], TantargyUid> s_uidConverter = uidRaw => new TantargyUid(uidRaw[0]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Adatszotar;
|
||||
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.Domain.VN.Ertekeles
|
||||
{
|
||||
public class ErtekelesListResponse : IEqualityComparer<ErtekelesListResponse>
|
||||
{
|
||||
private int? _sulySzazalekErteke;
|
||||
|
||||
public ErtekelesListResponse()
|
||||
{
|
||||
}
|
||||
|
||||
public ErtekelesListResponse(ErtekelesListResponse oldModel)
|
||||
{
|
||||
Uid = oldModel.Uid;
|
||||
Tipus = oldModel.Tipus;
|
||||
Tantargy = oldModel.Tantargy;
|
||||
Tema = oldModel.Tema;
|
||||
Mod = oldModel.Mod;
|
||||
SulySzazalekErteke = oldModel.SulySzazalekErteke;
|
||||
SzovegesErtek = oldModel.SzovegesErtek;
|
||||
SzovegesErtekelesRovidNev = oldModel.SzovegesErtekelesRovidNev;
|
||||
SzamErtek = oldModel.SzamErtek;
|
||||
LattamozasDatuma = oldModel.LattamozasDatuma;
|
||||
ErtekeloTanar = oldModel.ErtekeloTanar;
|
||||
Datum = oldModel.Datum;
|
||||
KeszitesDatum = oldModel.KeszitesDatum;
|
||||
ErtekFajta = oldModel.ErtekFajta;
|
||||
OsztalyCsoport = oldModel.OsztalyCsoport;
|
||||
Tanulo = oldModel.Tanulo;
|
||||
SortIndex = oldModel.SortIndex;
|
||||
}
|
||||
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
public TanarSimplifiedResponse ErtekeloTanar { get; set; }
|
||||
|
||||
public Adatszotar<ErtekelesErtekFajta> ErtekFajta { get; set; }
|
||||
|
||||
public ErtekelesUid Uid { get; set; }
|
||||
|
||||
public bool IsAtlagbaBeleszamit => Tipus == ErtekelesTipusEnum.evkozi_jegy_ertekeles && Mod != null && Uid.Jelleg == ErtekelesJelleg.Ertekeles;
|
||||
|
||||
public DateTime KeszitesDatum { get; set; }
|
||||
|
||||
public DateTime? LattamozasDatuma { get; set; }
|
||||
|
||||
public Adatszotar<ErtekelesModEnum> Mod { get; set; }
|
||||
|
||||
public int? SulySzazalekErteke { get => _sulySzazalekErteke; set => _sulySzazalekErteke = IsAtlagbaBeleszamit ? value : null; }
|
||||
|
||||
public int? SzamErtek { get; set; }
|
||||
|
||||
public string SzovegesErtek { get; set; }
|
||||
|
||||
public string SzovegesErtekelesRovidNev { get; set; }
|
||||
|
||||
public TantargyResponse Tantargy { get; set; }
|
||||
|
||||
public string Tema { get; set; }
|
||||
|
||||
public Adatszotar<ErtekelesTipusEnum> Tipus { get; set; }
|
||||
|
||||
public OsztalyCsoportSimplifiedResponse OsztalyCsoport { get; set; }
|
||||
|
||||
public TanuloSimplifiedResponse Tanulo { get; set; }
|
||||
|
||||
public int SortIndex { get; set; }
|
||||
|
||||
public bool Equals(ErtekelesListResponse x, ErtekelesListResponse y) => x.Uid.Equals(x.Uid, y.Uid);
|
||||
|
||||
public int GetHashCode(ErtekelesListResponse obj) => obj.Uid.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue