diff --git a/Antifraude.Net/GestionPersonalWeb/GestionPersonalWeb.csproj b/Antifraude.Net/GestionPersonalWeb/GestionPersonalWeb.csproj index 26ec5d4..cc0be36 100644 --- a/Antifraude.Net/GestionPersonalWeb/GestionPersonalWeb.csproj +++ b/Antifraude.Net/GestionPersonalWeb/GestionPersonalWeb.csproj @@ -87,6 +87,7 @@ + @@ -94,9 +95,6 @@ - - ..\..\..\..\Comun\tsDocumentos\bin\Debug\net8.0\tsDocumentos.dll - ..\..\..\..\Comun\tsUtilidades\bin\Debug\net8.0\tsUtilidades.dll diff --git a/Antifraude.Net/RegistroPersonalAN/RegistroPersonalAN.csproj b/Antifraude.Net/RegistroPersonalAN/RegistroPersonalAN.csproj index 4b43877..47e5c24 100644 --- a/Antifraude.Net/RegistroPersonalAN/RegistroPersonalAN.csproj +++ b/Antifraude.Net/RegistroPersonalAN/RegistroPersonalAN.csproj @@ -24,6 +24,7 @@ + @@ -31,9 +32,6 @@ - - ..\..\..\..\Comun\tsDocumentos\bin\Debug\net8.0\tsDocumentos.dll - ..\..\..\..\Comun\tsUtilidades\bin\Debug\net8.0\tsUtilidades.dll diff --git a/Antifraude.Net/SwaggerAntifraude/Controllers/FormulariosController.cs b/Antifraude.Net/SwaggerAntifraude/Controllers/FormulariosController.cs index 4f23426..0fd74bb 100644 --- a/Antifraude.Net/SwaggerAntifraude/Controllers/FormulariosController.cs +++ b/Antifraude.Net/SwaggerAntifraude/Controllers/FormulariosController.cs @@ -28,34 +28,37 @@ namespace SwaggerAntifraude.Controllers /// Fecha de emisión del formulario /// Campo extra opcional, según el tipo de formulario /// Archivo PDF resultante - [HttpGet("GenerarFormulario")] - [Authorize(Policy = "LecturaPolicy")] - public IActionResult GenerarFormulario( - [FromQuery] string claveFormulario, - [FromQuery] string idPersona, - [FromQuery] string Motivo, - [FromQuery] string texto1, - [FromQuery] string texto2, - [FromQuery] string FechaEfecto, - [FromQuery] string Organo, - [FromQuery] string FechaEmision, - [FromQuery] string Extra) - { - var pdfBytes = _servicioFormularios.GenerarFormulario( - claveFormulario, - idPersona, - Motivo, - texto1, - texto2, - FechaEfecto, - Organo, - FechaEmision, - Extra); + /// - if (pdfBytes == null || pdfBytes.Length == 0) - return NotFound("No se pudo generar el formulario."); - return File(pdfBytes, "application/pdf", "formulario.pdf"); - } - } + //[HttpGet("GenerarFormulario")] + //[Authorize(Policy = "LecturaPolicy")] + //public IActionResult GenerarFormulario( + // [FromQuery] string claveFormulario, + // [FromQuery] string idPersona, + // [FromQuery] string Motivo, + // [FromQuery] string texto1, + // [FromQuery] string texto2, + // [FromQuery] string FechaEfecto, + // [FromQuery] string Organo, + // [FromQuery] string FechaEmision, + // [FromQuery] string Extra) + //{ + // var pdfBytes = _servicioFormularios.GenerarFormulario( + // claveFormulario, + // idPersona, + // Motivo, + // texto1, + // texto2, + // FechaEfecto, + // Organo, + // FechaEmision, + // Extra); + + // if (pdfBytes == null || pdfBytes.Length == 0) + // return NotFound("No se pudo generar el formulario."); + + // return File(pdfBytes, "application/pdf", "formulario.pdf"); + //} + } } diff --git a/Antifraude.Net/SwaggerAntifraude/Servicios/ServicioFormularios.cs b/Antifraude.Net/SwaggerAntifraude/Servicios/ServicioFormularios.cs index 2ffc114..602d397 100644 --- a/Antifraude.Net/SwaggerAntifraude/Servicios/ServicioFormularios.cs +++ b/Antifraude.Net/SwaggerAntifraude/Servicios/ServicioFormularios.cs @@ -6,814 +6,815 @@ namespace SwaggerAntifraude.Servicios { public class ServicioFormularios { - public byte[] GenerarFormulario( - string claveFormulario, - string idPersona, - string Motivo, - string texto1, - string texto2, - string FechaEfecto, - string Organo, - string FechaEmision, - string Extra) - { - switch (claveFormulario) - { - case "TomPos": - return DevuelveTomaPosesion(idPersona, Motivo, texto1, FechaEfecto, Organo, FechaEmision); - case "CumTri": - return DevuelveCumplimientoTrienios(idPersona, Motivo, texto1, FechaEfecto, Organo, FechaEmision, "RECTRI"); - case "SolTri": - return DevuelveCumplimientoTrienios(idPersona, Motivo, texto1, FechaEfecto, Organo, FechaEmision, "SOLTRI"); - case "ComInt": - return DevuelveComunicacionInterna(idPersona, texto1, texto2, FechaEmision); - case "AcuJub": - return DevuelveAcuerdoJubilacion(idPersona, Motivo, texto1, FechaEfecto, Organo, FechaEmision, Extra); - case "AcuBaj": - return DevuelveAcuerdoBaja(idPersona, Motivo, texto1, FechaEfecto, Organo, FechaEmision); - case "AcuCes": - return DevuelveAcuerdoCese(idPersona, Motivo, texto1, FechaEfecto, Organo, FechaEmision); - case "ConGra": - return DevuelveConsolidacionGrado(idPersona, Motivo, texto1, texto2, FechaEfecto, Organo, FechaEmision); - default: - return null; - } - } - - private byte[] DevuelveTomaPosesion( - string idPersona, - string motivo, - string texto1, - string fechaEfecto, - string organo, - string fechaEmision) - { - try - { - using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) - { - PERSONAS per = new PERSONAS(); - var LisTomPos = new List(); - var ForTomPos = new bdAntifraude.DatRecTri.RecTri(); - - if (!string.IsNullOrEmpty(idPersona)) - { - int iDPer = Convert.ToInt32(idPersona); - per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); - - ForTomPos.Nif = per.NIF; - ForTomPos.Apellidos = per.APELLIDOS; - ForTomPos.Nombre = per.NOMBRE; - ForTomPos.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; - ForTomPos.NRP = per.NRP; - - if (per.IDSITUACIONADMINISTRATIVARPT != null) - ForTomPos.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; - - if (per.IDCUERPORPT != null) - ForTomPos.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; - - ForTomPos.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; - - PUESTOS PuestoTrabajo = null; - - var puestosPersona = context.PUESTOS.Where(x => x.IDPERSONAL == per.IDPERSONA); - if (puestosPersona.Any()) - { - PuestoTrabajo = puestosPersona - .OrderByDescending(x => x.IDRPTNavigation.F_PARLAMENTO.Value) - .First(); - - ForTomPos.DesPuesTrab = PuestoTrabajo.IDRPTDESNavigation.DENOMINACION; - } - - if (per.DEPARTAMENTOACTUAL != null) - ForTomPos.Departamento = per.IDDEPARTAMENTONavigation.DESCRIPCION; - - if (PuestoTrabajo != null) - { - ForTomPos.CuerpoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.CUERPO1Navigation.DESCRIPCION; - - double Especifico = double.Parse(PuestoTrabajo.IDRPTDESNavigation.ESPECIFICO.ToString()); - ForTomPos.ComEsp = Especifico.ToString("##,##0.00") + "€"; - - ForTomPos.GrupoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1; - ForTomPos.NivelPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.IDNIVEL_RPTNavigation.NIVEL1; - ForTomPos.CarOcu = PuestoTrabajo.IDOCUPACIONNavigation.DESCRIPCION; - } - - ForTomPos.MotivoTomaPosesion = motivo; - ForTomPos.texto1 = texto1; - ForTomPos.FechaEfectoTomaPosesion = fechaEfecto; - ForTomPos.OrganoCompetente = organo; - ForTomPos.FechaEmision = fechaEmision; - } - - LisTomPos.Add(ForTomPos); - - var pl = context.PLANTILLAS.First(x => x.CODIGO == "TOMPOS"); - var idPlantilla = pl.IDPLANTILLA; - - var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); - - return tsWPFCore.tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisTomPos).ToArray(); - } - } - catch (Exception ex) - { - return null; - } - } - - - - private byte[] DevuelveCumplimientoTrienios( - string idPersona, - string motivo, - string texto1, - string fechaEfecto, - string organo, - string fechaEmision, - string Tipo) - { - try - { - using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) - { - PERSONAS per=null; - var LisCumTri = new List(); - var ForCumTri = new bdAntifraude.DatRecTri.RecTri(); - - if (!string.IsNullOrEmpty(idPersona)) - { - int iDPer = Convert.ToInt32(idPersona); - per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); - - ForCumTri.Nif = per.NIF; - ForCumTri.Apellidos = per.APELLIDOS; - ForCumTri.Nombre = per.NOMBRE; - ForCumTri.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; - ForCumTri.NRP = per.NRP; - - if (per.IDSITUACIONADMINISTRATIVARPT != null) - ForCumTri.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; - - if (per.IDCUERPORPT != null) - ForCumTri.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; - - ForCumTri.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; - ForCumTri.Localidad = per.NombrePoblacion; - ForCumTri.Provincia = per.NombreProvincia; - - PUESTOS PuestoTrabajo = null; - var iDSitRptAct = context.ENUMERACIONES.First(x => x.CODIGO == "SITRPTMAESTRO.ACT").IDENUMERACION; - - var puestosActivos = context.PUESTOS - .Where(x => x.IDPERSONAL == per.IDPERSONA && x.IDRPTNavigation.IDSITUACION == iDSitRptAct); - - if (puestosActivos.Any()) - { - PuestoTrabajo = puestosActivos.First(); - ForCumTri.DesPuesTrab = PuestoTrabajo.IDRPTDESNavigation.DENOMINACION; - } - - if (per.FECHACUMPLIMIENTOPROXTRIENIO.HasValue) - { - //Truncamos la fecha a los primeros 10 caracteres - var fechaProx = per.FECHACUMPLIMIENTOPROXTRIENIO.Value; - ForCumTri.FecVenTri = fechaProx.ToString("yyyy-MM-dd").Substring(0, 10); - - if (fechaProx.Day == 1) - { - ForCumTri.FechaEfeEco = fechaProx.ToString("yyyy-MM-dd").Substring(0, 10); - } - else - { - var Fechaefe = fechaProx.AddMonths(1); - var primerDiaMesSiguiente = new DateTime(Fechaefe.Year, Fechaefe.Month, 1); - ForCumTri.FechaEfeEco = primerDiaMesSiguiente.ToString("yyyy-MM-dd").Substring(0, 10); - } - - ForCumTri.FecCumProTri = fechaProx.AddYears(3).ToString("yyyy-MM-dd").Substring(0, 10); - } - - //Calcular trienios - if (per.TRIENIOS.Any()) - { - foreach (var trienio in per.TRIENIOS.ToList()) - { - var grupoTrim = trienio.GRUPO.Trim(); - switch (grupoTrim) - { - case "A1": - case "I": - ForCumTri.TriA1 = trienio.TC; - if (per.GRUPOFUNCIONARIODESCRIPCION == "A1") - ForCumTri.TriA1 = (int)(trienio.TC + trienio.TOA + 1); - break; - case "A2": - case "II": - ForCumTri.TriA2 = trienio.TC; - if (per.GRUPOFUNCIONARIODESCRIPCION == "A2") - ForCumTri.TriA2 = trienio.TC + trienio.TOA + 1; - break; - case "C1": - case "III": - ForCumTri.TriC1 = trienio.TC; - if (per.GRUPOFUNCIONARIODESCRIPCION == "C1") - ForCumTri.TriC1 = trienio.TC + trienio.TOA + 1; - break; - case "C2": - case "IV": - ForCumTri.TriC2 = trienio.TC; - if (per.GRUPOFUNCIONARIODESCRIPCION == "C2") - ForCumTri.TriC2 = trienio.TC + trienio.TOA + 1; - break; - case "E": - case "V": - ForCumTri.TriE = trienio.TC; - if (per.GRUPOFUNCIONARIODESCRIPCION == "E") - ForCumTri.TriE = trienio.TC + trienio.TOA + 1; - break; - } - } - } - else - { - //No hay trienios, se asigna 1 según el grupo - if (!string.IsNullOrWhiteSpace(per.GRUPOFUNCIONARIODESCRIPCION)) - { - switch (per.GRUPOFUNCIONARIODESCRIPCION.Trim()) - { - case "A1": - ForCumTri.TriA1 = 1; - break; - case "A2": - ForCumTri.TriA2 = 1; - break; - case "C1": - ForCumTri.TriC1 = 1; - break; - case "C2": - ForCumTri.TriC2 = 1; - break; - case "E": - ForCumTri.TriE = 1; - break; - } - } - else if (PuestoTrabajo != null) - { - //Si no hay grupo en persona, se toma del puesto de trabajo - var grupoPT = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1.Trim(); - switch (grupoPT) - { - case "A1": - ForCumTri.TriA1 = 1; - break; - case "A2": - ForCumTri.TriA2 = 1; - break; - case "C1": - ForCumTri.TriC1 = 1; - break; - case "C2": - ForCumTri.TriC2 = 1; - break; - case "E": - ForCumTri.TriE = 1; - break; - } - } - } - - //Departamento y otros datos del puesto - if (PuestoTrabajo != null) - { - ForCumTri.Departamento = PuestoTrabajo.IDRPTDESNavigation.DEPARTAMENTO; - ForCumTri.CuerpoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.CUERPO1Navigation.DESCRIPCION; - - double Especifico = double.Parse(PuestoTrabajo.IDRPTDESNavigation.ESPECIFICO.ToString()); - ForCumTri.ComEsp = Especifico.ToString("##,##0.00") + "€"; - - ForCumTri.GrupoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1; - ForCumTri.NivelPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.IDNIVEL_RPTNavigation.NIVEL1; - - if (per.NIVEL != null) - ForCumTri.Nivel = per.IDNIVELRPTNavigation.NIVEL1; - - ForCumTri.CarOcu = PuestoTrabajo.IDOCUPACIONNavigation.DESCRIPCION; - } - - ForCumTri.MotivoTomaPosesion = motivo; - ForCumTri.texto1 = texto1; - - if (!string.IsNullOrEmpty(fechaEfecto) && fechaEfecto.Length >= 10) - ForCumTri.FechaEfectoTomaPosesion = fechaEfecto.Substring(0, 10); - - ForCumTri.OrganoCompetente = organo; - ForCumTri.FechaEmision = fechaEmision; - - ForCumTri.TolTri = per.TRIENIOS.Sum(x => x.TC) + per.TRIENIOS.Sum(x => x.TOA); - ForCumTri.texto1 = (ForCumTri.TolTri + 1).ToString(); - - if (per.FECHACUMPLIMIENTOPROXTRIENIO.HasValue) - { - var fechaProx = per.FECHACUMPLIMIENTOPROXTRIENIO.Value; - ForCumTri.texto2 = fechaProx.Day.ToString().PadLeft(2, '0') + " de " + - tsUtilidades.Extensiones.DateTimeExtensions.MesCastellano(fechaProx) + " de " + - fechaProx.Year.ToString(); - } - } - - LisCumTri.Add(ForCumTri); - - if (per != null && per.IDADSCRIPCIONRPTNavigation.DESCRIPCION == "LABORAL") - { - switch (ForCumTri.Grupo) - { - case "A1": - ForCumTri.Grupo = "I"; - break; - case "A2": - ForCumTri.Grupo = "II"; - break; - case "C1": - ForCumTri.Grupo = "III"; - break; - case "C2": - ForCumTri.Grupo = "IV"; - break; - case "E": - ForCumTri.Grupo = "V"; - break; - } - } - - PLANTILLAS pl; - - if (Tipo == "RECTRI") - { - pl = context.PLANTILLAS.First(x => x.CODIGO == "RECTRI"); - if (per.IDADSCRIPCIONRPTNavigation.DESCRIPCION == "LABORAL") - pl = context.PLANTILLAS.First(x => x.CODIGO == "RECTRIL"); - } - else - { - pl = context.PLANTILLAS.First(x => x.CODIGO == "RECTRI4"); - if (per.IDADSCRIPCIONRPTNavigation.DESCRIPCION == "LABORAL") - pl = context.PLANTILLAS.First(x => x.CODIGO == "RECTRI4L"); - } - - var idPlantilla = pl.IDPLANTILLA; - var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); - - return tsWPFCore.tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisCumTri).ToArray(); - } - } - catch (Exception ex) - { - return null; - } - } - - - private byte[] DevuelveComunicacionInterna( - string idPersona, - string texto1, - string texto2, - string fechaEmision) - { - try - { - using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) - { - PERSONAS per; - var LisCumTri = new List(); - var ForCumTri = new bdAntifraude.DatRecTri.RecTri(); - - if (!string.IsNullOrEmpty(idPersona)) - { - int iDPer = Convert.ToInt32(idPersona); - per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); - - ForCumTri.Nif = per.NIF; - ForCumTri.Apellidos = per.APELLIDOS; - ForCumTri.Nombre = per.NOMBRE; - ForCumTri.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; - ForCumTri.NRP = per.NRP; - - if (per.IDSITUACIONADMINISTRATIVARPT != null) - ForCumTri.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; - - if (per.IDCUERPORPT != null) - ForCumTri.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; - - ForCumTri.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; - ForCumTri.Localidad = per.NombrePoblacion; - ForCumTri.Provincia = per.NombreProvincia; - - if (per.IDDEPARTAMENTO != null) - ForCumTri.Departamento = per.IDDEPARTAMENTONavigation.DESCRIPCION; - - ForCumTri.FechaEmision = fechaEmision; - ForCumTri.texto1 = texto1; - ForCumTri.texto2 = texto2; - } - - LisCumTri.Add(ForCumTri); - - var pl = context.PLANTILLAS.First(x => x.CODIGO == "COMUNI"); - var idPlantilla = pl.IDPLANTILLA; - - var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); - - return tsWPFCore.tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisCumTri).ToArray(); - } - } - catch (Exception ex) - { - return null; - } - } - - - private byte[] DevuelveAcuerdoJubilacion( - string idPersona, - string motivo, - string texto1, - string fechaEfecto, - string organo, - string fechaEmision, - string fechaEfe) - { - try - { - using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) - { - var LisAcuJub = new List(); - var ForAcuJub = new RecTri(); - - if (!string.IsNullOrEmpty(idPersona)) - { - int iDPer = Convert.ToInt32(idPersona); - var per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); - - int Años = 0; - if (per.TRIENIOS.Any()) - { - Años = (int)per.TRIENIOS.Sum(x => x.TC + x.TOA) * 3; - } - - var Fechafin = tsUtilidades.Extensiones.DateTimeExtensions.FechaHoraStringADate(fechaEfe); - - if (per.FECHACUMPLIMIENTOPROXTRIENIO.HasValue && Fechafin.HasValue) - { - var TiemSer = bdAntifraude.Utilidades.AnosMesesDias(per.FECHACUMPLIMIENTOPROXTRIENIO.Value.AddYears(-3), Fechafin.Value); - - if (TiemSer != null) - { - TiemSer.Anos += Años; - - //Construcción del texto1 según años, meses, días - string tiempo = ""; - if (TiemSer.Anos == 1) tiempo += TiemSer.Anos.ToString() + " AÑO "; - else if (TiemSer.Anos > 1) tiempo += TiemSer.Anos.ToString() + " AÑOS "; - - if (TiemSer.Meses == 1) tiempo += TiemSer.Meses.ToString() + " MES "; - else if (TiemSer.Meses > 1) tiempo += TiemSer.Meses.ToString() + " MESES "; - - if (TiemSer.Dias == 1) tiempo += TiemSer.Dias.ToString() + " DIA "; - else if (TiemSer.Dias > 1) tiempo += TiemSer.Dias.ToString() + " DIAS "; - - ForAcuJub.texto1 = tiempo.Trim(); - } - } - - ForAcuJub.Nif = per.NIF; - ForAcuJub.Apellidos = per.APELLIDOS; - ForAcuJub.Nombre = per.NOMBRE; - ForAcuJub.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; - ForAcuJub.NRP = per.NRP; - - if (per.IDSITUACIONADMINISTRATIVARPT != null) - ForAcuJub.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; - - if (per.IDCUERPORPT != null) - ForAcuJub.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; - - ForAcuJub.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; - - var puestosPersona = context.PUESTOS.Where(x => x.IDPERSONAL == per.IDPERSONA); - PUESTOS PuestoTrabajo = null; - - if (puestosPersona.Any()) - { - PuestoTrabajo = puestosPersona - .OrderByDescending(x => x.IDRPTNavigation.F_PARLAMENTO.Value) - .First(); - ForAcuJub.DesPuesTrab = PuestoTrabajo.IDRPTDESNavigation.DENOMINACION; - } - - if (per.IDDEPARTAMENTO != null) - ForAcuJub.Departamento = per.IDDEPARTAMENTONavigation.DESCRIPCION; - - if (PuestoTrabajo != null) - { - ForAcuJub.CuerpoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.CUERPO1Navigation.DESCRIPCION; - - double Especifico = double.Parse(PuestoTrabajo.IDRPTDESNavigation.ESPECIFICO.ToString()); - ForAcuJub.ComEsp = Especifico.ToString("##,##0.00") + "€"; - - ForAcuJub.GrupoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1; - ForAcuJub.NivelPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.IDNIVEL_RPTNavigation.NIVEL1; - ForAcuJub.CarOcu = PuestoTrabajo.IDOCUPACIONNavigation.DESCRIPCION; - } - - ForAcuJub.MotivoTomaPosesion = motivo; - ForAcuJub.texto3 = motivo; - - if (per.FECHANACIMIENTO.HasValue) - { - var fechaNac = per.FECHANACIMIENTO.Value; - string dia = fechaNac.Day.ToString().PadLeft(2, '0'); - string mes = tsUtilidades.Extensiones.DateTimeExtensions.MesCastellano(fechaNac); - string anio = fechaNac.Year.ToString(); - ForAcuJub.FecVenTri = $"{dia} de {mes} de {anio}"; - } - - ForAcuJub.FechaEfeEco = fechaEfecto; - ForAcuJub.OrganoCompetente = organo; - } - - LisAcuJub.Add(ForAcuJub); - - var pl = context.PLANTILLAS.First(x => x.CODIGO == "ACUJUBI"); - var idPlantilla = pl.IDPLANTILLA; - - var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); - - return tsWPFCore.tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisAcuJub).ToArray(); - } - } - catch (Exception ex) - { - return null; - } - } - - - - private byte[] DevuelveAcuerdoBaja( - string idPersona, - string motivo, - string texto1, - string fechaEfecto, - string organo, - string fechaEmision) - { - try - { - using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) - { - PERSONAS per; - var LisAcuJub = new List(); - var ForAcuJub = new RecTri(); - - if (!string.IsNullOrEmpty(idPersona)) - { - int iDPer = Convert.ToInt32(idPersona); - per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); - - ForAcuJub.Nif = per.NIF; - ForAcuJub.Apellidos = per.APELLIDOS; - ForAcuJub.Nombre = per.NOMBRE; - ForAcuJub.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; - ForAcuJub.NRP = per.NRP; - - if (per.IDSITUACIONADMINISTRATIVARPT != null) - ForAcuJub.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; - - if (per.IDCUERPORPT != null) - ForAcuJub.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; - - ForAcuJub.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; - - PUESTOS PuestoTrabajo = null; - var puestosPersona = context.PUESTOS.Where(x => x.IDPERSONAL == per.IDPERSONA); - if (puestosPersona.Any()) - { - PuestoTrabajo = puestosPersona - .OrderByDescending(x => x.IDRPTNavigation.F_PARLAMENTO.Value) - .First(); - ForAcuJub.DesPuesTrab = PuestoTrabajo.IDRPTDESNavigation.DENOMINACION; - - if (per.IDDEPARTAMENTO != null) - ForAcuJub.Departamento = per.IDDEPARTAMENTONavigation.DESCRIPCION; - - ForAcuJub.CuerpoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.CUERPO1Navigation.DESCRIPCION; - - double Especifico = double.Parse(PuestoTrabajo.IDRPTDESNavigation.ESPECIFICO.ToString()); - ForAcuJub.ComEsp = Especifico.ToString("##,##0.00") + "€"; - - ForAcuJub.GrupoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1; - ForAcuJub.NivelPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.IDNIVEL_RPTNavigation.NIVEL1; - ForAcuJub.CarOcu = PuestoTrabajo.IDOCUPACIONNavigation.DESCRIPCION; - } - - ForAcuJub.MotivoTomaPosesion = motivo; - ForAcuJub.texto1 = texto1; - ForAcuJub.FechaEfectoTomaPosesion = fechaEfecto; - ForAcuJub.FechaEfeEco = fechaEfecto; - ForAcuJub.OrganoCompetente = organo; - ForAcuJub.FecVenTri = fechaEmision; - } - - LisAcuJub.Add(ForAcuJub); - - var pl = context.PLANTILLAS.First(x => x.CODIGO == "ACUBAJA"); - var idPlantilla = pl.IDPLANTILLA; - - var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); - - return tsWPFCore.tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisAcuJub).ToArray(); - } - } - catch (Exception) - { - return null; - } - } - - - private byte[] DevuelveAcuerdoCese( - string idPersona, - string motivo, - string texto1, - string fechaEfecto, - string organo, - string fechaEmision) - { - try - { - using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) - { - PERSONAS per; - var LisAcuJub = new List(); - var ForAcuJub = new RecTri(); - - if (!string.IsNullOrEmpty(idPersona)) - { - int iDPer = Convert.ToInt32(idPersona); - per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); - - ForAcuJub.Nif = per.NIF; - ForAcuJub.Apellidos = per.APELLIDOS; - ForAcuJub.Nombre = per.NOMBRE; - ForAcuJub.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; - ForAcuJub.NRP = per.NRP; - - if (per.IDSITUACIONADMINISTRATIVARPT != null) - ForAcuJub.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; - - if (per.IDCUERPORPT != null) - ForAcuJub.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; - - ForAcuJub.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; - - PUESTOS PuestoTrabajo = null; - var puestosPersona = context.PUESTOS.Where(x => x.IDPERSONAL == per.IDPERSONA); - if (puestosPersona.Any()) - { - PuestoTrabajo = puestosPersona - .OrderByDescending(x => x.IDRPTNavigation.F_PARLAMENTO.Value) - .First(); - - ForAcuJub.DesPuesTrab = PuestoTrabajo.IDRPTDESNavigation.DENOMINACION; - } - - if (per.IDDEPARTAMENTO != null) - ForAcuJub.Departamento = per.IDDEPARTAMENTONavigation.DESCRIPCION; - - if (PuestoTrabajo != null) - { - ForAcuJub.CuerpoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.CUERPO1Navigation.DESCRIPCION; - - double Especifico = double.Parse(PuestoTrabajo.IDRPTDESNavigation.ESPECIFICO.ToString()); - ForAcuJub.ComEsp = Especifico.ToString("##,##0.00") + "€"; - - ForAcuJub.GrupoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1; - ForAcuJub.NivelPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.IDNIVEL_RPTNavigation.NIVEL1; - ForAcuJub.CarOcu = PuestoTrabajo.IDOCUPACIONNavigation.DESCRIPCION; - } - - ForAcuJub.MotivoTomaPosesion = motivo; - ForAcuJub.texto1 = texto1; - ForAcuJub.FechaEfectoTomaPosesion = fechaEfecto; - ForAcuJub.FechaEfeEco = fechaEfecto; - ForAcuJub.OrganoCompetente = organo; - ForAcuJub.FecVenTri = fechaEmision; - } - - LisAcuJub.Add(ForAcuJub); - - var pl = context.PLANTILLAS.First(x => x.CODIGO == "ACUCESE"); - var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); - - return tsWPFCore.tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisAcuJub).ToArray(); - } - } - catch (Exception) - { - return null; - } - } - - - private byte[] DevuelveConsolidacionGrado( - string idPersona, - string motivo, - string texto1, - string texto2, - string fechaEfecto, - string organo, - string fechaEmision) - { - try - { - using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) - { - PERSONAS per; - var LisCumTri = new List(); - var ForCumTri = new RecTri(); - - if (!string.IsNullOrEmpty(idPersona)) - { - int iDPer = Convert.ToInt32(idPersona); - per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); - - ForCumTri.Nif = per.NIF; - ForCumTri.Apellidos = per.APELLIDOS; - ForCumTri.Nombre = per.NOMBRE; - ForCumTri.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; - ForCumTri.NRP = per.NRP; - - if (per.IDSITUACIONADMINISTRATIVARPT != null) - ForCumTri.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; - - if (per.IDCUERPORPT != null) - ForCumTri.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; - - ForCumTri.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; - ForCumTri.Localidad = per.NombrePoblacion; - ForCumTri.Provincia = per.NombreProvincia; - - var iDSitRptAct = context.ENUMERACIONES.First(x => x.CODIGO == "SITRPTMAESTRO.ACT").IDENUMERACION; - PUESTOS PuestoTrabajo = null; - - var puestoActivo = context.PUESTOS - .Where(x => x.IDPERSONAL == per.IDPERSONA && x.IDRPTNavigation.IDSITUACION == iDSitRptAct); - - if (puestoActivo.Any()) - { - PuestoTrabajo = puestoActivo.First(); - ForCumTri.DesPuesTrab = PuestoTrabajo.IDRPTDESNavigation.DENOMINACION; - } - - ForCumTri.FechaEfeEco = fechaEfecto; - - if (PuestoTrabajo != null) - { - ForCumTri.CuerpoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.CUERPO1Navigation.DESCRIPCION; - - double Especifico = double.Parse(PuestoTrabajo.IDRPTDESNavigation.ESPECIFICO.ToString()); - ForCumTri.ComEsp = Especifico.ToString("##,##0.00") + "€"; - - ForCumTri.GrupoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1; - ForCumTri.NivelPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.IDNIVEL_RPTNavigation.NIVEL1; - ForCumTri.CarOcu = PuestoTrabajo.IDOCUPACIONNavigation.DESCRIPCION; - } - - ForCumTri.texto1 = texto1; - ForCumTri.texto2 = texto2; - ForCumTri.texto3 = motivo; - } - - LisCumTri.Add(ForCumTri); - - var pl = context.PLANTILLAS.First(x => x.CODIGO == "CONGRA"); - var idPlantilla = pl.IDPLANTILLA; - - var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); - - return tsWPFCore.tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisCumTri).ToArray(); - } - } - catch (Exception) - { - return null; - } - } + // public byte[] GenerarFormulario( + // string claveFormulario, + // string idPersona, + // string Motivo, + // string texto1, + // string texto2, + // string FechaEfecto, + // string Organo, + // string FechaEmision, + // string Extra) + // { + // switch (claveFormulario) + // { + // case "TomPos": + // return DevuelveTomaPosesion(idPersona, Motivo, texto1, FechaEfecto, Organo, FechaEmision); + // case "CumTri": + // return DevuelveCumplimientoTrienios(idPersona, Motivo, texto1, FechaEfecto, Organo, FechaEmision, "RECTRI"); + // case "SolTri": + // return DevuelveCumplimientoTrienios(idPersona, Motivo, texto1, FechaEfecto, Organo, FechaEmision, "SOLTRI"); + // case "ComInt": + // return DevuelveComunicacionInterna(idPersona, texto1, texto2, FechaEmision); + // case "AcuJub": + // return DevuelveAcuerdoJubilacion(idPersona, Motivo, texto1, FechaEfecto, Organo, FechaEmision, Extra); + // case "AcuBaj": + // return DevuelveAcuerdoBaja(idPersona, Motivo, texto1, FechaEfecto, Organo, FechaEmision); + // case "AcuCes": + // return DevuelveAcuerdoCese(idPersona, Motivo, texto1, FechaEfecto, Organo, FechaEmision); + // case "ConGra": + // return DevuelveConsolidacionGrado(idPersona, Motivo, texto1, texto2, FechaEfecto, Organo, FechaEmision); + // default: + // return null; + // } + // } + + // private byte[] DevuelveTomaPosesion( + //string idPersona, + //string motivo, + //string texto1, + //string fechaEfecto, + //string organo, + //string fechaEmision) + // { + // try + // { + // using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) + // { + // PERSONAS per = new PERSONAS(); + // var LisTomPos = new List(); + // var ForTomPos = new bdAntifraude.DatRecTri.RecTri(); + + // if (!string.IsNullOrEmpty(idPersona)) + // { + // int iDPer = Convert.ToInt32(idPersona); + // per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); + + // ForTomPos.Nif = per.NIF; + // ForTomPos.Apellidos = per.APELLIDOS; + // ForTomPos.Nombre = per.NOMBRE; + // ForTomPos.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; + // ForTomPos.NRP = per.NRP; + + // if (per.IDSITUACIONADMINISTRATIVARPT != null) + // ForTomPos.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; + + // if (per.IDCUERPORPT != null) + // ForTomPos.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; + + // ForTomPos.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; + + // PUESTOS PuestoTrabajo = null; + + // var puestosPersona = context.PUESTOS.Where(x => x.IDPERSONAL == per.IDPERSONA); + // if (puestosPersona.Any()) + // { + // PuestoTrabajo = puestosPersona + // .OrderByDescending(x => x.IDRPTNavigation.F_PARLAMENTO.Value) + // .First(); + + // ForTomPos.DesPuesTrab = PuestoTrabajo.IDRPTDESNavigation.DENOMINACION; + // } + + // if (per.DEPARTAMENTOACTUAL != null) + // ForTomPos.Departamento = per.IDDEPARTAMENTONavigation.DESCRIPCION; + + // if (PuestoTrabajo != null) + // { + // ForTomPos.CuerpoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.CUERPO1Navigation.DESCRIPCION; + + // double Especifico = double.Parse(PuestoTrabajo.IDRPTDESNavigation.ESPECIFICO.ToString()); + // ForTomPos.ComEsp = Especifico.ToString("##,##0.00") + "€"; + + // ForTomPos.GrupoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1; + // ForTomPos.NivelPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.IDNIVEL_RPTNavigation.NIVEL1; + // ForTomPos.CarOcu = PuestoTrabajo.IDOCUPACIONNavigation.DESCRIPCION; + // } + + // ForTomPos.MotivoTomaPosesion = motivo; + // ForTomPos.texto1 = texto1; + // ForTomPos.FechaEfectoTomaPosesion = fechaEfecto; + // ForTomPos.OrganoCompetente = organo; + // ForTomPos.FechaEmision = fechaEmision; + // } + + // LisTomPos.Add(ForTomPos); + + // var pl = context.PLANTILLAS.First(x => x.CODIGO == "TOMPOS"); + // var idPlantilla = pl.IDPLANTILLA; + + // var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); + + // //return tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisTomPos).ToArray(); + // } + // } + // catch (Exception ex) + // { + // return null; + // } + // } + + + + // private byte[] DevuelveCumplimientoTrienios( + // string idPersona, + // string motivo, + // string texto1, + // string fechaEfecto, + // string organo, + // string fechaEmision, + // string Tipo) + // { + // try + // { + // using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) + // { + // PERSONAS per=null; + // var LisCumTri = new List(); + // var ForCumTri = new bdAntifraude.DatRecTri.RecTri(); + + // if (!string.IsNullOrEmpty(idPersona)) + // { + // int iDPer = Convert.ToInt32(idPersona); + // per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); + + // ForCumTri.Nif = per.NIF; + // ForCumTri.Apellidos = per.APELLIDOS; + // ForCumTri.Nombre = per.NOMBRE; + // ForCumTri.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; + // ForCumTri.NRP = per.NRP; + + // if (per.IDSITUACIONADMINISTRATIVARPT != null) + // ForCumTri.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; + + // if (per.IDCUERPORPT != null) + // ForCumTri.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; + + // ForCumTri.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; + // ForCumTri.Localidad = per.NombrePoblacion; + // ForCumTri.Provincia = per.NombreProvincia; + + // PUESTOS PuestoTrabajo = null; + // var iDSitRptAct = context.ENUMERACIONES.First(x => x.CODIGO == "SITRPTMAESTRO.ACT").IDENUMERACION; + + // var puestosActivos = context.PUESTOS + // .Where(x => x.IDPERSONAL == per.IDPERSONA && x.IDRPTNavigation.IDSITUACION == iDSitRptAct); + + // if (puestosActivos.Any()) + // { + // PuestoTrabajo = puestosActivos.First(); + // ForCumTri.DesPuesTrab = PuestoTrabajo.IDRPTDESNavigation.DENOMINACION; + // } + + // if (per.FECHACUMPLIMIENTOPROXTRIENIO.HasValue) + // { + // //Truncamos la fecha a los primeros 10 caracteres + // var fechaProx = per.FECHACUMPLIMIENTOPROXTRIENIO.Value; + // ForCumTri.FecVenTri = fechaProx.ToString("yyyy-MM-dd").Substring(0, 10); + + // if (fechaProx.Day == 1) + // { + // ForCumTri.FechaEfeEco = fechaProx.ToString("yyyy-MM-dd").Substring(0, 10); + // } + // else + // { + // var Fechaefe = fechaProx.AddMonths(1); + // var primerDiaMesSiguiente = new DateTime(Fechaefe.Year, Fechaefe.Month, 1); + // ForCumTri.FechaEfeEco = primerDiaMesSiguiente.ToString("yyyy-MM-dd").Substring(0, 10); + // } + + // ForCumTri.FecCumProTri = fechaProx.AddYears(3).ToString("yyyy-MM-dd").Substring(0, 10); + // } + + // //Calcular trienios + // if (per.TRIENIOS.Any()) + // { + // foreach (var trienio in per.TRIENIOS.ToList()) + // { + // var grupoTrim = trienio.GRUPO.Trim(); + // switch (grupoTrim) + // { + // case "A1": + // case "I": + // ForCumTri.TriA1 = trienio.TC; + // if (per.GRUPOFUNCIONARIODESCRIPCION == "A1") + // ForCumTri.TriA1 = (int)(trienio.TC + trienio.TOA + 1); + // break; + // case "A2": + // case "II": + // ForCumTri.TriA2 = trienio.TC; + // if (per.GRUPOFUNCIONARIODESCRIPCION == "A2") + // ForCumTri.TriA2 = trienio.TC + trienio.TOA + 1; + // break; + // case "C1": + // case "III": + // ForCumTri.TriC1 = trienio.TC; + // if (per.GRUPOFUNCIONARIODESCRIPCION == "C1") + // ForCumTri.TriC1 = trienio.TC + trienio.TOA + 1; + // break; + // case "C2": + // case "IV": + // ForCumTri.TriC2 = trienio.TC; + // if (per.GRUPOFUNCIONARIODESCRIPCION == "C2") + // ForCumTri.TriC2 = trienio.TC + trienio.TOA + 1; + // break; + // case "E": + // case "V": + // ForCumTri.TriE = trienio.TC; + // if (per.GRUPOFUNCIONARIODESCRIPCION == "E") + // ForCumTri.TriE = trienio.TC + trienio.TOA + 1; + // break; + // } + // } + // } + // else + // { + // //No hay trienios, se asigna 1 según el grupo + // if (!string.IsNullOrWhiteSpace(per.GRUPOFUNCIONARIODESCRIPCION)) + // { + // switch (per.GRUPOFUNCIONARIODESCRIPCION.Trim()) + // { + // case "A1": + // ForCumTri.TriA1 = 1; + // break; + // case "A2": + // ForCumTri.TriA2 = 1; + // break; + // case "C1": + // ForCumTri.TriC1 = 1; + // break; + // case "C2": + // ForCumTri.TriC2 = 1; + // break; + // case "E": + // ForCumTri.TriE = 1; + // break; + // } + // } + // else if (PuestoTrabajo != null) + // { + // //Si no hay grupo en persona, se toma del puesto de trabajo + // var grupoPT = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1.Trim(); + // switch (grupoPT) + // { + // case "A1": + // ForCumTri.TriA1 = 1; + // break; + // case "A2": + // ForCumTri.TriA2 = 1; + // break; + // case "C1": + // ForCumTri.TriC1 = 1; + // break; + // case "C2": + // ForCumTri.TriC2 = 1; + // break; + // case "E": + // ForCumTri.TriE = 1; + // break; + // } + // } + // } + + // //Departamento y otros datos del puesto + // if (PuestoTrabajo != null) + // { + // ForCumTri.Departamento = PuestoTrabajo.IDRPTDESNavigation.DEPARTAMENTO; + // ForCumTri.CuerpoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.CUERPO1Navigation.DESCRIPCION; + + // double Especifico = double.Parse(PuestoTrabajo.IDRPTDESNavigation.ESPECIFICO.ToString()); + // ForCumTri.ComEsp = Especifico.ToString("##,##0.00") + "€"; + + // ForCumTri.GrupoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1; + // ForCumTri.NivelPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.IDNIVEL_RPTNavigation.NIVEL1; + + // if (per.NIVEL != null) + // ForCumTri.Nivel = per.IDNIVELRPTNavigation.NIVEL1; + + // ForCumTri.CarOcu = PuestoTrabajo.IDOCUPACIONNavigation.DESCRIPCION; + // } + + // ForCumTri.MotivoTomaPosesion = motivo; + // ForCumTri.texto1 = texto1; + + // if (!string.IsNullOrEmpty(fechaEfecto) && fechaEfecto.Length >= 10) + // ForCumTri.FechaEfectoTomaPosesion = fechaEfecto.Substring(0, 10); + + // ForCumTri.OrganoCompetente = organo; + // ForCumTri.FechaEmision = fechaEmision; + + // ForCumTri.TolTri = per.TRIENIOS.Sum(x => x.TC) + per.TRIENIOS.Sum(x => x.TOA); + // ForCumTri.texto1 = (ForCumTri.TolTri + 1).ToString(); + + // if (per.FECHACUMPLIMIENTOPROXTRIENIO.HasValue) + // { + // var fechaProx = per.FECHACUMPLIMIENTOPROXTRIENIO.Value; + // ForCumTri.texto2 = fechaProx.Day.ToString().PadLeft(2, '0') + " de " + + // tsUtilidades.Extensiones.DateTimeExtensions.MesCastellano(fechaProx) + " de " + + // fechaProx.Year.ToString(); + // } + // } + + // LisCumTri.Add(ForCumTri); + + // if (per != null && per.IDADSCRIPCIONRPTNavigation.DESCRIPCION == "LABORAL") + // { + // switch (ForCumTri.Grupo) + // { + // case "A1": + // ForCumTri.Grupo = "I"; + // break; + // case "A2": + // ForCumTri.Grupo = "II"; + // break; + // case "C1": + // ForCumTri.Grupo = "III"; + // break; + // case "C2": + // ForCumTri.Grupo = "IV"; + // break; + // case "E": + // ForCumTri.Grupo = "V"; + // break; + // } + // } + + // PLANTILLAS pl; + + // if (Tipo == "RECTRI") + // { + // pl = context.PLANTILLAS.First(x => x.CODIGO == "RECTRI"); + // if (per.IDADSCRIPCIONRPTNavigation.DESCRIPCION == "LABORAL") + // pl = context.PLANTILLAS.First(x => x.CODIGO == "RECTRIL"); + // } + // else + // { + // pl = context.PLANTILLAS.First(x => x.CODIGO == "RECTRI4"); + // if (per.IDADSCRIPCIONRPTNavigation.DESCRIPCION == "LABORAL") + // pl = context.PLANTILLAS.First(x => x.CODIGO == "RECTRI4L"); + // } + + // var idPlantilla = pl.IDPLANTILLA; + // var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); + + // //return tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisCumTri).ToArray(); + // } + // } + // catch (Exception ex) + // { + // return null; + // } + // } + + + // private byte[] DevuelveComunicacionInterna( + // string idPersona, + // string texto1, + // string texto2, + // string fechaEmision) + // { + // try + // { + // using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) + // { + // PERSONAS per; + // var LisCumTri = new List(); + // var ForCumTri = new bdAntifraude.DatRecTri.RecTri(); + + // if (!string.IsNullOrEmpty(idPersona)) + // { + // int iDPer = Convert.ToInt32(idPersona); + // per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); + + // ForCumTri.Nif = per.NIF; + // ForCumTri.Apellidos = per.APELLIDOS; + // ForCumTri.Nombre = per.NOMBRE; + // ForCumTri.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; + // ForCumTri.NRP = per.NRP; + + // if (per.IDSITUACIONADMINISTRATIVARPT != null) + // ForCumTri.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; + + // if (per.IDCUERPORPT != null) + // ForCumTri.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; + + // ForCumTri.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; + // ForCumTri.Localidad = per.NombrePoblacion; + // ForCumTri.Provincia = per.NombreProvincia; + + // if (per.IDDEPARTAMENTO != null) + // ForCumTri.Departamento = per.IDDEPARTAMENTONavigation.DESCRIPCION; + + // ForCumTri.FechaEmision = fechaEmision; + // ForCumTri.texto1 = texto1; + // ForCumTri.texto2 = texto2; + // } + + // LisCumTri.Add(ForCumTri); + + // var pl = context.PLANTILLAS.First(x => x.CODIGO == "COMUNI"); + // var idPlantilla = pl.IDPLANTILLA; + + // var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); + + // //return tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisCumTri).ToArray(); + // } + // } + // catch (Exception ex) + // { + // return null; + // } + // } + + + // private byte[] DevuelveAcuerdoJubilacion( + //string idPersona, + //string motivo, + //string texto1, + //string fechaEfecto, + //string organo, + //string fechaEmision, + //string fechaEfe) + // { + // try + // { + // using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) + // { + // var LisAcuJub = new List(); + // var ForAcuJub = new RecTri(); + + // if (!string.IsNullOrEmpty(idPersona)) + // { + // int iDPer = Convert.ToInt32(idPersona); + // var per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); + + // int Años = 0; + // if (per.TRIENIOS.Any()) + // { + // Años = (int)per.TRIENIOS.Sum(x => x.TC + x.TOA) * 3; + // } + + // var Fechafin = tsUtilidades.Extensiones.DateTimeExtensions.FechaHoraStringADate(fechaEfe); + + // if (per.FECHACUMPLIMIENTOPROXTRIENIO.HasValue && Fechafin.HasValue) + // { + // var TiemSer = bdAntifraude.Utilidades.AnosMesesDias(per.FECHACUMPLIMIENTOPROXTRIENIO.Value.AddYears(-3), Fechafin.Value); + + // if (TiemSer != null) + // { + // TiemSer.Anos += Años; + + // //Construcción del texto1 según años, meses, días + // string tiempo = ""; + // if (TiemSer.Anos == 1) tiempo += TiemSer.Anos.ToString() + " AÑO "; + // else if (TiemSer.Anos > 1) tiempo += TiemSer.Anos.ToString() + " AÑOS "; + + // if (TiemSer.Meses == 1) tiempo += TiemSer.Meses.ToString() + " MES "; + // else if (TiemSer.Meses > 1) tiempo += TiemSer.Meses.ToString() + " MESES "; + + // if (TiemSer.Dias == 1) tiempo += TiemSer.Dias.ToString() + " DIA "; + // else if (TiemSer.Dias > 1) tiempo += TiemSer.Dias.ToString() + " DIAS "; + + // ForAcuJub.texto1 = tiempo.Trim(); + // } + // } + + // ForAcuJub.Nif = per.NIF; + // ForAcuJub.Apellidos = per.APELLIDOS; + // ForAcuJub.Nombre = per.NOMBRE; + // ForAcuJub.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; + // ForAcuJub.NRP = per.NRP; + + // if (per.IDSITUACIONADMINISTRATIVARPT != null) + // ForAcuJub.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; + + // if (per.IDCUERPORPT != null) + // ForAcuJub.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; + + // ForAcuJub.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; + + // var puestosPersona = context.PUESTOS.Where(x => x.IDPERSONAL == per.IDPERSONA); + // PUESTOS PuestoTrabajo = null; + + // if (puestosPersona.Any()) + // { + // PuestoTrabajo = puestosPersona + // .OrderByDescending(x => x.IDRPTNavigation.F_PARLAMENTO.Value) + // .First(); + // ForAcuJub.DesPuesTrab = PuestoTrabajo.IDRPTDESNavigation.DENOMINACION; + // } + + // if (per.IDDEPARTAMENTO != null) + // ForAcuJub.Departamento = per.IDDEPARTAMENTONavigation.DESCRIPCION; + + // if (PuestoTrabajo != null) + // { + // ForAcuJub.CuerpoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.CUERPO1Navigation.DESCRIPCION; + + // double Especifico = double.Parse(PuestoTrabajo.IDRPTDESNavigation.ESPECIFICO.ToString()); + // ForAcuJub.ComEsp = Especifico.ToString("##,##0.00") + "€"; + + // ForAcuJub.GrupoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1; + // ForAcuJub.NivelPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.IDNIVEL_RPTNavigation.NIVEL1; + // ForAcuJub.CarOcu = PuestoTrabajo.IDOCUPACIONNavigation.DESCRIPCION; + // } + + // ForAcuJub.MotivoTomaPosesion = motivo; + // ForAcuJub.texto3 = motivo; + + // if (per.FECHANACIMIENTO.HasValue) + // { + // var fechaNac = per.FECHANACIMIENTO.Value; + // string dia = fechaNac.Day.ToString().PadLeft(2, '0'); + // string mes = tsUtilidades.Extensiones.DateTimeExtensions.MesCastellano(fechaNac); + // string anio = fechaNac.Year.ToString(); + // ForAcuJub.FecVenTri = $"{dia} de {mes} de {anio}"; + // } + + // ForAcuJub.FechaEfeEco = fechaEfecto; + // ForAcuJub.OrganoCompetente = organo; + // } + + // LisAcuJub.Add(ForAcuJub); + + // var pl = context.PLANTILLAS.First(x => x.CODIGO == "ACUJUBI"); + // var idPlantilla = pl.IDPLANTILLA; + + // var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); + + // //return tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisAcuJub).ToArray(); + // } + // } + // catch (Exception ex) + // { + // return null; + // } + // } + + + + // private byte[] DevuelveAcuerdoBaja( + // string idPersona, + // string motivo, + // string texto1, + // string fechaEfecto, + // string organo, + // string fechaEmision) + // { + // try + // { + // using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) + // { + // PERSONAS per; + // var LisAcuJub = new List(); + // var ForAcuJub = new RecTri(); + + // if (!string.IsNullOrEmpty(idPersona)) + // { + // int iDPer = Convert.ToInt32(idPersona); + // per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); + + // ForAcuJub.Nif = per.NIF; + // ForAcuJub.Apellidos = per.APELLIDOS; + // ForAcuJub.Nombre = per.NOMBRE; + // ForAcuJub.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; + // ForAcuJub.NRP = per.NRP; + + // if (per.IDSITUACIONADMINISTRATIVARPT != null) + // ForAcuJub.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; + + // if (per.IDCUERPORPT != null) + // ForAcuJub.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; + + // ForAcuJub.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; + + // PUESTOS PuestoTrabajo = null; + // var puestosPersona = context.PUESTOS.Where(x => x.IDPERSONAL == per.IDPERSONA); + // if (puestosPersona.Any()) + // { + // PuestoTrabajo = puestosPersona + // .OrderByDescending(x => x.IDRPTNavigation.F_PARLAMENTO.Value) + // .First(); + // ForAcuJub.DesPuesTrab = PuestoTrabajo.IDRPTDESNavigation.DENOMINACION; + + // if (per.IDDEPARTAMENTO != null) + // ForAcuJub.Departamento = per.IDDEPARTAMENTONavigation.DESCRIPCION; + + // ForAcuJub.CuerpoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.CUERPO1Navigation.DESCRIPCION; + + // double Especifico = double.Parse(PuestoTrabajo.IDRPTDESNavigation.ESPECIFICO.ToString()); + // ForAcuJub.ComEsp = Especifico.ToString("##,##0.00") + "€"; + + // ForAcuJub.GrupoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1; + // ForAcuJub.NivelPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.IDNIVEL_RPTNavigation.NIVEL1; + // ForAcuJub.CarOcu = PuestoTrabajo.IDOCUPACIONNavigation.DESCRIPCION; + // } + + // ForAcuJub.MotivoTomaPosesion = motivo; + // ForAcuJub.texto1 = texto1; + // ForAcuJub.FechaEfectoTomaPosesion = fechaEfecto; + // ForAcuJub.FechaEfeEco = fechaEfecto; + // ForAcuJub.OrganoCompetente = organo; + // ForAcuJub.FecVenTri = fechaEmision; + // } + + // LisAcuJub.Add(ForAcuJub); + + // var pl = context.PLANTILLAS.First(x => x.CODIGO == "ACUBAJA"); + // var idPlantilla = pl.IDPLANTILLA; + + // var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); + + // return tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisAcuJub).ToArray(); + // } + // } + // catch (Exception) + // { + // return null; + // } + // } + + + // private byte[] DevuelveAcuerdoCese( + // string idPersona, + // string motivo, + // string texto1, + // string fechaEfecto, + // string organo, + // string fechaEmision) + // { + // try + // { + // using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) + // { + // PERSONAS per; + // var LisAcuJub = new List(); + // var ForAcuJub = new RecTri(); + + // if (!string.IsNullOrEmpty(idPersona)) + // { + // int iDPer = Convert.ToInt32(idPersona); + // per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); + + // ForAcuJub.Nif = per.NIF; + // ForAcuJub.Apellidos = per.APELLIDOS; + // ForAcuJub.Nombre = per.NOMBRE; + // ForAcuJub.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; + // ForAcuJub.NRP = per.NRP; + + // if (per.IDSITUACIONADMINISTRATIVARPT != null) + // ForAcuJub.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; + + // if (per.IDCUERPORPT != null) + // ForAcuJub.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; + + // ForAcuJub.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; + + // PUESTOS PuestoTrabajo = null; + // var puestosPersona = context.PUESTOS.Where(x => x.IDPERSONAL == per.IDPERSONA); + // if (puestosPersona.Any()) + // { + // PuestoTrabajo = puestosPersona + // .OrderByDescending(x => x.IDRPTNavigation.F_PARLAMENTO.Value) + // .First(); + + // ForAcuJub.DesPuesTrab = PuestoTrabajo.IDRPTDESNavigation.DENOMINACION; + // } + + // if (per.IDDEPARTAMENTO != null) + // ForAcuJub.Departamento = per.IDDEPARTAMENTONavigation.DESCRIPCION; + + // if (PuestoTrabajo != null) + // { + // ForAcuJub.CuerpoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.CUERPO1Navigation.DESCRIPCION; + + // double Especifico = double.Parse(PuestoTrabajo.IDRPTDESNavigation.ESPECIFICO.ToString()); + // ForAcuJub.ComEsp = Especifico.ToString("##,##0.00") + "€"; + + // ForAcuJub.GrupoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1; + // ForAcuJub.NivelPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.IDNIVEL_RPTNavigation.NIVEL1; + // ForAcuJub.CarOcu = PuestoTrabajo.IDOCUPACIONNavigation.DESCRIPCION; + // } + + // ForAcuJub.MotivoTomaPosesion = motivo; + // ForAcuJub.texto1 = texto1; + // ForAcuJub.FechaEfectoTomaPosesion = fechaEfecto; + // ForAcuJub.FechaEfeEco = fechaEfecto; + // ForAcuJub.OrganoCompetente = organo; + // ForAcuJub.FecVenTri = fechaEmision; + // } + + // LisAcuJub.Add(ForAcuJub); + + // var pl = context.PLANTILLAS.First(x => x.CODIGO == "ACUCESE"); + // var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); + + // return tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisAcuJub).ToArray(); + + // } + // } + // catch (Exception) + // { + // return null; + // } + // } + + + // private byte[] DevuelveConsolidacionGrado( + // string idPersona, + // string motivo, + // string texto1, + // string texto2, + // string fechaEfecto, + // string organo, + // string fechaEmision) + // { + // try + // { + // using (var context = tsGestionAntifraude.NuevoContexto(SoloLectura: true, UseLazyLoadingProxies: false)) + // { + // PERSONAS per; + // var LisCumTri = new List(); + // var ForCumTri = new RecTri(); + + // if (!string.IsNullOrEmpty(idPersona)) + // { + // int iDPer = Convert.ToInt32(idPersona); + // per = context.PERSONAS.First(x => x.IDPERSONA == iDPer); + + // ForCumTri.Nif = per.NIF; + // ForCumTri.Apellidos = per.APELLIDOS; + // ForCumTri.Nombre = per.NOMBRE; + // ForCumTri.Adscripcion = per.IDADSCRIPCIONRPTNavigation.DESCRIPCION; + // ForCumTri.NRP = per.NRP; + + // if (per.IDSITUACIONADMINISTRATIVARPT != null) + // ForCumTri.SitAdm = per.IDSITUACIONADMINISTRATIVARPTNavigation.LITERAL_SITUACION; + + // if (per.IDCUERPORPT != null) + // ForCumTri.Cuerpo = per.IDCUERPORPTNavigation.DESCRIPCION; + + // ForCumTri.Grupo = per.GRUPOFUNCIONARIODESCRIPCION; + // ForCumTri.Localidad = per.NombrePoblacion; + // ForCumTri.Provincia = per.NombreProvincia; + + // var iDSitRptAct = context.ENUMERACIONES.First(x => x.CODIGO == "SITRPTMAESTRO.ACT").IDENUMERACION; + // PUESTOS PuestoTrabajo = null; + + // var puestoActivo = context.PUESTOS + // .Where(x => x.IDPERSONAL == per.IDPERSONA && x.IDRPTNavigation.IDSITUACION == iDSitRptAct); + + // if (puestoActivo.Any()) + // { + // PuestoTrabajo = puestoActivo.First(); + // ForCumTri.DesPuesTrab = PuestoTrabajo.IDRPTDESNavigation.DENOMINACION; + // } + + // ForCumTri.FechaEfeEco = fechaEfecto; + + // if (PuestoTrabajo != null) + // { + // ForCumTri.CuerpoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.CUERPO1Navigation.DESCRIPCION; + + // double Especifico = double.Parse(PuestoTrabajo.IDRPTDESNavigation.ESPECIFICO.ToString()); + // ForCumTri.ComEsp = Especifico.ToString("##,##0.00") + "€"; + + // ForCumTri.GrupoPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.GRUPO1Navigation.GRUPO1; + // ForCumTri.NivelPuestoTrabajo = PuestoTrabajo.IDRPTDESNavigation.IDNIVEL_RPTNavigation.NIVEL1; + // ForCumTri.CarOcu = PuestoTrabajo.IDOCUPACIONNavigation.DESCRIPCION; + // } + + // ForCumTri.texto1 = texto1; + // ForCumTri.texto2 = texto2; + // ForCumTri.texto3 = motivo; + // } + + // LisCumTri.Add(ForCumTri); + + // var pl = context.PLANTILLAS.First(x => x.CODIGO == "CONGRA"); + // var idPlantilla = pl.IDPLANTILLA; + + // var sFicherohtmlTmp = tsUtilidades.Utilidades.ObtieneFicheroAleatorio("pdf"); + + // return tsXtraReport.ExportarAPDF(pl.IDFICHERONavigation.FICHERO, LisCumTri).ToArray(); + // } + // } + // catch (Exception) + // { + // return null; + // } + // } } } diff --git a/Antifraude.Net/SwaggerAntifraude/Servicios/tsXtraReport.cs b/Antifraude.Net/SwaggerAntifraude/Servicios/tsXtraReport.cs new file mode 100644 index 0000000..34bdcf6 --- /dev/null +++ b/Antifraude.Net/SwaggerAntifraude/Servicios/tsXtraReport.cs @@ -0,0 +1,39 @@ +using DevExpress.Data.Extensions; +using DevExpress.DataProcessing.InMemoryDataProcessor; +using System.Linq; +using DevExpress.XtraReports.Parameters; +namespace SwaggerAntifraude.Servicios +{ + public class tsXtraReport + { + public static void ExportarAPDF(byte[] Plantilla, object Datos, string FicheroPDF) + { + DevExpress.XtraReports.UI.XtraReport xr; + string s = System.Text.Encoding.UTF8.GetString(Plantilla); + using (StreamWriter sw = new StreamWriter(new MemoryStream())) + { + sw.Write(s); + sw.Flush(); + + xr = DevExpress.XtraReports.UI.XtraReport.FromStream(sw.BaseStream, true); + } + try + { + + var pr = xr.Parameters.Cast() + .FirstOrDefault(p => p.Name == "Fecha"); + + + pr.Value = DateTime.Now; + pr.Visible = false; + } + catch (Exception ex) + { + } + xr.DataSource = Datos; + xr.CreateDocument(); + xr.ExportToPdf(FicheroPDF); + } + + } +} diff --git a/Antifraude.Net/SwaggerAntifraude/SwaggerAntifraude.csproj b/Antifraude.Net/SwaggerAntifraude/SwaggerAntifraude.csproj index 11c1674..4620a8b 100644 --- a/Antifraude.Net/SwaggerAntifraude/SwaggerAntifraude.csproj +++ b/Antifraude.Net/SwaggerAntifraude/SwaggerAntifraude.csproj @@ -14,6 +14,10 @@ + + + + @@ -21,6 +25,8 @@ + + @@ -31,9 +37,6 @@ ..\..\..\..\Comun\tsUtilidades\bin\Debug\net8.0\tsUtilidades.dll - - ..\..\..\..\Comun\tsWPFCore\bin\Debug\net8.0-windows\tsWPFCore.dll - diff --git a/Antifraude.Net/bdAntifraude/bdAntifraude.csproj b/Antifraude.Net/bdAntifraude/bdAntifraude.csproj index 70a7952..dca36ae 100644 --- a/Antifraude.Net/bdAntifraude/bdAntifraude.csproj +++ b/Antifraude.Net/bdAntifraude/bdAntifraude.csproj @@ -23,6 +23,7 @@ + @@ -30,9 +31,6 @@ ..\..\..\..\Comun\tsEFCore7\bin\Debug\net8.0\tsEFCore7.dll - - ..\..\..\..\Comun\tsl5\bin\Debug\tsl5.dll - ..\..\..\..\Comun\tsUtilidades\bin\Debug\net8.0\tsUtilidades.dll