| | | 1 | | using FAU.Entidades; |
| | | 2 | | |
| | | 3 | | namespace FAU.Logica.DTOs; |
| | | 4 | | |
| | | 5 | | public sealed class InsumosPeriodo |
| | | 6 | | { |
| | 49 | 7 | | public long PeriodoId { get; init; } |
| | 400 | 8 | | public ParametroPeriodo ParametroPeriodo { get; init; } = null!; |
| | 554 | 9 | | public IReadOnlyDictionary<long, IReadOnlyDictionary<int, RemuneracionGrado>> RemuneracionesPorGrado { get; init; } |
| | 148 | 10 | | public IReadOnlyDictionary<long, IReadOnlyList<TablaPermanencia>> PermanenciasPorEscalafon { get; init; } = new Dict |
| | 120 | 11 | | public IReadOnlyList<FranjaIrpf> FranjasIrpf { get; init; } = Array.Empty<FranjaIrpf>(); |
| | 397 | 12 | | public IReadOnlyList<CatalogoItem> CatalogoItems { get; init; } = Array.Empty<CatalogoItem>(); |
| | 112 | 13 | | public IReadOnlyDictionary<long, IReadOnlyList<BeneficioSocial>> BeneficiosPorPersona { get; init; } = new Dictionar |
| | 112 | 14 | | public IReadOnlyDictionary<long, IReadOnlyList<ItemLoteCompensacion>> CompensacionesPorPersona { get; init; } = new |
| | 96 | 15 | | public IReadOnlyDictionary<long, NovedadPeriodo?> NovedadesPorPersona { get; init; } = new Dictionary<long, NovedadP |
| | | 16 | | // beneficioId → hijos registrados (para ASIGNACION_FAMILIAR) |
| | 111 | 17 | | public IReadOnlyDictionary<long, IReadOnlyList<BeneficioSocialBeneficiario>> BeneficiariosPorBeneficio { get; init; |
| | | 18 | | |
| | | 19 | | // Instructivos DFC — tipoFranja → registro vigente |
| | 111 | 20 | | public IReadOnlyDictionary<string, InstructivoAsigFamiliar> InstructivoAsigFamiliar { get; init; } = new Dictionary< |
| | | 21 | | // Instructivos DFC — numCategoria → registro vigente |
| | 111 | 22 | | public IReadOnlyDictionary<int, InstructivoPsf> InstructivoPsf { get; init; } = new Dictionary<int, InstructivoPsf>( |
| | | 23 | | // Tabla hogar constituido — tramos ordenados (hasta_haberes ASC, NULL al final) |
| | 111 | 24 | | public IReadOnlyList<TablaHogarConstituido> TablaPorHogar { get; init; } = Array.Empty<TablaHogarConstituido>(); |
| | | 25 | | |
| | | 26 | | // Aguinaldos (SAC) del año por persona — usado por AguinaldoCalculator (SIT14/15/18/20) |
| | 88 | 27 | | public IReadOnlyDictionary<long, IReadOnlyList<Aguinaldo>> AguinaldosPorPersona { get; init; } = new Dictionary<long |
| | | 28 | | |
| | | 29 | | // Diferencias de haberes por ascenso (OG 042.615) — cargado desde compensaciones_diferencia_ascenso |
| | 111 | 30 | | public IReadOnlyDictionary<long, CompensacionDiferenciaAscenso> CompensacionesDiferenciaAscensoPorPersona { get; ini |
| | | 31 | | |
| | | 32 | | // Descuentos personales aprobados por persona (COFAnS, retención, comedor) |
| | 80 | 33 | | public IReadOnlyDictionary<long, IReadOnlyList<DescuentoPersonalPeriodo>> DescuentosPersonalesPorPersona { get; init |
| | | 34 | | |
| | | 35 | | public RemuneracionGrado? ObtenerRemuneracion(long gradoId, int codigoItem) |
| | | 36 | | { |
| | 445 | 37 | | if (RemuneracionesPorGrado.TryGetValue(gradoId, out var items) && items.TryGetValue(codigoItem, out var remunera |
| | | 38 | | { |
| | 129 | 39 | | return remuneracion; |
| | | 40 | | } |
| | | 41 | | |
| | 316 | 42 | | return null; |
| | | 43 | | } |
| | | 44 | | |
| | | 45 | | public TablaPermanencia? ObtenerPermanencia(long escalafonId, int aniosServicio) |
| | | 46 | | { |
| | 40 | 47 | | if (PermanenciasPorEscalafon.TryGetValue(escalafonId, out var filas)) |
| | | 48 | | { |
| | 8 | 49 | | return filas.FirstOrDefault(p => p.AniosDesde <= aniosServicio && aniosServicio <= p.AniosHasta); |
| | | 50 | | } |
| | | 51 | | |
| | 36 | 52 | | return null; |
| | | 53 | | } |
| | | 54 | | |
| | | 55 | | public IReadOnlyList<BeneficioSocial> ObtenerBeneficios(long personaId) |
| | | 56 | | { |
| | 32 | 57 | | return BeneficiosPorPersona.TryGetValue(personaId, out var beneficios) |
| | 32 | 58 | | ? beneficios |
| | 32 | 59 | | : Array.Empty<BeneficioSocial>(); |
| | | 60 | | } |
| | | 61 | | |
| | | 62 | | public IReadOnlyList<ItemLoteCompensacion> ObtenerCompensaciones(long personaId) |
| | | 63 | | { |
| | 32 | 64 | | return CompensacionesPorPersona.TryGetValue(personaId, out var items) |
| | 32 | 65 | | ? items |
| | 32 | 66 | | : Array.Empty<ItemLoteCompensacion>(); |
| | | 67 | | } |
| | | 68 | | |
| | | 69 | | public NovedadPeriodo? ObtenerNovedad(long personaId) |
| | | 70 | | { |
| | 16 | 71 | | return NovedadesPorPersona.TryGetValue(personaId, out var novedad) |
| | 16 | 72 | | ? novedad |
| | 16 | 73 | | : null; |
| | | 74 | | } |
| | | 75 | | |
| | | 76 | | public CompensacionDiferenciaAscenso? ObtenerDiferenciaAscenso(long personaId) |
| | | 77 | | { |
| | 31 | 78 | | return CompensacionesDiferenciaAscensoPorPersona.TryGetValue(personaId, out var diff) |
| | 31 | 79 | | ? diff |
| | 31 | 80 | | : null; |
| | | 81 | | } |
| | | 82 | | |
| | | 83 | | public IReadOnlyList<DescuentoPersonalPeriodo> ObtenerDescuentosPersonales(long personaId) |
| | | 84 | | { |
| | 0 | 85 | | return DescuentosPersonalesPorPersona.TryGetValue(personaId, out var descuentos) |
| | 0 | 86 | | ? descuentos |
| | 0 | 87 | | : Array.Empty<DescuentoPersonalPeriodo>(); |
| | | 88 | | } |
| | | 89 | | } |