| | | 1 | | using FAU.Entidades; |
| | | 2 | | |
| | | 3 | | namespace FAU.Logica.DTOs; |
| | | 4 | | |
| | | 5 | | public sealed class InsumosPeriodo |
| | | 6 | | { |
| | 28 | 7 | | public long PeriodoId { get; init; } |
| | 70 | 8 | | public ParametroPeriodo ParametroPeriodo { get; init; } = null!; |
| | 240 | 9 | | public IReadOnlyDictionary<long, IReadOnlyDictionary<int, RemuneracionGrado>> RemuneracionesPorGrado { get; init; } |
| | 75 | 10 | | public IReadOnlyDictionary<long, IReadOnlyList<TablaPermanencia>> PermanenciasPorEscalafon { get; init; } = new Dict |
| | 30 | 11 | | public IReadOnlyList<FranjaIrpf> FranjasIrpf { get; init; } = Array.Empty<FranjaIrpf>(); |
| | 150 | 12 | | public IReadOnlyList<CatalogoItem> CatalogoItems { get; init; } = Array.Empty<CatalogoItem>(); |
| | 29 | 13 | | public IReadOnlyDictionary<long, IReadOnlyList<BeneficioSocial>> BeneficiosPorPersona { get; init; } = new Dictionar |
| | 29 | 14 | | public IReadOnlyDictionary<long, IReadOnlyList<ItemLoteCompensacion>> CompensacionesPorPersona { get; init; } = new |
| | 29 | 15 | | public IReadOnlyDictionary<long, NovedadPeriodo?> NovedadesPorPersona { get; init; } = new Dictionary<long, NovedadP |
| | | 16 | | |
| | | 17 | | public RemuneracionGrado? ObtenerRemuneracion(long gradoId, int codigoItem) |
| | | 18 | | { |
| | 186 | 19 | | if (RemuneracionesPorGrado.TryGetValue(gradoId, out var items) && items.TryGetValue(codigoItem, out var remunera |
| | | 20 | | { |
| | 52 | 21 | | return remuneracion; |
| | | 22 | | } |
| | | 23 | | |
| | 134 | 24 | | return null; |
| | | 25 | | } |
| | | 26 | | |
| | | 27 | | public TablaPermanencia? ObtenerPermanencia(long escalafonId, int aniosServicio) |
| | | 28 | | { |
| | 22 | 29 | | if (PermanenciasPorEscalafon.TryGetValue(escalafonId, out var filas)) |
| | | 30 | | { |
| | 8 | 31 | | return filas.FirstOrDefault(p => p.AniosDesde <= aniosServicio && aniosServicio <= p.AniosHasta); |
| | | 32 | | } |
| | | 33 | | |
| | 18 | 34 | | return null; |
| | | 35 | | } |
| | | 36 | | |
| | | 37 | | public IReadOnlyList<BeneficioSocial> ObtenerBeneficios(long personaId) |
| | | 38 | | { |
| | 1 | 39 | | return BeneficiosPorPersona.TryGetValue(personaId, out var beneficios) |
| | 1 | 40 | | ? beneficios |
| | 1 | 41 | | : Array.Empty<BeneficioSocial>(); |
| | | 42 | | } |
| | | 43 | | |
| | | 44 | | public IReadOnlyList<ItemLoteCompensacion> ObtenerCompensaciones(long personaId) |
| | | 45 | | { |
| | 1 | 46 | | return CompensacionesPorPersona.TryGetValue(personaId, out var items) |
| | 1 | 47 | | ? items |
| | 1 | 48 | | : Array.Empty<ItemLoteCompensacion>(); |
| | | 49 | | } |
| | | 50 | | |
| | | 51 | | public NovedadPeriodo? ObtenerNovedad(long personaId) |
| | | 52 | | { |
| | 1 | 53 | | return NovedadesPorPersona.TryGetValue(personaId, out var novedad) |
| | 1 | 54 | | ? novedad |
| | 1 | 55 | | : null; |
| | | 56 | | } |
| | | 57 | | } |