From fbe9373dd081ca46e6b50d39d64177c0f1b38be5 Mon Sep 17 00:00:00 2001 From: Andres Ramos Date: Thu, 6 Apr 2023 02:00:21 -0500 Subject: [PATCH 1/7] feat: agrega campo Uuid a Solicitud --- Core.Domain/Entities/Solicitud.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Core.Domain/Entities/Solicitud.cs b/Core.Domain/Entities/Solicitud.cs index 49e873a..c81b663 100644 --- a/Core.Domain/Entities/Solicitud.cs +++ b/Core.Domain/Entities/Solicitud.cs @@ -21,6 +21,7 @@ public Solicitud() public string RfcReceptor { get; set; } public string RfcSolicitante { get; set; } public string TipoSolicitud { get; set; } + public string Uuid { get; set; } public IEnumerable Receptores => RfcReceptor.Split('|'); @@ -53,7 +54,8 @@ public static Solicitud CreateNew(int empresaId, string rfcEmisor, string rfcReceptor, string rfcSolicitante, - string tipoSolicitud) + string tipoSolicitud, + string uuid) { var solicitud = new Solicitud { @@ -65,8 +67,10 @@ public static Solicitud CreateNew(int empresaId, RfcEmisor = rfcEmisor, RfcReceptor = rfcReceptor, RfcSolicitante = rfcSolicitante, - TipoSolicitud = tipoSolicitud + TipoSolicitud = tipoSolicitud, + Uuid = uuid }; + return solicitud; } } From 500ffc799ae4c7ca4e9f9c8df47e73df1dfeb8b3 Mon Sep 17 00:00:00 2001 From: Andres Ramos Date: Thu, 6 Apr 2023 02:01:12 -0500 Subject: [PATCH 2/7] feat: agrega campo Uuid a CrearSolicitudCommand --- .../Commands/CrearSolicitud/CrearSolicitudCommand.cs | 3 ++- .../Commands/CrearSolicitud/CrearSolicitudCommandHandler.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Core.Application/Solicitudes/Commands/CrearSolicitud/CrearSolicitudCommand.cs b/Core.Application/Solicitudes/Commands/CrearSolicitud/CrearSolicitudCommand.cs index fa383c6..288b7f0 100644 --- a/Core.Application/Solicitudes/Commands/CrearSolicitud/CrearSolicitudCommand.cs +++ b/Core.Application/Solicitudes/Commands/CrearSolicitud/CrearSolicitudCommand.cs @@ -9,4 +9,5 @@ public sealed record CrearSolicitudCommand(int EmpresaId, string RfcEmisor, string RfcReceptor, string RfcSolicitante, - string TipoSolicitud) : IRequest; + string TipoSolicitud, + string Uuid) : IRequest; diff --git a/Core.Application/Solicitudes/Commands/CrearSolicitud/CrearSolicitudCommandHandler.cs b/Core.Application/Solicitudes/Commands/CrearSolicitud/CrearSolicitudCommandHandler.cs index 2e4b93e..014ddc0 100644 --- a/Core.Application/Solicitudes/Commands/CrearSolicitud/CrearSolicitudCommandHandler.cs +++ b/Core.Application/Solicitudes/Commands/CrearSolicitud/CrearSolicitudCommandHandler.cs @@ -34,7 +34,8 @@ public async Task Handle(CrearSolicitudCommand request, CancellationToken c request.RfcEmisor, request.RfcReceptor, request.RfcSolicitante, - request.TipoSolicitud); + request.TipoSolicitud, + request.Uuid); _context.Entry(nuevaSolicitud).State = EntityState.Added; From c8fd626fae4c09ff00f133ea37cb79495920835b Mon Sep 17 00:00:00 2001 From: Andres Ramos Date: Thu, 6 Apr 2023 02:02:26 -0500 Subject: [PATCH 3/7] feat: agrega campo Uuid a NuevaSolicitudViewModel --- .../ViewModels/Solicitudes/NuevaSolicitudViewModel.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Presentation.WpfApp/ViewModels/Solicitudes/NuevaSolicitudViewModel.cs b/Presentation.WpfApp/ViewModels/Solicitudes/NuevaSolicitudViewModel.cs index 597ae29..30aa72a 100644 --- a/Presentation.WpfApp/ViewModels/Solicitudes/NuevaSolicitudViewModel.cs +++ b/Presentation.WpfApp/ViewModels/Solicitudes/NuevaSolicitudViewModel.cs @@ -25,6 +25,7 @@ public sealed class NuevaSolicitudViewModel : Screen private string _rfcSolicitante = string.Empty; private TipoRangoFechaEnum _tipoRangoFechaSeleccionado; private TipoSolicitudDto _tipoSolicitudSeleccionado; + private string _uuid; public NuevaSolicitudViewModel(ConfiguracionAplicacion configuracionAplicacion, IMediator mediator, @@ -183,6 +184,12 @@ public TipoSolicitudDto TipoSolicitudSeleccionado } } + public string Uuid + { + get => _uuid; + set => Set(ref _uuid, value); + } + public async Task InicializarAsync() { RfcReceptor = _configuracionAplicacion.ConfiguracionGeneral.CertificadoSat.Rfc; @@ -208,7 +215,8 @@ await _mediator.Send(new CrearSolicitudCommand(_configuracionAplicacion.Empresa. RfcEmisor, RfcReceptor, RfcSolicitante, - TipoSolicitudSeleccionado.Name)); + TipoSolicitudSeleccionado.Name, + Uuid)); await TryCloseAsync(); } catch (Exception e) From 4334c72c67a77e5e364992d47399dc654a8d5ed3 Mon Sep 17 00:00:00 2001 From: Andres Ramos Date: Thu, 6 Apr 2023 02:03:49 -0500 Subject: [PATCH 4/7] feat: agrega campo Uuid a CrearCommandOptions --- Presentation.ConsoleApp/Models/CrearCommandOptions.cs | 1 + Presentation.ConsoleApp/Program.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Presentation.ConsoleApp/Models/CrearCommandOptions.cs b/Presentation.ConsoleApp/Models/CrearCommandOptions.cs index ee7d79e..899db2c 100644 --- a/Presentation.ConsoleApp/Models/CrearCommandOptions.cs +++ b/Presentation.ConsoleApp/Models/CrearCommandOptions.cs @@ -11,5 +11,6 @@ public class CrearCommandOptions public DateTime FechaInicio { get; set; } public DateTime FechaFin { get; set; } public TipoSolicitudEnum TipoSolicitud { get; set; } + public string Uuid { get; set; } public bool Procesar { get; set; } } diff --git a/Presentation.ConsoleApp/Program.cs b/Presentation.ConsoleApp/Program.cs index c39899f..01fa393 100644 --- a/Presentation.ConsoleApp/Program.cs +++ b/Presentation.ConsoleApp/Program.cs @@ -168,7 +168,8 @@ await mediator.Send(new ValidarCredencialesUsuarioQuery(crearCommandOptions.Usua rfcEmisor, rfcReceptor, configuracionEmpresa.CertificadoSat.Rfc, - "CFDI")); + "CFDI", + crearCommandOptions.Uuid)); if (solicitudId != 0 && crearCommandOptions.Procesar) { From e3c6f037eece41b0d4cd4ea93529b4e2332b6bdb Mon Sep 17 00:00:00 2001 From: Andres Ramos Date: Thu, 6 Apr 2023 02:05:18 -0500 Subject: [PATCH 5/7] feat: agrega campo Uuid a NuevaSolicitudView --- .../Views/Solicitudes/NuevaSolicitudView.xaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Presentation.WpfApp/Views/Solicitudes/NuevaSolicitudView.xaml b/Presentation.WpfApp/Views/Solicitudes/NuevaSolicitudView.xaml index 5337b3c..632a842 100644 --- a/Presentation.WpfApp/Views/Solicitudes/NuevaSolicitudView.xaml +++ b/Presentation.WpfApp/Views/Solicitudes/NuevaSolicitudView.xaml @@ -50,6 +50,7 @@ + @@ -171,6 +172,18 @@ DisplayMemberPath="Name" VerticalAlignment="Center" Margin="5" /> +