| | | 1 | | using FAU.Entidades; |
| | | 2 | | |
| | | 3 | | namespace FAU.Logica.DTOs; |
| | | 4 | | |
| | | 5 | | public sealed class InsumosPeriodo |
| | | 6 | | { |
| | 35 | 7 | | public long PeriodoId { get; init; } |
| | 236 | 8 | | public ParametroPeriodo ParametroPeriodo { get; init; } = null!; |
| | 346 | 9 | | public IReadOnlyDictionary<long, IReadOnlyDictionary<int, RemuneracionGrado>> RemuneracionesPorGrado { get; init; } |
| | 105 | 10 | | public IReadOnlyDictionary<long, IReadOnlyList<TablaPermanencia>> PermanenciasPorEscalafon { get; init; } = new Dict |
| | 77 | 11 | | public IReadOnlyList<FranjaIrpf> FranjasIrpf { get; init; } = Array.Empty<FranjaIrpf>(); |
| | 249 | 12 | | public IReadOnlyList<CatalogoItem> CatalogoItems { get; init; } = Array.Empty<CatalogoItem>(); |
| | 69 | 13 | | public IReadOnlyDictionary<long, IReadOnlyList<BeneficioSocial>> BeneficiosPorPersona { get; init; } = new Dictionar |
| | 53 | 14 | | public IReadOnlyDictionary<long, IReadOnlyList<ItemLoteCompensacion>> CompensacionesPorPersona { get; init; } = new |
| | 53 | 15 | | public IReadOnlyDictionary<long, NovedadPeriodo?> NovedadesPorPersona { get; init; } = new Dictionary<long, NovedadP |
| | | 16 | | // beneficioId → hijos registrados (para ASIGNACION_FAMILIAR) |
| | 68 | 17 | | public IReadOnlyDictionary<long, IReadOnlyList<BeneficioSocialBeneficiario>> BeneficiariosPorBeneficio { get; init; |
| | | 18 | | |
| | | 19 | | // Instructivos DFC — tipoFranja → registro vigente |
| | 68 | 20 | | public IReadOnlyDictionary<string, InstructivoAsigFamiliar> InstructivoAsigFamiliar { get; init; } = new Dictionary< |
| | | 21 | | // Instructivos DFC — numCategoria → registro vigente |
| | 68 | 22 | | public IReadOnlyDictionary<int, InstructivoPsf> InstructivoPsf { get; init; } = new Dictionary<int, InstructivoPsf>( |
| | | 23 | | // Tabla hogar constituido — tramos ordenados (hasta_haberes ASC, NULL al final) |
| | 68 | 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) |
| | 60 | 27 | | public IReadOnlyDictionary<long, IReadOnlyList<Aguinaldo>> AguinaldosPorPersona { get; init; } = new Dictionary<long |
| | | 28 | | |
| | | 29 | | public RemuneracionGrado? ObtenerRemuneracion(long gradoId, int codigoItem) |
| | | 30 | | { |
| | 265 | 31 | | if (RemuneracionesPorGrado.TryGetValue(gradoId, out var items) && items.TryGetValue(codigoItem, out var remunera |
| | | 32 | | { |
| | 61 | 33 | | return remuneracion; |
| | | 34 | | } |
| | | 35 | | |
| | 204 | 36 | | return null; |
| | | 37 | | } |
| | | 38 | | |
| | | 39 | | public TablaPermanencia? ObtenerPermanencia(long escalafonId, int aniosServicio) |
| | | 40 | | { |
| | 25 | 41 | | if (PermanenciasPorEscalafon.TryGetValue(escalafonId, out var filas)) |
| | | 42 | | { |
| | 8 | 43 | | return filas.FirstOrDefault(p => p.AniosDesde <= aniosServicio && aniosServicio <= p.AniosHasta); |
| | | 44 | | } |
| | | 45 | | |
| | 21 | 46 | | return null; |
| | | 47 | | } |
| | | 48 | | |
| | | 49 | | public IReadOnlyList<BeneficioSocial> ObtenerBeneficios(long personaId) |
| | | 50 | | { |
| | 17 | 51 | | return BeneficiosPorPersona.TryGetValue(personaId, out var beneficios) |
| | 17 | 52 | | ? beneficios |
| | 17 | 53 | | : Array.Empty<BeneficioSocial>(); |
| | | 54 | | } |
| | | 55 | | |
| | | 56 | | public IReadOnlyList<ItemLoteCompensacion> ObtenerCompensaciones(long personaId) |
| | | 57 | | { |
| | 1 | 58 | | return CompensacionesPorPersona.TryGetValue(personaId, out var items) |
| | 1 | 59 | | ? items |
| | 1 | 60 | | : Array.Empty<ItemLoteCompensacion>(); |
| | | 61 | | } |
| | | 62 | | |
| | | 63 | | public NovedadPeriodo? ObtenerNovedad(long personaId) |
| | | 64 | | { |
| | 1 | 65 | | return NovedadesPorPersona.TryGetValue(personaId, out var novedad) |
| | 1 | 66 | | ? novedad |
| | 1 | 67 | | : null; |
| | | 68 | | } |
| | | 69 | | } |